Phaser API Documentation

  Version: 
<static> MarchingAnts(rect, [step], [quantity], [out])

Description:

Returns an array of points from the perimeter of the Rectangle, where each point is spaced out based on either the step value, or the quantity.

Parameters:

name type arguments description
rect Phaser.Geom.Rectangle

The Rectangle to get the perimeter points from.

step number <optional>

The distance between each point of the perimeter. Set to null if you wish to use the quantity parameter instead.

quantity number <optional>

The total number of points to return. The step is then calculated based on the length of the Rectangle, divided by this value.

out array | Array.<Phaser.Geom.Point> <optional>

An array in which the perimeter points will be stored. If not given, a new array instance is created.

Returns:
Description:

An array containing the perimeter points from the Rectangle.

Type:
Since: 3.0.0