Skip to content

tessellateFill

tessellateFill(polygons, holes?): FillGeometry

Defined in: core/tessellate.ts:22

Triangulate filled (closed) subpaths into triangles via earcut.

Each entry in polygons is one outer ring (a closed Subpath). The matching entry in holes (optional) is a list of hole rings for that polygon. Open subpaths are skipped — a fill requires a closed ring.

Vertices from every polygon are concatenated into one flat buffer and indices are offset accordingly, so the result is one combined mesh ready for a single draw call.

readonly Subpath[]

readonly readonly Subpath[][] = []

FillGeometry