Phaser API Documentation

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

Description:

Returns the center of a Rectangle as a Point.

Parameters:

name type arguments description
rect Phaser.Geom.Rectangle

The Rectangle to get the center of.

out object | Phaser.Geom.Point <optional>

Optional point-like object to update with the center coordinates.

Returns:
Description:

The modified out object, or a new Point if none was provided.

Type:
Since: 3.0.0