phaserjs avatar

Animations

Handles sprite animation in Phaser 4 through the global AnimationManager and per-sprite AnimationState. Covers the usual workflow of loading spritesheets or atlases, creating animation definitions with frame sequences, and controlling playback with play, pause, chain, and reverse methods. The skill explains the local vs global animation distinction, yoyo and repeat patterns, animation mixing for transitions, and the full event system including frame-level callbacks. If you're building anything with character movement, effects, or UI animations in Phaser, this gives you the complete reference for timing, sequencing, and responding to animation lifecycle events.

skills.sh installs
1.2K
GitHub stars
40.7K
last updated
Aug 21, 2026

Install

$ npx -y skills add phaserjs/phaser --skill animations --agent claude-code

Installs into .claude/skills of the current project.

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:

Sponsors

Details

Repository
github.com/phaserjs/phaser
Categories
Design & UI/UX, Game Development
First seen
Jun 3, 2026

More from phaserjs/phaser

All 8
1forztf avataropenspec-proposal-creationforztf/open-skilled-sddCreates structured change proposals with specification deltas for new features, breaking changes, or architecture updates. Use when planning features, creating 1.2Kskills.sh installs
2linkfox-ai avatarlinkfox-multimodal-recognize-imagelinkfox-ai/linkfox-skills基于多模态AI的图片识别与分析。当用户想分析、描述、从图片URL中提取信息、image recognition, image analysis, image description, image content understanding, OCR text recognition, visual Q&A时触发此技能。1.2Kskills.sh installs
3alirezarezvani avatarsenior-computer-visionalirezarezvani/claude-skillsComputer vision engineering skill for object detection, image segmentation, and visual AI systems. Covers CNN and Vision Transformer architectures, YOLO/Faster 1.2Kskills.sh installs
4nexscope-ai avatarecommerce-returns-managementnexscope-ai/ecommerce-skillsOptimize e-commerce returns process and reduce return rates. Returns policy design, reverse logistics, root cause analysis, and customer retention through bette1.2Kskills.sh installs
5kostja94 avatarproduct-launchkostja94/marketing-skillsWhen the user wants to plan a product launch, execute launch channels, or create a launch checklist. Also use when the user mentions "product launch," "launch s1.2Kskills.sh installs
6alirezarezvani avatargrill-mealirezarezvani/claude-skillsInterview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to s1.2Kskills.sh installs