Docs / Block Reference

Block Reference

Every building block an object may be composed of, with its properties, their types, defaults and ranges. This page is generated from the live registry, so it cannot drift from what the compiler will accept.

New here? Building Blocks explains what these are and how a drawing is made from them, and Object Definition is the document you put them in.

How to read this page

The same catalogue is available to an agent at runtime through list_building_blocks, search_building_blocks and get_building_block_schema, which read the registry directly.

Limits

LimitValue
Nodes in one object2 000
Nesting depth16
Component nesting depth8
repeat count720
Characters in one expression512
Rows in one memory2 000, at six decimals
image sourceshttps:, data:image/ and relative paths
path dataThe SVG path grammar only

Primitives

The blocks that draw. A node names one as its type, and sets these under properties as constants or under bindings as declarative values.

arc circle clip-box ellipse group image line path polygon polyline rect ring text

arc — Arc

Circular arc or annular sector measured clockwise from the start angle.

Capabilities: fillable strokable radial angular

PropertyTypeDefaultRange
fillcolour"none"
strokecolour"none"
strokeWidthnumber1min 0, max 100
strokeDashstring""
strokeLinecapstring"round"butt | round | square
opacitynumber1min 0, max 1
visiblebooleantrue
pointerEventsstring""
centerXnumber0
centerYnumber0
radiusnumber40min 0
innerRadiusnumber0min 0
startAnglenumber225
endAnglenumber-45

circle — Circle

Circle defined by a centre point and a radius.

Capabilities: fillable strokable radial

PropertyTypeDefaultRange
fillcolour"none"
strokecolour"none"
strokeWidthnumber1min 0, max 100
strokeDashstring""
strokeLinecapstring"round"butt | round | square
opacitynumber1min 0, max 1
visiblebooleantrue
pointerEventsstring""
centerXnumber0
centerYnumber0
radiusnumber40min 0

clip-box — Clip box

Container showing only the part of its children that falls inside it.

Capabilities: container sizable

PropertyTypeDefaultRange
fillcolour"none"
strokecolour"none"
strokeWidthnumber1min 0, max 100
strokeDashstring""
strokeLinecapstring"round"butt | round | square
opacitynumber1min 0, max 1
visiblebooleantrue
pointerEventsstring""
xnumber0
ynumber0
widthnumber100min 0
heightnumber60min 0

Accepts children.

ellipse — Ellipse

Ellipse defined by a centre point and two radii.

Capabilities: fillable strokable radial

PropertyTypeDefaultRange
fillcolour"none"
strokecolour"none"
strokeWidthnumber1min 0, max 100
strokeDashstring""
strokeLinecapstring"round"butt | round | square
opacitynumber1min 0, max 1
visiblebooleantrue
pointerEventsstring""
centerXnumber0
centerYnumber0
radiusXnumber50min 0
radiusYnumber30min 0

group — Group

Container that positions, rotates and scales its children as one unit.

Capabilities: container

PropertyTypeDefaultRange
fillcolour"none"
strokecolour"none"
strokeWidthnumber1min 0, max 100
strokeDashstring""
strokeLinecapstring"round"butt | round | square
opacitynumber1min 0, max 1
visiblebooleantrue
pointerEventsstring""

Accepts children.

image — Image

Bitmap or SVG image placed in a box. Only https:, data: and same-origin relative sources are allowed.

Capabilities: sizable media

PropertyTypeDefaultRange
fillcolour"none"
strokecolour"none"
strokeWidthnumber1min 0, max 100
strokeDashstring""
strokeLinecapstring"round"butt | round | square
opacitynumber1min 0, max 1
visiblebooleantrue
pointerEventsstring""
xnumber0
ynumber0
widthnumber60min 0
heightnumber60min 0
hrefstring""
preserveAspectRatiostring"xMidYMid meet"

line — Line

Straight line segment between two points.

Capabilities: strokable linear

PropertyTypeDefaultRange
fillcolour"none"
strokecolour"none"
strokeWidthnumber1min 0, max 100
strokeDashstring""
strokeLinecapstring"round"butt | round | square
opacitynumber1min 0, max 1
visiblebooleantrue
pointerEventsstring""
x1number0
y1number0
x2number100
y2number0

path — Path

Raw SVG path data. Commands are restricted to the standard path grammar.

Capabilities: fillable strokable

PropertyTypeDefaultRange
fillcolour"none"
strokecolour"none"
strokeWidthnumber1min 0, max 100
strokeDashstring""
strokeLinecapstring"round"butt | round | square
opacitynumber1min 0, max 1
visiblebooleantrue
pointerEventsstring""
dstring""

polygon — Polygon

Closed sequence of connected points.

Capabilities: fillable strokable

PropertyTypeDefaultRange
fillcolour"none"
strokecolour"none"
strokeWidthnumber1min 0, max 100
strokeDashstring""
strokeLinecapstring"round"butt | round | square
opacitynumber1min 0, max 1
visiblebooleantrue
pointerEventsstring""
pointspoints[]

polyline — Polyline

Open sequence of connected points.

Capabilities: strokable linear

PropertyTypeDefaultRange
fillcolour"none"
strokecolour"none"
strokeWidthnumber1min 0, max 100
strokeDashstring""
strokeLinecapstring"round"butt | round | square
opacitynumber1min 0, max 1
visiblebooleantrue
pointerEventsstring""
pointspoints[]

rect — Rectangle

Axis-aligned rectangle with optional corner radius.

Capabilities: fillable strokable sizable

PropertyTypeDefaultRange
fillcolour"none"
strokecolour"none"
strokeWidthnumber1min 0, max 100
strokeDashstring""
strokeLinecapstring"round"butt | round | square
opacitynumber1min 0, max 1
visiblebooleantrue
pointerEventsstring""
xnumber0
ynumber0
widthnumber100min 0
heightnumber60min 0
cornerRadiusnumber0min 0

ring — Ring

