Phaser API Documentation

  Version: 
<static> Decompose(rect, [out])

Description:

Create an array of points for each corner of a Rectangle If an array is specified, each point object will be added to the end of the array, otherwise a new array will be created.

Parameters:

name type arguments description
rect Phaser.Geom.Rectangle

The Rectangle object to be decomposed.

out array <optional>

If provided, each point will be added to this array.

Returns:
Description:

Will return the array you specified or a new array containing the points of the Rectangle.

Type:
  • array
Since: 3.0.0