obj-mesh
parse an obj file into the object format that mesh-viewer understands
The format that mesh-viewer understands is the same object format that the bunny and stanford-dragon packages use.
example
var xhr = ;var objmesh = ;var through = ;var viewer = ;var shell = ;var meshes = ;shell;shell;
methods
var objmesh =
var stream = objmesh()
Return a transform stream
that expects to be written obj file contents and
outputs an object of the form that
mesh-viewer for each object group in
the input source file.
Each object has:
- row.positions - an array of
[x,y,z]
arrays for each point in the mesh - row.cells - an array of
[i,j,k,...]
point indexes for each point inrow.positions
install
With npm do:
npm install obj-mesh
license
MIT