Full annulus between an inner and an outer radius.

Capabilities: fillable strokable radial

PropertyTypeDefaultRange
fillcolour"none"
strokecolour"none"
strokeWidthnumber1min 0, max 100
strokeDashstring""
strokeLinecapstring"round"butt | round | square
opacitynumber1min 0, max 1
visiblebooleantrue
pointerEventsstring""
centerXnumber0
centerYnumber0
innerRadiusnumber30min 0
outerRadiusnumber40min 0

text — Text

Single line of text anchored at a point.

Capabilities: fillable textual

PropertyTypeDefaultRange
fillcolour"none"
strokecolour"none"
strokeWidthnumber1min 0, max 100
strokeDashstring""
strokeLinecapstring"round"butt | round | square
opacitynumber1min 0, max 1
visiblebooleantrue
pointerEventsstring""
xnumber0
ynumber0
textstring""
unitstring""
fontSizenumber"token:font.size.default"min 1, max 400
fontFamilystring"token:font.family"
fontWeightnumber"token:font.weight.default"min 100, max 900
textAnchorstring"middle"start | middle | end
baselinestring"central"auto | central | hanging

Modifiers

Applied to a node and everything under it, in the order the modifiers array lists them.

fill mirror opacity repeat rotate scale stroke translate visibility z-order

fill — Fill

Overrides the fill colour of a node.

Capabilities: style

PropertyTypeDefaultRange
colorcolournull

mirror — Mirror

Mirrors a node about a horizontal or vertical axis through an anchor point.

Capabilities: transform

PropertyTypeDefaultRange
axisstring"horizontal"horizontal | vertical
centerXnumber0
centerYnumber0

opacity — Opacity

Sets the opacity of a node or group.

Capabilities: style

PropertyTypeDefaultRange
valuenumber1min 0, max 1

repeat — Repeat

Repeats the node it is applied to, offsetting each copy by an angle step, a translation or a scale. The copy index is available to bindings as the parameter $index.

Capabilities: layout structural

PropertyTypeDefaultRange
countnumber1min 0
angleStepnumber0
angleStartnumber0
centerXnumber0
centerYnumber0
dxnumber0
dynumber0

rotate — Rotate

Rotates a node clockwise around an anchor point, in degrees.

Capabilities: transform angular

PropertyTypeDefaultRange
anglenumber0
centerXnumber0
centerYnumber0

scale — Scale

Scales a node around an anchor point.

Capabilities: transform

PropertyTypeDefaultRange
scaleXnumber1
scaleYnumber1
centerXnumber0
centerYnumber0

stroke — Stroke

Overrides the stroke colour, width and dash pattern of a node.

Capabilities: style

PropertyTypeDefaultRange
colorcolournull
widthnumbernullmin 0
dashstringnull

translate — Translate

Moves a node or group by an offset.

Capabilities: transform

PropertyTypeDefaultRange
dxnumber0
dynumber0

visibility — Visibility

Shows or hides a node, typically bound to a model condition.

Capabilities: style conditional

PropertyTypeDefaultRange
visiblebooleantrue

z-order — Z order

Sorts siblings; higher values are drawn on top.

Capabilities: layout

PropertyTypeDefaultRange
ordernumber0

Behaviours

What the reader can do to a node, and what that writes. Listed on the node under behaviours.

clickable drag-angle drag-axis-tick drag-circle-point drag-rotate draggable follow-pointer forget hoverable keep-time play-note press-and-slide remember resizable respond-to-simulation rotatable selectable tooltip track-pointer

clickable — Clickable

Writes a value into a model variable or into a component parameter when the node is clicked. The value is a binding like any other, so a key can write what the model or the object itself currently holds rather than only a constant.

Capabilities: interaction writes-model

PropertyTypeDefaultRange
variablevariable""
propertystring""
valuenumber0

drag-angle — Drag angle

Lets the user drag the node around an anchor point and writes the resulting angle back into a model variable, using the same angle-to-value mapping the node was bound with. Naming a length as well makes the node reach the pointer rather than only point at it: how far the pointer stands from the anchor is written as the length, in the units the node is drawn in, so one drag both turns the thing and stretches it.

Capabilities: interaction angular writes-model

PropertyTypeDefaultRange
variablevariable""
propertystring""
verticalVariablevariable""
verticalPropertystring""
centerXnumber0
centerYnumber0
degreesPerUnitnumber6
offsetDegreesnumber0
signedbooleanfalse
minimumnumbernull
maximumnumbernull
wrapAtnumbernull
lengthVariablevariable""
lengthPropertystring""
pixelsPerUnitnumber1
minimumLengthnumbernull
maximumLengthnumbernull
hoverFillcolour"none"
hoverOpacitynumber0.15min 0, max 1

drag-axis-tick — Drag axis tick

Rescales an axis by dragging one of its ticks: the tick follows the pointer and the far end of the axis moves with it, writing the object's own maximum. An axis standing on zero is pulled from the middle, naming no minimum property and handing nought over as the minimum value, so what it writes is how far the drawing reaches from the origin. The same interaction, and the same arithmetic, the chart's axes have. An axis whose ticks are placed by the logarithm of their value is dragged in decades rather than in values, and one that says how many parts it is cut into rather than how much one part is worth keeps the part and writes the count, so its numbers stay the same distance apart and there are more or fewer of them.

Capabilities: interaction

PropertyTypeDefaultRange
axisstring"x"x | y
valuenumber0
minimumPropertystring""
minimumValuenumbernull
maximumPropertystring""
scalestring"linear"linear | logarithmic
countPropertystring""
stepValuenumber0
originPixelnumber0
lengthPixelsnumber0min 0

drag-circle-point — Drag a point round a circle

