Skip to content

Function: triangulateFills() ​

ts
function triangulateFills(input, origin?): FillTriangulation;

Experimental

Triangulate every polygon and merge the result into one indexed triangle list. origin (optional) is subtracted from coordinates before triangulating, which keeps earcut's cross products well conditioned for large values such as ms timestamps; output positions are absolute either way.

Parameters ​

ParameterType
inputFillGeometryInput
originreadonly [number, number, number]

Returns ​

FillTriangulation

Released under the MIT License.