path-tangents
TypeScript icon, indicating that this package has built-in type declarations

3.1.0 • Public • Published

path-tangents

npm version stability-stable npm minzipped size dependencies types Conventional Commits styled with prettier linted with eslint license

Compute tangents for a path of 3D points.

paypal coinbase twitter

Installation

npm install path-tangents

Usage

import pathTangents from "path-tangents";

// const path = ...

const closed = true;
const tangents = pathTangents(path, closed);

API

Functions

pathTangents(path, [closed])TypedArray | Array | Array.<vec3>

Compute tangents for a path of 3D points.

Typedefs

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.

vec3 : Array.<number>

Kind: global typedef

License

MIT. See license file.

Dependents (1)

Package Sidebar

Install

npm i path-tangents

Weekly Downloads

3

Version

3.1.0

License

MIT

Unpacked Size

9.52 kB

Total Files

7

Last publish

Collaborators

  • dmnsgn