Drags a point round a circle and writes back everything the circle is read for at once: the angle the point stands at, how far out it stands, how far across and how far up it is, the tangent of that angle and the length of the arc it has swept. Each of them goes into the term its row names, or into the object's own parameter when that row holds a plain number instead, and a row the model works out for itself is left alone — so a circle whose angle a definition gives is still dragged where it writes the point. Asking for a number of divisions makes the angle land on one of them: the point follows the pointer while it is held and lands on the nearest division, exactly, the moment it is let go. The whole drag is one edit.

Capabilities: interaction angular writes-model

PropertyTypeDefaultRange
centerXnumber0
centerYnumber0
pixelsPerUnitnumber1
unitsPerTurnnumber360
angleValuenumber0
angleVariablevariable""
anglePropertystring""
radiusVariablevariable""
radiusPropertystring""
stretchbooleanfalse
minimumRadiusnumbernull
maximumRadiusnumbernull
xVariablevariable""
xPropertystring""
yVariablevariable""
yPropertystring""
tangentVariablevariable""
tangentPropertystring""
arcVariablevariable""
arcPropertystring""
snapDivisionsnumber0min 0, max 360
hoverFillcolour"none"
hoverOpacitynumber0.15min 0, max 1

drag-rotate — Drag rotate

Lets the user turn the node around an anchor point by dragging it. The variable moves by the angle the pointer travels, so the grabbed point follows the pointer instead of jumping to it, which is what a rose, a bezel or a dial ring needs.

Capabilities: interaction angular writes-model

PropertyTypeDefaultRange
variablevariable""
propertystring""
verticalVariablevariable""
verticalPropertystring""
centerXnumber0
centerYnumber0
degreesPerUnitnumber1
minimumnumbernull
maximumnumbernull
wrapAtnumbernull
hoverFillcolour"none"
hoverOpacitynumber0.15min 0, max 1

draggable — Draggable

The object can be moved with the move handle. Provided by the host shape for every component.

Capabilities: interaction

follow-pointer — Follow pointer

Reports where the pointer is over the node, in the units the node is scaled in, so a drawing can show the value under the cursor. What is reported is not kept: it lasts as long as the pointer is over the node, and the model is not touched.

Capabilities: interaction

PropertyTypeDefaultRange
xParameterstring""
yParameterstring""
activeParameterstring""
originXnumber0
originYnumber0
scaleXnumber1
scaleYnumber-1
minimumXnumbernull
maximumXnumbernull
minimumYnumbernull
maximumYnumbernull
whilePlayingbooleanfalse

forget — Forget

Empties one of the object's memories when the node is clicked.

Capabilities: interaction memory

PropertyTypeDefaultRange
memorystring""

hoverable — Hoverable

The node reacts to pointer hover with the standard highlight cursor.

Capabilities: interaction

PropertyTypeDefaultRange
cursorstring"pointer"

keep-time — Keep time

A transport key for a reading of the clock: play sets it counting real time from wherever it stands, pause holds it there, and stop ends the run and clears it. A key set to toggle is both — it starts a clock standing still and holds a clock that is counting, so one key does the work of two. What is counted is written into the four parts of the reading — the hours, the minutes, the seconds and the thousandths — each into the term that part names, or into the object's own property when it names a plain number instead. The whole run is one edit.

Capabilities: interaction writes-model

PropertyTypeDefaultRange
actionstring"play"play | pause | stop | toggle
hourVariablevariable""
hourPropertystring""
minuteVariablevariable""
minutePropertystring""
secondVariablevariable""
secondPropertystring""
millisecondVariablevariable""
millisecondPropertystring""
runningParameterstring""
intervalMsnumber33min 10, max 1000

play-note — Play a note

A key of an instrument: it sounds its own pitch for as long as it is held, and stops when it is let go. Several keys sound together, whether they are held by several fingers or by several computer keys at once, and sliding across them plays them in turn. The object reports the notes it is holding into a parameter of its own, so its drawing can show which keys are down and what it publishes can be worked out from the chord. Nothing is written down: a file remembers no note left sounding.

Capabilities: interaction sound

PropertyTypeDefaultRange
frequencynumber0min 0
notenumber0
keyCodestring""
notesParameterstring""

press-and-slide — Press and slide

A control the reader holds down: pressing keeps the value where it is, sliding the pointer up raises it and down lowers it, by however far it travelled, and letting go lets the value fall back to its resting value a step at a time. It is what a pedal or a throttle needs — nothing is written by pressing alone, and the whole gesture, the fall back included, is one edit.

Capabilities: interaction linear writes-model

PropertyTypeDefaultRange
variablevariable""
propertystring""
verticalVariablevariable""
verticalPropertystring""
bearingnumbernull
unitsPerPixelnumber1
restValuenumber0
returnStepnumber0min 0
intervalMsnumber100min 20, max 5000
minimumnumbernull
maximumnumbernull
hoverFillcolour"none"
hoverOpacitynumber0.15min 0, max 1

remember — Remember

Appends a row to one of the object's memories when the node is clicked. A row carries a label and two numbers, all of them bindings, so a key records what the object held at the moment it was pressed.

Capabilities: interaction memory

PropertyTypeDefaultRange
memorystring""
textstring""
xnumber0
ynumber0
limitnumber50min 1, max 2000

resizable — Resizable

The object can be resized with the corner handles. Provided by the host shape for every component.

Capabilities: interaction

respond-to-simulation — Respond to simulation updates

Marks the object as redrawing on every simulation tick. Components with model bindings get this automatically.

Capabilities: simulation

rotatable — Rotatable

The object can be rotated with the rotation handle. Provided by the host shape for every component.

Capabilities: interaction

selectable — Selectable

The object can be selected on the board. Provided by the host shape for every component.

Capabilities: interaction

tooltip — Tooltip

Shows a native tooltip with a fixed or bound text when the pointer rests on the node.

Capabilities: interaction textual

PropertyTypeDefaultRange
textstring""

track-pointer — Track pointer

