Skip to content
CAI
Software that uses CAICheck a score

phaserjs/phaser

62.5

Adequate · 25 September 2026

216.7k

lines of production code

JavaScript

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a 2D game engine framework that provides a comprehensive suite of tools for building interactive applications, including a modular scene graph, physics simulation, and asset management. It supports diverse rendering backends with WebGL and Canvas, offering advanced visual effects through post-processing filters, dynamic lighting, and custom shader integration. The engine features robust input handling for mouse, keyboard, touch, and gamepads, alongside utilities for geometry, animations, and particle systems to facilitate complex game logic and UI creation.

How it got here

2013–2018 — Phaser 4 architecture and feature expansion

131 changes.

This period focused on the foundational restructuring of the Phaser engine for version 4, introducing a modular plugin-based architecture for core systems like input, scenes, and physics. It involved a comprehensive rewrite of the WebGL and Canvas renderers, the implementation of new Game Object types such as Containers and Graphics, and the integration of Matter.js physics. The work also expanded the API with new geometry, math, and texture utilities to support advanced game development workflows.

2019–2020 — TypeScript definitions and event standardization

59 changes.

This period focused on establishing a robust type system by introducing comprehensive JSDoc and TypeScript definitions for nearly all core subsystems, including cameras, physics, and game objects. Concurrently, the codebase standardized its event architecture by replacing hardcoded strings with explicit, typed constants across modules like input, sound, and scenes to improve developer experience and type safety.

2022–2026 — WebGL rendering architecture and visual effects

29 changes.

This period focused on a comprehensive rewrite of the WebGL renderer, introducing a modular batch rendering system with dedicated nodes for state management, texturing, and transformation. It expanded the game object library with high-performance GPU-driven layers, complex mesh support, and a wide array of procedural noise and post-processing filter effects.

Features

Add IsoTriangle shape game object

Introduces the IsoTriangle shape, a new Game Object that renders an isometric triangle (pyramid) with distinct fill colors for the top, left, and right faces. Users can add this shape to scenes via the factory method \scene.isotriangle()\, and control its appearance using properties like \projection\ to adjust the viewing angle, \isReversed\ to flip the orientation, and \showTop/Left/Right\ to toggle individual faces. The implementation includes WebGL and Canvas renderers, supporting full batching, lighting, and standard transform behaviors.

src/gameobjects/shape/isotriangle · high confidence

Add NineSlice Game Object for resizable UI elements

Introduces the NineSlice Game Object, allowing textures to be stretched while keeping corners fixed, which is ideal for UI buttons and panels. The implementation supports both 9-slice and 3-slice modes, automatic configuration from Texture Packer 7.1.0+ atlases, and a new tiling mode for repeating scalable regions. It is WebGL-only, includes factory and creator methods for easy instantiation, and handles vertex rendering with proper origin and camera transform support.

src/gameobjects/nineslice · high confidence

Add Noise Game Object for procedural visual effects

A new Noise Game Object has been added, allowing developers to render procedural noise (such as Perlin or simplex noise) directly onto a WebGL quad. This feature enables dynamic visual effects like clouds, fog, or animated backgrounds. The object supports configuration for noise offset (to scroll the pattern), noise power (to sculpt output levels), and color mapping (defining colors for low and high noise values). It also includes options for random channel noise and random normal values. The implementation includes the core Noise class, a factory method for easy scene integration, and a creator for programmatic construction.

src/gameobjects/noise · high confidence

Add NoiseCell2D game object for cellular noise effects

A new NoiseCell2D game object is introduced, allowing developers to render cellular (Worley/Voronoi) noise patterns on a quad. This WebGL-only feature provides controls for cell count, variation, offset (for scrolling), iteration count, and rendering modes (sharp, soft, or flat edges). It also supports color gradients, normal map generation for lighting, and seamless wrapping, accessible via the scene's \noisecell2d\ factory method.

src/gameobjects/noise/noisecell2d · high confidence

Add NoiseCell3D game object for 3D cellular noise

A new NoiseCell3D game object is now available, allowing developers to render cellular (Worley/Voronoi) noise with an additional Z-axis dimension. This WebGL-only feature lets users create patterns resembling waves, clouds, or scales, with controls for cell count, variation, seed, and detail level. Users can scroll the noise in X and Y, or evolve the pattern along the Z-axis, and optionally generate normal maps for lighting effects. The object is registered in both the GameObjectCreator and GameObjectFactory under the 'noisecell3d' key, with configuration options for color, mode (sharp, soft, or flat edges), and smoothing.

src/gameobjects/noise/noisecell3d · high confidence

Add NoiseCell4D game object for 4D cellular noise

Developers can now create 4D cellular (Worley) noise effects using the new NoiseCell4D game object, accessible via the scene factory and creator methods. This WebGL-only component renders a quad displaying cellular noise patterns with support for four dimensions (X, Y, Z, W), allowing users to scroll the pattern in X and Y, evolve it smoothly in Z and W, and configure properties such as cell count, variation, iteration count, mode (sharp, soft, or flat edges), normal maps, and color gradients.

src/gameobjects/noise/noisecell4d · high confidence

Add NoiseSimplex3D game object for 3D simplex noise effects

A new NoiseSimplex3D game object is introduced, allowing developers to render 3D simplex noise patterns on a quad. This WebGL-only feature provides controls for scrolling (noiseOffset), evolving the pattern over time (noiseFlow), adding turbulence (noiseWarpAmount), and adjusting detail via octaves (noiseIterations). Users can also configure the noise seed, color gradients, cell counts, and enable normal map output for lighting effects, accessible via the scene factory and creator methods.

src/gameobjects/noise/noisesimplex3d · high confidence

Add TileSprite configuration type definitions

New JSDoc type definitions have been added for the TileSprite game object, specifically defining the \TileSpriteConfig\ interface which extends \GameObjectConfig\. This includes properties for position (x, y), dimensions (width, height), texture key, and an optional frame selector, providing explicit type information for developers configuring TileSprites.

src/gameobjects/tilesprite/typedefs · high confidence

Added JSDoc type definitions for PathFollower configuration

New JSDoc typedefs have been added to define the \PathConfig\ object for the PathFollower game object. This introduces structured documentation for configuration properties including \duration\, \from\, \to\, \positionOnPath\, \rotateToPath\, \rotationOffset\, and \startAt\, making the available settings and their defaults explicit for developers using the library.

src/gameobjects/pathfollower/typedefs · high confidence

Added JSDoc type definitions for curve configuration and JSON structures

New JSDoc typedefs have been added to the \src/curves/typedefs\ directory to define the structure of curve-related data. This includes \Phaser.Types.Curves.EllipseCurveConfig\ for ellipse parameters, \Phaser.Types.Curves.JSONCurve\ for generic curve data, \Phaser.Types.Curves.JSONEllipseCurve\ for ellipse-specific JSON data, and \Phaser.Types.Curves.JSONPath\ for path structures containing curves. These definitions are organized under the \Phaser.Types.Curves\ namespace, improving type hinting and documentation for developers working with curve data.

src/curves/typedefs · high confidence

Added JSDoc type definitions for keyboard input

New JSDoc typedefs have been added to the \src/input/keyboard/typedefs\ directory to document the Phaser keyboard input API. This includes \CursorKeys\ for mapping arrow keys, space, and shift; \KeyComboConfig\ for configuring key combination behaviors such as reset conditions and delays; and \KeyboardKeydownCallback\ for defining the structure of keydown event handlers. These definitions improve IDE autocomplete and type checking for developers using the keyboard input system.

src/input/keyboard/typedefs · high confidence

Added JSDoc type definitions for new Phaser filters

Added JSDoc type definitions for the Blocky, GradientMap, ImageLight, Key, NormalTools, PanoramaBlur, and Quantize filters, including their respective configuration objects and callback types, to support TypeScript generation and IDE autocompletion.

src/filters/typedefs · high confidence

Added JSDoc type definitions for the Noise game object

New JSDoc typedefs have been added to define the configuration options for the Noise game object. This includes \NoiseConfig\ for general object settings like width and height, and \NoiseQuadConfig\ for detailed noise rendering parameters such as offsets, power, colors, and channel randomization. An index file is also provided to expose the \Phaser.Types.GameObjects.Noise\ namespace.

src/gameobjects/noise/typedefs · high confidence

Added Math.Snap utility functions for grid alignment

The Phaser Math.Snap namespace now includes three new functions—Ceil, Floor, and To—that allow snapping numeric values to a grid. These utilities accept a value, a gap size, an optional start offset, and a divide flag to return the result in grid units, enabling precise alignment of positions or sizes to regular intervals.

src/math/snap · high confidence

Added Matter.js physics type definitions

Added JSDoc type definitions for the Matter.js physics system, including configuration objects for bodies, constraints, the world, and the runner, as well as types for collision data, filters, and debug rendering. These definitions provide IDE support and documentation for Matter.js-specific properties and options within Phaser.

src/physics/matter-js/typedefs · high confidence

Added NoAudio sound implementation for graceful degradation

Introduced \NoAudioSound\ and \NoAudioSoundManager\ classes to handle scenarios where audio is disabled in the game configuration or unsupported by the device. These components provide a minimal, non-functional sound interface that prevents Phaser projects from breaking on devices lacking audio playback technologies, ensuring graceful degradation by returning \false\ for playback methods while maintaining the expected API structure.

src/sound/noaudio · high confidence

Added Phaser.Types.Geom namespace definition

A new typedefs file has been introduced at src/geom/typedefs/index.js, establishing the Phaser.Types.Geom namespace for geometry-related type definitions. The file includes standard copyright and license headers attributed to Phaser Studio Inc. for the 2013-2026 period.

src/geom/typedefs · high confidence

Added Process Queue event constants

