v4.62.2
2026-06-19
- Do not add spurious side-effect-free external imports to chunks when using minChunkSize (#6411)
Phaser v4.2.0
- New game config options:
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:- Toggling stencil testing
- Selectively activating alpha handling strategies
- Freehand GL scissor modification
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.- Unlike stencil masks in Phaser 3, Stencil objects are universal, persistent, and support anything as a stencil source, so long as it draws pixels. Use sprites and filter outputs as stencil sources!
- Operating modes include
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.- Game config can set a default alpha strategy.
- Stencil and CustomContext allow you to set an alpha strategy.
- Most Phaser shaders handle alpha strategy. Custom shaders must implement it themselves, but you can use compositing (
filtersForceComposite) to run graphics through a compatible shader. - Strategies include:
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:- Alpha strategy
- Color writemask
- Stencil parameters
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.- To support this, the encoding of tint mode in shaders with the
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. - Game objects with the Tint component now support a second tint per corner (
tint2TopLeftetc), and have a new methodsetTint2(). Additionally, the Mesh2D and Tile objects support constant tint viatint2. (TilemapGPULayer does not support tinting on tiles.)
- To support this, the encoding of tint mode in shaders with the
Timestep#setFPSLimitmethod changes the frame rate at runtime. This method updates derived properties, making it safer than manually adjustingTimestep#fpsLimit.
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.md file 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.- The
DefineLightsGLSL shader gains two new uniforms:vec2 directionandvec3 cone.
Thanks to @FSDevelop for adding this feature.
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)
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.- A Blitter will now call
destroyon its Bob Game Objects as part of its own destroy process. Fix #7292 (thanks @samme) - Fixed a bug where the Line
widthandheightvalues were not being updated after a call tosetTo(). Fix #7270 (thanks @samme) Phaser.Math.Pow2now exportsGetPowerOfTwo,IsSizePowerOfTwoandIsValuePowerOfTwo. Fix #7309 (thanks @Visualizeit )
v0.35.2
-
TypeScript: Add
mediaTypeto metadata response. #4492 -
Improve WebAssembly fallback detection. #4513
-
Improve code bundler support with stub binaries. #4543
-
Verify GIF
effortoption is an integer. #4544 @metsw24-max -
Verify
recombmatrix entries are numbers. #4545 @metsw24-max -
TypeScript: Replace namespace with named exports for ESM. #4546
-
Bound dilate and erode width to avoid mask-size overflow. #4548 @metsw24-max
-
Verify
convolvekernel values are numbers. #4549 @metsw24-max
v4.62.1
2026-06-19
- Preserve multipart file extensions when deconflicting output chunks (#6408)
- Fix an issue where getLogFilter would match additional logs (#6415)
- #6393: Use import attributes for importing JSON (@selfisekai, @lukastaegert)
- #6408: fix: insert conflict numbers before first extension in multi-extension filenames (@LeSingh1, @lukastaegert)
- #6415: fix: advance value past wildcard prefix before suffix check in getLogFilter (@JSap0914, @lukastaegert)
- #6417: chore(deps): update msys2/setup-msys2 digest to 66cd2cc (@renovate[bot])
- #6418: fix(deps): update minor/patch updates (@renovate[bot], @lukastaegert)
- #6419: chore(deps): update dependency eslint-plugin-unicorn to v66 (@renovate[bot])
- #6420: chore(deps): lock file maintenance minor/patch updates (@renovate[bot], @lukastaegert)
@eigenpal/docx-editor-core@1.8.2
-
4f183b3: Fix duplicate comment range markers when commenting across a tracked change. A comment whose range was interrupted by an inserted or deleted run now serializes as a single commentRangeStart/End pair instead of multiple, which Word rejected as unreadable content.
Fixes #914
-
0c233db: Keep drag-selecting text inside a table cell from selecting the whole cell.
-
7811a73: Fix caret size and table insert button position when the editor is zoomed. Both are painted inside the zoomed page container, so their geometry is now normalized by the zoom factor instead of being scaled twice.
Fixes #928
@eigenpal/docx-editor-vue@1.8.2
-
9022b42: Vue: Cut and Copy from the right-click context menu now work. The editor is focused before the clipboard command runs, so the selection is actually cut or copied, matching React.
Fixes #929
-
9622082: Vue: clicking a heading in the document outline now scrolls the page to that heading, matching React.
Fixes #930
-
7811a73: Fix caret size and table insert button position when the editor is zoomed. Both are painted inside the zoomed page container, so their geometry is now normalized by the zoom factor instead of being scaled twice.
Fixes #928
-
Updated dependencies [4f183b3]
-
Updated dependencies [0c233db]
-
Updated dependencies [7811a73]
- @eigenpal/docx-editor-core@1.8.2
- @eigenpal/docx-editor-agents@1.8.2
- @eigenpal/docx-editor-i18n@1.8.2
@eigenpal/docx-editor-react@1.8.2
-
7811a73: Fix caret size and table insert button position when the editor is zoomed. Both are painted inside the zoomed page container, so their geometry is now normalized by the zoom factor instead of being scaled twice.
Fixes #928
-
Updated dependencies [4f183b3]
-
Updated dependencies [0c233db]
-
Updated dependencies [7811a73]
- @eigenpal/docx-editor-core@1.8.2
- @eigenpal/docx-editor-agents@1.8.2
- @eigenpal/docx-editor-i18n@1.8.2