Optional
points: Vector3[]An array of Vector3 points. Default is [].
Optional
isClosed: booleanWhether the curve is closed. Default is false.
Optional
curveType: CatmullRomCurveTypeCurve paramertization name. Default is 'centripetal'.
Optional
tension: numberTension of the curve. Default is 0.5.
Determines the amount of divisions when calculating the
cumulative segment lengths of a curve via .getLengths
. To ensure
precision when using methods like .getSpacedPoints
, it is recommended
to increase .arcLengthDivisions
if the curve is very large.
200
The curve will loop back onto itself when this is true.
When curveType is catmullrom, defines catmullrom's tension.
Readonly
issubclass should override
false
Readonly
istrue
Readonly
issubclass should override
false
Readonly
issubclass should override
false
Readonly
issubclass should override
false
Readonly
issubclass should override
false
Readonly
issubclass should override
false
Readonly
issubclass should override
false
Readonly
issubclass should override
false
Readonly
issubclass should override
false
The array of Vector3 points that define the curve. It needs at least two entries.
[]
When curveType is catmullrom, defines catmullrom's tension.
Readonly
type'CatmullRomCurve3'
Generates the Frenet frames. Learn more at http://www.cs.indiana.edu/pub/techreports/TR425.pdf
An object with shape: { tangents: Vector3[]; normals: Vector3[]; binormals: Vector3[]; }
Number of segments
Optional
closed: booleanTrue if this curve is closed.
Copies another Curve object's properties to this instance.
This instance.
The source curve.
Copies the data from the given JSON object to this instance.
This instance.
The source JSON object.
Find the point (vector) for point t of the curve where t is between 0 and 1.
The point.
A position on the curve. Must be in the range [ 0, 1 ].
Optional
optionalTarget: Vector3(optional) If specified, the result will be copied into this Vector, otherwise a new Vector will be created.
Find a vector for point at relative position in curve according to arc length
The point.
A position on the curve according to the arc length. Must be in the range [ 0, 1 ].
Optional
optionalTarget: Vector3(optional) If specified, the result will be copied into this Vector, otherwise a new Vector will be created.
Compute a unit vector tangent at t. If the subclassed curve do 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 getTangent(t: number, optionalTarget?: T): T;
A vector tangent to t.
A position on the curve. Must be in the range [ 0, 1 ].
Optional
optionalTarget: Vector3— (optional) If specified, the result will be copied into this Vector, otherwise a new Vector will be created.
Compute the tangent at a point which is equidistant to the ends of the
curve from the point given in getTangent()
.
a vector tangent to u.
A position on the curve according to the arc length. Must be in the range [ 0, 1 ].
Optional
optionalTarget: Vector3(optional) If specified, the result will be copied into this Vector, otherwise a new Vector will be created.
A smooth 3d spline curve from a series of points using the Catmull-Rom algorithm.
References: https://en.wikipedia.org/wiki/Centripetal_Catmull%E2%80%93Rom_spline
http://www.cemyuksel.com/research/catmullrom_param/
Example