actions-and-utilities
Use this skill when working with Phaser 4 utility functions, actions, alignment, grid layout, or batch operations on game objects. Triggers on: align, grid…
Use this skill when migrating a Phaser 3 project to Phaser 4, or when a user asks about breaking changes, API differences, or how to update their v3 code. Covers renderer changes (pipelines to render nodes), FX/masks to filters, tint system, camera matrix, texture coordinates,
$ npx -y skills add phaserjs/phaser --skill v3-to-v4-migration --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/v3-to-v4-migrationContext preview
The summary Claude sees to decide when to auto-load this skill.
Use this skill when migrating a Phaser 3 project to Phaser 4, or when a user asks about breaking changes, API differences, or how to update their v3 code. Covers renderer changes (pipelines to render nodes), FX/masks to filters, tint system, camera matrix, texture coordinates,
name: v3-to-v4-migration description: "Use this skill when migrating a Phaser 3 project to Phaser 4, or when a user asks about breaking changes, API differences, or how to update their v3 code. Covers renderer changes (pipelines to render nodes), FX/masks to filters, tint system, camera matrix, texture coordinates, DynamicTexture, shaders, lighting, removed game objects, and a full migration checklist. Triggers on: migrate, upgrade, v3 to v4, breaking changes, Phaser 3 to 4, migration guide, update from v3."
This guide covers everything you need to change when upgrading a Phaser v3 project to Phaser v4. It is organized from highest-impact changes to smaller details, so you can work through it top-to-bottom.
**Related skills:** ../v4-new-features/SKILL.md, ../game-setup-and-config/SKILL.md, ../filters-and-postfx/SKILL.md
---
1. [Renderer: Pipelines to Render Nodes](#1-renderer-pipelines-to-render-nodes) 2. [Canvas Renderer Deprecated](#2-canvas-renderer-deprecated) 3. [FX and Masks are now Filters](#3-fx-and-masks-are-now-filters) 4. [Tint System](#4-tint-system) 5. [Camera System](#5-camera-system) 6. [Texture Coordinates and GL Orientation](#6-texture-coordinates-and-gl-orientation) 7. [DynamicTexture and RenderTexture](#7-dynamictexture-and-rendertexture) 8. [Shader API](#8-shader-api) 9. [GLSL Loading](#9-glsl-loading) 10. [Lighting](#10-lighting) 11. [TileSprite](#11-tilesprite) 12. [Graphics and Shape](#12-graphics-and-shape) 13. [Geometry: Point Replaced by Vector2](#13-geometry-point-replaced-by-vector2) 14. [Math Constants](#14-math-constants) 15. [Data Structures](#15-data-structures) 16. [Round Pixels](#16-round-pixels) 17. [Removed Game Objects](#17-removed-game-objects) 18. [Removed Plugins and Entry Points](#18-removed-plugins-and-entry-points) 19. [Removed Utilities and Polyfills](#19-removed-utilities-and-polyfills) 20. [Spine Plugins](#20-spine-plugins) 21. [Miscellaneous Breaking Changes](#21-miscellaneous-breaking-changes) 22. [Migration Checklist](#migration-checklist)
---
Phaser v4 contains a brand-new WebGL renderer. The entire rendering pipeline from v3 has been replaced. This is the single biggest change in v4.
**What was removed:**
The v3 `Pipeline` system has been removed entirely. Pipelines frequently held multiple responsibilities (e.g. the Utility pipeline handled various different rendering tasks) and each had to manage WebGL state independently, leading to conflicts where one pipeline could break another's assumptions.
**What replaced it:**
The new `RenderNode` architecture. Each render node handles a single rendering task, making the system more maintainable. All render nodes have a `run` method, and some have a `batch` method to assemble state from several sources before invoking `run`.
**What this means for you:**
---
The Canvas renderer is still available but should be considered deprecated. Canvas rendering does not support any of the WebGL techniques used in v4's advanced rendering features. As WebGL support is effectively baseline today, we recommend WebGL for all new projects.
Canvas retains one advantage: 27 blend modes vs WebGL's 4 native modes (NORMAL, ADD, MULTIPLY, SCREEN). In v4, the new `Blend` filter can recreate all Canvas blend modes in WebGL, though it requires indirection through a `CaptureFrame`, `DynamicTexture`, or similar.
---
This is one of the most impactful changes for v3 users who relied on the FX or Mask systems.
**What changed:**
FX (pre and post) and Masks have been unified into a single **Filter** system. A Filter takes an input image and produces an output image, usually via a single shader. All filters are mutually compatible.
**Key differences from v3:**
**Removed derived FX and their replacements:**
| v3 FX | v4 Replacement | |---|---| | `Bloom` | `Phaser.Actions.AddEffectBloom()` | | `Shine` | `Phaser.Actions.AddEffectShine()` | | `Circle` | `Phaser.Actions.AddMaskShape()` | | `Gradient` | `Gradient` game object |
**ColorMatrix change:**
The `ColorMatrix` filter shifted its color management methods onto a `colorMatrix` property:
// v3 colorMatrix.sepia(); // v4 colorMatrix.colorMatrix.sepia();
**Mask migration:**
// v3 - BitmapMask const mask = new Phaser.Display.Masks.BitmapMask(scene, maskObject); sprite.setMask(mask); // v4 - Mask filter
Phaser is a fast, free, and fun open source HTML5 game framework that offers WebGL and Canvas rendering across desktop and mobile web browsers and has been actively developed for over 13 years.
Repo: phaserjs/phaser
Use this skill when working with Phaser 4 utility functions, actions, alignment, grid layout, or batch operations on game objects. Triggers on: align, grid…
Use this skill when creating or controlling sprite animations in Phaser 4. Covers spritesheets, atlases, AnimationManager, AnimationState, play/stop/chain,…
Use this skill when adding audio or sound to a Phaser 4 game. Covers loading audio, playing sounds, music, volume, spatial audio, Web Audio API, and…
Use this skill when working with cameras in Phaser 4. Covers camera effects (shake, fade, flash, pan, zoom), following sprites, scroll, bounds, viewports,…
Use this skill when working with curves and paths in Phaser 4. Covers splines, bezier curves, lines, ellipses, path followers, and mathematical curve types.…
Use this skill when using the Phaser 4 DataManager to store custom key-value data on game objects, listen for data change events, or manage game state.…