Update dependency phaser to v4#3786
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
c4ae4e7 to
cb11d55
Compare
Coverage Report for CI Build 25510774887Coverage remained the same at 41.559%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
7f43b07 to
a291e66
Compare
9927f42 to
638bae0
Compare
2840c80 to
72482bc
Compare
e1e3240 to
dcc88bf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
~3.90.0→~4.2.0Release Notes
phaserjs/phaser (phaser)
v4.2.0: Phaser v4.2.0Compare Source
Version 4.2.0 - Giedi - 19th June 2026
New Features
render.alphaStrategy: hint to shaders to handle alpha in different ways.render.stencil: disable stencil buffer creation in a game, saving memory.render.stencilAlphaStrategy: set the default alpha strategy used withinStencilobjects, where regular alpha does nothing.CustomContextgame object is a container which can modify theDrawingContextat render time. This is an advanced rendering technique which reaches into the deep settings of the renderer. Potential uses include:Mesh2Dgame object renders textured triangles. It batches with regular sprites.Mesh2D#buildOrderedIndicesprecomputes an optimized index list (Mesh2D#indicesOrdered) which arranges triangles into quad-forming pairs, synthesizing degenerate triangles where a triangle has no edge-sharing partner. You choose the optimization strategy (0fast,1medium,2high), paying the cost once when the topology is stable. UseMesh2D#useOrderedIndices(andMesh2D#setUseOrderedIndices) to toggle between the ordered and unordered lists without rebuilding.Mesh2D#renderAsTriangles(andMesh2D#setRenderAsTriangles) renders the mesh as individual triangles via the newBatchHandlerTrirender node, which is suitable for dynamic topology that cannot be optimized into quads.BatchHandlerTrirender node draws individual textured triangles (gl.TRIANGLES) as a batch. It extendsBatchHandlerQuad, reusing its shader, vertex layout, and texture handling, and adds abatchTrianglesmethod which accepts vertex and index arrays directly.TransformerVertexrender node now splits its per-vertexrunintosetupMatrix(build the transform matrix once per GameObject) andtransformVertex(project a single vertex with the cached matrix). Mesh rendering uses this to avoid rebuilding the transform matrix for every vertex.runis unchanged for existing callers.Stencilgame object is a container whose contents modify the stencil buffer. This is a fast way to persistently mask the game canvas. There are many ways to combine stencils. The default approach is to add layers to the stencil mask.addLayer,subtractLayer,clear, andclearRegion. Add and subtract can be inverted.StencilReferencegame object re-renders a targetStencilwith different settings. This is useful for removing or reusing stencil geometry.AlphaStrategysetting used in the render system allows you to use GLSLdiscardinstead of alpha in many shaders. This is inefficient, but is useful for some effects and situations.filtersForceComposite) to run graphics through a compatible shader.keep: use alpha as normal.dither: use a dithering algorithm to select pixels to discard.threshold: discard all pixels below a certain alpha.BatchHandlerrender node now has a config option fortopology, allowing extended nodes to opt into different triangulation modes.BatchHandlerTrirender node renders textured triangles. It is used byMesh2Din triangle rendering mode. This can be more efficient than attempting to compile triangles into quads, which is the default strategy.DrawingContextadds more controls:WebGLGlobalWrappernow handles stencil write mask.WebGLStencilParametersFactorynow takes an extrawriteMaskparameter.TintModes.MULTIPLY_TWOis a new tint mode which uses a secondary color. This can create powerful new tint effects, such as fire or inversion.ApplyTintaddition has been changed. TheinTintEffectshader attribute has changed from afloatto avec4, and its encoding has changed from a float32 to four uint8s. This should only affect deep uses of the render system.tint2TopLeftetc), and have a new methodsetTint2(). Additionally, the Mesh2D and Tile objects support constant tint viatint2. (TilemapGPULayer does not support tinting on tiles.)Timestep#setFPSLimitmethod changes the frame rate at runtime. This method updates derived properties, making it safer than manually adjustingTimestep#fpsLimit.New Feature: Cone Lights
Cone lights are standard Phaser dynamic lights restricted to a directional cone. They are useful for flashlights, lantern beams, vision cones, headlights, searchlights, and other focal light sources.
Cone lights run through the existing WebGL lighting shader. They do not require a mask, a second Camera, or rendering the map twice. Any Game Object that already works with Phaser lighting can be lit by a cone light.
Full details can be found in the
Phaser 4 Cone Lights.mdfile in the docs folder in this repo.Light.coneEnabledis a new boolean property that controls if the light is restricted to a cone.Light.coneRotationis a new number property that sets the cone direction in radians.Light.coneInnerAngleis a new number property that sets the inner cone angle in radians.Light.coneOuterAngleis a new number property that sets the outer cone angle in radians.Light.setConeis a new method that sets a Light to be a Cone light.Light.setConeRotationis a new method that sets the cone light rotation.Light.setConeAnglesis a new method that sets the cone light inner and outer angles.Light.disableConeis a new method that disables a cone light.LightsManager.addConeLightis a new method that creates a cone-limited light.DefineLightsGLSL shader gains two new uniforms:vec2 directionandvec3 cone.Thanks to @FSDevelop for adding this feature.
Changes
GameObjects.Components.Filtersnow adds its RenderStep just before the core render method. This allows other steps to run beforehand.WebGLStencilParametersFactorynow defaults to:enabled: true(stencil test is on by default; testing showed little performance impact)func: gl.EQUAL(stencil test now passes if the stencil buffer is EQUAL to 0)Fixes
Layerno longer has a duplicate RenderStep which does nothing.SpriteGPULayerno longer tries to access global namespace for Phaser functionality, which can cause a crash in modules.SpriteGPULayerno longer has a Mask component, as it's a Canvas feature but the object is WebGL only.DrawingContextno longer attempts to unbind textures based on the game canvas, which cannot exist and just wastes time.destroyon its Bob Game Objects as part of its own destroy process. Fix #7292 (thanks @samme)widthandheightvalues were not being updated after a call tosetTo(). Fix #7270 (thanks @samme)Phaser.Math.Pow2now exportsGetPowerOfTwo,IsSizePowerOfTwoandIsValuePowerOfTwo. Fix #7309 (thanks @Visualizeit)
v4.1.0: Phaser v4.1.0Compare Source
Version 4.1.0 - Salusa - 30th April 2026
New Features
RenderConfig#mipmapRegenerationoption allows certain framebuffer-based objects to use mipmaps if the game is configured to use mipmaps. This has a cost because mipmaps must be recreated after every change. Currently it only applies to DynamicTextures; Filters cannot render mipmaps. Thanks @Flow!Layeris now a trueGameObject. This fixes numerous small inconsistencies, and some big issues such as Filters not working. Thanks @rexrainbow for reporting the initial issue!Controllernow hasgetPaddingCeil(), which returns the ceiling of the current padding. This is mostly used internally to avoid quality loss from fractional padding. If your code callsgetPadding()on a filter controller (typically in a custom render node), you should replace it withgetPaddingCeil().Fixes
RectangleCanvasRenderer.RenderTexture#saveTexture. Thanks @UnaiNeuronUp!Utils.Array.GetRandomoften returningnullif onlystartIndexwas specified. Now it always returns an array element if part of the array is within range, as documented.v4.0.0: Phaser v4.0.0Compare Source
After years of development, Phaser 4 is here. This is the biggest release in Phaser's history - a ground-up rebuild of the WebGL renderer with a completely new architecture, while keeping the API you know and love.
Highlights
MULTIPLY,FILL,ADD,SCREEN,OVERLAY,HARD_LIGHT. Color and mode are now separate concerns.sprite.setLighting(true). Self-shadows, explicit light height, works across most game objects.#pragmaGLSL directives, TileSprite now supports atlas frames and tile rotation.skills/folder for deep Phaser 4 knowledge.Install
Links
Thank You
Phaser wouldn't have been possible without the fantastic support of the community. Thank you to everyone who supports our work, who shares our belief in the future of HTML5 gaming, and Phaser's role in that.
Happy coding everyone!
Rich and the whole team at Phaser Studio
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.