figureone
    Preparing search index...

    Interface OBJ_PolylineToShapes

    Options obect for polylineToShapes that evenly distributes shapes along a line

    • points TypeParsablePoint[] — array of points representing a polyline where each point is a corner in the line
    • num number — number of shapes to distribute along line
    • close booleantrue closes the polyline
    • size number — size of shape
    • shape number | (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.