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?
The start point of this curve.
The first control point of this curve.
The second control point of this curve.
The end point of this curve.
String based identifier for the type of curve.
Draws this curve to the specified graphics object.
The graphics object this curve should be drawn to.
OptionalpointsTotal: numberThe number of intermediary points that make up this curve. A higher number of points will result in a smoother curve. 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.
Returns the resolution of this curve.
The amount of divisions used by this curve.
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.
Returns a JSON object that describes this curve.
Calculate and cache the arc lengths.
StaticfromGenerates a curve from a JSON object.
The JSON object containing this curve data.
A higher-order Bézier curve constructed of four points.