JSPM

get-plane-normal

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 716
  • Score
    100M100P100Q101563F
  • License MIT

gets a plane's normal from 3 points

Package Exports

  • get-plane-normal

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (get-plane-normal) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

get-plane-normal

stable

Gets a plane's normal from 3 points on that plane.

var point1 = [0, 1, 0], 
    point2 = [1, 1, 0.5], 
    point3 = [0, 1, -2]

var norm = normal([], point1, point2, point3)
console.log(norm) // [0, 1, 0]

Usage

NPM

out = normal(out, point1, point2, point3)

With three points on the same plane, determines the unit normal and stores it in out [x, y, z].

Returns out.

License

MIT, see LICENSE.md for details.