An incredibly fast JavaScript library for Delaunay triangulation of 2D points
Accept plain (non-typed) arrays in Delaunator
constructor.
⚠️ breaking: Delaunator constructor now accepts a typed flat array of coordinates:
const coords = new Float64Array(x0, y0, x1, y1, ...);
const delaunay = new Delaunator()
For the old constructor behavior, use Delaunator.from
:
const delaunay = Delaunator.from([[10, 10], [20, 20], ...]);
🍏 Delaunator can now be used as a ES module in environments that support them:
import Delaunator from 'delaunator';
Fixed an issue where halfedges
structure would get invalid in rare cases. #11
delaunay.halfedges
array for traversing the triangulation.~2x performance improvement! See #3
delaunay.triangles
now returns a Int32Array
instead of Array
.First release.