Records where the pointer is while it is dragged over the node, one sample every sampling interval, into one of the object's memories. The sample is written in the units the node is scaled in, so what is recorded is a pair of values rather than a pair of pixels — and when the memory names model terms, the run becomes the values those terms take, iteration by iteration. Nothing is recorded until the pointer travels: a click that never moves leaves the memory alone, and a drag opens its run at the point the pointer went down.

Capabilities: interaction memory writes-model

PropertyTypeDefaultRange
memorystring""
modestring"replace"replace | append
xVariablestring""
xPropertystring""
yVariablestring""
yPropertystring""
limitnumber600min 1, max 2000
sampleMsnumber33min 10, max 1000
minimumMovePixelsnumber0min 0, max 50
breakOnDragbooleanfalse
originXnumber0
originYnumber0
scaleXnumber1
scaleYnumber-1
minimumXnumbernull
maximumXnumbernull
minimumYnumbernull
maximumYnumbernull

Components

Ready-made assemblies. A node names one as its type and sets these under parameters.

calculator circular-gauge clock compass dial-face key-cap label-ring mechanical-wave memory-list memory-trace mouse-tracker orbit-system oscilloscope piano piano-keyboard plot-axes plot-crosshair plot-grid pointer-hand pointer-ring protractor rotating-vector ruler seven-segment-display speedometer steering-wheel thermometer tick-ring trigonometric-circle

calculator — Calculator

Calculator whose working is held by the object itself: four functions on a narrow one, and a scientific pad of powers, roots, trigonometry and logarithms beside the digits once it is wide enough to hold one. Term keys load the value a model variable has at the iteration on screen, the result can be written back into a model variable, and every completed operation is kept in a history the object remembers and can be read back from.

Capabilities: interaction textual reads-model writes-model memory

ParameterTypeDefaultRange
nnumber0
anumber0
pnumber0
snumber0
dpnumber0
adnumber0
freshnumber0
invnumber0
historymemory[]
termAvariable""
termBvariable""
termCvariable""
termDvariable""
keyAColorcolour"token:surface.muted"
keyBColorcolour"token:surface.muted"
keyCColorcolour"token:surface.muted"
keyDColorcolour"token:surface.muted"
resultVariablevariable""
digitsnumber2min 0, max 6
scientificbooleantrue
angleUnitstring"radians"radians | degrees
showHistorybooleantrue
historyLimitnumber24min 1, max 200
bodyColorcolour"token:surface.emphasis"
displayColorcolour"token:surface.default"
keyColorcolour"token:surface.default"
functionKeyColorcolour"token:surface.muted"
accentColorcolour"token:stroke.accent"
borderColorcolour"token:stroke.subtle"
textColorcolour"token:text.primary"
accentTextColorcolour"token:text.inverse"
mutedTextColorcolour"token:text.secondary"

circular-gauge — Circular gauge

Ring gauge that fills clockwise in proportion to a model variable.

Capabilities: radial angular reads-model

ParameterTypeDefaultRange
valueVariablevariable"0"
minimumnumber0
maximumnumber100
startAnglenumber90
spanAnglenumber360min 1, max 360
thicknessnumber0.22min 0.02, max 1
trackColorcolour"token:surface.muted"
fillColorcolour"token:stroke.accent"
labelColorcolour"token:text.primary"
digitsnumber0min 0, max 6
unitunit""
showReadoutbooleantrue

clock — Clock

Clock reading the hour, minute, second and millisecond a model gives it, or reading the model's own time as a count of seconds, shown either as a face with a hand for each or as a digital readout of the same time. The seconds and the milliseconds can each be left out, and what is left out goes from the face and from the readout alike. Run by its own keys it is a stopwatch: one key starts and holds it, one takes a lap, and one ends the run — and the laps it has taken are kept in a list of their own under the face.

Capabilities: radial angular reads-model textual interaction memory

ParameterTypeDefaultRange
syncedWithPlayerbooleanfalse
hourVariablevariable"0"
minuteVariablevariable"0"
secondVariablevariable"0"
millisecondVariablevariable"0"
shownAsstring"analogue"analogue | digital
showControlsbooleanfalse
showLapsbooleanfalse
faceColorcolour"token:surface.default"
borderColorcolour"token:stroke.default"
hourColorcolour"token:stroke.strong"
minuteColorcolour"token:stroke.strong"
secondColorcolour"token:stroke.warning"
millisecondColorcolour"#00000000"
numberColorcolour"token:text.primary"
buttonColorcolour"token:surface.muted"
runningnumber0
lapsmemory[]

compass — Compass

Compass rose with cardinal labels, a needle whose heading comes from a model variable and a rose that a second variable can turn. The needle and the rim of the rose can be dragged to write those variables back.

Capabilities: radial angular reads-model interaction writes-model

ParameterTypeDefaultRange
headingVariablevariable"0"
rotationVariablevariable"0"
pointersterms[]
showDegreesbooleanfalse
faceColorcolour"token:surface.default"
borderColorcolour"token:stroke.default"
tickColorcolour"token:stroke.subtle"
needleColorcolour"token:stroke.warning"
tailColorcolour"token:stroke.subtle"
labelColorcolour"token:text.primary"

dial-face — Dial face

Circular face with an optional bezel ring, used as the background of clocks, gauges and compasses.

Capabilities: radial background

ParameterTypeDefaultRange
centerXnumber0
centerYnumber0
radiusnumber80min 1
faceColorcolour"token:surface.default"
borderColorcolour"token:stroke.default"
borderWidthnumber2min 0, max 40
bezelWidthnumber0min 0, max 60
bezelColorcolour"token:surface.emphasis"

key-cap — Key cap

Rounded key with a centred label. It carries no interaction of its own: put it inside a group and give that group the behaviour the key performs, so the same cap serves a keypad, a legend or a toolbar.

Capabilities: sizable textual

