triangulate

external fun triangulate(positions: ReadonlyArray<Cartesian2>, holes: ReadonlyArray<JsDouble>? = definedExternally): ReadonlyArray<JsDouble>(source)

Triangulate a polygon.

Return

Index array representing triangles that fill the polygon

Parameters

positions

Cartesian2 array containing the vertices of the polygon

holes

An array of the staring indices of the holes.

See also