Phaser API Documentation

  Version: 

Member of: Phaser.Curves.Curve

getBounds([out], [accuracy])

Description:

Returns a Rectangle where the position and dimensions match the bounds of this Curve.

You can control the accuracy of the bounds. The value given is used to work out how many points to plot across the curve. Higher values are more accurate at the cost of calculation speed.

Parameters:

name type arguments Default description
out Phaser.Geom.Rectangle <optional>

The Rectangle to store the bounds in. If falsey a new object will be created.

accuracy number <optional> 16

The accuracy of the bounds calculations.

Returns:
Description:

A Rectangle object holding the bounds of this curve. If out was given it will be this object.

Examples:
Since: 3.0.0
Source: src/curves/Curve.js (Line 135)