Delaunator
Fast JavaScript library for Delaunay triangulation of 2D points
...After constructing a delaunay = Delaunator.from(points) object, it will have a triangles array and a halfedges array, both indexed by half-edge id. What’s a half-edge? A triangle edge may be shared with another triangle. Instead of thinking about each edge A↔︎B, we will use two half-edges A→B and B→A. Having two half-edges is the key to everything this library provides. It will also be useful to have some helper functions to go from one half-edge to the next and previous half-edges in the same triangle. We can draw all the triangle edges without constructing the triangles themselves.