triangulate

fun triangulate(shape: Shape, distanceTolerance: Double = 0.5, fillRule: FillRule = FillRule.NONZERO_WINDING): List<Vector2>(source)

Triangulates a Shape into a List of triangle corner positions.

Parameters

distanceTolerance

How refined should the triangular shape be, smaller values equate to higher precision.


@JvmName(name = "triangulateV2")
fun triangulate(shape: List<List<Vector2>>, fillRule: FillRule = FillRule.NONZERO_WINDING): List<Int>(source)
@JvmName(name = "triangulateV3")
fun triangulate(shape: List<List<Vector3>>, fillRule: FillRule = FillRule.NONZERO_WINDING): List<Int>(source)

Triangulate shape into a List of indexed triangles