These docs are for v1.0. Click to read the latest docs for v1.2.

A shape's geometry, which is defined through a shape definition, is what creates the data that is rendered to the screen. Geometry can be created from a standard geometric shape, a custom path, or a combination of the two (achieved with boolean operations). Geometry is drawn using relative coordinates, which are defined based on the bounds of the shape that the geometry is contained in (either a sub-shape or a rectangle if it is top-level geometry).

Conditional geometry

For complex geometry, formulas can be used to determine whether or not to include the geometry in the shape's render output. Conditional geometry evaluates the formula and if the result is false, the geometry is not rendered.
These formulas work for standard shapes, paths, and boolean operations.

Repeating geometry

Geometry that is made up of multiple instances of the same shape can be defined using formulas. This is true even when those shapes have different sizes or positions (e.g. a venn diagram). There are two ways to use repeating geometry: ForRepeats and MapRepeats.

ForRepeat

ForRepeats are used to repeat geometry multiple times according to a min value and a max value. Be default, this will be looped from min to max with a step of 1, but you are able to adjust the step if you want. For example, a ForRepeat with a min of 1, a max of 7, and a step of 2 would loops 4 times, resulting in index values of 1, 3, 5, and 7 for each respective loop.

PropertyTypeDescription
typefor
indexstring (optional)
minnumber, formula
maxnumber, formula
stepnumber, formula (optional)

MapRepeat

MapRepeats are used to repeat geometry by looping over the items in a given array. For example, a MapRepeat with a list equal to [2, 4, 6, 8] would repeat 4 times, resulting in item values of 2, 4, 6, and 8 for each respective loop. If you defined a variable for index, then it would have values of 1, 2, 3, and 4 for each respective loop.

PropertyTypeDescription
typemap
indexstring (optional)
itemstring
listnumber\[]