Animations
Sprite animation toolkit for Phaser 4 covering global definitions, per-sprite playback, and event hooks.
- CCM score
- 75 of 100
- skills.sh installs
- 1.4K
- GitHub stars
- 40.8K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers spritesheet and atlas animations, plus play, stop, chain, reverse, mix, and pause controls for sprites
- Includes
generateFrameNumbersandgenerateFrameNameshelpers, yoyo and repeat options, and events likeanimationcompleteandanimationupdate - Separates global
AnimationManagerdefinitions from per-spriteAnimationStateplayback, with local animations taking priority when keys collide - Designed for Phaser 4 scenes that need shared or sprite-specific animation timing, frame callbacks, and chained sequences
Install
$ npx -y skills add phaserjs/phaser --skill animations -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Phaser 4 -- Sprite Animations
AnimationManager (global), AnimationState (per-sprite), creating animations from spritesheets and atlases, playing/pausing/chaining, animation events, frame callbacks.
Related skills: ../sprites-and-images/SKILL.md, ../loading-assets/SKILL.md
Quick Start
// In preload -- load a spritesheet
this.load.spritesheet('explosion', 'explosion.png', {
frameWidth: 64,
frameHeight: 64
});
// In create -- define a global animation
this.anims.create({
key: 'explode',
frames: this.anims.generateFrameNumbers('explosion', { start: 0, end: 11 }),
frameRate: 24,
repeat: 0
});
// Play it on a sprite
const sprite = this.add.sprite(400, 300, 'explosion');
sprite.play('explode');
Core Concepts
AnimationManager vs AnimationState
Phaser has two distinct animation objects:
Details
- Repository
- github.com/phaserjs/phaser
- Categories
- Game Development, Animation & Motion, Frontend & UI Code
- First seen
- Jun 3, 2026
Questions
How do I create and play a sprite animation from a spritesheet in Phaser 4?
Load the spritesheet with frame width and height, then register an animation with this.anims.create using generateFrameNumbers for the frame range. Call sprite.play with the animation key to start it on the sprite.
What is the difference between AnimationManager and AnimationState in Phaser 4?
AnimationManager is the global singleton on this.anims that stores animation definitions shared across all scenes. AnimationState lives on each sprite as sprite.anims and controls playback for that one object, so local animations take priority when a key matches.
How do I chain animations or react when one finishes?
Call sprite.chain with one key or an array of keys to queue animations that start after the current one completes or stops. Listen for animationcomplete or animationcomplete-explode events to run your own code when a specific animation finishes.
Which category is the Phaser animations skill in, and what sets it apart?
It sits in the Game Development category on Claude Marketplaces, alongside game-feel, game-ui-ux, level-design and higgsfield-game-generation. It covers spritesheets, atlases, AnimationManager, AnimationState, frame callbacks and animation events for Phaser 4.
More from phaserjs/phaser
All 8Similar to Animations
More Game Developmentgsap-timelinegreensock/gsap-skills95K installsReference guide for sequencing GSAP animations with timelines, position parameters, labels, nesting, and playback control.
hyperframes-animationheygen-com/hyperframes1M installsA GSAP-first motion skill that composes atomic rules, scene blueprints, and seven runtime adapters for HyperFrames animation.
threejs-animationcloudai-x/threejs-skills33.2K installsComprehensive guide to three.js animation covering keyframe tracks, skeletal and morph-target playback, and clip blending.
roblox-animationssentinelcore/roblox-skills1.1K installsReference guide for Roblox animation APIs covering playback, events, priority blending, and default animation replacement.
sprites-and-imagesphaserjs/phaser1.5K installsCovers Phaser 4 Sprite and Image creation, texture and frame selection, and common visual operations on each.
animejsbowtiedswan/animejs-skills1.5K installsComprehensive Anime.js v4 reference covering animation, timelines, scroll, draggables, SVG, and text utilities.