Skip to content
Kitbay
Skill

actions-and-utilities

MITUpdated on Aug 21, 202640,693GitHub stars

A skill published in the Phaser repository on the batch actions and helper utilities of Phaser 4.

What the skill teaches

A skill published in the Phaser repository on the batch actions and helper utilities of Phaser 4. Actions take an array of game objects, such as a group's children, set or increment a property on each with an optional step per item, and return the same array; they cover placing objects on circles, lines and shapes, grid alignment and fitting to a region, spreading a value across items, rotating around a point, shuffling and playing animations, plus newer bloom, shine and mask effects. It also covers the array, object and string utilities, such as stable sorting, deep copies, dot-path lookups and padding. Gotchas include geometry actions needing Phaser geometry objects and shuffle changing arrays in place.

Capabilities

  • Set properties on groups of game objects
  • Align game objects in a grid
  • Place objects along shapes
  • Use Phaser's array and object helpers