Package Exports
- triangles-index
- triangles-index/index.js
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 (triangles-index) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
triangles-index
index a set of triangles into a set of positions/pts and cells. merge vertices fast.
//module.exports = {indexTriangles, deIndexTriangles};
//single triangle = [[x,y,z],[x,y,z],[x,y,z]]
//indexTriangles(triangles) => {cells: cells, pts: pts}
//deindexTriangles(indexResult) => array of triangles
//demergeMeshTriangles(indexResult) => {cells: cells, pts: pts} -- but no more shared vertices -- # cells == # triangles * 3
add _meshView
to the function names to get the same format as meshview and other libs use {cells, positions}
//indexTriangles_meshView(triangles) => {cells: cells, positions: positions}
//deindexTriangles_meshView(indexResult) => array of triangles
//demergeMeshTriangles_meshView(indexResult) => {cells: cells, pts: pts} -- but no more shared vertices -- # cells == # triangles * 3