tweens

Animates object properties over time using Phaser 4 tweens, chains, and easing functions.

465|41|Updated Aug 4, 2026
One-click install
npx skills add https://github.com/autonomous-ai/openharness --skill tweens-autonomous-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tweens
Source: https://github.com/autonomous-ai/openharness/tree/main/store/agents/phaser/skills/tweens
Command: npx skills add https://github.com/autonomous-ai/openharness --skill tweens-autonomous-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Animating game object properties in Phaser 4 requires knowing the TweenManager API, config options, easing names, and lifecycle events, which are easy to misuse without a reference. ## Core Features & Use Cases - Tween Creation and Configuration: Build tweens with targets, duration, delay, easing, yoyo, repeat, and per-property overrides via this.tweens.add(). - Tween Chains and Stagger: Sequence tweens with this.tweens.chain() and offset multiple targets with this.tweens.stagger() including grid and center-out patterns. - Playback Control and Events: Pause, resume, seek, restart, and kill tweens, plus handle onStart, onUpdate, onComplete, and EventEmitter events. - Use Case: A game developer wants a coin to bob up and down forever and a UI panel to slide in with a bounce; this Skill provides the exact yoyo/repeat and easing configs to implement both. ## Quick Start Ask the agent to add a Phaser tween that moves a sprite to x 600 over two seconds with Sine easing in the scene's create method.

Frequently Asked Questions about tweens

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

FAQPage Schema
How do I create a tween in Phaser 4?

Call this.tweens.add() inside a Scene with a config object specifying targets, the properties to animate, duration, and an ease name. The tween starts immediately and auto-destroys on completion unless persist is true.

How do I chain multiple tweens in sequence in Phaser?

Use this.tweens.chain() with a tweens array of TweenBuilderConfig objects. Each tween starts after the previous one completes, and the chain supports loop, loopDelay, and chain-level callbacks.

What is the difference between repeat and loop in Phaser tweens?

Repeat is per-property and replays that property's animation, while loop restarts the entire tween from scratch. A repeat of 1 means the property plays twice total, and loop -1 loops forever so onComplete never fires.

How do I stagger animations across multiple targets in Phaser?

Pass this.tweens.stagger() as the delay value, for example this.tweens.stagger(100) for 100ms between targets. Options include from center, a range array, and grid-based stagger with easing.

Why did my Phaser tween disappear after finishing?

Tweens auto-destroy after completion by default, so stored references become invalid. Set persist: true in the config to keep the tween alive for replay, and call tween.destroy() manually when done.

Can I tween a plain number without a game object in Phaser?

Yes, use this.tweens.addCounter() with from and to values to create a number tween with no target. Read the current value in onUpdate via tween.getValue().