Get a number of points along a line's length.
Provide a quantity
to get an exact number of points along the line.
Provide a stepRate
to ensure a specific distance between each point on the line. Set quantity
to 0
when
providing a stepRate
.
name | type | arguments | description |
---|---|---|---|
line | Phaser.Geom.Line |
The line. |
|
quantity | number |
The number of points to place on the line. Set to |
|
stepRate | number | <optional> |
The distance between each point on the line. When set, |
out | array | Array.<Phaser.Geom.Point> | <optional> |
An optional array of Points, or point-like objects, to store the coordinates of the points on the line. |
An array of Points, or point-like objects, containing the coordinates of the points on the line.