figureone
    Preparing search index...

    Interface OBJ_PolygonCloudShapes

    Options object to generate shapes at random positions within a polygon.

    • radius number — radius of polygon (1)
    • sides number — number of polygon sides (4)
    • position TypeParsablePoint — center position of polygon ([0, 0])
    • rotation number — polygon rotation (first vertex will be along the positive x axis) (0)
    • num number — number of shapes to generate (10)
    • size number — size of each shape (0.01)
    • 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, ....]