What problem does it solve?
This Skill helps you reliably create, play, chain, pause, and debug sprite animations in Phaser by organizing global AnimationManager definitions and per-sprite AnimationState playback.
Core Features & Use Cases
- Create animations from spritesheets and atlases using frame generation helpers like generateFrameNumbers and generateFrameNames, including custom frame sequences and zero-padded atlas naming.
- Play and control animations per sprite or globally with play, playReverse, stop, pause/resume, repeat/yoyo behavior, timeScale overrides, and frame-based stopping.
- React to animation lifecycle with events and callbacks, including animationcomplete/animationstop and per-frame animationupdate checks for hit detection or gameplay timing.
- Use advanced playback features like chaining (per sprite), animation mixing delays (with play), staggered starts across groups, JSON export/import, and Aseprite tag-based generation.
Quick Start
Use the animations skill to define a global Phaser animation from a loaded spritesheet and then play it on a sprite using its animation key, for example creating an 'explode' animation via this.anims.create and triggering sprite.play('explode').