figureone
    Preparing search index...

    Interface OBJ_PointsToShapes

    Options obect for pointsToShapes that creates a shape at each point

    • points TypeParsablePoint[] — array of points to create shapes at
    • 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, and the position of the shape. The function must return a single array containing all vertex colors.