tweens

Automate time-based animations for Phaser 4 game objects with tweens.

Updated Jun 21, 2021
One-click install
npx skills add https://github.com/mahirocoko/mahirocoko --skill tweens-mahirocoko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tweens
Source: https://github.com/mahirocoko/mahirocoko/tree/main/plugins/phaser/skills/tweens
Command: npx skills add https://github.com/mahirocoko/mahirocoko --skill tweens-mahirocoko

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Animating game objects over time can be verbose and brittle when done with manual frame updates. This skill provides a cohesive API to create, chain, stagger, and control time-based animations in Phaser 4 using Tweens, the TweenManager, and per-property configuration.

Core Features & Use Cases

  • Basic tween creation to move, fade, or rotate objects.
  • Chain tweens, staggered delays, and reusable tween configs for complex sequences.
  • Rich event callbacks and per-property overrides for precise control.

Quick Start

In a Scene's create() method, create a basic tween to move a sprite from x:100 to x:600 over 2000ms.

Frequently Asked Questions about tweens

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

FAQPage Schema
How do I animate Phaser game objects over time without manual frame updates?

You can animate Phaser game objects over time by using tweens to automate time-based motion. This provides a cohesive API to create smooth, configurable animations without manual frame updates.

What is the best way to chain multiple animations sequentially in Phaser?

The best way to chain animations sequentially in Phaser is by using TweenChain. It allows you to create complex sequences and staggered delays for continuous, multi-step object motion.

Can I override individual properties like rotation or fade in a Phaser tween?

Yes, you can override individual properties like rotation or fade in a Phaser tween. The API supports per-property configuration and rich event callbacks for precise control over object motion.

Does this Phaser animation approach support staggered delays for multiple sprites?

Yes, this Phaser animation approach supports staggered delays. You can apply staggered configurations to multiple sprites to create complex, reusable sequences for group animations.

Why does my Phaser animation break when using manual frame updates?

Phaser animations often break with manual frame updates because the process is verbose and brittle. Using a TweenManager with time-based tweens provides a robust API to drive smooth motion reliably.

Do I need external dependencies to create smooth easing animations in Phaser 4?

No external dependencies are needed to create smooth easing animations in Phaser 4. The skill provides TweenManager and Tween APIs natively to drive configurable motion and easing chains.