New event constants for the Process Queue system have been introduced, allowing developers to listen for specific lifecycle actions. The \PROCESS\_QUEUE\_ADD\ event is dispatched when an item is successfully moved to the active list (commonly used by a Scene's Update List), and the \PROCESS\_QUEUE\_REMOVE\ event is dispatched when an item is removed from the active list. These constants are now exported via the \Phaser.Structs.Events\ namespace.

src/structs/events · high confidence

Added RenderTexture configuration type definitions

Introduced JSDoc type definitions for the RenderTexture feature, specifically adding the \RenderTextureConfig\ object which defines optional properties for position (x, y) and dimensions (width, height) with their default values, and established the \Phaser.Types.GameObjects.RenderTexture\ namespace in the index file to organize these types.

src/gameobjects/rendertexture/typedefs · high confidence

Added Timeline Complete event

Users can now listen for a 'complete' event on Timeline instances to detect when all scheduled events have finished running. This new capability, available since version 3.70.0, allows developers to attach listeners via \timeline.on('complete', listener)\ to trigger actions upon timeline completion.

src/time/events · high confidence

Added TypeScript definitions generation tool (tsgen)

The \scripts/tsgen\ directory now contains the TypeScript definitions generation tool, which parses JSDoc comments from the Phaser source code to produce \phaser.d.ts\ and \phaser.json\ type definitions. This includes a new Parser implementation, JSDoc plugins to handle specific type transformations (such as resolving \this\ references and generic placeholders), and configuration files to define the build process and output location.

scripts/tsgen · high confidence

Added TypeScript/JSDoc typedefs for the Text Game Object

This change introduces a comprehensive set of JSDoc type definitions for the Text Game Object in Phaser, located in \src/gameobjects/text/typedefs\. It adds specific configuration types including \TextStyle\ (covering font, color, stroke, shadow, padding, alignment, and word wrap settings), \TextConfig\ for creation parameters, \TextPadding\, \TextShadow\, \TextMetrics\, \TextWordWrap\, and \GetTextSizeObject\. These definitions provide explicit type information for developers using the Text component, improving IDE autocomplete and type checking for text styling and layout properties.

src/gameobjects/text/typedefs · high confidence

Added gamepad configuration presets for SNES, DualShock 4, and Xbox 360

New configuration modules have been added to the gamepad input system, providing named constants for button and axis indices for the Tatar SNES USB Controller, Sony PlayStation DualShock 4, and Xbox 360 controllers. These presets allow developers to reference controller inputs by semantic names (e.g., \Phaser.Input.Gamepad.Configs.XBOX\_360.A\) rather than raw numeric indices, simplifying input handling for these specific hardware profiles.

src/input/gamepad/configs · high confidence

Added requestVideoFrame polyfill for video frame callbacks

A new polyfill has been added to the project to provide the \requestVideoFrameCallback\ API for browsers that support \HTMLVideoElement\ and \getVideoPlaybackQuality\ but lack native frame callback support. This allows applications to schedule callbacks synchronized with video frame presentation, improving video playback synchronization and performance monitoring in older or non-standard environments.

src/polyfills · high confidence

Arcade Physics TypeScript definitions and configuration options

This change introduces a comprehensive set of JSDoc type definitions for the Arcade Physics system, covering body bounds, collision states, collider types, and callbacks. It adds configuration options for \PhysicsGroupConfig\, including \customBoundsRectangle\, \maxSpeed\, and \useDamping\, and updates \ArcadeWorldConfig\ with \fixedStep\ and \customUpdate\ to allow manual world updates. These definitions improve type safety and IDE support for Phaser developers using the Arcade Physics API.

src/physics/arcade/typedefs · high confidence

Comprehensive loader file type configuration types added

The loader's type definitions have been expanded to include explicit configuration objects for a wide range of file formats, ensuring better type safety and documentation for asset loading. New typedefs cover Aseprite animations, various atlas formats (JSON, XML, PCT, Unity, Multi), compressed textures (ETC, ASTC, PVRTC, S3TC, etc.), and media types including Audio, Video, and AudioSprites. Additional support is defined for 3D models (OBJ with optional materials), scripts (with module type support), plugins, scenes, and standard assets like images, spritesheets, fonts, CSS, HTML, and tilemaps. This provides a unified interface for configuring URLs, extensions, XHR settings, and format-specific options across the loader.

src/loader/filetypes/typedefs · high confidence

Dynamic lighting system with cone lights and point lights

The lighting system now supports directional cone lights, allowing you to restrict a light's influence to a specific angle and direction via new properties like \coneEnabled\, \coneRotation\, and \coneInnerAngle\. Additionally, a new \PointLight\ game object is available for high-performance, non-shader-based lighting effects that do not require normal maps or impact other game objects' rendering. The \LightsManager\ also introduces an \attenuation\ parameter for point lights to control light falloff, and the maximum number of simultaneous lights is now configurable via the \maxLights\ game config property.

src/gameobjects/lights · high confidence

Expanded Polygon geometry utilities and Earcut integration

The \Phaser.Geom.Polygon\ API has been significantly expanded with new methods for polygon manipulation and analysis. Users can now triangulate polygons using the exposed \Earcut\ function, simplify complex shapes with \Simplify\ (using Douglas-Peucker and Radial Distance algorithms), and smooth edges with \Smooth\ (Chaikin's algorithm). Additional utilities include \Translate\ for moving points, \Reverse\ for flipping point order, \GetPoints\ for sampling perimeter coordinates, \Perimeter\ for calculating total edge length, \GetAABB\ for bounding box retrieval, and \GetNumberArray\ for exporting coordinates. The \Polygon\ constructor and \setTo\ method also now support defining points via space-separated strings.

src/geom/polygon · high confidence

Expanded geometric intersection utilities with precise point retrieval and raycasting

The \src/geom/intersects\ module has been significantly expanded to provide detailed intersection data beyond simple boolean checks. New \Get\ functions (e.g., \GetCircleToCircle\, \GetLineToLine\, \GetLineToPolygon\) now return specific intersection points or the closest intersection point as \Vector2\ or \Vector3\ objects, enabling precise collision resolution. Additionally, new capabilities include \GetRaysFromPointToPolygon\ for projecting rays from a point to detect polygon intersections, and an \isRay\ parameter added to line intersection methods to treat lines as infinite rays. The \PointToLine\ function also now supports a configurable \lineThickness\ parameter to account for circular line endpoints.

src/geom/intersects · high confidence

Exposed Tilemap Parser functions in the public API

The tilemap parsing utilities are now accessible via the \Phaser.Tilemaps.Parsers\ namespace, allowing developers to directly parse raw map data (such as 2D arrays, CSV strings, Tiled JSON, and Weltmeister formats) into \MapData\ objects. This change exposes functions like \Parse\, \Parse2DArray\, \ParseCSV\, and \FromOrientationString\, enabling custom map loading workflows and programmatic map creation outside of the standard scene loader.

src/tilemaps/parsers · high confidence

Groups now support centering and boundary-based positioning

Groups now expose \centerX\, \centerY\, \left\, \right\, \top\, and \bottom\ as both getters and setters. These properties calculate the bounds of the Group based on all visible children, allowing you to easily retrieve the horizontal or vertical center of a Group or position the Group itself based on those calculated boundaries, with scale and rotation taken into consideration.

(repo-wide) · high confidence

Initial MouseManager implementation with configurable event prevention

The MouseManager class has been introduced to handle native DOM mouse events, providing specific boolean properties (preventDefaultDown, preventDefaultUp, preventDefaultMove, preventDefaultWheel) that allow developers to control whether default browser actions are prevented for each mouse event type. The manager also includes dedicated window-level event handlers (onMouseDownWindow, onMouseUpWindow) to capture mouse interactions outside the primary target, and exposes the target element for event listening.

src/input/mouse · high confidence

Initial TypeScript type definitions for Phaser and Matter.js

This change introduces the foundational TypeScript declaration files for the project, establishing the type system for Phaser and its Matter.js physics integration. The \types/index.d.ts\ file acts as the central entry point, referencing the main \phaser.d.ts\ definitions as well as specific Spine plugin types (\SpinePlugin\, \SpineFile\, \SpineGameObject\, \SpineContainer\). Additionally, \types/matter.d.ts\ provides detailed type definitions for the Matter.js physics engine as used by Phaser, covering interfaces for body definitions, physics properties, and collision handling, thereby enabling strict type checking for game objects, physics bodies, and scene configurations.

types · high confidence

Initial device detection module added

The \src/device\ module has been introduced to provide a centralized system for detecting browser, operating system, and hardware capabilities. This new module exposes read-only properties via \this.sys.game.device\, allowing games to adapt to the user's environment. It includes sub-modules for OS identification (including specific handling for iOS 13+ iPads and Node.js), browser detection (with improved regex for Safari and Edge), and feature checks for audio/video format support, canvas capabilities, input methods, and fullscreen API availability.

src/device · high confidence

Initial implementation of Matter.js constraint modules

This change introduces the \Constraint\ and \MouseConstraint\ modules from the Matter.js physics library. The \Constraint\ module adds support for creating and manipulating distance constraints between bodies, including configurable stiffness for springs and rigid links, with specific rendering logic for lines, pins, and springs. The \MouseConstraint\ module enables user interaction by allowing bodies to be grabbed and dragged via mouse or touch events, integrating with the engine's update loop to handle collision detection and drag state.

src/physics/matter-js/lib/constraint · high confidence

Initial integration of Matter.js physics engine factory modules

This change introduces the Matter.js physics library into the project, specifically adding the \Bodies\ and \Composites\ factory modules. The \Bodies\ module provides methods to create rigid body shapes such as rectangles, trapezoids, circles, and polygons, including support for vertex chamfering. The \Composites\ module adds utilities for arranging multiple bodies into structured groups, offering factory methods for stacks, chains, meshes, and pyramids. This establishes the foundational geometry and composite creation capabilities for the physics simulation.

src/physics/matter-js/lib/factory · high confidence

Introduce Mesh2D game object for 2D mesh rendering

A new Mesh2D game object is now available for displaying 2D meshes using WebGL. This feature allows you to define custom geometry via vertex and index arrays, supporting both static topology (optimized into quads for batching with other objects) and dynamic topology (rendered as individual triangles). It includes support for two-color tinting via a new MULTIPLY\_TWO mode, lighting, and various rendering strategies to balance performance and flexibility.

src/gameobjects/mesh2d · high confidence

Introduce SpriteGPULayer for high-performance batch rendering

Adds a new WebGL-only SpriteGPULayer game object designed to render millions of stateless, animated sprites in a single draw call, significantly reducing overhead for complex backgrounds or particle effects. This location provides the core implementation, including GPU buffer management with segmented updates, easing function encoding for animations, and factory/creator registration methods to instantiate the layer within scenes.

src/gameobjects/spritegpulayer · high confidence

Introduction of BaseShader resource class

A new BaseShader class has been added to the display/shader module, serving as a lightweight resource container for GLSL source code. This class stores the shader's unique key, raw GLSL string, and optional metadata, enabling dynamic shader creation and management via the Shader Cache. It acts as the foundational data structure for shaders used by the Shader Game Object and BaseFilterShader, allowing developers to load, store, and retrieve shader source code independently of the rendering pipeline.

src/display/shader · high confidence

Introduction of Container Game Object

The Container Game Object is now available in \src/gameobjects/container\, allowing developers to group multiple Game Objects into a single parent entity. This feature enables unified transformation (position, rotation, scale, alpha) of children, supports nested Containers, and includes dedicated Canvas and WebGL renderers to handle child rendering, blend modes, and masks. A Factory and Creator are provided to instantiate Containers, optionally accepting an initial array of children via configuration.

src/gameobjects/container, src/gameobjects/image · high confidence

Introduction of Dynamic Bitmap Text Game Object

A new Dynamic Bitmap Text game object has been added, extending the existing BitmapText class to support per-character rendering callbacks. This allows developers to manipulate individual glyph properties such as position, scale, rotation, and tint during the render pass, enabling effects like jiggling text that are not possible with static bitmap text. The feature includes dedicated Canvas and WebGL renderers, a factory method for scene creation, and a creator method for configuration-based instantiation, with the callback data object providing a reference to the parent instance for advanced use cases.

src/gameobjects/bitmaptext/dynamic · high confidence

Introduction of Gamepad Event Constants

The \src/input/gamepad/events\ directory now exports a set of string constants for Gamepad Plugin events, including \BUTTON\_DOWN\, \BUTTON\_UP\, \CONNECTED\, \DISCONNECTED\, \GAMEPAD\_BUTTON\_DOWN\, and \GAMEPAD\_BUTTON\_UP\. These constants, defined in individual modules and aggregated in \index.js\, provide a standardized way to reference event types for listeners such as \this.input.gamepad.on('down', listener)\ or \this.input.gamepad.once('connected', listener)\, replacing previous implicit string usage with explicit, documented symbols.

src/input/gamepad/events · high confidence

Introduction of GeometryMask for Canvas-based clipping

A new GeometryMask class has been added to the display mask system, allowing developers to use a Graphics object as a clipping path to hide pixels of Game Objects that do not intersect with the geometry's visible pixels. This feature is currently supported only in the Canvas Renderer, providing a way to create complex, shape-based masks that respect the Graphics object's own visual properties and camera settings without affecting the masked objects' transforms. The implementation includes methods to set the shape, manage canvas context clipping via preRenderCanvas and postRenderCanvas, and a destroy method to clean up references.

src/display/mask · high confidence

Introduction of Phaser.Geom namespace and constants

The \src/geom\ location now exposes the \Phaser.Geom\ namespace, providing direct access to geometry classes (Circle, Ellipse, Line, Polygon, Rectangle, Triangle) and the \Intersects\ utility. It also introduces the \Phaser.Geom\ constants object (\GEOM\_CONST\), defining type identifiers for each geometry shape. This change establishes the public API surface for geometry operations in this module.

src/geom · high confidence

Introduction of TouchManager for handling touch input

A new TouchManager class has been added to the input system to handle native DOM touch events and pass them to the Input Manager. This component supports multi-touch (up to 10 pointers), includes window-level event handlers for touch start, end, and cancel events, and provides a method to disable context menus on touch devices. It also tracks canvas over/out states and ensures proper cleanup of event listeners when the manager is destroyed.

src/input/touch · high confidence

Introduction of the Data Manager system for key-value storage

This change introduces the Data Manager, a new system that allows Game Objects, Systems, and Plugins to store, retrieve, and manage arbitrary key-value data. The \DataManager\ class handles the core storage logic and emits events (\setdata\, \changedata\) when values are modified, enabling reactive UI updates and game logic triggers. The \DataManagerPlugin\ integrates this functionality into the Scene lifecycle, automatically handling cleanup on scene shutdown or destruction to prevent memory leaks. Users can now access data via \scene.data\ or directly on game objects, using methods like \get\, \set\, and \getAll\ to interact with the stored values.

src/data · high confidence

Introduction of the Graphics Game Object for drawing primitives

The \src/gameobjects/graphics\ area now provides the core implementation for the Graphics Game Object, enabling users to draw primitive shapes such as rectangles, circles, polygons, lines, arcs, and curves. This change introduces the \Graphics\ class along with its dedicated Canvas and WebGL renderers, a command-based rendering system (\Commands.js\), and factory/creator utilities (\GraphicsFactory.js\, \GraphicsCreator.js\). Users can now programmatically create and manipulate vector graphics within their scenes, with support for fill and stroke styles, gradients, and texture generation.

src/gameobjects/graphics · high confidence

Introduction of the Group Game Object for object pooling and bulk management

The \Group\ game object is now available in \src/gameobjects/group\, allowing developers to create, manipulate, and recycle similar game objects as a single unit. This feature supports object pooling patterns (e.g., for bullets or enemies) by managing a collection of children, enforcing a \maxSize\ limit, and providing bulk operations. The implementation uses a native \Set\ for child storage, extends \EventEmitter\ to support custom events, and integrates with the scene via \GroupFactory\ and \GroupCreator\ for easy instantiation.

src/gameobjects/group · high confidence

Introduction of the Shape Game Object with WebGL and Canvas rendering support

The \src/gameobjects/shape\ area introduces the new \Shape\ base class, which serves as the foundation for built-in primitives like Arc, Rectangle, and Triangle. This change adds dedicated rendering logic for both WebGL (\FillPathWebGL\, \StrokePathWebGL\) and Canvas (\FillStyleCanvas\, \LineStyleCanvas\), enabling shapes to be filled and stroked with specific colors and alpha values. The \Shape\ class integrates components such as \AlphaSingle\ and \Lighting\, allowing for uniform alpha control and support for the Light2d pipeline, while exposing properties like \geom\, \pathData\, and \pathIndexes\ to manage geometry and rendering efficiently.

src/gameobjects/shape · high confidence

Introduction of the Zone Game Object for non-rendering hit areas and drop zones

This change introduces the Zone Game Object, a non-rendering entity that exists on the display list with position, size, and transform capabilities but no visual texture. It is designed primarily for creating drop zones and input hit areas, supporting rectangular and circular shapes as well as custom geometry for overlap checks. The implementation includes the core Zone class, factory and creator methods for easy instantiation in scenes, and associated configuration typedefs, enabling developers to use Zones for logical grouping and interaction detection without visual rendering overhead.

src/gameobjects/zone · high confidence

Introduction of the new Canvas Renderer implementation

The \src/renderer/canvas\ area now contains the initial implementation of the new Canvas Renderer (\CanvasRenderer.js\) and its module exports (\index.js\). This change introduces a restructured rendering engine that manages 2D canvas contexts, supporting features such as antialiasing, pixel rounding, and snapshot capabilities. It replaces previous logic with a unified \batchSprite\ method for drawing textured objects and integrates with the new camera effects system, including the emission of pre-render and post-render events. The renderer also supports custom context options, desynchronized contexts, and alpha handling, providing a foundation for improved performance and rendering accuracy in Canvas mode.

src/renderer/canvas · high confidence

Matter.js physics engine integrated into Phaser

The Matter.js physics engine has been added to the project, providing rigid body simulation capabilities. This integration introduces the Matter.Body module for creating and manipulating rigid bodies, including support for custom properties like center of mass, gravity scaling, and attractors. The Matter.Composite module manages collections of bodies, constraints, and other composites, with modified behavior to emit compositeModified events for better state tracking. Additionally, a backward-compatible Matter.World alias module is provided to ease migration from older code patterns, though it is marked for eventual deprecation in favor of the Composite module.

src/physics/matter-js/lib/body · high confidence

Matter.js physics engine integration and core API overhaul

The Matter.js physics system has been completely rewritten and upgraded to version 0.20.0, introducing a new plugin-based architecture and a suite of new capabilities. Users can now attach Matter physics bodies to any Game Object via the new \MatterGameObject\ factory, and the \MatterImage\ and \MatterSprite\ classes provide dedicated, optimized game objects for physics-enabled rendering. The system now includes a \BodyBounds\ helper for precise coordinate extraction, a \PointerConstraint\ for interactive object manipulation, and new parsers (\PhysicsEditorParser\, \PhysicsJSONParser\) for loading complex compound bodies. Additionally, \MatterTileBody\ now supports flipped tiles and direct event listening, while the \Factory\ has been expanded with methods like \trapezoid\ and \fromVertices\ to streamline body creation.

src/physics/matter-js · high confidence

Matter.js physics engine updated to v0.18 with new geometry features

The Matter.js physics library has been upgraded to version 0.18, introducing new geometry capabilities in the \src/physics/matter-js/lib/geometry\ module. Users can now utilize the new \Bounds.wrap\ method to automatically calculate translation vectors for wrapping objects within specific boundaries, and the \Vertices.fromPath\ method to parse coordinate strings directly into vertex sets. This update also includes the addition of the \Axes\ module for creating and manipulating axis sets, and the \Svg\ module for converting SVG paths into vector points, enhancing the engine's ability to handle complex shapes and boundary conditions.

src/physics/matter-js/lib/geometry · high confidence

New 2D Camera Effects system

The 2D camera now supports a modular effects system, introducing dedicated classes for Fade, Flash, Pan, RotateTo, Shake, and Zoom. These effects allow developers to animate camera properties such as viewport color, scroll position, rotation angle, and zoom level over a specified duration with configurable easing and callbacks.

src/cameras/2d/effects · high confidence

New 2D Camera event constants for effects and lifecycle

The \src/cameras/2d/events\ directory now exports a comprehensive set of string constants for 2D Camera events, allowing developers to listen for camera lifecycle and effect milestones using named constants (e.g., \Phaser.Cameras.Scene2D.Events.DESTROY\, \FADE\_IN\_COMPLETE\, \FOLLOW\_UPDATE\) instead of hardcoding event names. This includes events for camera destruction, pre/post rendering, and the start/complete phases of camera effects like fade, flash, pan, rotate, shake, and zoom, as well as a new \FOLLOW\_UPDATE\ event for tracking camera position while following a game object.

src/cameras/2d/events · high confidence

New 2D Camera type definitions and namespace

This change introduces a new set of JSDoc type definitions for the 2D camera system, organized under the \Phaser.Types.Cameras.Scene2D\ namespace. It adds specific types for camera configuration (\CameraConfig\), JSON serialization structures (\JSONCamera\, \JSONCameraBounds\), and callback signatures for camera effects such as fade, flash, pan, rotate, shake, and zoom. Additionally, it defines a \CameraPaddingWrapper\ type (since v4.0.0) that abstracts padding adjustments, and provides an index file to expose the new namespace.

src/cameras/2d/typedefs · high confidence

New Action type definitions for effects, masking, and layout

This update introduces a comprehensive set of JSDoc type definitions for the Phaser Actions API, establishing a structured namespace under \Phaser.Types.Actions\. It adds configuration and return types for visual effects (\AddEffectBloom\, \AddEffectShine\), shape-based masking (\AddMaskShape\), and layout utilities (\FitToRegion\, \GridAlign\). Additionally, it defines a callback type (\CallCallback\) to support action chaining. These definitions provide developers with explicit type hints for action parameters and return values, improving IDE autocomplete and code reliability when using these specific game object manipulation features.

src/actions/typedefs · high confidence

New Animation Event Constants and Documentation

The \src/animations/events\ directory has been restructured to expose a comprehensive set of string constants for Phaser animation events, including \ADD\_ANIMATION\, \ANIMATION\_COMPLETE\, \ANIMATION\_COMPLETE\_KEY\, \ANIMATION\_REPEAT\, \ANIMATION\_RESTART\, \ANIMATION\_START\, \ANIMATION\_STOP\, \ANIMATION\_UPDATE\, \PAUSE\_ALL\, \REMOVE\_ANIMATION\, and \RESUME\_ALL\. Each event is now defined in its own file with detailed JSDoc comments describing the event flow, parameters, and usage, providing developers with explicit, type-safe constants for listening to animation lifecycle changes on Sprites and the global Animation Manager.

src/animations/events · high confidence

New Arc and Circle Shape Game Objects

Added the Arc Shape Game Object, allowing you to render customizable arcs (including full circles) with control over start/end angles, winding direction, and smoothness iterations. The Arc supports both fill and stroke styling and is available via the scene factory methods \scene.arc()\ and \scene.circle()\. Canvas rendering now correctly restores the context state after drawing, ensuring proper rendering with non-canvas-sized cameras, while WebGL rendering uses the shared \GetCalcMatrix\ utility for consistent transform handling.

src/gameobjects/shape/arc · high confidence

New ArcadeImage and ArcadeSprite game object classes

Arcade Physics now provides dedicated \ArcadeImage\ and \ArcadeSprite\ classes that extend the standard \Image\ and \Sprite\ game objects with physics components. \ArcadeImage\ is a lightweight option for non-animated objects like scenery or bullets, while \ArcadeSprite\ supports texture-based animations. These classes automatically mix in physics behaviors such as velocity, bounce, and gravity, and are created via the \physics.add.image()\ and \physics.add.sprite()\ factory methods.

src/physics/arcade · high confidence

New Array Matrix utility functions

The \Phaser.Utils.Array.Matrix\ namespace now includes a suite of new utilities for manipulating 2D arrays: \CheckMatrix\ validates matrix structure, \MatrixToString\ creates debug-friendly string representations, \ReverseRows\ and \ReverseColumns\ flip the matrix orientation, \RotateMatrix\ (along with \RotateLeft\, \RotateRight\, and \Rotate180\) handles 90-degree rotations, \TransposeMatrix\ swaps rows and columns, and \Translate\ shifts the matrix content cyclically in any direction.

src/utils/array/matrix · high confidence

New Blitter Game Object for high-performance batched rendering

A new Blitter Game Object has been added to enable the fast rendering of large numbers of lightweight 'Bob' objects that share a single texture. This component is designed for scenarios requiring high performance, such as particle effects, crowds, or bullet pools, by batching draw calls. The implementation includes dedicated Canvas and WebGL renderers, a factory/creator for easy instantiation, and specific handling for features like flipping, alpha, and tinting within the batched context.

src/gameobjects/blitter · high confidence

New CaptureFrame WebGL GameObject for framebuffer capture

Added a new CaptureFrame game object that captures the current state of the WebGL framebuffer into a texture at the point it is rendered in the display list. This enables full-scene post-processing effects (such as water layers or distortions) by allowing objects rendered before the CaptureFrame to be captured to a named texture, while objects rendered after are excluded. The feature is WebGL-only, requires the Camera's \forceComposite\ property to be enabled (or usage within a framebuffer context like Filters or DynamicTextures), and includes factory/creator methods (\scene.add.captureFrame()\) and compatibility shims for \setAlpha\ and \setScrollFactor\ to ensure seamless integration with existing game object patterns.

src/gameobjects/captureframe · high confidence

New Color utility functions and ColorSpectrum generator

The \src/display/color\ module now includes a \ColorSpectrum\ function that generates an array of Color Objects representing a full color spectrum, allowing users to specify a \limit\ parameter to control the number of colors returned. Additionally, the \HSVToRGB\ and \RGBToHSV\ conversion functions have been updated to accept an optional \out\ argument, enabling results to be set into an existing \HSVColorObject\ or \Color\ object instead of always creating a new one.

src/display/color · high confidence

New Curve Shape Game Object

A new Curve Shape Game Object has been added, allowing you to render filled and stroked curves as batched WebGL or Canvas graphics. You can create a Curve by passing a \Phaser.Curves.Curve\ object to the constructor or via the \scene.curve()\ factory method. The shape supports fill and stroke styles, and includes a \smoothness\ property (default 32) to control the number of points used for rendering, balancing visual smoothness against performance. It integrates with the standard Scene graph, supporting transforms, input, and physics like other Game Objects.

(repo-wide) · high confidence

New Curve and Path classes for defining 2D motion paths

The \src/curves\ directory now provides a complete set of curve classes (\Curve\, \LineCurve\, \QuadraticBezierCurve\, \CubicBezierCurve\, \EllipseCurve\, \SplineCurve\) and path components (\Path\, \MoveTo\) that allow Game Objects to follow complex 2D routes. These classes implement the standard curve interface (sampling points, calculating arc lengths, and obtaining tangents) and are designed to be used with \Phaser.Curves.Path\ or \PathFollower\ objects to animate movement along smooth, mathematically defined paths.

src/curves · high confidence

New CustomContext game object for WebGL rendering customization

Phaser 4.2.0 introduces the CustomContext game object, an extended Container that allows developers to modify the WebGL DrawingContext before rendering occurs. By providing a callback function, users can adjust context settings (such as disabling stencil tests) on a cloned context, enabling advanced rendering effects. This feature is available via the GameObjectFactory and GameObjectCreator under the 'customContext' key and is restricted to WebGL renderers.

src/gameobjects/customcontext · high confidence

New DOM Element Game Object for HTML overlays

Phaser now includes a DOM Element Game Object that allows you to control and manipulate HTML elements (such as divs, forms, or text inputs) directly over the top of your game canvas. To use this feature, you must enable it in the game configuration by setting \dom.createContainer: true\ and providing a parent container element. Once enabled, you can create DOM elements via the factory (e.g., \this.add.dom()\) and position, scale, rotate, and apply blend modes to them as they move with the camera. The implementation includes a new \CSSBlendModes\ map for CSS blend mode support, a \DOMElementCSSRenderer\ for applying transforms and styles, and a factory registration for easy instantiation.

src/gameobjects/domelement · high confidence

New Data Manager event constants for tracking data changes

The Data Manager now exposes specific event constants (CHANGE\_DATA, CHANGE\_DATA\_KEY, DESTROY, REMOVE\_DATA, SET\_DATA) that allow developers to listen for precise data lifecycle changes on Game Objects. This enables more granular event handling, such as listening for changes to a specific data key via the 'changedata-' prefix or detecting when the Data Manager is destroyed.

src/data/events · high confidence

New Display Bounds utility functions for Phaser Game Objects

The \src/display/bounds\ module now provides a comprehensive set of utilities for querying and positioning Game Objects based on their visual bounds. Users can retrieve specific coordinates (left, right, top, bottom, center X/Y, and offsets) or obtain the full unrotated bounds as a \Rectangle\ via \GetBounds\. Additionally, new positioning helpers (\SetLeft\, \SetRight\, \SetTop\, \SetBottom\, \SetCenterX\, \SetCenterY\, and \CenterOn\) allow precise alignment of Game Objects to specific coordinates, correctly accounting for the object's origin point.

src/display/bounds · high confidence

New DynamicTexture and CanvasTexture classes for runtime texture generation

The texture system now includes dedicated classes for creating and managing textures generated at runtime. \DynamicTexture\ allows you to draw Game Objects, frames, and other textures to a backing store (WebGL Framebuffer or Canvas) and use the result as a texture for other objects, supporting features like command buffers, camera control, and mipmap configuration. \CanvasTexture\ provides a texture backed directly by an HTML Canvas element, exposing the 2D context and pixel data for direct manipulation, with automatic WebGL synchronization via a \refresh\ method. Both classes integrate with the \TextureManager\ and support adding frames, making them suitable for dynamic sprite sheets, render targets, and custom visual effects.

src/textures · high confidence

New Ellipse Shape Game Object with configurable smoothness and factory support

Developers can now add an Ellipse shape to scenes using the new \scene.ellipse()\ factory method. This Game Object supports both fill and stroke rendering across WebGL and Canvas backends, and includes a \smoothness\ property (defaulting to 64 points) to control the polygonal approximation of the curve, allowing for a trade-off between visual smoothness and rendering performance. The shape also provides a \setSize\ method to adjust dimensions without scaling the object's transform.

src/gameobjects/shape/ellipse · high confidence

New Extern Game Object for custom rendering

A new Extern Game Object has been added to Phaser, allowing developers to integrate custom rendering logic directly into the render pipeline. This component enables the injection of third-party WebGL or Canvas draw calls at a specific point in the display list, giving full control over the renderer state for custom GPU operations or unsupported content while maintaining correct compositing with other scene objects.

src/gameobjects/extern · high confidence

New Gradient Game Object for WebGL rendering

Developers can now create and manipulate gradient shapes using the new Gradient Game Object, which renders smooth color transitions across a quad via WebGL. This feature supports multiple shape modes (linear, radial, conic) and repeat behaviors, allowing for complex visual effects like glows, ripples, and animated color shifts by adjusting properties such as offset, bands, and dithering.

src/gameobjects/gradient · high confidence

New JSDoc typedefs for Timeline and Timer events

Added JSDoc type definitions for \Phaser.Types.Time.TimelineEvent\, \Phaser.Types.Time.TimelineEventConfig\, and \Phaser.Types.Time.TimerEventConfig\ to improve IDE support and documentation for time-based event handling. The \TimelineEvent\ and \TimelineEventConfig\ types introduce support for conditional execution via an \if\ callback, loop callbacks, and tween instance tracking, while \TimerEventConfig\ defines the configuration structure for timer events including delay, repeat, and callback scope.

src/time/typedefs · high confidence

New JSDoc typedefs for Tween configuration and callbacks

The \src/tweens/typedefs\ directory now contains a comprehensive set of JSDoc type definitions for the Tween system. This includes \TweenBuilderConfig\ and \NumberTweenBuilderConfig\ for tween options, \TweenChainBuilderConfig\ for chaining tweens, and \StaggerConfig\ for staggered animations. It also defines specific callback types (e.g., \TweenOnStartCallback\, \TweenOnUpdateCallback\) and data structures like \TweenDataConfig\ and \TweenPropConfig\, providing better type hinting and documentation for developers using the Phaser Tween API.

src/tweens/typedefs · high confidence

New KeyCombo class for detecting sequential key presses

The \src/input/keyboard/combo\ directory now contains the implementation for the \KeyCombo\ class, which allows users to define and listen for specific sequences of key presses (such as the Konami code). This feature enables developers to create combos using strings, arrays of key codes, or Key objects, and receive a \keycombomatch\ event when the sequence is successfully entered. The implementation includes internal helpers for advancing the combo state, processing key events with optional timing delays, and resetting the combo on incorrect input or after a match.

src/input/keyboard/combo · high confidence

New Math type definitions for vectors, rectangles, and noise configuration

This update introduces several new TypeScript/JSDoc type definitions in the \Phaser.Types.Math\ namespace to improve type safety and documentation for math-related APIs. It adds \Vector2Like\, \Vector3Like\, and \Vector4Like\ to represent vector-like objects, with \Vector3Like\ and \Vector4Like\ having optional components. It also defines \RectangleLike\ for rectangle objects with required \x\, \y\, \width\, and \height\ properties. Additionally, new configuration types \HashCellConfig\ and \HashSimplexConfig\ are added to support noise generation features, allowing users to configure algorithms, cell counts, wrapping, and seeds for hash-based noise functions. The \SinCosTable\ type is also included for sine/cosine table structures.

src/math/typedefs · high confidence

New Matter Physics World lifecycle and drag events

The Matter Physics World now exposes new events to allow developers to hook into specific stages of the simulation and user interaction. You can now listen for 'beforeadd' and 'afteradd' to intercept bodies or constraints being added to the world, and 'beforeremove' and 'afterremove' for removals. Lifecycle hooks 'beforeupdate' and 'afterupdate' are available to run logic immediately before or after the physics engine updates. Collision handling is enhanced with 'collisionactive' (for pairs currently colliding), 'collisionstart', and 'collisionend'. Additionally, Pointer Constraint interactions now trigger 'dragstart', 'drag', and 'dragend' events, and the world itself emits 'pause' and 'resume' events when its state changes.

src/physics/matter-js/events · high confidence

New Matter.js physics plugins for attractors, collision events, and world wrapping

Three new Matter.js plugins are introduced to extend physics capabilities: MatterAttractors enables bodies to exert gravitational forces on each other via a configurable constant; MatterCollisionEvents exposes granular collision lifecycle events (start, active, end) on game objects and bodies, supporting both callback functions and event emission; and MatterWrap allows bodies and composites to seamlessly wrap around defined world bounds, maintaining velocity when crossing edges.

src/physics/matter-js/lib/plugins · high confidence

New MoveTo curve type for creating gaps in paths

A new MoveTo curve class has been added to the curves library, allowing paths to contain non-drawing positional markers. This enables developers to create gaps between sub-paths or reset the drawing position without connecting to the previous curve, similar to the SVG moveto command. The MoveTo curve is inactive for bounds and length calculations, ensuring it does not affect rendering or path metrics, while still being serializable and compatible with the existing Path API.

src/curves/path · high confidence

New PathFollower Game Object for moving sprites along paths

A new PathFollower Game Object has been added, allowing Sprites to automatically move along a defined Phaser.Curves.Path. This component supports traversal in either direction, configurable playback speed and duration, and optional rotation to face the direction of travel. It is exposed via the scene factory as scene.add.follower() for easy creation.

src/gameobjects/pathfollower · high confidence

New Phaser Arcade Physics distribution bundle

The \dist\ directory now includes a new \phaser-arcade-physics.js\ file and its minified counterpart, providing a standalone build for the Arcade Physics subsystem. This allows users to load only the physics components of the library, reducing bundle size when the full Phaser engine is not required.

dist · high confidence

New Phaser.Display.Align.To alignment helpers and QuickSet utility

This change introduces a new set of alignment functions under the \Phaser.Display.Align.To\ namespace, including \BottomCenter\, \BottomLeft\, \BottomRight\, \LeftBottom\, \LeftCenter\, \LeftTop\, \RightBottom\, \RightCenter\, \RightTop\, \TopCenter\, \TopLeft\, and \TopRight\. These functions allow developers to position a Game Object relative to another (the \alignTo\ object) with specific edge alignments (e.g., top edge flush with bottom) and optional horizontal/vertical offsets. Additionally, a \QuickSet\ function is added, which accepts a \Phaser.Display.Align\ constant (like \LEFT\_CENTER\) to dynamically select and execute the appropriate alignment function from a map, simplifying alignment logic when the position is determined at runtime.

src/display/align/to · high confidence

New Phaser.Geom.Triangle geometry class and utilities

The \src/geom/triangle\ area now provides a complete Triangle geometry implementation. This includes the core \Triangle\ class (storing vertices as x1/y1, x2/y2, x3/y3) and a suite of static utility functions for construction (\BuildEquilateral\, \BuildRight\, \BuildFromPolygon\), manipulation (\Offset\, \Rotate\, \CenterOn\, \Clone\, \CopyFrom\), and geometric queries (\Area\, \Perimeter\, \Contains\, \Centroid\, \CircumCenter\, \InCenter\, \GetPoint\, \GetPoints\, \Random\).

src/geom/triangle · high confidence

New Phaser.Math.Angle utility functions

The \src/math/angle\ module now exposes a comprehensive set of angle manipulation utilities. This includes helpers for calculating angles between points (\Between\, \BetweenPoints\, \BetweenY\), rotating objects smoothly (\RotateTo\), and reversing directions (\Reverse\). New distance-calculation functions allow measuring angular separation in specific directions (\GetClockwiseDistance\, \GetCounterClockwiseDistance\) or finding the shortest path (\GetShortestDistance\, \ShortestBetween\). The module also adds angle normalization and wrapping (\Normalize\, \Wrap\, \WrapDegrees\), random angle generation (\Random\, \RandomDegrees\), and a helper to convert standard clockwise angles to a counter-clockwise format (\CounterClockwise\).

src/math/angle, src/utils/string · high confidence

New Phaser.Math.Distance utility functions for coordinate calculations

The \src/math/distance\ module now exposes a comprehensive set of distance calculation methods under \Phaser.Math.Distance\. Users can calculate standard Euclidean distance (\Between\), squared distance (\Squared\), and generalized power-based distance (\Power\). Additionally, new methods support vector objects (\BetweenPoints\, \BetweenPointsSquared\) and alternative metrics like Chebyshev distance (\Chebyshev\) and Snake (Manhattan) distance (\Snake\), all documented with JSDoc and exported via the module index.

src/math/distance · high confidence

New Phaser.Math.Fuzzy API for epsilon-based math operations

The \src/math/fuzzy\ directory now exposes a new \Phaser.Math.Fuzzy\ namespace containing five functions: \Ceil\, \Floor\, \Equal\, \GreaterThan\, and \LessThan\. These functions allow users to perform ceiling, floor, and comparison operations with a configurable epsilon tolerance (defaulting to 0.0001), which helps mitigate floating-point precision errors in calculations. The module is exported via \src/math/fuzzy/index.js\ for easy integration.

src/math/fuzzy · high confidence

New Point Light Game Object for WebGL

A new Point Light Game Object is now available for WebGL rendering, providing a performant way to add point light effects (such as flickering torches or muzzle flashes) without the overhead of traditional lights or normal map calculations. This feature introduces the \PointLight\ class along with its factory and creator methods (\scene.pointlight()\ and \gameobjects.pointlight()\), allowing developers to configure color, radius, intensity, and a new attenuation parameter that controls light falloff. The implementation includes a dedicated WebGL renderer that handles batching and camera culling, while Canvas rendering is intentionally left as a no-op since the feature is WebGL-only.

src/gameobjects/pointlight · high confidence

New Scene lifecycle and transition events exposed

The \Phaser.Scenes.Events\ namespace now exposes a comprehensive set of string constants for scene lifecycle and transition events. This includes new events for game object display list changes (\ADDED\_TO\_SCENE\, \REMOVED\_FROM\_SCENE\), a post-creation hook (\CREATE\), and a pre-render step (\PRE\_RENDER\). It also formalizes the scene transition flow with \TRANSITION\_OUT\, \TRANSITION\_INIT\, \TRANSITION\_START\, \TRANSITION\_WAKE\, and \TRANSITION\_COMPLETE\, allowing developers to hook into specific moments of scene initialization, state changes, and transitions.

src/scene/events · high confidence

New Shader Game Object for WebGL effects

A new Shader Game Object has been added to Phaser, allowing developers to render custom GLSL fragment shaders as rectangular objects within the display list. This feature supports loading shaders from the cache or providing inline source code, and enables the binding of up to four texture inputs (iChannel0 to iChannel3) for complex visual effects. The implementation includes a dedicated WebGL renderer that handles rendering to the display list or to a texture via \setRenderToTexture\, along with factory methods for easy creation and configuration of uniforms and shader properties.

src/gameobjects/noise/noisesimplex2d, src/gameobjects/shader · high confidence

New SpriteGPULayer type definitions for high-performance sprite rendering

This change introduces the TypeScript/JSDoc type definitions for the new SpriteGPULayer game object, enabling the rendering of millions of stateless, animated sprites. The diff adds typedefs for the layer configuration (SpriteGPULayerConfig), individual member properties (Member) including per-vertex tint and alpha, and animation settings (MemberAnimation, SetAnimation). Key features exposed in these types include support for non-looping animations for one-off effects, a new tint mode system (TintModes) replacing the previous tint fill approach, and the ability to animate member properties like position, rotation, and scale using easing functions.

src/gameobjects/spritegpulayer/typedefs · high confidence

New Stamp Game Object for screen-space rendering

Added a new Stamp Game Object that renders at a fixed screen position, ignoring camera scroll and transforms, making it suitable for HUDs and overlays. The implementation includes the core Stamp class extending Image, a dedicated Canvas renderer that temporarily resets camera scroll to ensure correct positioning, and factory/creator registrations to allow easy instantiation via scene methods.

src/gameobjects/stamp · high confidence

New Stencil and StencilReference Game Objects

Phaser 4.2.0 introduces WebGL-only Stencil and StencilReference game objects to efficiently control rendering masks. The Stencil object acts as a container that writes to the stencil buffer, supporting layer addition/subtraction, inversion, and clearing (full or region-based) via configurable modes and alpha strategies. The StencilReference object allows re-rendering an existing Stencil with different settings (such as inverting or clearing) without recreating the geometry, enabling complex mask reuse and manipulation.

src/gameobjects/stencil · high confidence

New Structs module with List, Map, ProcessQueue, RTree, and Size components

A new \Phaser.Structs\ module has been introduced to provide specialized data structures for internal and public use. The \List\ class offers a generic, ordered collection with stable sorting, callback hooks, and positional traversal. \Map\ provides a key-value store with indexed iteration and bulk loading via \setAll\. \ProcessQueue\ manages deferred additions and removals of active items (such as cameras or plugins) to prevent iteration bugs, extending \EventEmitter\ and supporting a \checkQueue\ mode to enforce uniqueness. \RTree\ implements a high-performance 2D spatial index (RBush) with a fixed accessor structure to resolve CSP policy violations. Finally, \Size\ allows for managing width/height dimensions with aspect ratio locking, min/max clamping, and grid snapping.

src/structs · high confidence

New Time system with Clock, Timeline, and TimerEvent classes

The \src/time\ module has been restructured into a new plugin-based architecture featuring three core components: \Clock\, \Timeline\, and \TimerEvent\. The \Clock\ acts as the central time manager for a Scene, handling delta time scaling, pausing, and scheduling \TimerEvent\ instances which represent delayed or repeating callbacks. A new \Timeline\ class has been introduced as a sequencer for scheduling complex event chains (callbacks, tweens, sounds) at specific times, extending \EventEmitter\ for event-driven control. \TimerEvent\ objects are now explicit instances managed by the \Clock\, supporting features like time scaling, start offsets, and infinite looping with safety checks against zero-delay infinite loops. This change replaces the previous timer implementation with a more robust, scene-lifecycle-aware system accessible via \this.time\.

src/time · high confidence

New Tint Modes and Blend Modes available in Renderer

The renderer now exposes new tint modes (TintModes) including FILL, ADD, SCREEN, OVERLAY, HARD\_LIGHT, MULTIPLY\_TWO, and MULTIPLY\_ADD, allowing for more flexible color manipulation of Game Objects, particularly supporting two-color tinting for Spine animations. Additionally, new blend modes such as HARD\_LIGHT, EXCLUSION, HUE, SATURATION, and COLOR are available for compositing visuals, with most new modes supporting both Canvas and WebGL renderers.

src/renderer · high confidence

New Tween lifecycle event constants

The tweening system now exposes a set of new event constants for the \Phaser.Tweens.Events\ namespace, allowing developers to listen for specific lifecycle moments. These include \active\, \start\, \complete\, \loop\, \repeat\, \yoyo\, \update\, \pause\, \resume\, and \stop\. Each event provides context such as the tween instance, target objects, and property values (current/previous) where applicable, enabling more granular control over animation behavior.

src/tweens/events · high confidence

New TypeScript definitions for BitmapText types and configuration

This change introduces a comprehensive set of new TypeScript typedefs for the BitmapText system, improving type safety and IDE support. New types include \BitmapFontCharacterData\ (which now includes WebGL UV data as of version 3.50), \BitmapFontData\, \BitmapTextConfig\, \DisplayCallbackConfig\, \JSONBitmapText\, \RetroFontConfig\, and \TintConfig\. Additionally, new types \BitmapTextSize\, \BitmapTextCharacter\, \BitmapTextLines\, and \BitmapTextWord\ are added to provide detailed type information for the \getTextBounds\ return value, including per-character and per-word positioning data. These definitions are organized under the \Phaser.Types.GameObjects.BitmapText\ namespace.

src/gameobjects/bitmaptext/typedefs · high confidence

New TypeScript definitions generator tooling

The \scripts/tsgen/bin\ directory now contains the compiled JavaScript entry points for the TypeScript definitions generator. This includes a \Parser\ that processes JSDoc output to build the \phaser.d.ts\ type definitions and a \publish\ script that filters the documentation data (removing undocumented, private, and package-level items) and writes the final \phaser.json\ and \phaser.d.ts\ files to the destination directory.

scripts/tsgen/bin · high confidence

New TypeScript type definitions for core configuration objects

The \src/core/typedefs\ directory now includes a comprehensive set of JSDoc-based TypeScript definitions for Phaser's core configuration structures. This adds explicit type support for \GameConfig\, \RenderConfig\, \FPSConfig\, \InputConfig\ (including mouse, keyboard, touch, and gamepad sub-configs), \LoaderConfig\, \ScaleConfig\, \PhysicsConfig\, \AudioConfig\, \PluginObject\, and \DOMContainerConfig\. Users benefit from improved IDE autocomplete, type checking, and documentation for game setup and runtime configuration options.

src/core/typedefs · high confidence

New Video Game Object for in-game playback

A new Video Game Object has been added to the engine, allowing developers to play video files, video streams, or media streams directly within scenes. This feature supports playback via the Request Video Frame API (with a polyfill for older browsers), enables transparent video rendering using WebM files with alpha channels, and provides methods to load videos from the cache or directly from URLs. It includes support for autoplay policies, snapshotting, and standard Game Object behaviors like scaling, rotating, and tinting.

src/gameobjects/video · high confidence

New WebGL Rope Game Object for flexible strip rendering

Adds a new Rope Game Object that renders a texture stretched across a series of user-defined vertices, enabling effects like waving flags, banners, cloth, or wavy water. This WebGL-only component supports horizontal or vertical alignment, per-vertex color and alpha data, and frame-based animations via the \anims\ property. It includes factory and creator methods for easy instantiation, a dedicated WebGL renderer that integrates with the post-pipeline for effects like glow or blur, and a stubbed Canvas renderer.

src/gameobjects/rope · high confidence

New WebGL batch rendering architecture for 2D and lighting

The \src/renderer/webgl/renderNodes\ directory has been completely rewritten to introduce a modular batch handler system. This change replaces the previous rendering logic with a hierarchy of specialized nodes: \BatchHandler\ serves as the base, while \BatchHandlerQuad\ handles standard textured quads (Images, Sprites) with support for multi-texturing, normal-map lighting, and smooth pixel art. New handlers include \BatchHandlerPointLight\ for efficient radial light rendering, \BatchHandlerTri\ and \BatchHandlerTriFlat\ for Mesh2D and Graphics objects, \BatchHandlerStrip\ for Rope objects, and \BatchHandlerTileSprite\ for tiled textures with frame clamping/wrapping. The \Camera\ node has also been refactored to orchestrate this new pipeline, handling internal/external filters and compositing via \BatchHandlerQuadSingle\. This architecture enables better performance, more flexible shader composition, and dedicated support for advanced features like secondary tinting and lighting strategies.

src/renderer/webgl/renderNodes · high confidence

New WebGL render nodes for GPU-driven sprite and tilemap layers

The WebGL renderer now includes dedicated render nodes for high-performance, GPU-driven rendering of complex sprite and tilemap layers. SubmitterSpriteGPULayer and SubmitterTilemapGPULayer handle these objects as standalone renderers, managing their own shader programs and vertex buffers to support features like normal-mapped lighting, smooth pixel art upscaling, animated tiles, and self-shadowing. Additionally, new submitters for standard quads (SubmitterQuad), meshes (SubmitterMeshToQuad), tiles (SubmitterTile), and tile sprites (SubmitterTileSprite) standardize how these objects are batched, with specific optimizations like frame clamping for tiles to prevent texture bleeding and dynamic UV support for tile sprites.

src/renderer/webgl/renderNodes/submitter · high confidence

New WebGL renderer type definitions for Phaser 4.0.0

This location introduces a comprehensive set of new JSDoc type definitions for the WebGL renderer, marking the start of the 4.0.0 API. The changes add specific types for alpha strategies (keep, dither, threshold), drawing context options (including stencil and mipmap support), shader addition configurations, and detailed attribute buffer layouts. It also defines structures for WebGL global parameters (bindings, scissor, viewport), stencil parameters, and texture compression support (including S3TCSRGB), providing the foundational type system for the new rendering pipeline.

src/renderer/webgl/typedefs · high confidence

New WebGL shader addition makers for lighting, texturing, and effects

The \src/renderer/webgl/shaders/additionMakers\ directory now provides a comprehensive set of factory functions to configure modular WebGL shader additions. These include makers for multi-texture sampling (\MakeGetTexture\, \MakeDefineTexCount\), normal-mapped lighting (\MakeApplyLighting\, \MakeGetNormalFromMap\, \MakeDefineLights\), and visual effects like smooth pixel art (\MakeSmoothPixelArt\) and alpha discard strategies (\MakeApplyAlphaDiscard\). This modular approach allows the renderer to dynamically inject specific GLSL logic—such as coordinate wrapping for TileSprites or bounded sampling—into the rendering pipeline.

src/renderer/webgl/shaders/additionMakers · high confidence

New WebGL shader library and filter pipeline

The WebGL renderer now includes a comprehensive set of new GLSL shader modules for the fragment pipeline. This adds support for advanced visual effects including multiple blend modes (Normal, Add, Multiply, Screen, Overlay, etc.), lighting calculations with cone and self-shadowing support, and a wide range of image filters such as Blur, Bokeh, Glow, Vignette, Wipe, and ColorMatrix. The tinting system has been refactored to support multiple modes (Multiply, Add, Hard Light, Soft Light, etc.) via a mode enum, and new utility shaders handle texture sampling, normal map generation, and alpha discard strategies.

src/renderer/webgl/shaders · high confidence

New WebGL wrapper classes for state and resource management

The WebGL renderer now uses dedicated wrapper classes to encapsulate and manage core WebGL resources and state, including WebGLBufferWrapper, WebGLFramebufferWrapper, WebGLGlobalWrapper, WebGLProgramWrapper, WebGLShaderSetterWrapper, WebGLTextureUnitsWrapper, WebGLTextureWrapper, WebGLVAOWrapper, and WebGLVertexBufferLayoutWrapper. These wrappers centralize the lifecycle management of buffers, textures, framebuffers, and shader programs, ensuring that raw WebGL objects are not exposed outside the renderer. This architecture allows the renderer to transparently handle WebGL context loss and restoration, automatically recreating resources and re-applying state without requiring other systems to be aware of the underlying WebGL events.

src/renderer/webgl/wrappers · high confidence

New alignment functions for bottom-left, bottom-right, top-left, and top-right positions

The \Phaser.Display.Align.In\ module now includes dedicated alignment functions for the four corner positions: \BottomLeft\, \BottomRight\, \TopLeft\, and \TopRight\. These functions allow developers to align a Game Object so that its respective corner matches the corresponding corner of a reference object, with optional horizontal and vertical offsets. The \QuickSet\ function has also been updated to support these new positions via the \ALIGN\_CONST\ enum values \LEFT\_BOTTOM\, \LEFT\_TOP\, \RIGHT\_BOTTOM\, and \RIGHT\_TOP\, which map to their bottom/top counterparts for consistency.

src/display/align/in · high confidence

New and improved Phaser.Utils.Array utilities

The \src/utils/array\ module has been completely rewritten, introducing a suite of new array manipulation functions and fixing several long-standing bugs. New capabilities include \Flatten\ for deep array flattening, \SortByDigits\ for natural numeric sorting of strings, \FindClosestInSorted\ for binary search on sorted arrays, and \MoveAbove\/\MoveBelow\ for reordering elements relative to others. Existing functions have been enhanced: \GetFirst\ now supports negative start indices to search from the end of the array, \NumberArray\ allows reverse ranges, and \GetRandom\ no longer returns null for valid ranges. The module also introduces \StableSort\ for consistent depth sorting and \SafeRange\ to prevent out-of-bounds errors, while fixing issues in \Remove\, \AddAt\, and \BringToTop\ that previously caused incorrect results or crashes.

src/utils/array · high confidence

New and updated Scale Manager events

The Scale Manager now exposes new events for fullscreen state changes: ENTER\_FULLSCREEN, FULLSCREEN\_FAILED, FULLSCREEN\_UNSUPPORTED, and LEAVE\_FULLSCREEN, allowing developers to react to successful entry, failures, unsupported browsers, and exit from fullscreen mode. The existing RESIZE event has been updated to provide additional context by passing previous width and height values alongside the standard game, base, and display size components, facilitating more precise handling of dimension changes.

src/scale/events · high confidence

New and updated texture parsers for compressed formats and atlases

The texture parsing system has been expanded with new parsers for compressed texture containers: KTXParser now handles KTX files, and PVRParser supports PVR files including sRGB variants of ASTC, S3TC, and ETC formats, as well as experimental BPTC support. A new PCT parser and decoder have been added for the Phaser Compact Texture Atlas format. Existing parsers have been updated to support new features: JSONHash and JSONArray now copy extra JSON data to the Texture's customData and handle frame pivots and scale9 borders; JSONHash now uses hasOwnProperty checks to safely iterate frames; SpriteSheetFromAtlas now correctly applies trim offsets for frames extracted from atlases; and AtlasXML now supports trimmed frames. The parsers are now exposed via the index module.

src/textures/parsers · high confidence

New animation configuration type definitions

The animation system now exposes dedicated JSDoc type definitions for configuration objects, including \Animation\, \PlayAnimationConfig\, \GenerateFrameNames\, \GenerateFrameNumbers\, and JSON-based animation structures. These definitions document new optional properties such as \randomFrame\ (which allows starting playback from a random frame for variety in sprite groups) and \showBeforeDelay\ (which controls whether the first frame appears immediately or after a delay), providing better type support and documentation for developers configuring animations.

src/animations/typedefs · high confidence

New canvas display utilities for interpolation, pooling, and styling

The \src/display/canvas\ area now exposes a suite of helper modules to manage canvas rendering behavior and DOM integration. \CanvasInterpolation\ provides \setCrisp\ and \setBicubic\ methods to control CSS \image-rendering\ properties, allowing developers to choose between sharp pixel-art scaling and smooth interpolation. \CanvasPool\ introduces a recycling system for 2D canvas elements, featuring a new \selfParent\ argument in the \create\ method to allow a canvas to act as its own parent key for easier removal. \Smoothing\ offers cross-browser vendor-prefixed control over the \imageSmoothingEnabled\ context property, while \TouchAction\ and \UserSelect\ apply specific CSS styles (\touch-action\, \user-select\, etc.) to disable default browser interactions on the canvas element.

src/display/canvas · high confidence

New color manipulation and gradient infrastructure

The display module now includes new classes to support advanced color effects and gradients: ColorMatrix provides a 5x4 matrix for shader-based color operations like brightness and saturation; ColorRamp manages sequences of color transitions and encodes them into GPU data textures for use by the new Gradient game object; ColorBand defines individual color transitions with configurable interpolation and color spaces; and RGB offers a lightweight, mutable container for normalized color components with change notifications.

src/display · high confidence

New display type definitions for color configuration and objects

Added JSDoc typedefs for display-related color structures, including \ColorBandConfig\ for defining color ramp bands with interpolation and color space options, \ColorObject\ for RGBA values, \HSVColorObject\ for hue/saturation/value, and \InputColorObject\ for input color data. These definitions are organized under the \Phaser.Types.Display\ namespace to provide structured type information for color handling in the display module.

src/display/typedefs · high confidence

New interpolation methods added to Phaser.Math.Interpolation

The \Phaser.Math.Interpolation\ namespace now includes several new interpolation functions: \Bezier\ for generalized Bezier curves over arbitrary control points, \CatmullRom\ for smooth spline interpolation (supporting both open and closed curves), \CubicBezier\ and \QuadraticBezier\ for standard Bezier interpolation with 4 and 3 points respectively, and \SmoothStep\ and \SmootherStep\ for S-shaped easing transitions. These are available via the \src/math/interpolation\ module and exported through \index.js\.

src/math/interpolation · high confidence

New loader file types for animations, Aseprite, and XML atlases

The loader now supports loading Animation JSON data, Aseprite animation files, and XML-based texture atlases. Animation JSON files are automatically processed by the Animation Manager upon load. Aseprite files coordinate the loading of both the sprite sheet image and its JSON data, supporting normal maps and adding the result to the Texture Manager. XML-based atlases are also now supported, allowing developers to use XML atlas formats alongside the existing JSON-based ones.

src/loader/filetypes · high confidence

New loader type definitions for file configuration and XHR settings

Added JSDoc type definitions for \Phaser.Types.Loader.FileConfig\ and \Phaser.Types.Loader.XHRSettingsObject\ to improve IDE support and documentation for the loader system. \FileConfig\ now includes properties for handling compressed texture formats (ETC, ASTC, S3TC, etc.), shader configuration, and a \maxRetries\ option for controlling load failure retries. \XHRSettingsObject\ exposes detailed configuration for HTTP requests, including a new \withCredentials\ property to manage cross-site access control credentials, as well as headers, timeouts, and authentication details.

src/loader/typedefs · high confidence

New math utilities and classes for noise, geometry, and transformations

The \src/math\ area now includes a comprehensive suite of new mathematical functions and classes. This adds procedural noise generation capabilities via \Hash\, \HashCell\, and \HashSimplex\, alongside geometry helpers like \GetCentroid\ and \GetVec2Bounds\. New interpolation and rounding utilities (\Bernstein\, \CatmullRom\, \CeilTo\, \FloorTo\, \LinearXY\) are available, as well as new 3D transformation classes \Euler\ and \Matrix3\. The \Matrix4\ class has been extended with new methods including \transform\, \lookAtRH\, \getInverse\, \getMaxScaleOnAxis\, \projectViewMatrix\, and \unprojectViewMatrix\. Additionally, the \Quaternion\ class now supports an \onChangeCallback\ and new methods like \fromEuler\ and \setFromRotationMatrix\.

src/math · high confidence

New modular easing function library with comprehensive documentation

The \src/math/easing\ directory now provides a fully structured, modular easing library. This change introduces a centralized \EaseMap\ for convenient access to all easing types (Linear, Quadratic, Cubic, Quartic, Quintic, Sine, Expo, Circular, Elastic, Back, Bounce, and Stepped) along with their In, Out, and InOut variants. Each easing function is implemented in its own file with detailed JSDoc comments explaining the visual effect and parameters, and organized into sub-namespaces (e.g., \Phaser.Math.Easing.Back\) for cleaner API usage.

src/math/easing · high confidence

New object utility functions for cloning, merging, and property access

The \src/utils/object\ module now exposes a comprehensive suite of object manipulation utilities. Users can perform shallow or recursive deep copies via \Clone\ and \DeepCopy\, and merge objects with \Extend\, \Merge\, and \MergeRight\ (which supports deep merging and specific overwrite strategies). Property access is enhanced with \GetValue\ (supporting dot-notation and alternative sources), \GetFastValue\ for top-level lookups, and \GetAdvancedValue\ for dynamic or randomized configuration values. Additionally, the module provides \SetValue\ for setting nested properties, \Pick\ for selecting specific keys, and validation helpers like \HasAll\, \HasAny\, \HasValue\, and \IsPlainObject\.

src/utils/object · high confidence

New particle emission and death zones: EdgeZone, RandomZone, and DeathZone

This update introduces three new zone types for Phaser Particle Emitters, allowing more precise control over particle behavior. EdgeZone places particles sequentially along the edges of a shape (such as a Curve or Path), supporting options for yoyo traversal and seamless looping. RandomZone spawns particles at random positions within the interior of a shape that provides a getRandomPoint method. DeathZone defines a region that kills particles upon entering or leaving, using the particle's worldPosition for collision checks against a source object with a contains method. These zones are exported via the Phaser.GameObjects.Particles.Zones namespace.

src/gameobjects/particles/zones · high confidence

New post-processing filter effects for cameras

The \src/filters\ area now includes a comprehensive suite of new post-processing filter controllers that can be applied to cameras via the FilterList component. These new capabilities include Barrel (pinch/expand distortion), Blocky (pixelation), Blur, Bokeh (shallow depth of field and Tilt Shift), ColorMatrix (color grading), CombineColorMatrix (advanced compositing and alpha transfer), Displacement (map-based distortion), Glow (luminous halos), and GradientMap (recoloring via color ramps). The diff also introduces the base Controller class which manages filter configuration and padding, and adds a Blend filter for applying textures with specific blend modes.

src/filters · high confidence

New scene lifecycle and video playback events exposed

The \src/gameobjects/events\ module now exports dedicated event constants for Game Object lifecycle and Video playback. Game Objects can now listen for \ADDED\_TO\_SCENE\ and \REMOVED\_FROM\_SCENE\ events to detect when they enter or leave a Scene, and the \DESTROY\ event now includes a \fromScene\ boolean parameter to indicate if the destruction was initiated by the Scene. Additionally, the Video Game Object exposes a comprehensive set of new events including \VIDEO\_TEXTURE\ (for when the video texture is ready), \VIDEO\_LOCKED\ and \VIDEO\_UNLOCKED\ (for browser autoplay policy handling), \VIDEO\_METADATA\, \VIDEO\_CREATED\, \VIDEO\_PLAY\, \VIDEO\_PLAYING\, \VIDEO\_SEEKING\, \VIDEO\_SEEKED\, \VIDEO\_STALLED\, \VIDEO\_STOP\, \VIDEO\_COMPLETE\, \VIDEO\_LOOP\, \VIDEO\_ERROR\, \VIDEO\_UNSUPPORTED\, and \VIDEO\_CREATED\, allowing for finer-grained control and feedback during video playback.

src/gameobjects/events · high confidence

New snapshot typedefs with unpremultiply support

Added JSDoc typedefs for the snapshot callback and state configuration, including a new \unpremultiplyAlpha\ boolean option for WebGL snapshots to control whether alpha is unpremultiplied before being returned.

src/renderer/snapshot/typedefs · high confidence

New texture type definitions and configuration objects

This update introduces a comprehensive set of new TypeScript/JSDoc type definitions for the texture system, primarily located in \src/textures/typedefs\. Key additions include \CaptureConfig\ for the new \DynamicTexture.capture\ method, which allows drawing objects in world space with specific transform, camera, and rendering options. It also adds \StampConfig\ and \RepeatConfig\ to configure stamping and tiling operations on dynamic textures. Furthermore, new types like \CompressedTextureData\ and \MipmapType\ provide structure for handling compressed texture formats, while \TextureSource\ and \TextureSourceElement\ unify the input types for texture creation. These definitions support the expanded capabilities of DynamicTextures and compressed texture handling in version 4.0.0.

src/textures/typedefs · high confidence

New tilemap orientation constants exposed via public API

The tilemap module now exposes orientation constants (Orthogonal, Isometric, Staggered, and Hexagonal) through a new \Phaser.Tilemaps.Orientation\ namespace. These constants are defined in \src/tilemaps/const/ORIENTATION\_CONST.js\ and re-exported via \src/tilemaps/const/index.js\, making them available for developers to identify or specify tilemap orientations in their projects.

src/tilemaps/const · high confidence

New typedefs for GameObject configuration, matrix results, and WebGL rendering steps

This change introduces a set of new JSDoc typedefs in the \Phaser.Types.GameObjects\ namespace to improve type definitions for developers. Specifically, it adds \GameObjectConfig\ to define the standard configuration properties for creating game objects (such as position, scale, and visibility), \DecomposeMatrixResults\ and \GetCalcMatrixResults\ to describe the output structures for matrix decomposition and calculation operations, and \FiltersInternalExternal\ to distinguish between internal and external filter lists. Additionally, \RenderWebGLStep\ is defined to support customizing WebGL rendering sequences, and \JSONGameObject\ provides the structure for serialized game object data. These definitions are exported via a new \index.js\ file.

src/gameobjects/typedefs · high confidence

New utility functions for base64 encoding and class management

This change introduces several new utility modules in the \src/utils\ directory. It adds \Phaser.Class\, a factory for creating ES5-style classes with prototype-based inheritance, supporting features like \Extends\ and \Mixins\. It also includes \Phaser.Utils.NOOP\ and \Phaser.Utils.NULL\ for efficient callback handling. Additionally, a new \Phaser.Utils.Base64\ namespace is added, providing \ArrayBufferToBase64\ and \Base64ToArrayBuffer\ functions to convert between ArrayBuffers and base64 strings, with optional support for data URIs.

src/utils · high confidence

New visual effect and masking actions

Added Phaser.Actions.AddEffectBloom, AddEffectShine, and AddMaskShape to the Actions module. AddEffectBloom applies a bloom filter to cameras or game objects, returning references to the underlying filters for further control. AddEffectShine creates a specular highlight effect using a dynamic texture and tween, with options for displacement maps and reveal modes. AddMaskShape applies a mask to targets using configurable shapes (circle, ellipse, square, rectangle) with optional blur and padding.

src/actions · high confidence

Phaser.Geom.Circle geometry implementation

The \src/geom/circle\ directory now contains the complete implementation of the \Phaser.Geom.Circle\ class and its associated utility functions. This change introduces a new geometry object defined by a center position and radius, designed for hit-testing, overlap checks, and spatial queries without requiring a physics body. The module provides methods to calculate area and circumference, check containment for points and rectangles, clone and copy circle data, and retrieve points along the circumference or random points within the circle.

src/geom/circle · high confidence

Phaser.Geom.Rectangle API expansion and refactoring

The \src/geom/rectangle\ module has been significantly expanded and refactored. New capabilities include \RandomOutside\ for generating points between two rectangles, \Intersection\ for calculating overlap areas, \MarchingAnts\ for perimeter point generation, and \FromXY\ for creating rectangles from coordinate pairs. Existing methods have been updated: \GetPoints\ now supports a \stepRate\ parameter for flexible point spacing, \Union\ caches internal variables to prevent corruption when reusing input rectangles as output, and \GetLineA/B/C/D\ now returns typed \Line\ objects with optional reuse support. The core \Rectangle\ class now exposes a \type\ property for fast type checking, and several methods (\GetCenter\, \GetSize\, \GetPoint\, etc.) now accept an optional output object to reduce garbage collection.

src/geom/rectangle · high confidence

Phaser.Math.Pow2 now exports GetPowerOfTwo, IsSizePowerOfTwo, and IsValuePowerOfTwo

The \Phaser.Math.Pow2\ namespace now exposes three specific utility functions: \GetPowerOfTwo\ (which returns the smallest power of 2 greater than or equal to a given value), \IsSizePowerOfTwo\ (which checks if width and height are powers of two, useful for texture dimensions), and \IsValuePowerOfTwo\ (which tests if a single value is a power of two). These functions are now available via the \index.js\ entry point alongside their legacy aliases (\GetNext\, \IsSize\, \IsValue\), ensuring consistent naming and availability for developers working with power-of-two calculations.

src/math/pow2 · high confidence

Static BitmapText rendering and component integration

Static BitmapText objects are now fully rendered in both WebGL and Canvas contexts, supporting multi-line text with configurable alignment, character and line spacing, and drop shadows. The WebGL renderer batches characters using pre-calculated bounds and supports per-character and per-word tinting via the new tint mode system, while the Canvas renderer applies consistent scaling, kerning, and pixel rounding. A new creator and factory allow easy instantiation via scene methods, and the object now integrates with standard components like Origin, Mask, and Depth for correct positioning and rendering order.

src/gameobjects/bitmaptext/static · high confidence

Texture Manager event string constants and key-specific listeners

The Texture Manager now exposes dedicated event string constants for texture lifecycle changes, allowing scenes to listen for specific events like 'addtexture', 'removetexture', 'onload', 'onerror', and 'ready'. Additionally, key-specific events ('addtexture-' and 'removetexture-') are introduced, enabling listeners to target only textures with a particular key rather than all texture changes.

src/textures/events · high confidence

WebGL texturing for Image and TileSprite GameObjects

The WebGL renderer now includes dedicated render nodes for handling texture data for Image and TileSprite GameObjects. TexturerImage extracts frame references, UV sources, and resolution-adjusted display dimensions, correctly handling cropped objects by switching to crop UVs and scaling dimensions by the frame source's resolution. TexturerTileSprite computes a UV transformation matrix that accounts for tile position, scale, and rotation, allowing textures to scroll, scale, and rotate independently of the GameObject's transform. These nodes ensure device-independent pixel values are passed to the upstream batcher.

src/renderer/webgl/renderNodes/texturer · high confidence

Architecture

Game Object features refactored into reusable components

The monolithic Game Object implementation has been split into modular, mixin-based components (such as Alpha, BlendMode, Crop, Depth, Filters, Flip, GetBounds, and TransformMatrix) that can be applied to any Game Object class. This change allows developers to selectively add or remove capabilities like alpha blending, cropping, depth sorting, and WebGL filters, resulting in a more flexible architecture where custom Game Objects can be tailored to specific needs without inheriting unused functionality.

src/gameobjects/components · high confidence

Group typedefs moved to namespaced scopes

The type definitions for the Group system (including GroupConfig, GroupCreateConfig, and related callbacks) have been reorganized into a dedicated \src/gameobjects/group/typedefs\ directory and are now exposed under the \Phaser.Types.GameObjects.Group\ namespace rather than as globals. This change improves type organization and reduces global namespace pollution for developers using TypeScript or JSDoc-based type checking.

src/gameobjects/group/typedefs · high confidence

Matter.js physics components restructured into dedicated modules

The Matter.js physics capabilities for Game Objects have been reorganized from a monolithic structure into distinct, dedicated component modules (Bounce, Collision, Force, Friction, Gravity, Mass, Sensor, SetBody, Sleep, Static, Transform, and Velocity). This change improves code maintainability and allows developers to understand the specific physics features available on Matter-enabled objects through clearly separated files, while preserving the existing API surface for controlling body properties like restitution, collision filters, forces, friction, gravity, mass, sensor state, body creation, sleep management, static state, transform, and velocity.

src/physics/matter-js/components · high confidence

Behavioural changes

2D Camera system refactored into BaseCamera and Effects architecture

The 2D Camera system has been restructured to separate core view management from visual effects. A new \BaseCamera\ class now handles fundamental camera properties such as viewport, scroll, and world view, while the \Camera\ class extends it to provide specific effect handlers (Fade, Flash, Shake, Pan, Zoom, RotateTo) and filter support. This change introduces an effect-based system where callbacks are passed the camera instance, and the \CameraManager\ now manages a default un-transformed camera instance for matrix calculations. Users should note that this is a significant behavioral change to how camera transforms and effects are handled, with only systems using \TransformerImage\ currently rendering correctly.

src/cameras/2d · high confidence

Add min and max zoom configuration to camera control types

New typedefs for FixedKeyControlConfig and SmoothedKeyControlConfig now include minZoom and maxZoom properties, allowing users to define the smallest and largest zoom values the camera can reach. These changes are part of a broader effort to move camera control type definitions into properly namespaced scopes under Phaser.Types.Cameras.Controls.

src/cameras/controls/typedefs · high confidence

Animation system refactored with new playback behaviors and event-driven architecture

The animation system has been significantly reworked to improve reliability and flexibility. Time scale settings on a Sprite's Animation component now persist across animation changes, rather than resetting to 1 when a new animation loads. Playback logic has been corrected to properly handle reverse animations, yoyo effects, and frame duration calculations, ensuring animations play as intended without skipping frames or jumping incorrectly. The system has also migrated from callback-based notifications to an event-driven model, with all animation events now passing the Game Object as the final argument. New capabilities include the ability to play animations in reverse, set random starting frames for variety in sprite groups, create animations directly from Aseprite exports, and blend animations using a new mixing system that allows custom delays between animation transitions.

src/animations · high confidence

Arcade Physics body properties are now exposed as modular components

The Arcade Physics system has been refactored to expose body properties (such as acceleration, angular motion, bounce, collision masks, drag, friction, gravity, mass, size, and velocity) as distinct, reusable component modules. This change provides a consistent, chainable API for configuring physics bodies and introduces new capabilities like per-body collision categories and masks, direct position-based velocity control, and configurable damping for smoother deceleration.

src/physics/arcade/components · high confidence

Arcade Physics events are now string constants

The Arcade Physics event system has been refactored so that all event types (such as 'collide', 'overlap', 'pause', 'resume', 'tilecollide', 'tileoverlap', 'worldbounds', and 'worldstep') are exported as string constants from the \src/physics/arcade/events\ module. This change provides a consistent, type-safe way to listen to physics events using \this.physics.world.on()\ instead of relying on magic strings, and introduces the new \worldstep\ event which fires after each physics update.

src/physics/arcade/events · high confidence

BitmapText rendering and layout engine overhaul

The BitmapText game object has been refactored to improve rendering performance and layout accuracy. A new internal \BatchChar\ function inlines character batching to reduce function call overhead. Text wrapping logic has been fixed to correctly handle lines ending with spaces and carriage returns, and a new \lineSpacing\ property allows vertical adjustment between lines. The \GetBitmapTextSize\ function now calculates bounds based on glyph data and letter spacing for consistent origin alignment, and includes an optional \updateOrigin\ parameter to automatically adjust the text's origin. Additionally, \ParseXMLBitmapFont\ now pre-calculates WebGL UV data during parsing to save CPU cycles at render time, and \ParseFromAtlas\ automatically populates texture frames for each glyph.

src/gameobjects/bitmaptext · high confidence

Cache events now expose string constants for ADD and REMOVE

The cache event system has been refactored to use explicit string constants for event types. New files in src/cache/events define ADD\_EVENT and REMOVE\_EVENT, exporting the strings 'add' and 'remove' respectively, and index.js re-exports these as Phaser.Cache.Events.ADD and Phaser.Cache.Events.REMOVE. This ensures that all cache events have a consistent string type, addressing issue \#6136, and allows consumers to reference these events by name rather than hardcoding strings.

src/cache/events · high confidence

Camera controls now enforce configurable min/max zoom limits

The FixedKeyControl and SmoothedKeyControl modules in src/cameras/controls now expose minZoom and maxZoom configuration properties (defaulting to 0.001 and 1000 respectively), allowing users to define the precise zoom boundaries for camera movement. This change aligns the controls' zoom behavior with the Base Camera's capabilities and ensures that zoom levels are clamped within these specified limits during updates.

src/cameras/controls · high confidence

Camera module reorganization and namespace separation

The camera functionality has been restructured to improve code organization. The main camera logic is now exposed via a new \src/cameras/index.js\ entry point that exports the \Controls\ and \Scene2D\ components. These components are sourced from their own dedicated subdirectories (\./controls\ and \./2d\), effectively moving camera controls into their own namespace and separating the 2D scene camera implementation from the broader source tree.

src/cameras · high confidence

Complete rewrite of the Input system with new plugin architecture

The input handling in Phaser has been completely rewritten from the ground up, replacing the legacy Input Manager with a new, modular plugin-based architecture. This change introduces the InputPlugin as the primary interface for scenes, which manages a central InputManager responsible for DOM event listeners and Pointer objects. The new system features a dedicated InputPluginCache for registering and installing sub-plugins (such as Mouse, Touch, Keyboard, and Gamepad) based on configuration, allowing for more flexible and isolated input handling. Key behavioral updates include the introduction of \CreateInteractiveObject\ for managing per-game-object input state (hit areas, drag state), support for multi-touch with up to 10 pointers, native wheel event support, and improved handling of pointer coordinates across cameras and containers. The legacy \InputHandler\ class and associated DOM callback queues have been removed in favor of the new event-driven plugin system.

src/input · high confidence

Ellipse geometry module refactored into modular utility functions

The \Phaser.Geom.Ellipse\ implementation has been restructured to expose a suite of standalone utility functions (such as \Area\, \Circumference\, \Contains\, \GetPoint\, \GetPoints\, \Random\, and \Clone\) as static members on the \Ellipse\ class. This change allows users to perform geometric calculations and point sampling without needing to instantiate an \Ellipse\ object, while the core \Ellipse\ class methods now delegate to these shared utilities. The module also introduces new capabilities for calculating ellipse area and circumference, and standardizes point operations to return \Vector2\ objects.

src/geom/ellipse · high confidence

EventEmitter now registered as a Scene Systems plugin

The EventEmitter is now registered as a plugin within the Scene Systems via the PluginCache, making it accessible via \scene.events\ and allowing it to be managed alongside other scene plugins. This change also introduces a new \src/events/index.js\ entry point that exports the EventEmitter under the \Phaser.Events\ namespace, providing a cleaner public API for accessing event-driven communication between game objects, scenes, and systems.

src/events · high confidence

Exposure of alignment constants in Phaser.Display.Align

The alignment constants (such as TOP\_LEFT, CENTER, and BOTTOM\_RIGHT) are now directly exposed on the Phaser.Display.Align namespace. Previously, these constants were likely internal or required separate imports; users can now access them directly via Phaser.Display.Align.TOP\_LEFT, etc., simplifying the API for positioning and alignment operations.

src/display/align · high confidence

Gamepad input refactored into a Scene-owned Input Plugin with improved button state handling

The gamepad system has been restructured from a standalone manager into a Scene-owned Input Plugin (GamepadPlugin), allowing gamepads to be accessed directly via properties like \pad1\ without waiting for connection events in every new Scene. The \Button\ class now tracks its pressed state to prevent spurious 'down' events when a button is held across scene transitions, and the \Axis.getValue()\ method correctly applies a dead-zone threshold to ignore minor stick drift. Additionally, the plugin now uses \eventemitter3\ for event dispatching and includes guards in \stopListeners\ and \disconnectAll\ to prevent errors on undefined gamepads.

src/input/gamepad · high confidence

Introduce default render node configurations for WebGL game objects

The WebGL renderer now exposes a set of default render node maps for various game objects, including BitmapText, Blitter, Graphics, Image, Mesh2D, ParticleEmitters, PointLights, Quads, Ropes, Stamps, TileSprites, and Tilemap layers. These files define the specific Submitter, BatchHandler, Transformer, and Texturer components that handle the rendering pipeline for each object type, allowing the renderer to construct the appropriate node graph for drawing these elements.

src/renderer/webgl/renderNodes/defaults · high confidence

Introduction of new core game initialization and configuration system

The \src/core\ directory has been restructured to introduce a dedicated configuration and initialization pipeline for the game engine. A new \Config\ class now parses and manages all game settings (such as scale, renderer type, and audio options) from the game configuration object, exposing them via a read-only \game.config\ property. The renderer creation logic has been extracted into a new \CreateRenderer\ module, which handles renderer selection (WebGL, Canvas, or Headless) and canvas setup based on device capabilities and build-time flags. Additionally, a new \DebugHeader\ module manages the console banner output, allowing users to customize or disable it via configuration. These changes centralize the game boot process, making the initialization sequence more modular and configurable.

src/core · high confidence

Introduction of the new Cache system with BaseCache and CacheManager

The \src/cache\ area now introduces the foundational classes for the game's asset caching system. \BaseCache\ provides a key-value store that emits events on add/remove operations and includes methods like \exists\, \getKeys\, and \destroy\. \CacheManager\ acts as the global owner of these caches, exposing specific instances for different asset types (such as \audio\, \video\, \json\, \atlas\, and \html\) and allowing developers to register custom caches via \addCustom\. This change replaces previous caching implementations with a structured, event-driven approach.

src/cache · high confidence

Keyboard event string constants are now exported as dedicated modules

The keyboard event identifiers (such as 'keydown', 'keyup', 'down', 'up', 'keycombomatch', and the dynamic 'keydown-' and 'keyup-' prefixes) are now defined in individual source files within \src/input/keyboard/events\ and re-exported via an index. This change provides a centralized, documented source for these string constants, ensuring consistency across the Keyboard Plugin and Key objects, and clarifying the specific event names users should listen for in their scenes.

src/input/keyboard/events · high confidence

Keyboard input now uses a global manager and scene-local plugin with capture and duplicate-event handling

The keyboard system has been restructured into two parts: a global KeyboardManager that listens for native DOM keyboard events and an event queue, and a scene-local KeyboardPlugin that processes those events. The manager now supports global key capture (via a config flag and a captures array) to preventDefault non-modified keys, and the plugin deduplicates rapid key events by tracking the previous key code, timestamp, and event type. This means keyboard input is more robust against duplicate firing on fast typing, and developers can control whether specific keys block default browser behavior globally or per-scene.

src/input/keyboard · high confidence

Layer is now a true GameObject with unified rendering and introspection

The Layer Game Object has been refactored to extend GameObject directly (mixing in EventEmitter and standard components like Alpha, BlendMode, Depth, Mask, and Visible), replacing its previous inheritance from List. This change ensures Layer shares the same class shape as other Game Objects, including identical properties and methods (such as setInteractive, which is now a no-op to maintain interface consistency). The implementation introduces dedicated Canvas and WebGL renderers that handle child rendering, alpha blending, and mask application, while also adding a displayList property and introspection support to fix errors when running introspection within containers. Additionally, Layer.destroy now emits a DESTROY event and destroys all children, and methods like addChildCallback utilize new display list management methods.

src/gameobjects/layer · high confidence

Loader events are now exported as string constants

The Loader event names (such as 'addfile', 'complete', 'filecomplete', 'loaderror', 'load', 'fileprogress', 'postprocess', 'progress', and 'start') are now explicitly defined as string constants in individual modules and re-exported via the \src/loader/events/index.js\ file. This ensures that all event types are consistently typed as strings, providing a stable reference for developers listening to loader events (e.g., \this.load.on(Phaser.Loader.Events.ADD, listener)\) and eliminating potential typos or inconsistencies in event name strings.

src/loader/events · high confidence

Loader plugin restructured with new file types and XHR settings

The loader module has been restructured to support a new unified file loading architecture. The core \File\ and \MultiFile\ classes now manage the full lifecycle of assets, including URL resolution, progress tracking, and error states. A new \FileTypesManager\ allows file types to register themselves, making them available as methods on the \LoaderPlugin\ (e.g., \this.load.image()\). The \LoaderPlugin\ now supports hierarchical configuration, allowing XHR settings, base URLs, and paths to be set at the game, scene, or individual file level. Additionally, the \XHRLoader\ has been updated to handle base64 data directly, support custom headers, and manage timeouts more effectively, while the \GetURL\ function ensures absolute URLs (including \capacitor://\ and \file://\) are not incorrectly prefixed.

src/loader · high confidence

Major overhaul of WebGL shader pipeline with new filters, lighting, and tint modes

The WebGL rendering pipeline has been significantly restructured and expanded. The core shading logic now uses a new \Multi\ pipeline with \highp float\ precision by default to fix rendering artifacts on Android devices, and introduces a \tintMode\ enum (replacing the previous \tintFill\) to support multiple blending behaviors like Multiply, Additive, Screen, Overlay, Hard Light, and two-color tinting. A comprehensive suite of new visual filters has been added, including Vignette, Wipe, Key, GradientMap, PanoramaBlur, Quantize, Blocky, and NormalTools. The system also introduces new lighting capabilities via Cone and Point Light game objects with dedicated shaders, and adds new game objects for Noise (Simplex and Cell variants), Gradient, and SpriteGPULayer for high-performance sprite rendering. Additionally, the pipeline now handles pre-multiplied alpha correctly, implements stencil operations with alpha discard strategies, and fixes UV coordinate and round-pixel precision issues.

src/renderer/webgl/shaders/src · high confidence

Matter.js physics engine upgraded to v0.20.0

The Matter.js physics library has been upgraded from v0.18 to v0.20.0, introducing new engine configuration options such as \Engine.syncVerts\ to help prevent vertex drift in high-velocity environments or when using pointer constraints. The \Body.gravityScale\ property now allows scaling the effect of world gravity on specific bodies, and the \ignoreGravity\ boolean is now correctly checked during internal engine functions to ensure it works as expected. Additionally, the \Runner\ module now includes improved delta smoothing and time correction for more stable game loops, and the \Body.wrap\ feature has been added to handle bounds wrapping.

src/physics/matter-js/lib/core · high confidence

New Canvas rendering utilities for blend modes and transform preparation

The Canvas renderer now includes two new internal utility functions in the utils folder. GetBlendModes.js provides a mapping of Phaser's default blend modes to native Canvas composite operations, supporting newer blend modes like multiply, screen, and overlay when the browser supports them, and explicitly handling the new ERASE mode. SetTransform.js consolidates the preparation of a Game Object for rendering by calculating the combined transform matrix, setting the appropriate blend mode and alpha, saving the context state, and configuring image smoothing based on the texture's scale mode or the renderer's antialias setting.

src/renderer/canvas/utils · high confidence

New DOM utility functions and orientation detection improvements

This change introduces a new set of DOM utility functions in the \src/dom\ directory, including \AddToDOM\, \CreateDOMContainer\, \GetTarget\, and \GetInnerHeight\, alongside updates to \GetScreenOrientation\. The \GetScreenOrientation\ function now prioritizes \window.orientation\ to ensure correct orientation detection on iOS devices, fixing issues where the Screen API was incomplete. Additionally, \CreateDOMContainer\ now supports a new \domPointerEvents\ configuration option to control the CSS \pointer-events\ attribute on the DOM container, and \AddToDOM\ has been refined to handle parent resolution more robustly. These utilities support the integration of DOM elements with the Scale Manager and Game Object system.

src/dom · high confidence

New Game Object lifecycle and scene integration system

The \src/gameobjects\ area now introduces a structured lifecycle for Game Objects, centered around the new \BuildGameObject\ and \BuildGameObjectAnimation\ helper functions. These utilities standardize how Game Objects are initialized with configuration properties (such as position, scale, and depth) and automatically registered with the Scene's \DisplayList\ and \UpdateList\. This change is supported by the new \DisplayList\ and \UpdateList\ plugins, which manage the rendering order and update cycles, and the \GetCalcMatrix\ utility, which unifies transform calculations. Additionally, the \GameObject\ base class and its associated \GameObjectFactory\ and \GameObjectCreator\ plugins have been updated to emit \ADDED\_TO\_SCENE\ and \REMOVED\_FROM\_SCENE\ events, ensuring that Game Objects are properly integrated into the Scene's event system and update flow from the moment they are created.

src/gameobjects · high confidence

New Scene type definitions and configuration types

Added JSDoc type definitions for the Scene system, including \CreateSceneFromObjectConfig\, \SettingsConfig\, and \SettingsObject\ to describe scene configuration and runtime state. New callback types were introduced for scene lifecycle methods (\SceneInitCallback\, \ScenePreloadCallback\, \SceneCreateCallback\, \SceneUpdateCallback\) and scene transitions (\SceneTransitionOnStartCallback\). The \SceneType\ union type was updated to include \CreateSceneFromObjectConfig\, and the \SceneTransitionConfig\ now exposes an \onStart\ callback, enabling better type checking for scene setup and transition logic.

src/scene/typedefs · high confidence

New Tilemap type definitions and configuration options

This update introduces a comprehensive set of new JSDoc type definitions for the Phaser Tilemaps system, including \CreateFromObjectLayerConfig\, \TiledObject\, \LayerDataConfig\, and \MapDataConfig\. For users, this provides improved IDE autocomplete and type checking when working with tilemap layers, object layers, and map data. Notably, \CreateFromObjectLayerConfig\ now includes a \sortByY\ property, allowing objects in a layer to be sorted by their Y position for correct rendering order, and \TiledObject\ definitions have been expanded to support point, polyline, and polygon object types.

src/tilemaps/typedefs · high confidence

New WebGL filter render node architecture

The WebGL rendering pipeline for filters has been completely rewritten for v4.0.0, introducing a new \BaseFilter\ and \BaseFilterShader\ class structure that replaces the previous implementation. This change introduces a suite of new filter render nodes—including Blur (with Low, Med, and High quality tiers), Barrel, Blend, Blocky, Bokeh, ColorMatrix, CombineColorMatrix, Displacement, Glow, GradientMap, and others—each handling specific visual effects via dedicated fragment shaders. The new architecture supports advanced features such as multi-pass axis-separable Gaussian blurs, dynamic shader recompilation for parameters like glow distance and quality, and texture-based effects like displacement maps and color ramp mapping. This represents a significant behavioral change to how filters are processed and rendered in WebGL.

src/renderer/webgl/renderNodes/filters · high confidence

New WebGL parameter factories for blend, global, and stencil state

The WebGL renderer now uses dedicated factory classes to generate and manage state parameter objects, improving how blend modes, global context settings, and stencil buffers are configured. \WebGLBlendParametersFactory\ provides methods to create combined or separate blend configurations for RGB and alpha channels. \WebGLGlobalParametersFactory\ generates a default global state object that tracks buffer bindings, blend modes, color masks, scissor regions, stencil settings, texturing options, and viewport dimensions to help the renderer detect and avoid redundant WebGL calls. \WebGLStencilParametersFactory\ creates stencil buffer configurations, allowing control over the stencil test function, per-operation behavior, clear values, and write masks. These factories centralize the creation of WebGL state descriptions, ensuring consistent defaults and easier state management within the renderer.

src/renderer/webgl/parameters · high confidence

New build scripts and help banner for shader bundling and example copying

The build tooling now includes a new \bundle-shaders.js\ script that converts raw vertex and fragment shader files into standard JavaScript modules and generates an \index.js\ export, removing the previous dependency on \raw-loader\. Additionally, new \copy-to-examples.js\ and \copy-to-examples-watch.js\ scripts have been added to automatically copy the built Phaser files and source maps to the examples directory, with the non-watch version also integrating \node-sloc\ to report source line counts. A new \help.js\ script provides an updated CLI banner listing available commands, including the new shader bundling and TypeScript definition generation tasks.

scripts · high confidence

New input type definitions and debug properties

The input system now exposes new TypeScript/JSDoc type definitions for event data, hit area callbacks, and plugin containers. Interactive objects now support debug shapes via \enableDebug\/\removeDebug\ to visualize hit areas, and include new global drag start coordinates (\dragStartXGlobal\, \dragStartYGlobal\) alongside the existing local ones. The \customHitArea\ boolean property indicates whether a hit area was user-defined or auto-generated from texture size.

src/input/typedefs · high confidence

New plugin architecture with global and scene-level plugin support

Phaser now uses a revamped PluginManager that distinguishes between Global Plugins (installed once per game) and Scene Plugins (installed per scene). The system introduces a PluginCache for storing plugin definitions, a BasePlugin class for global plugins with init/start/stop/destroy lifecycle methods, and a ScenePlugin class for scene-specific plugins with a boot method. Default plugins are now categorized into Global, CoreScene, and DefaultScene lists, allowing developers to customize which plugins are loaded. The PluginManager handles installation, injection into Scene Systems, and proper cleanup via destroy methods.

src/plugins · high confidence

New snapshot capture module for Canvas and WebGL renderers

The \src/renderer/snapshot\ directory now contains dedicated modules (\CanvasSnapshot\ and \WebGLSnapshot\) that handle frame capture via a unified configuration object. This change introduces support for single-pixel color sampling, partial area captures, and full-frame grabs. For WebGL specifically, the new implementation corrects Y-axis inversion for framebuffer and render texture snapshots, adds optional un-premultiplication of alpha channels, and ensures sub-pixel dimensions are floored to prevent texture corruption. Canvas snapshots now utilize a canvas pool for area captures and include \willReadFrequently\ hints for optimized context creation.

src/renderer/snapshot · high confidence

New sound type definitions for spatial audio and decoding

This change introduces a new set of JSDoc type definitions in the \src/sound/typedefs\ directory to support advanced sound features. Specifically, it adds \SpatialSoundConfig\ to define 3D positioning, panning models, and distance attenuation for spatial audio, and \WebAudioDecodeEntry\ to manage the asynchronous decoding queue. It also includes \DecodeAudioConfig\ for batch audio decoding, \AudioSpriteSound\ for sprite-based playback, and updates \SoundConfig\ and \SoundMarker\ to reflect current API properties like panning and source configuration.

src/sound/typedefs · high confidence

New transformer render nodes for precise screen-space positioning

The WebGL renderer now includes a suite of new transformer render nodes (TransformerImage, TransformerStamp, TransformerTile, TransformerTileSprite, and TransformerVertex) that compute and store screen-space quad vertices or single vertex positions. These nodes combine the camera view matrix (adjusted for scroll factors), parent container matrices, and game object transforms (position, rotation, scale, flip) to produce final coordinates. Key behavioral changes include the introduction of vertex rounding to integer pixel coordinates to prevent sub-pixel rendering artifacts, specific handling for Stamp objects that render in world space without camera transforms, and specialized logic for Tilemap tiles and TileSprites that accounts for tileset offsets and arbitrary dimensions.

src/renderer/webgl/renderNodes/transformer · high confidence

Particle Emitter configuration and type definitions expanded

The particle emitter system now supports advanced lifecycle and emission controls, including the ability to fast-forward emitters via the new \advance\ property, limit total emissions with \stopAfter\, and cap active particles with \maxAliveParticles\. Tinting has been refactored to use a dedicated \tintMode\ property, separating color from blending behavior. Emitter operations have been significantly enhanced with new configuration types for easing, interpolation, and custom callbacks, allowing for smoother and more complex particle property changes over time. Additionally, new types clarify zone sources, death zones, and animation configurations, providing better structure for emitter setup.

src/gameobjects/particles/typedefs · high confidence

Particle Emitter system refactored with new EmitterOps and processors

The particle system has been significantly restructured to improve flexibility and performance. The core \ParticleEmitter\ now uses a new \EmitterOp\ architecture to manage property configurations (such as position, scale, and color) with distinct modes for static values, random selection, easing, and interpolation. A new \EmitterColorOp\ class enables smooth color gradient transitions over a particle's lifetime. The system now supports \ParticleProcessor\ components like \GravityWell\ and \ParticleBounds\ for advanced physics and collision behaviors. Additionally, the \ParticleEmitterManager\ has been removed in favor of direct \ParticleEmitter\ instances, and new events (\complete\, \deathzone\) and methods (\fastForward\, \stop\) have been added to control emitter lifecycle and state.

src/gameobjects/particles · high confidence

Phaser 4.2.1 release entry points and constants

This change introduces the source files for the Phaser 4.2.1 release, establishing the global constants (VERSION, LOG\_VERSION, renderer modes, directions) in src/const.js and defining the framework's entry points. It adds src/phaser.js as the full-featured build, src/phaser-core.js for a core-only build, src/phaser-arcade-physics.js for a build with Arcade Physics but without Matter.js, src/phaser-no-physics.js for a build without any physics engine, and src/phaser-esm.js for ES Module exports. These files wire together the various subsystems (Cameras, GameObjects, Input, etc.) and conditionally include features like Sound based on build flags.

src · high confidence

Phaser.Geom.Line API restructured with new utility methods and Vector2 integration

The \Phaser.Geom.Line\ geometry module has been refactored to improve type safety and expand geometric capabilities. The API now returns \Phaser.Math.Vector2\ instances for point-based operations (such as \getPoint\, \getMidPoint\, and \getRandomPoint\) instead of untyped objects, ensuring consistent coordinate handling. Several new static methods have been added to the \Line\ class: \Extend\ for adjusting line length, \GetEasedPoints\ for distributing points along a line using ease functions, \GetNearestPoint\ for projecting points onto the line, and \GetShortestDistance\ for calculating perpendicular distance. Additionally, the \getPoints\ method now supports a \stepRate\ parameter to define specific distances between points, and the \setFromObjects\ method allows initialization from any objects with \x\/\y\ properties.

src/geom/line · high confidence

Physics module restructured with Arcade and Matter exports

The physics subsystem now exposes Arcade and Matter physics engines through a unified entry point at src/physics/index.js. This change consolidates the physics API, allowing users to access both physics implementations via a single namespace, while also updating copyright information to reflect the 2025-2026 period.

src/physics · high confidence

Polygon shape now supports dynamic point updates and stroke rendering

The Polygon shape game object now includes a \setTo\ method, allowing developers to update the polygon's points at runtime using various input formats (including space-separated strings, arrays of vectors, or coordinate pairs). This change also introduces support for stroke rendering alongside the existing fill capabilities in both WebGL and Canvas renderers, and ensures the Canvas renderer correctly restores the context state after drawing to support non-canvas-sized cameras.

src/gameobjects/shape/polygon · high confidence

RandomDataGenerator now auto-seeds when instantiated without a seed

When creating a new instance of RandomDataGenerator without providing a seed, the class now automatically generates a default random seed based on the current timestamp (Date.now) combined with a random multiplier. Previously, users were expected to always provide a seed; this change ensures the generator remains functional and produces varied results even when no explicit seed is passed, while still allowing explicit seeding for reproducibility when needed.

src/math/random-data-generator · high confidence

Rectangle shape now supports rounded corners and stroke rendering

The Rectangle Game Object now supports rounded corners via the new \setRounded\ method, which applies to both WebGL and Canvas renderers. Additionally, stroke rendering has been added, allowing rectangles to be outlined with a line style. The \setSize\ method now correctly updates the underlying geometry and input hit area, fixing previous issues where size changes did not reflect in the rendered shape or its collision bounds.

src/gameobjects/shape/rectangle · high confidence

Refactored Arcade Physics tilemap collision into modular internal functions

The Arcade Physics tilemap collision system has been restructured into a set of dedicated, modular functions within the \src/physics/arcade/tilemap\ directory. This change introduces specific handlers for processing per-tile and per-layer collision callbacks (\ProcessTileCallbacks\), calculating and applying horizontal and vertical separation (\ProcessTileSeparationX\, \ProcessTileSeparationY\), and managing the core separation logic (\SeparateTile\) which now prioritizes axes based on velocity and overlap. Additionally, dedicated check functions (\TileCheckX\, \TileCheckY\) handle axis-specific collision detection and respect tile face flags, while \TileIntersectsBody\ provides the underlying intersection test. This modularization improves the clarity and maintainability of the collision resolution process for game objects interacting with tilemaps.

src/physics/arcade/tilemap · high confidence

Refactored Tween system with new builders and chain API

The tween system has been refactored to use a new plugin-based architecture with dedicated builders. Users can now create tweens using \TweenBuilder\ and chain them using the new \TweenChainBuilder\, replacing the previous array-passing capabilities in \add\ and \chain\. The \TweenManager\ now exposes \addMultiple\ for adding multiple tweens at once and includes a \remove\ method to fully delete tweens from the manager. Additionally, \getTweensOf\ now supports an \includePending\ parameter to retrieve pending tweens, and the system ensures that paused tweens flagged in config are correctly handled in the destroy list to prevent memory leaks.

src/tweens · high confidence

Refactored keyboard key utilities into modular functions

The keyboard input system in \src/input/keyboard/keys\ has been restructured to use standalone utility functions for state checking. \JustDown\ and \JustUp\ now operate as pure functions that consume the key's internal \\_justDown\/\\_justUp\ flags, fixing issues where these states were reset too early in update loops. New \DownDuration\ and \UpDuration\ functions allow users to check if a key was pressed or released within a specific time window using the game clock. The \Key\ class now requires a reference to its parent plugin to access the game loop time, and \KeyMap\ provides a reverse lookup from key codes to names.

src/input/keyboard/keys · high confidence

Render Texture now supports dynamic render modes (render, redraw, all)

The Render Texture Game Object now includes a \renderMode\ property that controls how the texture is updated and displayed. Users can set this to 'render' (default, draws the texture to the frame), 'redraw' (calls \render()\ every frame but does not draw the texture itself, useful for updating textures for reuse by other objects), or 'all' (calls \render()\ then draws the texture to the frame). This change is implemented via new \RenderTextureRenderModes\, \RenderTextureCanvasRenderer\, and \RenderTextureWebGLRenderer\ files that handle the mode-specific logic, preventing infinite loops when drawing containers via the \isCurrentlyRendering\ flag.

src/gameobjects/rendertexture · high confidence

Renderer event constants standardized to string types

The renderer event definitions in \src/renderer/events\ have been refactored so that all event identifiers are plain strings (e.g., 'losewebgl', 'postrender', 'prerender', 'prerenderclear', 'render', 'resize', 'restorewebgl', 'setparalleltextureunits') rather than object-based types. This change ensures consistent string-based event handling across the renderer, affecting both WebGL and Canvas renderers, and includes new events for WebGL context loss/restoration and pre-render clearing to give users finer control over rendering lifecycle and resource management.

src/renderer/events · high confidence

Restored HTML5 Audio sound system with iOS unlock fixes

The HTML5 Audio sound implementation (HTML5AudioSoundManager and HTML5AudioSound) has been restored to the 3.55.2 version and updated with fixes for iOS audio unlocking. The system now correctly handles the browser's audio lock state by checking for cached audio entries and performing queued actions only when audio tags are actually locked, resolving issues where audio would fail to unlock on mobile devices if loaded in subsequent scenes.

src/sound/html5 · high confidence

Scale Manager refactoring and bug fixes

The Scale Manager has been reorganized into its own namespace (Phaser.Scale) with constants moved to dedicated files for better documentation. Several behavioral issues are resolved: the manager now correctly handles canvas position changes by checking for x/y shifts in \getParentBounds\, fixes iOS orientation reporting by refreshing internals directly on orientation change, and prevents fullscreen entry errors by properly handling the fullscreen API promise. Additionally, string-based width/height config values are now strictly treated as fixed units (unless ending in '%'), the \resolution\ property is removed, and the \listeners\ property is renamed to \domlisteners\ to avoid conflicts with EventEmitter.

src/scale · high confidence

Scale manager constants are reorganized into dedicated modules

The Phaser Scale Manager constants for centering, orientation, scale modes, and zoom are now split into their own individual files (CENTER\_CONST, ORIENTATION\_CONST, SCALE\_MODE\_CONST, ZOOM\_CONST) under the src/scale/const directory, with a central index.js re-exporting them. This structural change improves documentation navigation and code organization for developers using the Scale Manager, without altering the runtime behavior of the constants themselves.

src/scale/const · high confidence

Scene system refactored with plugin resolution helpers and injection map

The scene module has been restructured to improve how plugins and systems are resolved and exposed. New utility functions, GetPhysicsPlugins and GetScenePlugins, now determine which physics and general plugins to activate based on scene-specific settings or global defaults, with scene-level settings taking priority. The InjectionMap defines the default properties injected into each Scene (such as renderer, cameras, and loaders), and the Settings module now supports a mapAdd configuration to extend these defaults. This change centralizes plugin resolution and property injection, ensuring consistent access to core systems like the renderer and input manager across all scenes.

src/scene · high confidence

Sound events now use string constants

The sound event system has been refactored so that all events (such as COMPLETE, PLAY, PAUSE, and DECODED) are now exposed as string constants (e.g., 'complete', 'play') rather than other types. This ensures consistent string-based event handling across both Web Audio and HTML5 Audio sound objects, simplifying how developers listen for and trigger sound lifecycle events.

src/sound/events · high confidence

Sound system refactored with new base classes and manager creator

The sound subsystem has been restructured to introduce \BaseSound\ and \BaseSoundManager\ as shared foundation classes, decoupling common playback state, configuration, and event handling from specific audio implementations. A new \SoundManagerCreator\ has been added to automatically select the appropriate manager (Web Audio, HTML5 Audio, or No Audio) based on device capabilities and game configuration, while the \index.js\ entry point now explicitly exports these core components alongside the specific implementations.

src/sound · high confidence

Sprite Game Object rendering and lifecycle management

The Sprite Game Object now explicitly manages its presence in the Scene's update list via new \addedToScene\ and \removedFromScene\ callbacks, ensuring animations advance only while the Sprite is active. Additionally, the Canvas and WebGL renderers now explicitly register the Sprite with the Camera's render list during the draw phase, and the Sprite Creator handles configuration defaults more robustly to prevent errors when no config object is provided.

src/gameobjects/sprite · high confidence

Sprite configuration now supports sprite sheet creation from tilemaps

The Sprite configuration type has been updated to include a new \useSpriteSheet\ boolean property. This addition allows developers to explicitly indicate when a Sprite is being created by a Tilemap and is part of a spritesheet, resolving the issue where this specific use case was not properly supported in the configuration schema.

src/gameobjects/sprite/typedefs · high confidence

Standardized Input Event String Constants

The input event system has been refactored to use dedicated, exported string constants for every event type (such as 'pointerdown', 'drag', 'wheel', and 'gameobjectout') within the \src/input/events\ directory. This change ensures that all input events consistently use string identifiers, resolving previous inconsistencies and providing a reliable, centralized source for event names that developers can import and use in their listeners.

src/input/events · high confidence

Standardized event types and introduced new lifecycle events

The event system in \src/core/events\ has been refactored so that all event identifiers are now explicitly typed as strings, resolving issue \#6136. This change also introduces several new game lifecycle events: \SYSTEM\_READY\ (dispatched when the System Scene is created for plugin initialization), \CONTEXT\_LOST\ (triggered when the WebGL context is lost, after which rendering halts and a reload is required), and \BOOT\ (signaling the end of the boot phase before systems are ready). Additionally, the \RESUME\ event now includes a \pauseDuration\ parameter indicating how long the game was paused.

src/core/events · high confidence

Support for Tiled Group Layers and Infinite Maps

The Tiled tilemap parser now supports Tiled group layers and infinite (chunked) maps. Group layers are fully parsed, with opacity, visibility, and positional offsets correctly inherited by child layers. Infinite maps are handled by decoding and processing chunked tile data, ensuring large maps load without memory issues. Additionally, the parser now deep-copies the source JSON to prevent object mutation, fixing a bug where Tiled Object Layer names were duplicated across multiple Tilemap instances.

src/tilemaps/parsers/tiled · high confidence

Text Game Object restructured with new measurement and rendering components

The Text Game Object has been restructured to improve text measurement accuracy and rendering performance. A new \MeasureText\ utility now calculates font ascent and descent using the \actualBoundingBoxAscent\ API with a pixel-scanning fallback, while \GetTextSize\ handles precise dimension calculations including letter spacing and line spacing. The rendering pipeline has been split into dedicated \TextCanvasRenderer\ and \TextWebGLRenderer\ modules, and the \TextStyle\ class now supports new properties like \baselineX\, \baselineY\, and \letterSpacing\ for finer control over text layout and metrics.

src/gameobjects/text · high confidence

TileSprite restructured with dedicated renderers and component-based architecture

The TileSprite implementation has been refactored to use a component-based architecture, replacing mixins with explicit component mixins (such as ComputedSize, Transform, and Texture) and introducing dedicated renderer modules (TileSpriteCanvasRenderer and TileSpriteWebGLRenderer) for handling Canvas and WebGL rendering respectively. This change also adds a TileSpriteCreator and TileSpriteFactory to standardize object creation, ensuring that TileSprites are properly added to the scene and render list, while lifting previous restrictions on texture sizes and enabling support for features like tile rotation and dynamic resizing.

src/gameobjects/tilesprite · high confidence

Tilemap components refactored into modular, orientation-aware functions

The tilemap system has been restructured by extracting core logic into individual, reusable component functions within \src/tilemaps/components\. This change introduces orientation-specific dispatchers (e.g., \GetCullTilesFunction\, \GetWorldToTileXYFunction\) that automatically select the correct implementation for orthogonal, isometric, hexagonal, or staggered maps. Key capabilities now include optimized tile culling that respects layer scale and camera zoom, accurate collision face calculation for efficient physics, and robust coordinate conversion utilities that handle world-to-tile and tile-to-world transformations correctly across all map types.

src/tilemaps/components · high confidence

Tilemap data classes now expose layer and object IDs

The \LayerData\ and \ObjectLayer\ classes in the tilemap system now include an \id\ property that reflects the actual ID assigned in the Tiled map editor, rather than relying solely on array indices. This allows developers to uniquely identify layers and object groups by their editor-assigned IDs. Additionally, \MapData\ and \ObjectLayer\ now enforce that the \objects\ property is always an array, fixing a bug where Tiled could output an empty object instead.

src/tilemaps/mapdata · high confidence

Tilemap system restructured with unified layer classes and new GPU-optimized rendering

The tilemap architecture has been consolidated: the previous Static and Dynamic Tilemap Layer objects are replaced by a single TilemapLayer class that handles all map orientations (Orthogonal, Isometric, Hexagonal, and Staggered) and supports multiple tilesets. A new TilemapGPULayer is introduced for high-performance, WebGL-only rendering of static orthographic maps using a single tileset and a GPU-bound shader. The system now supports Tiled 1.2 group layers (flattened during parsing with prepended names to avoid duplicates), Image Collections (standalone images per tile), and staggered map types. Object layer creation is improved via ObjectHelper, which resolves GIDs to tileset data for texture frames and applies custom properties. Additional capabilities include tile tint modes (fill vs. additive), post-pipeline support on layers, collision categories/masks for Arcade Physics, and methods like getTileCorners and removeTile.

src/tilemaps · high confidence

Tween builder system refactored with new interpolation, easing, and stagger capabilities

The tween builder logic has been restructured into modular helper functions (GetBoolean, GetEaseFunction, GetInterpolationFunction, GetNewValue, GetProps, GetTargets, GetValueOp) to support more flexible tween configuration. Users can now specify custom easing parameters via \easeParams\, use string-based relative value operations (e.g., \+=400\, \random(10, 100)\), and apply value interpolation (linear, bezier, catmull) to multi-value properties. The \StaggerBuilder\ now supports grid-based staggering with configurable origins and easings, while \NumberTweenBuilder\ enables counter-style tweens that interpolate plain numeric values. \TweenChainBuilder\ correctly defaults \persist\ to false, and \TweenBuilder\ handles texture tweening and null/undefined target safety.

src/tweens/builders · high confidence

Tween system refactored with new class hierarchy and state management

The tween engine has been restructured to use a new class-based architecture, introducing \BaseTween\ and \BaseTweenData\ as shared foundations for \Tween\, \TweenChain\, \TweenData\, and \TweenFrameData\. This change replaces the previous object-based data structures with dedicated classes to improve internal state management and VM optimization. The update introduces a more granular state system (e.g., \PENDING\, \ACTIVE\, \FINISHED\) and adds new configuration options such as \persist\ to retain tweens after completion and \interpolation\ for array-based value handling. Additionally, the \TweenManager\ now enforces stricter state checks before playback, and the \Tween.stop\ method has been simplified to prepare tweens for immediate destruction, while \Tween.seek\ has been rewritten to support seeking across repeats and loops.

src/tweens/tween · high confidence

Updated Matter.js physics engine to v0.19

The Matter.js physics library in the collision module has been upgraded to version 0.19. This update brings improved performance and reduced memory usage, along with various bug fixes integrated from the upstream Matter.js repository. Users will benefit from more efficient collision detection and resolution, particularly in scenarios involving multiple bodies, as the underlying collision algorithms and pair management have been refined.

src/physics/matter-js/lib/collision · high confidence

Updated Matter.js renderer to v0.20

The Matter.js rendering module has been upgraded to version 0.20, introducing changes to the internal render loop and timing logic. This update includes optimizations for performance and memory usage, as well as the addition of \willReadFrequently\ flags to canvas contexts to improve browser rendering efficiency.

src/physics/matter-js/lib/render · medium confidence

Updated poly-decomp library to version 0.3.0

The poly-decomp library, used by Matter.js for polygon decomposition, has been updated to version 0.3.0. This change includes the addition of JSDoc comments for better code documentation and an update to the license link, ensuring the physics engine's underlying geometry processing remains current and well-documented.

src/physics/matter-js/poly-decomp · high confidence

Web Audio sound manager and sound instance implementation

The Web Audio sound system now includes a dedicated WebAudioSoundManager and WebAudioSound implementation. The manager handles AudioContext lifecycle, including unlocking on user interaction, resuming on visibility changes (fixing iOS 17.5+ focus loss issues), and detecting suspended/interrupted states. The sound instance supports real-time control of volume, mute, rate, detune, pan, and 3D spatial positioning, with fallbacks for browsers lacking StereoPannerNode support.

src/sound/webaudio · high confidence

WebGL renderer refactored with new state management and shader systems

The WebGL renderer has been significantly restructured to improve state management and shader handling. A new DrawingContext class now encapsulates the drawing state (framebuffer, viewport, scissor box, blend mode, etc.), managed by a DrawingContextPool for efficient reuse. Shader programs are now handled by a ShaderProgramFactory, which caches and assembles programs from base shaders, additions, and features, and a ProgramManager that manages program suites and uniforms. The WebGLRenderer itself has been updated to use these new systems, including wrappers for WebGL objects (buffers, textures, framebuffers, programs, VAOs) and a global state wrapper to track and restore WebGL state, particularly around context loss.

src/renderer/webgl · high confidence

Webpack 5 configuration migration with ESM build support

The build system has been migrated to Webpack 5, introducing a new modular configuration structure in the config folder. This update adds support for exporting an ES Module (ESM) version of Phaser alongside the existing UMD builds, enabling modern module import workflows. The configuration also specifies 'this' as the globalObject for broader compatibility and includes a dedicated no-spector config for development, while maintaining production optimizations for minified outputs.

config · high confidence

Test coverage

Added TypeScript definition validation test suite; Initial test infrastructure and unit tests for Phaser v4 Actions.

Dependencies

Phaser 4.2.1 release with modernized build tooling

This update introduces Phaser version 4.2.1 (codenamed 'Giedi') and refreshes the development environment by upgrading key build dependencies: TypeScript to 6.0.2, Webpack to 5.106.0, ESLint to 10.2.0, and Vitest to 4.1.4. The project now relies on eventemitter3 as its sole runtime dependency and utilizes modern Node.js engine requirements for its dev tools.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 45 → 63 (+17.5)
  • Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 58 → 57 (-1.9)
  • Architecture 83 (new)
  • Maturity 57 → 62 (+5.7)
  • Readiness 30 → 65 (+35.3)
  • Security 71 → 82 (+11.0)

Resolved (67)

  • Boundary-crossing change coupling: FilterList.js ↔ index.js (src/gameobjects/components/FilterList.js)
  • Boundary-crossing change coupling: GroupClassTypeConstructor.js ↔ PhysicsGroup.js (src/gameobjects/group/typedefs/GroupClassTypeConstructor.js)
  • Boundary-crossing change coupling: SpriteGPULayer.js ↔ SpriteGPULayer-vert.js (src/gameobjects/spritegpulayer/SpriteGPULayer.js)
  • Change coupling: Group.js ↔ GroupClassTypeConstructor.js (src/gameobjects/group/Group.js)
  • Change coupling: PointLight-frag.js ↔ PointLight-vert.js (src/renderer/webgl/shaders/PointLight-frag.js)
  • Change coupling: RenderNodeManager.js ↔ index.js (src/renderer/webgl/renderNodes/RenderNodeManager.js)
  • Change coupling: TransformerImage.js ↔ TransformerTile.js (src/renderer/webgl/renderNodes/transformer/TransformerImage.js)
  • Change coupling: TransformerImage.js ↔ TransformerTileSprite.js (src/renderer/webgl/renderNodes/transformer/TransformerImage.js)
  • Change coupling: index.js ↔ index.js (src/renderer/webgl/renderNodes/index.js)
  • Dimension evaluation failed
  • FileTooLong: animations/Animation.test.js (tests/animations/Animation.test.js)
  • FileTooLong: animations/AnimationState.test.js (tests/animations/AnimationState.test.js)
  • FileTooLong: scale/ScaleManager.js (src/scale/ScaleManager.js)
  • FileTooLong: scene/SceneManager.js (src/scene/SceneManager.js)
  • FileTooLong: structs/RTree.js (src/structs/RTree.js)
  • FileTooLong: textures/TextureManager.js (src/textures/TextureManager.js)
  • FileTooLong: tilemaps/Tilemap.js (src/tilemaps/Tilemap.js)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • …and 47 more

New (312)

  • (anonymous) (cognitive 19) (src/loader/filetypes/CompressedTextureFile.js)
  • Add.Add (cognitive 20) (src/utils/array/Add.js)
  • AddAt.AddAt (cognitive 21) (src/utils/array/AddAt.js)
  • AddEffectShine.AddEffectShine (cognitive 31) (src/actions/AddEffectShine.js)
  • AddEffectShine.AddEffectShine (cyclomatic 26) (src/actions/AddEffectShine.js)
  • AddMaskShape.AddMaskShape (cognitive 22) (src/actions/AddMaskShape.js)
  • AddMaskShape.AddMaskShape (cyclomatic 17) (src/actions/AddMaskShape.js)
  • AssignTileProperties.AssignTileProperties (cognitive 16) (src/tilemaps/parsers/tiled/AssignTileProperties.js)
  • Audio.init (cognitive 26) (src/device/Audio.js)
  • BitmapTextCanvasRenderer.BitmapTextCanvasRenderer (cognitive 22) (src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js)
  • BitmapTextCanvasRenderer.BitmapTextCanvasRenderer (cyclomatic 19) (src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js)
  • BitmapTextWebGLRenderer.BitmapTextWebGLRenderer (cognitive 17) (src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js)
  • BlitterCanvasRenderer.BlitterCanvasRenderer (cognitive 27) (src/gameobjects/blitter/BlitterCanvasRenderer.js)
  • Boundary-crossing change coupling: BlitterWebGLRenderer.js ↔ TransformerTile.js (src/gameobjects/blitter/BlitterWebGLRenderer.js)
  • Boundary-crossing change coupling: BlitterWebGLRenderer.js ↔ TransformerTileSprite.js (src/gameobjects/blitter/BlitterWebGLRenderer.js)
  • Boundary-crossing change coupling: ParticleEmitterWebGLRenderer.js ↔ TransformerTile.js (src/gameobjects/particles/ParticleEmitterWebGLRenderer.js)
  • Boundary-crossing change coupling: ParticleEmitterWebGLRenderer.js ↔ TransformerTileSprite.js (src/gameobjects/particles/ParticleEmitterWebGLRenderer.js)
  • BuildTilesetIndex.BuildTilesetIndex (cognitive 16) (src/tilemaps/parsers/tiled/BuildTilesetIndex.js)
  • CalculateFacesAt.CalculateFacesAt (cognitive 20) (src/tilemaps/components/CalculateFacesAt.js)
  • CalculateFacesAt.CalculateFacesAt (cyclomatic 17) (src/tilemaps/components/CalculateFacesAt.js)
  • …and 292 more

Changes since last survey

  • 3 commits — 3 feature/other, 0 fixes

By area

  • (repo) — 1 commit
  • changelog/v4 — 1 commit
  • src/renderer — 1 commit

Notable commits

  • change: Add TintModes.MULTIPLY_ADD.
  • change: Create CHANGELOG-v4.3.md.
  • change: Merge remote-tracking branch 'origin/master'

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

phaserjs/phaser was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 25 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 02d8931b626d9764c133cbb3fbf99966c03c757c — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-dd72cc24c749.