1.0.1 • Published 1 year ago

three-obj-earcut v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Three Obj Earcut

NPM version npm download

Triangulates obj text, depends on three.js and earcut, supports convex and concave polygon without holes.

Make sure your obj file contains normal coords, the first vertex's normal in a face will be used for rotation (rotate the face to parallel to the XY plane), because earcut handles 3D data as if it was projected onto the XY plane.

Install

npm install --save three-obj-earcut

Usage

import triangulate from 'three-obj-earcut'
const result = triangulate(objText)

License

MIT

1.0.1

1 year ago

1.0.0

1 year ago

0.0.1

1 year ago