3.1.0 • Published 2 months ago
path-tangents v3.1.0
path-tangents
Compute tangents for a path of 3D points.
Installation
npm install path-tangents
Usage
import pathTangents from "path-tangents";
// const path = ...
const closed = true;
const tangents = pathTangents(path, closed);
API
Functions
Typedefs
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. |
vec3 : Array.<number>
Kind: global typedef
License
MIT. See license file.