JSPM

triangles-index

0.0.0042
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q48040F
  • License CC0-1.0

index a set of triangles into a set of positions/pts and cells. merge vertices fast.

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 

stonks