Options obect for polylineToShapes that evenly distributes shapes
along a line
pointsTypeParsablePoint[] — array of points representing a
polyline where each point is a corner in the line
numnumber — number of shapes to distribute along line
closeboolean — true closes the polyline
sizenumber — size of shape
shapenumber | (center: Point, size: number) => number[] — By default a square of two triangles is created (six vertices). Use a
number to create a regular polygon with number sides. Use a custom
function to make a custom shape. The function takes as input the [x, y]
position of the point to build the shape around, and size. It outputs an
array of interlaced x and y coordinates of triangle vertices - i.e.:
[x1, y1, x2, y2, x3, y3, ....]
makeColors(num: number, center: Point, cumDist: number, percentDist: number, index: number) => number[] — function that creates colors for each vertex of the shape.
Function input parameters are the number of shape vertices to be colored,
the center point coordinate, the previous polyline point index, the
cumulative length from the start of the polyline, and the percentLength from
the start of the polyline. The function must return a single array
containing all vertex colors.
Options obect for polylineToShapes that evenly distributes shapes along a line
pointsTypeParsablePoint[] — array of points representing a polyline where each point is a corner in the linenumnumber— number of shapes to distribute along linecloseboolean—truecloses the polylinesizenumber— size of shapeshapenumber|(center: Point, size: number) => number[]— By default a square of two triangles is created (six vertices). Use anumberto create a regular polygon withnumbersides. Use a custom function to make a custom shape. The function takes as input the [x, y] position of the point to build the shape around, andsize. It outputs an array of interlaced x and y coordinates of triangle vertices - i.e.: [x1, y1, x2, y2, x3, y3, ....]makeColors(num: number, center: Point, cumDist: number, percentDist: number, index: number) => number[]— function that creates colors for each vertex of the shape. Function input parameters are the number of shape vertices to be colored, the center point coordinate, the previous polyline point index, the cumulative length from the start of the polyline, and the percentLength from the start of the polyline. The function must return a single array containing all vertex colors.