CubicBezierCurve3
A curve representing a 3D Cubic Bezier curve.
Attributes
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
Copies the values of the given curve to this instance.
Copies the values of the given curve to this instance.
Value parameters
- {Curve}
-
source - The curve to copy.
Attributes
- Returns
-
{Curve} A reference to this curve.
- Definition Classes
Deserializes the curve from the given JSON.
Deserializes the curve from the given JSON.
Value parameters
- {Object}
-
json - The JSON holding the serialized curve.
Attributes
- Returns
-
{Curve} A reference to this curve.
- Definition Classes
Inherited methods
Generates the Frenet Frames. Requires a curve definition in 3D space. Used in geometries like [[TubeGeometry]] or [[ExtrudeGeometry]].
Generates the Frenet Frames. Requires a curve definition in 3D space. Used in geometries like [[TubeGeometry]] or [[ExtrudeGeometry]].
Value parameters
- {boolean}
-
[closed=false] - Whether the curve is closed or not.
- {number}
-
segments - The number of segments.
Attributes
- Returns
-
{{tangents: Array
, normals: Array , binormals: Array }} The Frenet Frames. - Inherited from:
- Curve
Returns the total arc length of the curve.
Returns the total arc length of the curve.
Attributes
- Returns
-
{number} The length of the curve.
- Inherited from:
- Curve
Returns an array of cumulative segment lengths of the curve.
Returns an array of cumulative segment lengths of the curve.
Value parameters
- {number}
-
[divisions=this.arcLengthDivisions] - The number of divisions.
Attributes
- Returns
-
{Array
} An array holding the cumulative segment lengths. - Inherited from:
- Curve
This method returns a vector in 2D or 3D space (depending on the curve definition) for the given interpolation factor.
This method returns a vector in 2D or 3D space (depending on the curve definition) for the given interpolation factor.
Value parameters
- {(Vector2|Vector3)}
-
[optionalTarget] - The optional target vector the result is written to.
- {number}
-
t - A interpolation factor representing a position on the curve. Must be in the range
[0,1].
Attributes
- Returns
-
{(Vector2|Vector3)} The position on the curve. It can be a 2D or 3D vector depending on the curve definition.
- Inherited from:
- Curve
This method returns a vector in 2D or 3D space (depending on the curve definition) for the given interpolation factor. Unlike [[Curve#getPoint]], this method honors the length of the curve which equidistant samples.
This method returns a vector in 2D or 3D space (depending on the curve definition) for the given interpolation factor. Unlike [[Curve#getPoint]], this method honors the length of the curve which equidistant samples.
Value parameters
- {(Vector2|Vector3)}
-
[optionalTarget] - The optional target vector the result is written to.
- {number}
-
u - A interpolation factor representing a position on the curve. Must be in the range
[0,1].
Attributes
- Returns
-
{(Vector2|Vector3)} The position on the curve. It can be a 2D or 3D vector depending on the curve definition.
- Inherited from:
- Curve
This method samples the curve via [[Curve#getPoint]] and returns an array of points representing the curve shape.
This method samples the curve via [[Curve#getPoint]] and returns an array of points representing the curve shape.
Value parameters
- {number}
-
[divisions=5] - The number of divisions.
Attributes
- Returns
-
{Array<(Vector2|Vector3)>} An array holding the sampled curve values. The number of points is
divisions + 1. - Inherited from:
- Curve
This method samples the curve via [[Curve#getPointAt]] and returns an array of points representing the curve shape. Unlike [[Curve#getPoints]], this method returns equi-spaced points across the entire curve.
This method samples the curve via [[Curve#getPointAt]] and returns an array of points representing the curve shape. Unlike [[Curve#getPoints]], this method returns equi-spaced points across the entire curve.
Value parameters
- {number}
-
[divisions=5] - The number of divisions.
Attributes
- Returns
-
{Array<(Vector2|Vector3)>} An array holding the sampled curve values. The number of points is
divisions + 1. - Inherited from:
- Curve
Returns a unit vector tangent for the given interpolation factor. If the derived curve does not implement its tangent derivation, two points a small delta apart will be used to find its gradient which seems to give a reasonable approximation.
Returns a unit vector tangent for the given interpolation factor. If the derived curve does not implement its tangent derivation, two points a small delta apart will be used to find its gradient which seems to give a reasonable approximation.
Value parameters
- {(Vector2|Vector3)}
-
[optionalTarget] - The optional target vector the result is written to.
- {number}
-
t - The interpolation factor.
Attributes
- Returns
-
{(Vector2|Vector3)} The tangent vector.
- Inherited from:
- Curve
Same as [[Curve#getTangent]] but with equidistant samples.
Same as [[Curve#getTangent]] but with equidistant samples.
Value parameters
- {(Vector2|Vector3)}
-
[optionalTarget] - The optional target vector the result is written to.
- {number}
-
u - The interpolation factor.
Attributes
- Returns
-
{(Vector2|Vector3)} The tangent vector.
- See also
-
[[Curve#getPointAt]] - Inherited from:
- Curve
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.
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.
Value parameters
- {?number}
-
distance - An optional distance on the curve.
- {number}
-
u - The interpolation factor.
Attributes
- Returns
-
{number} The updated interpolation factor.
- Inherited from:
- Curve
Attributes
- Inherited from:
- Object
Attributes
- Inherited from:
- Object
Attributes
- Inherited from:
- Object
Attributes
- Inherited from:
- Object
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 method must be called on the composed curve, too.
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 method must be called on the composed curve, too.
Attributes
- Inherited from:
- Curve
Attributes
- Inherited from:
- Object
Concrete fields
This flag can be used for type testing.
This flag can be used for type testing.
Attributes
Inherited fields
The type property is used for detecting the object type in context of serialization/deserialization.
The type property is used for detecting the object type in context of serialization/deserialization.
Attributes
- Inherited from:
- Curve
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 [[Curve#getSpacedPoints]], it is recommended to increase the value of this property if the curve is very large.
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 [[Curve#getSpacedPoints]], it is recommended to increase the value of this property if the curve is very large.
Attributes
- Inherited from:
- Curve
An internal cache that holds precomputed curve length values.
Must be set to true if the curve parameters have changed.