Phaser API Documentation

  Version: 

Member of: Phaser.Actions

<static> PlaceOnRectangle(items, rect, [shift])

Description:

Takes an array of Game Objects and positions them on evenly spaced points around the perimeter of a Rectangle.

Placement starts from the top-left of the rectangle, and proceeds in a clockwise direction. If the shift parameter is given you can offset where placement begins.

Parameters:

name type arguments description
items array | Array.<Phaser.GameObjects.GameObject>

An array of Game Objects. The contents of this array are updated by this Action.

rect Phaser.Geom.Rectangle

The Rectangle to position the Game Objects on.

shift number <optional>

An optional positional offset.

Returns:
Description:

The array of Game Objects that was passed to this Action.

Type:
Examples:
Since: 3.0.0