actions-and-utilities

Batch modify and align Phaser 4 Game Objects using Phaser.Actions utilities.

40.1k|7.2k|Updated Apr 12, 2013
One-click install
npx skills add https://github.com/phaserjs/phaser --skill actions-and-utilities-phaserjs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: actions-and-utilities
Source: https://github.com/phaserjs/phaser/tree/main/skills/actions-and-utilities
Command: npx skills add https://github.com/phaserjs/phaser --skill actions-and-utilities-phaserjs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing and manipulating large arrays of Phaser Game Objects manually is repetitive and error-prone; this skill provides a collection of actions and utilities to batch-update properties, align, distribute, and place objects efficiently.

Core Features & Use Cases

  • Batch position, rotate, scale, and other properties on arrays of game objects.
  • Grid-align a collection of objects or Groups for organized layouts.
  • Place and distribute objects along geometric shapes or paths using geometry helpers.

Quick Start

Create 20 sprites and batch-position them in a 5x4 grid using Phaser.Actions.GridAlign.

Frequently Asked Questions about actions-and-utilities

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

FAQPage Schema
How do I batch update properties on multiple Phaser game objects at once?

You can batch update properties on Phaser game objects by applying actions to arrays or Groups, allowing you to bulk modify position, rotation, and scale across large collections efficiently.

What is the best way to grid-align a group of sprites in Phaser?

Grid alignment in Phaser is achieved using dedicated actions utilities that arrange arrays of game objects into structured rows and columns, streamlining common scene setup tasks for organized layouts.

Can I distribute Phaser game objects along a geometric shape or path?

Yes, you can distribute and place Phaser game objects along geometric shapes or paths using built-in geometry helpers, enabling precise placement of objects across defined curves and structures.

Do I need to manage state manually when applying batch effects to Phaser Groups?

No, you do not need to manage state manually because this approach provides a general-purpose, non-stateful toolkit that applies batched changes to Groups or arrays in real-time without retaining internal state.

Why does manually positioning large arrays of Phaser game objects become error-prone?

Manually positioning large arrays of Phaser game objects is error-prone due to repetitive code, so using batch actions and utilities prevents mistakes by streamlining alignment, distribution, and property updates.