AGENT SKILL

phaserjs-animate-sprites

Build Phaser sprite clips and presentation tweens with versioned atlas contracts, interruption and restart-safe ownership.

License 许可
MIT
最近更新
2026-11-13
Stars
★ 4
Forks
3

01 前言 Front Matter

name
phaserjs-animate-sprites
engines
[ "PHASERJS" ]
description
Build Phaser sprite clips and presentation tweens with versioned atlas contracts, interruption and restart-safe ownership.

02 资源文件 1

03 SKILL.md 正文

Animate Phaser Sprites

When to use

Implement sprite animation, atlas frame selection, tweened presentation or actor animation state adapters.

Engine and dependencies

Before edits or tool launches, run resolve-engine.sh and resolve-skill.sh phaserjs-animate-sprites; require compatibility and respect task override scope. Inspect the locked Phaser major, atlas/frame metadata, gameplay states and clock policy. Use authorized project sprites; skeletal-animation middleware, authoring tools and their licenses remain separate selections.

Workflow

  1. Validate texture keys, frame names/order, trim/pivot metadata and clip durations. Build named animation definitions through this.anims with explicit repeat, frame rate and delay; namespace shared keys and avoid redefining them on every scene restart.
  2. Separate shared AnimationManager definitions from each Sprite's animation state and scene-owned TweenManager work. Configure per-actor playback and transitions; missing clips must report the intended fallback or block according to the gameplay contract.
  3. Define movement, facing, hit-react and one-shot precedence. Restart, complete, stop and interrupt are distinct paths. A transition token prevents a cancelled clip's completion listener from mutating the replacement state.
  4. Use tweens for presentation channels with explicit target/property ownership and cancellation restoration. Do not tween a physics-owned authoritative position. Remove/stop owned tweens when actors despawn and reset pooled sprites' frame, alpha, scale and playback state.
  5. Keep gameplay outcomes on the simulation clock. Animation events can drive bounded presentation; skipped frames, slow motion or pause cannot duplicate damage or delay authoritative invulnerability indefinitely. Version-specific filters/FX must follow the selected Phaser renderer.
  6. Remove event handlers and owned playback on shutdown; preserve global definitions and textures while other scenes or sprites still need them.

Output and verification

Deliver atlas/clip contracts, transitions and interruption/cleanup behavior. Check missing frames, trimmed alignment, rapid state changes, duplicate completion listeners, pooled reuse, scene restart, pause and varied frame rates. Record visual timing and readability in a running build; definition validation alone cannot prove animation quality. Consult the animation guide and verify APIs against the host revision.

04 同仓库更多 Skills

TimothyMeadows
TimothyMeadows/Hephaera

verify-web3-game-lifecycle

Verify a game's selected Web3 asset, wallet, ownership and trading lifecycle with contract properties, canonical recovery, actual target evidence and separate release readiness.

★ 4
TimothyMeadows
TimothyMeadows/Hephaera

verify-onchain-game-assets

Verify exact on-chain game collection ownership and quantities at canonical blocks, reconcile inventory events, and design honest match admission. Use for ERC721/ERC1155 inventory, reorg recovery, reservations, or transfer-during-match rules.

★ 4
TimothyMeadows
TimothyMeadows/Hephaera

plan-web3-game-assets

Define an opt-in Ethereum, Base or Immutable game-asset lifecycle, including token identity, supply, rights, custody, game eligibility and chain-specific dependencies.

★ 4
TimothyMeadows
TimothyMeadows/Hephaera

integrate-game-wallets

Integrate explicit player-wallet connection, scoped SIWE authentication, authority invalidation and reviewed target-specific handoff without application-held player keys.

★ 4
TimothyMeadows
TimothyMeadows/Hephaera

integrate-game-asset-trading

Integrate explicitly selected game asset settlement with exact unsigned intents, scoped approvals, idempotent operations and canonical receipt reconciliation. Use for NFT listing, buying, cancellation, retries or marketplace integration.

★ 4
TimothyMeadows
TimothyMeadows/Hephaera

build-evm-game-contracts

Author and verify host-owned EVM game collections and explicit mint, burn, craft or admin rules with pinned Solidity tooling. Use for contract source and deployment candidates; deployment and player signing require separate authorization.

★ 4