Constructor
new Path3D(points, optionsopt)
Parameters:
| Name | Type | Attributes | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
points |
Array.<Vector3> | Path points. | |||||||||||
options |
Object |
<optional> |
Optional options.
Properties
|
- Source:
Throws:
-
-
When inputs are invalid.
- Type
- TypeError
-
-
-
When points are insufficient.
- Type
- RangeError
-
Classes
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