Skip to content

Triangulates obj text, depends on three.js and earcut.

License

Notifications You must be signed in to change notification settings

wxfred/three-obj-earcut

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Triangulates obj text, depends on three.js and earcut.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published