Phaser API Documentation

  Version: 

Member of: Phaser.Curves.Line

getSpacedPoints([divisions], [stepRate], [out])

Description:

Get a sequence of equally spaced points (by arc distance) from the curve.

1 + divisions points will be returned.

Parameters:

name type arguments Default description
divisions number <optional> this.defaultDivisions

The number of divisions to make.

stepRate number <optional>

Step between points. Used to calculate the number of points to return when divisions is falsy. Ignored if divisions is positive.

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

An optional array to store the points in.

Returns:
Description:

An array of points.

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