Phaser API Documentation

  Version: 
getPoints([divisions], [stepRate], [out])

Description:

Get a sequence of evenly spaced points from the curve.

You can pass divisions, stepRate, or neither.

The number of divisions will be

  1. divisions, if divisions > 0; or
  2. this.getLength / stepRate, if stepRate > 0; or
  3. this.defaultDivisions

1 + divisions points will be returned.

Parameters:

name type arguments description
divisions number <optional>

The number of divisions to make.

stepRate number <optional>

The curve distance between points, implying divisions.

out array | Array.<Phaser.Math.Vector2> <optional>

An optional array to store the points in.

Returns:
Description:

An array of Points from the curve.

Type:
Since: 3.0.0
Source: src/curves/Curve.js (Line 300)