ParameterTypeDefaultRange
xnumber0
ynumber0
widthnumber44min 0
heightnumber32min 0
labelstring""
fillcolour"token:surface.default"
borderColorcolour"token:stroke.subtle"
borderWidthnumber1min 0
cornerRadiusnumber6min 0
labelColorcolour"token:text.primary"
fontSizenumber14min 1
fontWeightnumber500min 100, max 900

label-ring — Label ring

Numeric or text labels placed evenly around a centre, always drawn upright.

Capabilities: radial angular textual

ParameterTypeDefaultRange
centerXnumber0
centerYnumber0
radiusnumber60min 1
countnumber12min 0, max 360
startAnglenumber90
spanAnglenumber360
includeEndbooleanfalse
startValuenumber12
valueStepnumber1
wrapAtnumber12min 0
digitsnumber0min 0, max 6
numberFormatstring"decimal"decimal | pi
textsstring""
fontSizenumber12min 1
fontFamilystring"token:font.family"
fontWeightnumber400min 100, max 900
colorcolour"token:text.primary"

mechanical-wave — Mechanical wave

A mechanical wave drawn as a chain of oscillators, each taking up the motion of the source as late as its distance from it. It repeats what a term of the model has been doing, one oscillator to each iteration of the run, or works its own wave out and hands the model the oscillator it is read at.

Capabilities: reads-model writes-model oscillation

ParameterTypeDefaultRange
wavevariable""
amplitudevariable"2"
frequencyvariable"0.5"
speedvariable"5"
dampingvariable"0"
lengthnumber20min 0.001
autoScalebooleantrue
minimumYnumber-2
maximumYnumber2
samplesnumber30min 2, max 200
orientationstring"transverse"transverse | longitudinal | radial
wavefrontbooleantrue
elementSizenumber4min 1, max 30
referenceIndexnumber1min 0, max 200
showArrowsbooleanfalse
showLinebooleanfalse
showAxesbooleanfalse
backgroundColorcolour"token:surface.default"
borderColorcolour"token:stroke.subtle"
waveColorcolour"token:stroke.accent"
referenceColorcolour"token:stroke.strong"
axisColorcolour"token:axis.color"

memory-list — Memory list

The rows of a memory drawn as a list, newest first, with the label on the left and the number on the right. Rows can carry actions, so choosing one puts what it holds back into the object.

Capabilities: memory textual interaction

ParameterTypeDefaultRange
rowsobject[]
xnumber0
ynumber0
widthnumber120min 0
heightnumber160min 0
rowHeightnumber20min 6
orderstring"newest"newest | oldest
layoutstring"row"row | stacked
digitsnumber2min 0, max 6
fontSizenumber"token:font.size.default"min 1
textColorcolour"token:text.secondary"
valueColorcolour"token:text.primary"
rowColorcolour"none"
cornerRadiusnumber4min 0
emptyTextstring""
rowActionsobject[]

memory-trace — Memory trace

The path the rows of a memory draw, mapped from the values they hold to the pixels of a plot with the same origin and scale the recording used.

Capabilities: memory linear

ParameterTypeDefaultRange
rowsobject[]
originXnumber0
originYnumber0
scaleXnumber1
scaleYnumber-1
colorcolour"token:stroke.accent"
lineWidthnumber2min 0
opacitynumber1min 0, max 1
shownRowsnumber0min 0
showPointsbooleanfalse
pointRadiusnumber1.5min 0
clipXnumber0
clipYnumber0
clipWidthnumber0min 0
clipHeightnumber0min 0

mouse-tracker — Mouse tracker

Records where the pointer goes across the plot, against a horizontal and a vertical axis. Every drag adds to what is already there, drawn as a line of its own, so several of them build one recording made of separate runs. A click records nothing: the plot is only written to by a gesture that travels. The run is measurements: name a variable for each axis and it takes the value of sample n at iteration n, so the model's own player replays the gesture and everything reading those variables moves with it. A variable the model works out for itself is read rather than written: the gesture says where the model's input now stands, the definitions say what comes out of it, and that is the value the line is drawn through and the value the run remembers, so a recording made against a definition is in the model's own coordinates. The marker showing the sample on screen can be any character from the catalogue, placed by its pivot point.

Capabilities: interaction memory linear writes-model textual

ParameterTypeDefaultRange
samplesmemory[]
xVariablevariable"0"
yVariablevariable"0"
xVariableUnitstring""
yVariableUnitstring""
xValueColorcolour"token:axis.color"
yValueColorcolour"token:axis.color"
characterKeycharacter""
characterImagestring""
characterPivotXnumber0.5
characterPivotYnumber0.5
characterAspectnumber1
hoverXnumber0
hoverYnumber0
hoveringnumber0
autoScalebooleanfalse
equalScalesbooleanfalse
minimumXnumber0
maximumXnumber10
minimumYnumber0
maximumYnumber10
perStepbooleanfalse
showGridbooleanfalse
showTicksbooleanfalse
ticksnumber5min 2, max 11
backgroundColorcolour"token:surface.default"
dataAreaColorcolour"token:surface.default"
axisColorcolour"token:axis.color"
valueColorcolour"token:stroke.warning"
foregroundColorcolour"token:axis.labelColor"
borderColorcolour"token:stroke.subtle"

orbit-system — Orbit system

Central body with up to four orbiting bodies whose angular positions come from model variables or from simulation time and an orbital period.

Capabilities: radial angular reads-model

ParameterTypeDefaultRange
timeVariablevariable"t"
bodyCountnumber3min 0, max 4
period1number4min 0.0001
period2number8min 0.0001
period3number16min 0.0001
period4number32min 0.0001
showOrbitsbooleantrue
starColorcolour"#f08c02"
bodyColorcolour"token:stroke.accent"
orbitColorcolour"token:stroke.subtle"

oscilloscope — Oscilloscope

