npm.io
1.0.0 • Published 12 years ago

mesh-reindex

Licence
MIT
Version
1.0.0
Deps
0
Vulns
0
Weekly
0
Stars
4

mesh-reindex stable

Convert a flat array into a simplicial-complex-style indexed mesh, without optimisation.

Useful for interoperability with other modules, and can also be used in combination with unindex-mesh to force hard edges.

Usage

NPM

mesh = reindex(array)

Given a flat array of vertices, expand into an indexed mesh with the following properties:

  • positions: the vertices in the mesh.
  • cells: the faces in the mesh, with each element being an array of three indices for each point in a triangle.

See Also

License

MIT. See LICENSE.md for details.

Keywords