Function: partition()
ts
function partition(
outlines,
label,
scale
): Map<number, Shape[]>;Split the plane into regions by a labeling function: each point gets a label (a number; negative for "nothing"), and every region of equal label is returned as shapes. The labels may only change across the given outlines (closed loops; pass an open polyline's segments as two-point "loops"), which are cut where they meet like overlay's.
Parameters
| Parameter | Type |
|---|---|
outlines | Polygon[] |
label | (p) => number |
scale | number |
Returns
Map<number, Shape[]>