A screen the model's waves are read on. Each row of the list names a wave the model defined over element indices and draws it across a graticule, in a colour of its own, so as many of them as the reader names stand one over another. A row naming a term the model holds no elements of — one an object writes a point at a time — is read over the run instead, a point to each row: the trace fills the screen from the left as the run goes, and once the run has passed the right-hand edge the screen travels with it, so a term that was never a wave is drawn as the wave its points make and goes on being drawn where the model has got to. Resting the pointer on the screen stands a cursor on it and reads every trace where it crosses, and a mark left by a click measures the distance from there to the cursor — a wavelength taken crest to crest, and the wavenumber that follows from it.

Capabilities: reads-model linear textual interaction

ParameterTypeDefaultRange
wavesterms[]
minimumXnumber-5
maximumXnumber5
minimumYnumber-5
maximumYnumber5
samplesnumber200min 2, max 300
ticksnumber10min 2, max 11
showGridbooleantrue
showTicksbooleantrue
showMarkbooleanfalse
markXnumber0
hoverXnumber0
hoverYnumber0
hoveringnumber0
backgroundColorcolour"#e0e0e0"
screenColorcolour"#a5d6a7"
gridColorcolour"#ffffff"
axisColorcolour"#000000"
originColorcolour"#000000"
cursorColorcolour"token:stroke.default"
foregroundColorcolour"token:axis.labelColor"
borderColorcolour"token:stroke.subtle"

piano — Piano

A piano keyboard played with the pointer or with the computer keys, several notes at a time, that hands the model the sound of the chord it is holding, a point of it on every row of the run.

Capabilities: writes-model interaction sound

ParameterTypeDefaultRange
wavevariable""
amplitudevariable"1"
samplesnumber30min 2, max 2000
durationnumber0.02min 0.001
firstOctavenumber4min 0, max 8
octavesnumber2min 1, max 4
notesobjectnull
whiteColorcolour"token:surface.default"
blackColorcolour"token:stroke.strong"
pressedColorcolour"token:stroke.accent"
borderColorcolour"token:stroke.default"

piano-keyboard — Piano keyboard

A run of piano keys, drawn and tuned from the note each one carries: the naturals share the width between them and the sharps ride over the seams. Every key sounds its own pitch while it is held, by pointer or by the computer key that plays it, and the keys that are down are drawn lit. Nothing is written on a key: a keyboard is read by where a key sits, not by a letter painted on it.

Capabilities: interaction sound

ParameterTypeDefaultRange
widthnumber420min 1
heightnumber120min 1
firstOctavenumber4min 0, max 8
octavesnumber2min 1, max 4
notesobjectnull
notesParameterstring""
whiteColorcolour"token:surface.default"
blackColorcolour"token:stroke.strong"
pressedColorcolour"token:stroke.accent"
borderColorcolour"token:stroke.default"

plot-axes — Plot axes

Horizontal and vertical axis of a plot box, with tick marks and numbered labels. Any object that shows a value against a scale reads the same way a chart does.

Capabilities: layout textual

ParameterTypeDefaultRange
xnumber0
ynumber0
widthnumber100min 1
heightnumber100min 1
minimumXnumber0
maximumXnumber10
minimumYnumber0
maximumYnumber10
ticksXnumber5min 2, max 41
ticksYnumber5min 2, max 41
showTicksbooleantrue
showLabelsbooleantrue
showBorderbooleanfalse
showZeroLinesbooleantrue
minimumXPropertystring""
maximumXPropertystring""
minimumYPropertystring""
maximumYPropertystring""
originstring"box"box | zero
showAxisLinesbooleantrue
rangePropertystring""
colorcolour"token:axis.color"
zeroColorcolour""
labelColorcolour"token:axis.labelColor"
fontFamilystring"token:font.family"
fontSizenumber"token:font.size.tick"min 1
lineWidthnumber"token:axis.strokeWidth"min 0
tickLengthnumber"token:axis.tickLength"min 0

plot-crosshair — Plot crosshair

Dashed lines from a point out to both axes, with the value it stands at read on a badge against each one — the way a chart answers where a point is.

Capabilities: layout textual

ParameterTypeDefaultRange
xnumber0
ynumber0
widthnumber100min 1
heightnumber100min 1
minimumXnumber0
maximumXnumber10
minimumYnumber0
maximumYnumber10
valueXnumber0
valueYnumber0
rowsobject[]
digitsnumber2min 0, max 6
xUnitstring""
yUnitstring""
showBadgesbooleantrue
colorcolour"token:stroke.default"
xColorcolour""
yColorcolour""
pointColorcolour"token:stroke.accent"
axisBadgeColorcolour"token:axis.labelColor"
badgeColorcolour"token:text.secondary"
badgeTextColorcolour"token:text.inverse"
fontFamilystring"token:font.family"
fontSizenumber"token:font.size.tick"min 1

plot-grid — Plot grid

Grid inside a plot box: one line at every tick of both axes, drawn the way the chart draws its own.

Capabilities: layout

ParameterTypeDefaultRange
xnumber0
ynumber0
widthnumber100min 1
heightnumber100min 1
minimumXnumber0
maximumXnumber10
minimumYnumber0
maximumYnumber10
ticksXnumber5min 2, max 41
ticksYnumber5min 2, max 41
colorcolour"token:grid.color"
lineWidthnumber"token:strokeWidth.default"min 0

pointer-hand — Pointer hand

A clock hand, gauge needle or compass pointer that rotates clockwise around an anchor. Angle 0 points up.

Capabilities: angular rotation interaction

ParameterTypeDefaultRange
centerXnumber0
centerYnumber0
anglenumber0
lengthnumber60min 0
tailLengthnumber0min 0
widthnumber4min 0
colorcolour"token:stroke.strong"
stylestring"needle"needle | line | arrow
dragVariablevariable""
dragPropertystring""
degreesPerUnitnumber6
offsetDegreesnumber0
wrapAtnumber0min 0

pointer-ring — Pointer ring

Directions marked around a dial, one marker per row: a row names an angle, or a pair of values read as a vector — how far across and how far up. Each marker stands where the tick for its direction stands, so it is read against the same scale.

