Verbs — bringing it to life
Verbs are the script. Each one names an entity and animates it. They run
top-to-bottom, one after another (use par for simultaneous).
Almost every verb takes two optional trailing arguments:
move(sun, (900, 400), 0.8, smooth);
// ^dur ^easing
[dur]— how long, in seconds (there’s a sensible default).[ease]— the motion curve:linear,smooth,in,out,back,bounce,elastic,spring(see Colour & style).
Reveal & hide
draw(sun, 1.2); // -> trace a stroke on (needs `untraced` first)
erase(sun); // -> the reverse: un-draw it
show(cap, 0.5); // -> fade in (needs `hidden` first)
fade(cap); // -> fade out
type(cap); // -> typewriter: reveal text character by character
Attention
flash(sun, cyan); // -> flash to a colour, then restore
pulse(sun); // -> quick grow-and-settle "look here"
shake(sun); // -> horizontal shake, an "error/no" gesture
spin(sun, 360); // -> spin about its centre
Motion
move(p, (900, 400)); // -> glide to an absolute point
shift(p, (0, -120)); // -> move by a delta (relative)
scale(r, 1.4); // -> animate uniform scale to 1.4x
rotate(r, 45); // -> rotate by 45 degrees
grow(arrow, (500, 200));// -> animate a line/arrow endpoint (draws or retargets)
cycle(x, y, z, 0.8, 90, smooth); // -> x→y→z→x along arcs
cycle(a, b, c, …, [dur], [arc], [ease]) moves every entity into the next
one’s position and the last into the first. The path arc is in degrees and
defaults to 90; pass 0 for straight paths. Repeated calls compose, making it
useful for symbol rearrangements, card carousels, and CyclicReplace-style moves.
Relationship motion
Three verbs cover motion that would otherwise require many coordinated keyframes:
attach(label, marker, (0,-36)); // label follows marker
travel(marker, route, 2, smooth);
become(marker, nodeBlueprint, 0.8); // same id, new visual state
attach(label, none); // release at the settled position
turn(nodeGroup, marker, 20, 0.6, out);// shared group pivot
attach is persistent until released. become interpolates compatible shapes
and safely crossfades other pairs, always settling on the exact declared
blueprint. turn accepts one entity or a tag and rotates its members around a
point or entity pivot. See Motion graphics for the full
design rules and a copyable V2 Reel.
Ambient motion and path flow
particles(bubbles, glass, 24, 5, 7);
link(pipe, glass, tank, 35);
untraced(pipe);
par {
wander(bubbles, 6); // always stays inside glass
seq { draw(pipe); flow(pipe, 1); }
}
wander is deterministic: the same optional particle seed gives the same
placement and motion in preview and in the final recording. It occupies the
duration you give it, so run it in par with the story it should accompany.
flow sends a temporary luminous pulse over any line, arrow, curve, spline,
arc, or tracked link; it is useful for a signal, energy, traffic, or simply
directing attention.
travel(marker, path, dur, smooth) moves the actual marker once along that
same kind of path and leaves it at the endpoint. Use flow for temporary
emphasis and travel when object identity and the stopping point matter:
plot(curve, (180,620), 90, 140, "1-exp(-x)", (0,4));
dot(marker, (180,620), 7);
par { draw(curve, 2, out); travel(marker, curve, 2, out); }
For a persistent layout change, keep the same particle ids:
rect(chamber, (540,500), 600, 260);
particles(gas, chamber, 48, 5, 17, "grid");
arrange(gas, chamber, "random", 2.5, smooth);
arrange(gas, chamber, "grid", 2.5, smooth); // exact ordered return
circle(orbit, (900,500), 150);
arrange(gas, orbit, "ring", 1.2, smooth); // move and stop radially
arrange also accepts a different circle/rectangle container, which makes a
free expansion readable without moving every dot by hand. A random layout
uses independent seeded curved routes: the result is reproducible and
scrubbable, but does not look like every particle followed the same ruler.
For a complete creator-oriented treatment of persistent motion, arrival,
settling, and the difference between travel and flow, see
Motion graphics — move ideas, not layers.
For shape continuity, morph(a,b) preserves topology: graph/line paths remain
open, while circles and other closed outlines remain closed. This prevents an
unwanted diagonal chord when a plot becomes a connector or guide line.
For a persistent comparison style, use dashed(id, [dash], [gap]) before the
timeline. It is a base Manic modifier—not a calculus feature—so the same
16/10-pixel default pattern works on a plot, guide line, link, arrow, curve,
spline, coil, or plain arc. Increase both values for a calmer large-format dash;
keep the gap smaller than the dash when the curve must remain easy to follow.
Content & colour
say(cap, "next step"); // -> crossfade a text entity to new words
recolor(sun, lime, 0.5); // -> permanently animate the colour
Rewrite an equation without rebuilding it
Declare one real LaTeX equation, then supply each mathematically correct state:
equation(work, (cx, 300), `x^2+2x=3`, 54);
rewrite(work, `x^2+2x+1=4`, 0.9, smooth);
rewrite(work, `(x+1)^2=4`, 0.9, smooth);
rewrite(work, `x=-1\pm2`, 0.9, smooth);
rewrite is visual, not a computer-algebra system: it never invents or verifies
a step. Equal RaTeX parts retain identity and travel smoothly. Matching respects
reading order, coarse layout roles—main line, exponent, numerator, denominator,
fraction rule, and other structure—and RaTeX math-style depth. An identical
character therefore cannot change mathematical jobs or jump between levels of
a nested exponent. This also protects logarithm bases, operator limits, and
derivative orders. If one side gains or loses fraction, radical, or
grouping structure, that side leaves before the replacement enters while the
compatible side and equality remain continuous. Globally incompatible states,
such as a matrix becoming a compact formula, use a staged whole-equation
dissolve with only a short, dim overlap. When unmatched source and target glyphs
are a replacement, the old glyph leaves before the new one becomes readable;
pure additions still enter immediately.
Semantic \textcolor roles follow the authored formula, and the final frame is
always the exact target LaTeX. No flag or alternate verb is required. Keep one
equation id for the whole derivation, write readable steps, and use wait
between them when the viewer needs time to absorb a result.
For a plot or diagram that changes with the same step, place rewrite and the
related motion in par. Existing equations are unaffected unless this verb is
used.
The escape hatch — to / set
Named verbs are shortcuts. to animates any single property, for whatever
isn’t pre-named:
to(sun, opacity, 0.3, 0.5); // animate opacity to 0.3 over 0.5s
to(sun, rot, 90); // rotation to 90 degrees
Properties: pos, color, opacity, scale, rot, trace, hue.
Move the camera
cam((300, 200), 1.0); // pan the camera centre
zoom(1.6, 0.8); // zoom to 1.6x
The camera moves the whole world, so a caption or counter would slide off with it.
Mark it sticky(id) to pin it to the screen and keep it readable through the move.
One verb, a whole group
If a name refers to a tag (a group) instead of a single entity, the verb runs on every member at once. This is how you animate a whole graph, table, or loop-generated set in one line:
hidden(g.nodes); // every node, at t=0
draw(g.edges); // trace every edge on together
flash(a.cells, cyan);// flash all array cells
More on grouping in the Kits chapter. Next, control when things happen → Timing.