Phaser API Documentation

  Version: 

Member of: Phaser.Actions

<static> PlaceOnTriangle(items, triangle, [stepRate])

Description:

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

If you wish to pass a Phaser.GameObjects.Triangle Shape to this function, you should pass its geom property.

Parameters:

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

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

triangle Phaser.Geom.Triangle

The Triangle to position the Game Objects on.

stepRate number <optional> 1

An optional step rate, to increase or decrease the packing of the Game Objects on the lines.

Returns:
Description:

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

Type:
Examples:
Since: 3.0.0