Capabilities: radial angular reads-model

ParameterTypeDefaultRange
centerXnumber0
centerYnumber0
radiusnumber80min 1
lengthnumber14min 0
widthnumber10min 0
startAnglenumber90
pointersobject[]

protractor — Protractor

A scale bent round a vertex to measure an angle against: a band of degrees numbered at every division, divided ten ways between one number and the next, standing on the arms it is read between. It is laid over whatever is being measured — a vector, a body's path, a drawing — and resting the pointer on it reads the angle from its zero. How far round it goes is its own, so the same object is a half circle, a quadrant or a whole dial, and the numbers the two ends read are its own too, so a protractor can be marked in degrees, in turns, or in whatever the model measures its angles in.

Capabilities: radial angular scale interaction

ParameterTypeDefaultRange
startAnglenumber0min -360, max 360
endAnglenumber180min -360, max 360
angleUnitstring"degrees"degrees | radians
digitsnumber0min 0, max 6
faceColorcolour"token:surface.default"
borderColorcolour"token:stroke.default"
scaleColorcolour"token:axis.color"
scaleLabelColorcolour"token:axis.labelColor"
readingColorcolour"token:stroke.accent"
hoverXnumber0
hoverYnumber0
hoveringnumber0

rotating-vector — Rotating vector

Phasor arrow whose angle and length come from model variables, with an optional reference circle and projections. The arrow reaches the pointer that drags it: one drag both turns it and stretches it, writing the angle and the length back together, so where the reader leaves the tip is where the arrow points and how far it goes.

Capabilities: angular linear reads-model vector interaction writes-model

ParameterTypeDefaultRange
angleVariablevariable"0"
lengthVariablevariable"1"
lengthScalenumber1min 0
showCirclebooleantrue
showProjectionsbooleanfalse
backgroundColorcolour"none"
vectorColorcolour"token:stroke.accent"
circleColorcolour"token:stroke.subtle"
circleFillColorcolour"none"
projectionColorcolour"token:stroke.subtle"

ruler — Ruler

A scale laid across the board to measure against: a body ruled from one end to the other, cut into as many numbered parts as it is asked for, with the space between each pair of numbers divided ten ways and the halfway mark drawn taller. Resting the pointer on it reads the value it stands at, and pulling one of the numbers stretches the scale under it the way a chart's axis is stretched, so the ruler is set against what it is measuring rather than typed in. Read logarithmically it is a slide rule instead: the decades are evenly spread, numbered 1, 10, 100, and each is divided by the marks for 2 to 9 standing where their logarithms put them.

Capabilities: linear scale interaction

ParameterTypeDefaultRange
minimumXnumber0
maximumXnumber10
scaleTypestring"linear"linear | logarithmic
majorTicksnumber10min 1, max 60
unitunit""
digitsnumber2min 0, max 6
backgroundColorcolour"token:surface.default"
borderColorcolour"token:stroke.default"
scaleColorcolour"token:axis.color"
scaleLabelColorcolour"token:axis.labelColor"
readingColorcolour"token:stroke.accent"
hoverValuenumber0
hoverDepthnumber0
hoveringnumber0

seven-segment-display — Seven-segment display

A reading spelled out in seven-segment lamps, the way a digital clock, a meter or a stopwatch shows one. Digits, the colon, the point and the minus sign are drawn as bars; the bars a character does not light are left showing faintly, the way the unlit ones on a real panel are. The text is fitted to the box it is given, so it is placed by handing it a box rather than a font size.

Capabilities: sizable textual

ParameterTypeDefaultRange
xnumber0
ynumber0
widthnumber120min 0
heightnumber40min 0
textstring""
colorcolour"token:text.primary"
colorsstring""
ghostOpacitynumber0.12min 0, max 1
thicknessnumber0.16min 0.02, max 0.4
digitWidthnumber0.56min 0.2, max 1.5
spacingnumber0.14min 0, max 1
slantnumber0min -30, max 30

speedometer — Speedometer

Sweeping dial with a scale, a needle bound to a model variable and a numeric readout.

Capabilities: radial angular reads-model scale audible

ParameterTypeDefaultRange
valueVariablevariable"0"
minimumnumber0
maximumnumber100
startAnglenumber225
endAnglenumber-45
majorTicksnumber9min 2, max 60
minorPerMajornumber4min 0, max 20
digitsnumber0min 0, max 6
unitunit""
showReadoutbooleantrue
faceColorcolour"token:surface.emphasis"
borderColorcolour"token:stroke.default"
needleColorcolour"token:stroke.warning"
labelColorcolour"token:text.primary"
soundaudio""

steering-wheel — Steering wheel

The controls a vehicle is driven with: a wheel turned by a model variable, drawn as a car wheel, a motorbike handlebar or a ship's helm, and the accelerator and brake of that same vehicle under it. The wheel, the pedals, and the brake among the pedals, can each be left out. Dragging the wheel turns it and writes back what it reads; the accelerator and the brake each press a value of its own up from zero, both above zero and both pressed the same way, each read the way the wheel is — a term, or a pair laid down along the bearing the wheel is turned to, forwards for the accelerator and back the other way for the brake.

Capabilities: radial angular linear reads-model scale interaction writes-model

ParameterTypeDefaultRange
turnedBystring"angle"angle | orientation
angleVariablevariable"0"
angleUpVariablevariable"0"
accelerationVariablevariable"0"
accelerationUpVariablevariable"0"
brakingVariablevariable"0"
brakingUpVariablevariable"0"
wheelTypestring"car"car | motor bike | boat
showWheelbooleantrue
showPedalsbooleanfalse
showBrakebooleantrue
brakeMaximumnumber100min 0
maximumnumber100
pedalReturnStepnumber10min 0
rimColorcolour"token:stroke.default"
gripColorcolour"token:stroke.subtle"
hubColorcolour"token:surface.muted"
restingAnglenumber0
markColorcolour"token:stroke.warning"
acceleratorColorcolour"token:stroke.accent"
brakeColorcolour"token:stroke.warning"
frameColorcolour"token:stroke.default"
surfaceColorcolour"token:surface.muted"

