What problem does it solve?
This skill solves the problem of creating smooth, time-based animations without manually updating values frame-by-frame, especially when multiple properties and targets must move in sync.
Core Features & Use Cases
- TweenManager-driven motion: Create and manage tweens with a consistent lifecycle, including delayed starts, updates, completion, and optional persistence.
- Easing, yoyo, and repeat control: Apply easing functions and control back-and-forth behavior with yoyo, hold, repeat, and loop at both property and tween-chain levels.
- Scalable animation patterns: Use tween targets, per-property configs, staggered delays for multiple targets, tween chains for sequential effects, and callbacks/events for integration points (start, update, repeat, complete).
- Use Case: Animate UI elements like a “hover pulse” (yoyo + easing), spawn a group with staggered entrance timing, then follow with a sequential chain that scales and fades out each element.
Quick Start
Use this Skill by calling this.tweens.add in your Scene’s create method to move a sprite’s x position over a specified duration with an easing function.