Skip to content

Bump phaser from 4.1.0 to 4.2.0#39

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/phaser-4.2.0
Open

Bump phaser from 4.1.0 to 4.2.0#39
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/phaser-4.2.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jun 22, 2026

Copy link
Copy Markdown
Contributor

Bumps phaser from 4.1.0 to 4.2.0.

Release notes

Sourced from phaser's releases.

Phaser v4.2.0

Version 4.2.0 - Giedi - 19th June 2026

New Features

  • 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 within Stencil objects, where regular alpha does nothing.
  • CustomContext game object is a container which can modify the DrawingContext at 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
  • Mesh2D game object renders textured triangles. It batches with regular sprites.
    • Mesh2D#buildOrderedIndices precomputes 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 (0 fast, 1 medium, 2 high), paying the cost once when the topology is stable. Use Mesh2D#useOrderedIndices (and Mesh2D#setUseOrderedIndices) to toggle between the ordered and unordered lists without rebuilding.
    • Mesh2D#renderAsTriangles (and Mesh2D#setRenderAsTriangles) renders the mesh as individual triangles via the new BatchHandlerTri render node, which is suitable for dynamic topology that cannot be optimized into quads.
  • BatchHandlerTri render node draws individual textured triangles (gl.TRIANGLES) as a batch. It extends BatchHandlerQuad, reusing its shader, vertex layout, and texture handling, and adds a batchTriangles method which accepts vertex and index arrays directly.
  • TransformerVertex render node now splits its per-vertex run into setupMatrix (build the transform matrix once per GameObject) and transformVertex (project a single vertex with the cached matrix). Mesh rendering uses this to avoid rebuilding the transform matrix for every vertex. run is unchanged for existing callers.
  • Stencil game 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, and clearRegion. Add and subtract can be inverted.
  • StencilReference game object re-renders a target Stencil with different settings. This is useful for removing or reusing stencil geometry.
  • AlphaStrategy setting used in the render system allows you to use GLSL discard instead 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.
  • BatchHandler render node now has a config option for topology, allowing extended nodes to opt into different triangulation modes.
  • BatchHandlerTri render node renders textured triangles. It is used by Mesh2D in triangle rendering mode. This can be more efficient than attempting to compile triangles into quads, which is the default strategy.
  • DrawingContext adds more controls:
    • Alpha strategy
    • Color writemask
    • Stencil parameters
  • WebGLGlobalWrapper now handles stencil write mask.
  • WebGLStencilParametersFactory now takes an extra writeMask parameter.
  • TintModes.MULTIPLY_TWO is 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 ApplyTint addition has been changed. The inTintEffect shader attribute has changed from a float to a vec4, 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 (tint2TopLeft etc), and have a new method setTint2(). Additionally, the Mesh2D and Tile objects support constant tint via tint2. (TilemapGPULayer does not support tinting on tiles.)
  • Timestep#setFPSLimit method changes the frame rate at runtime. This method updates derived properties, making it safer than manually adjusting Timestep#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.md file in the docs folder in this repo.

... (truncated)

Changelog

Sourced from phaser's changelog.

Phaser Change Logs

Phaser 4

Document Description
4.2.0 Changelog Full changelog for Phaser 4.2.0
4.1.0 Changelog Full changelog for Phaser 4.1.0
4.0.0 Changelog Full changelog for Phaser 4.0.0
Migration Guide Guide for upgrading from Phaser 3 to Phaser 4

Phaser 3

You can find the exhaustive Change Logs for all versions of Phaser 3 below.

Version Name Release Date
3.90 Tsugumi 23rd May 2025
3.88.2 Minami 13th February 2025
3.88.1 Minami 12th February 2025
3.88 Minami 11th February 2025
3.87 Hanabi 14th November 2024
3.86 Aoi 11th October 2024
3.85.2 Itsuki 17th September 2024
3.85.0 Itsuki 5th September 2024
3.80.1 Nino 27th February 2024
3.80 Nino 21st February 2024
3.70 Yotsuba 10th November 2023
3.60 Miku 12th April 2023
3.55.2 Ichika 27th May 2021
3.55.1 Ichika 26th May 2021
3.55 Ichika 24th May 2021
3.54 Futaro 26th March 2021
3.53.1 Anastasia 8th March 2021
3.53 Anastasia 8th March 2021
3.52 Crusch 14th January 2021
3.51 Emilia 5th January 2021
3.50.1 Subaru 21st December 2020
3.50 Subaru 16th December 2020
3.24.1 Rem 14th July 2020
3.24 Rem 13th July 2020
3.23 Ginro 27th April 2020
3.22 Kohaku January 15th 2020
3.21 Senku 22nd November 2019
3.20.1 Fitoria 15th October 2019
3.20 Fitoria 11th October 2019
3.19 Naofumi 8th August 2019
3.18.1 Raphtalia 20th June 2019

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [phaser](https://github.com/phaserjs/phaser) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/phaserjs/phaser/releases)
- [Changelog](https://github.com/phaserjs/phaser/blob/master/CHANGELOG.md)
- [Commits](phaserjs/phaser@v4.1.0...v4.2.0)

---
updated-dependencies:
- dependency-name: phaser
  dependency-version: 4.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Development

Successfully merging this pull request may close these issues.

0 participants