polygon2.points

The polygon’s corners in ring order.

Value helperSince 0.4.0

Usage

TypeScript
polygon.points(): Point2[]

Returns

A new array of cornerCount points, without a closing repeat.

Example

TypeScript
Polygon2.rectangle(2, 2).value.points()[0] // → { x: -1, y: -1 }

See also