thermometer — Thermometer

A temperature read as the height of a column: a bulb, a stem the liquid rises up, and a scale beside it marked every so many degrees. A dashed line carries the top of the column across to the scale, so the reading is placed against the marks the way a chart places a point against its axes. The column can be dragged to write the temperature back, and the marks and their numbers are the sizes the board's own axes are drawn to, so the scale stretches as the object is resized rather than the writing on it.

Capabilities: linear scale reads-model interaction writes-model audible

ParameterTypeDefaultRange
valueVariablevariable"0"
minimumnumber-20
maximumnumber120
tickStepnumber20min 0
digitsnumber1min 0, max 6
unitstring"°C"°C | °F
showReadoutbooleantrue
columnColorcolour"token:stroke.warning"
glassColorcolour"token:surface.default"
borderColorcolour"token:stroke.default"
scaleColorcolour"token:axis.color"
scaleLabelColorcolour"token:axis.labelColor"
readoutColorcolour"token:text.primary"
soundaudio""

tick-ring — Tick ring

Evenly spaced radial tick marks around a centre, with optional longer major ticks.

Capabilities: radial angular scale

ParameterTypeDefaultRange
centerXnumber0
centerYnumber0
radiusnumber80min 1
countnumber12min 0, max 720
startAnglenumber90
spanAnglenumber360
includeEndbooleanfalse
lengthnumber8min 0
widthnumber1min 0
colorcolour"token:stroke.default"
majorEverynumber0min 0
majorLengthnumber12min 0
majorWidthnumber2min 0

trigonometric-circle — Trigonometric circle

Circle with a point the reader drags round it, and everything the circle is read for drawn where it is read: the angle swept from the horizontal, the radius out to the point, the two projections that are its cosine and its sine, the tangent taken on the line standing at the radius, and the arc the point has travelled. Each of them names a term of its own — one the model works out for itself moves the point, one the model leaves free is the circle's to write — so the same object shows a model turning a circle and lets a reader turn one for the model. A free row is written both ways: by dragging the point, and by the circle itself on every row of a run, so a sine the model never works out is still plotted and tabulated like one it does. A dragged angle can be made to land on a whole number of parts of the circle rather than wherever the pointer left it, and the angle counts the turns: round one way it grows past a whole turn, round the other it falls through nothing and past a turn the other way, so what the circle hands the model is how far the point has been turned rather than where it stopped.

Capabilities: radial angular reads-model interaction writes-model textual

ParameterTypeDefaultRange
angleVariablevariable"0.9"
radiusVariablevariable"1"
pointXVariablevariable"0"
pointYVariablevariable"0"
tangentVariablevariable"0"
arcVariablevariable"0"
angleUnitstring"radians"radians | degrees
snapDivisionsnumber0min 0, max 360
dragRadiusbooleanfalse
showGridbooleantrue
showAxesbooleantrue
fitViewbooleantrue
showAnglebooleantrue
showRadiusbooleantrue
showSinebooleantrue
showCosinebooleantrue
showTangentbooleanfalse
showArcbooleanfalse
backgroundColorcolour"none"
circleColorcolour"token:stroke.default"
axisColorcolour"token:axis.color"
gridColorcolour"token:grid.color"
labelColorcolour"token:text.secondary"
radiusColorcolour"token:stroke.accent"
angleColorcolour"#00695c"
sineColorcolour"token:stroke.warning"
cosineColorcolour"#2f9e44"
tangentColorcolour"#6a1b9a"
arcColorcolour"#f08c02"
viewRangenumber1.6min 0.05

Design tokens

The board's own colours, widths, fonts, axis and crosshair numbers. Write one as a default with "token:stroke.accent", or read one with the binding { "token": "stroke.accent" } — never the literal value, so a preset restyles every object at once.

Values below are the standard preset. The presets are standard minimal scientific classroom high-contrast; each one overrides some of these and inherits the rest.

TokenStandard value
surface.default"#ffffff"
surface.emphasis"#f7f7f7"
surface.muted"#eeeeee"
stroke.default"#1e1e1e"
stroke.strong"#000000"
stroke.subtle"#9a9a9a"
stroke.accent"#1871c2"
stroke.warning"#e03130"
text.primary"#1e1e1e"
text.secondary"#6b6b6b"
text.inverse"#ffffff"
selection.outline"#1871c2"
handle.fill"#ffffff"
handle.stroke"#1871c2"
strokeWidth.hairline0.5
strokeWidth.default1
strokeWidth.strong2
strokeWidth.heavy3
radius.small2
radius.medium4
radius.large8
spacing.small4
spacing.medium8
spacing.large16
font.family"Katex_Main, Inter, serif"
font.family.sans"Inter, Assistant, system-ui, sans-serif"
font.size.small9
font.size.default11
font.size.large14
font.size.tick10
font.weight.default400
font.weight.strong600
axis.color"#7a7a7a"
axis.labelColor"#666666"
axis.strokeWidth1.2
axis.tickLength4
axis.minorTickLength2.5
axis.minorOpacity0.45
axis.labelGapX1.8
axis.labelGapY0.7
axis.labelRise0.3
grid.color"#d3d3d3"
grid.majorOpacity0.75
grid.minorOpacity0.4
crosshair.dash"4 3"
crosshair.opacity0.25
crosshair.strokeWidth1
badge.opacity0.85
badge.cornerRadius3
badge.paddingX4
badge.paddingY2
badge.charWidth0.58
shadow.soft"0 1px 2px rgba(0,0,0,0.16)"
opacity.disabled0.4
opacity.ghost0.5
duration.fast120
duration.default240
size.default.width180
size.default.height180
handle.size8