Compute tangents for a path of 3D points.
npm install path-tangents
import pathTangents from "path-tangents";
// const path = ...
const closed = true;
const tangents = pathTangents(path, closed);
-
pathTangents(path, [closed]) ⇒
TypedArray
|Array
|Array.<vec3>
-
Compute tangents for a path of 3D points.
-
vec3 :
Array.<number>
pathTangents(path, [closed]) ⇒ TypedArray
| Array
| Array.<vec3>
Compute tangents for a path of 3D points.
Kind: global function
Param | Type | Default | Description |
---|---|---|---|
path |
TypedArray | Array | Array.<vec3>
|
Simplicial complex geometry positions (eg. new Float32Array([x, y, z, x, y, z, ...])/new Array(x, y, z, x, y, z, ...) or new Array([x, y, z], [x, y, z], ...) ) |
|
[closed] | boolean |
false |
Specify if the path is closed. If so the last tangent will point to the first point. Otherwise it will follow the previous point. |
Kind: global typedef
MIT. See license file.