Returns an array of
quantity Points where each point is taken from the given Line,
spaced out according to the ease function specified.
const line = new Phaser.Geom.Line(100, 300, 700, 300); const points = Phaser.Geom.Line.GetEasedPoints(line, 'sine.out', 32)
In the above example, the
points array will contain 32 points spread-out across
the length of
line, where the position of each point is determined by the
You can optionally provide a collinear threshold. In this case, the resulting points
are checked against each other, and if they are
< collinearThreshold distance apart,
they are dropped from the results. This can help avoid lots of clustered points at
far ends of the line with tightly-packed eases such as Quartic. Leave the value set
to zero to skip this check.
Note that if you provide a collinear threshold, the resulting array may not always
The Line object.
|ease||string | function||
The ease to use. This can be either a string from the EaseMap, or a custom function.
The number of points to return. Note that if you provide a
An optional threshold. The final array is reduced so that each point is spaced out at least this distance apart. This helps reduce clustering in noisey eases.
An optional array of ease parameters to go with the ease.
An array of Geom.Points containing the coordinates of the points on the line.