Capítulo 341 de 859
An abstract base class for creating an analytic curve object that contains methods for interpolation.
true if the curve parameters have changed.Constructor
| Signature |
|---|
new Curve() (abstract) |
Properties
| Property | Description |
|---|---|
.arcLengthDivisions : number | This value determines the amount of divisions when calculating the cumulative segment lengths of a curve via Curve#getLengths. To ensure precision when using methods like [Cu… |
.needsUpdate : boolean | Must be set to true if the curve parameters have changed. |
.type : string (readonly) | The type property is used for detecting the object type in context of serialization/deserialization. |
Methods
| Method | Description |
|---|---|
.clone() : Curve | Returns a new curve with copied values from this instance. |
.computeFrenetFrames( segments : number, closed : boolean ) : Object | Generates the Frenet Frames. Requires a curve definition in 3D space. Used in geometries like TubeGeometry or ExtrudeGeometry. |
.copy( source : Curve ) : Curve | Copies the values of the given curve to this instance. |
.fromJSON( json : Object ) : Curve | Deserializes the curve from the given JSON. |
.getLength() : number | Returns the total arc length of the curve. |
.getLengths( divisions : number ) : Array.<number> | Returns an array of cumulative segment lengths of the curve. |
| `.getPoint( t : number, optionalTarget : Vector2 | Vector3 ) : Vector2 |
| `.getPointAt( u : number, optionalTarget : Vector2 | Vector3 ) : Vector2 |
| `.getPoints( divisions : number ) : Array.<(Vector2 | Vector3)>` |
| `.getSpacedPoints( divisions : number ) : Array.<(Vector2 | Vector3)>` |
| `.getTangent( t : number, optionalTarget : Vector2 | Vector3 ) : Vector2 |
| `.getTangentAt( u : number, optionalTarget : Vector2 | Vector3 ) : Vector2 |
.getUtoTmapping( u : number, distance : number ) : number | Given an interpolation factor in the range [0,1], this method returns an updated interpolation factor in the same range that can be ued to sample equidistant points from a curve. |
.toJSON() : Object | Serializes the curve into JSON. |
.updateArcLengths() | Update the cumulative segment distance cache. The method must be called every time curve parameters are changed. If an updated curve is part of a composed curve like CurvePath, this… |