For a curve on a Path, false means the Path will ignore this curve.
The quantity of arc length divisions within the curve.
An array of cached arc length values.
The default number of divisions within the curve.
Does the data of this curve need updating?
String based identifier for the type of curve.
Draws this curve on the given Graphics object.
The curve is drawn using Graphics.strokePoints so will be drawn at whatever the present Graphics stroke color is.
The Graphics object is not cleared before the draw, so the curve will appear on-top of anything else already rendered to it.
The Graphics instance onto which this curve will be drawn.
OptionalpointsTotal: numberThe resolution of the curve. The higher the value the smoother it will render, at the cost of rendering performance. Default 32.
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.
Get total curve arc length
Get a list of cumulative segment lengths.
These lengths are
Optionaldivisions: numberThe number of divisions or segments.
Get a sequence of evenly spaced points from the curve.
You can pass divisions, stepRate, or neither.
The number of divisions will be
divisions, if divisions > 0; orthis.getLength / stepRate, if stepRate > 0; orthis.defaultDivisions1 + divisions points will be returned.
Optionaldivisions: numberThe number of divisions to make.
OptionalstepRate: numberThe curve distance between points, implying divisions.
Optionalout: OAn optional array to store the points in.
Get a sequence of equally spaced points (by arc distance) from the curve.
1 + divisions points will be returned.
Optionaldivisions: numberThe number of divisions to make. Default this.defaultDivisions.
OptionalstepRate: numberStep between points. Used to calculate the number of points to return when divisions is falsy. Ignored if divisions is positive.
Optionalout: Math.Vector2[]An optional array to store the points in.
Get a unit vector tangent at a relative position on the curve. In case any sub curve does not implement its tangent derivation, 2 points a small delta apart will be used to find its gradient which seems to give a reasonable approximation
The relative position on the curve, [0..1].
Optionalout: OA vector to store the result in.
Given a distance in pixels, get a t to find p.
The distance, in pixels.
Optionaldivisions: numberOptional amount of divisions.
Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant.
A float between 0 and 1.
The distance, in pixels.
Optionaldivisions: numberOptional amount of divisions.
Calculate and cache the arc lengths.
A Base Curve class, which all other curve types extend.
Based on the three.js Curve classes created by zz85