Constructor
new Shape( points : Array.<Vector2> )
Constructs a new shape.
| points |
An array of 2D points defining the shape. |
Properties
.holes : Array.<Path> (readonly)
Defines the holes in the shape. Hole definitions must use the opposite winding order (CW/CCW) than the outer shape.
.uuid : string (readonly)
The UUID of the shape.
Methods
.extractPoints( divisions : number ) : Object
Returns an object that holds contour data for the shape and its holes as arrays of 2D points.
| divisions |
The fineness of the result. |
- Returns: An object with contour data.
.getPointsHoles( divisions : number ) : Array.<Array.<Vector2>>
Returns an array representing each contour of the holes as a list of 2D points.
| divisions |
The fineness of the result. |
- Returns: The holes as a series of 2D points.