animations

Implement Phaser 4 sprite animations with AnimationManager and AnimationState.

Updated Apr 20, 2026
One-click install
npx skills add https://github.com/Raphe-dev/phaser-cozy-mmo --skill animations-raphe-dev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: animations
Source: https://github.com/Raphe-dev/phaser-cozy-mmo/tree/main/skills/animations
Command: npx skills add https://github.com/Raphe-dev/phaser-cozy-mmo --skill animations-raphe-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers building games in Phaser 4 often struggle to implement and coordinate complex sprite animations across scenes, including loading assets, defining global vs local animations, and responding to animation events.

Core Features & Use Cases

  • Global AnimationManager and per-sprite AnimationState explain how to share animations and how to apply them to individual sprites.
  • Local vs Global animations: differentiate scoped playback and ensure priority overrides.
  • Chaining, events, and per-frame callbacks to react to animation state changes.
  • Practical patterns for spritesheets and texture atlases with generateFrameNumbers/generateFrameNames.

Quick Start

Load a spritesheet or atlas asset, create a named animation with frames, and apply it to a sprite to begin playback.

Frequently Asked Questions about animations

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create Phaser 4 sprite animations using a spritesheet or texture atlas?▼

To create Phaser 4 sprite animations, load a spritesheet or atlas asset, define a named animation with frames using generateFrameNumbers or generateFrameNames, and apply it to a sprite for playback.

What is the difference between global AnimationManager and local AnimationState in Phaser?▼

The global AnimationManager defines and shares animations across scenes and sprites, while the per-sprite AnimationState applies those animations to individual sprites, differentiating scoped playback and priority overrides.

How do I handle animation events and chaining for sprites in Phaser 4?▼

You handle Phaser 4 sprite animation events and chaining by using per-frame callbacks and configuration options that react to AnimationState changes, allowing sequential playback and event-driven game logic.

What are common pitfalls when configuring Phaser sprite animations with AnimationConfig?▼

Common pitfalls when configuring Phaser sprite animations with AnimationConfig involve mismanaging global versus local animation scopes, ignoring priority overrides, and incorrectly setting per-frame timing within PlayAnimationConfig.

Can I use generateFrameNames to set up Phaser 4 texture atlas animations?▼

Yes, you can use generateFrameNames to set up Phaser 4 texture atlas animations by extracting named frames from the atlas, defining an AnimationConfig, and applying it to a sprite for immediate playback.