Function triangulateNonConvexFacesVertices

  • Parameters

    • graph: FOLD

      a FOLD object.

    • earcut: any

      the earcut npm package from Mapbox

    Returns number[][]

    faces_vertices where all faces have only 3 vertices

    Description

    Triangulate a faces_vertices with the capability to handle both convex and nonconvex. This will increase the number of faces. You will need to link a reference to the package "Earcut" by Mapbox. Earcut is a small and capable library with zero dependencies. https://www.npmjs.com/package/earcut