Class: Path3D

Path3D(points, optionsopt)

Path built from 3D points. Provides arc-length parameterization with cached segment lengths.

Constructor

new Path3D(points, optionsopt)

Parameters:
Name Type Attributes Description
points Array.<Vector3> Path points.
options Object <optional>
Optional options.
Properties
Name Type Attributes Default Description
loop boolean <optional>
false Whether the path is looped.
Source:
Throws:
  • When inputs are invalid.
    Type
    TypeError
  • When points are insufficient.
    Type
    RangeError

Classes

Path3D

Members

loop

Source:

points

Source:

totalLength

Source:

Methods

getPointAt(pathParameter, outopt) → {Vector3}

Returns an interpolated point at a normalized distance along the path.
Parameters:
Name Type Attributes Description
pathParameter number Normalized path parameter in [0..1].
out Vector3 <optional>
Optional output vector.
Source:
Throws:
When inputs are invalid.
Type
TypeError
Returns:
- Interpolated point written to `out`.
Type
Vector3

getTangentAt(pathParameter, outopt) → {Vector3}

Returns a normalized tangent at a normalized distance along the path.
Parameters:
Name Type Attributes Description
pathParameter number Normalized path parameter in [0..1].
out Vector3 <optional>
Optional output vector.
Source:
Throws:
When inputs are invalid.
Type
TypeError
Returns:
- Normalized tangent written to `out`, or zero for a degenerate segment.
Type
Vector3