{{verb: arguments}}. They fire at the word position where they appear in the text. TTS timing aligns trigger execution to the spoken narration.
Visibility Control
show
Reveal a named visualization block on stage.| Parameter | Type | Required | Description |
|---|---|---|---|
| target | string | Yes | Block name. Must match a named block defined in the same step. |
| animation | tokens | No | Optional effect, duration, easing. See Animations. |
- In split mode: Appends block alongside existing blocks. Deduplicates if already shown.
- In normal mode: Replaces whatever is currently displayed.
show-group
Reveal multiple blocks at once.| Parameter | Type | Required | Description |
|---|---|---|---|
| targets | string | Yes | Comma-separated block names (no spaces). |
| animation | tokens | No | Applied to all targets. |
hide
Remove a named block from stage.| Parameter | Type | Required | Description |
|---|---|---|---|
| target | string | Yes | Block name. |
| animation | tokens | No | Optional exit animation. |
- If the block isn’t currently shown, silently does nothing.
hide-group
Remove multiple blocks at once.| Parameter | Type | Required | Description |
|---|---|---|---|
| targets | string | Yes | Comma-separated block names (no spaces). |
| animation | tokens | No | Applied to all targets. |
clear
Remove all blocks and reset the entire scene. Hard scene break.| Parameter | Type | Required | Description |
|---|---|---|---|
| transition | fade | slide | instant | No | Transition style. Default: fade. |
| animation | tokens | No | Optional duration and easing override. |
- Slots (all visible blocks)
- Focus
- Flow
- Annotations
- Zoom (back to 1x)
- Pulse
- Trace
- Pan
- Draw
- Epoch (incremented)
transform
Morph one block into another with visual continuity.| Parameter | Type | Required | Description |
|---|---|---|---|
| from->to | string | Yes | Source and destination block names, separated by ->. |
| animation | tokens | No | Optional animation tokens. |
Layout Control
split
Enable multi-panel mode. Subsequentshow commands add blocks side-by-side.
- Stays active until
{{unsplit}}or{{clear}}. - Maximum two panels.
- Convention: left = code/explanation, right = visual/preview.
unsplit
Return to single-panel mode. Keeps only the last-shown block.Attention Control
focus
Highlight a specific region within a block. Everything else dims.| Parameter | Type | Required | Description |
|---|---|---|---|
| target | string | Yes | A region name defined in the block’s region footer, or none. |
- Only one focus active at a time. New focus replaces previous.
noneclears focus (everything returns to normal brightness).- Focus persists across paragraphs until changed.
pulse
Briefly emphasize a region without changing focus state.| Parameter | Type | Required | Description |
|---|---|---|---|
| target | string | Yes | Region name. |
- Visual flash/emphasis effect with a sound cue.
- Does not alter the current focus.
- Use to call out a detail in passing.
trace
Animate a path through edges or connections in a data structure or diagram.| Parameter | Type | Required | Description |
|---|---|---|---|
| target | string | Yes | Region name representing a path (edges between nodes), or none. |
- Showing request flow through a system
- Algorithm traversal paths
annotate
Attach a text label to a region. Renders as a floating callout.| Parameter | Type | Required | Description |
|---|---|---|---|
| target | string | Yes | Region name. |
| text | string | Yes | Quoted string. Keep to 2-5 words. |
- Annotations persist until the next
{{clear}}. - One annotation per target. Re-annotating the same target replaces the previous text.
zoom
Scale the visualization. Centers on the targeted region.| Parameter | Type | Required | Description |
|---|---|---|---|
| scale | string | Yes | Multiplier in Nx format: 0.5x, 1x, 1.2x, 1.3x, 2x, etc. |
| target | string | No | Optional region name. If omitted, scales the whole block. |
| Scale | Purpose |
|---|---|
0.8x | Zoom out to show more context (rare) |
1x | Normal. Full block visible. Reset between focus jumps. |
1.1x | Slight emphasis on current context |
1.2x | Standard zoom for code walkthrough |
1.3x | Dramatic zoom for critical moments |
1.5x+ | Extreme single-line emphasis (rare) |
- Any code block over 15 lines MUST have zoom choreography.
- Always reset to
1xbefore jumping to a distant region. 1xresets to normal scale.
flow
Mark a path or set of elements as “active.” Used in data structures and diagrams to show execution flow.| Parameter | Type | Required | Description |
|---|---|---|---|
| target | string | Yes | Region name representing a path (node IDs, edge set), or none. |
- Algorithm traces
- Request flows
- Data movement
pan
Translate the viewport to center on a named region.| Parameter | Type | Required | Description |
|---|---|---|---|
| target | string | Yes | Region name to center on, or none. |
- Orthogonal to zoom — pan translates, zoom scales. They compose when both active.
noneresets pan (center on default position).
- Navigating large visualizations (wide diagrams, long code blocks).
- Pan and zoom can be combined:
{{pan: far-region}} {{zoom: 1.3x}}
draw
Animate edges drawing themselves like a pen stroke. One-shot effect (not looping like flow/trace).| Parameter | Type | Required | Description |
|---|---|---|---|
| target | string | Yes | Region name representing edges to draw, or none. |
- Edges animate from source to target with a trailing arrowhead that fades in after the stroke completes.
- Unlike
flow(looping dash animation) ortrace(highlighted path),drawis a one-shot reveal.
- Revealing graph connections one at a time
- Algorithm edge discovery
- Building up a path incrementally
Sequence Control
play
Execute a named sequence block and expand its output into the narration stream.| Parameter | Type | Required | Description |
|---|---|---|---|
| target | string | Yes | Name of a seq block defined in the same step. |
- Expands at parse time into interleaved narration text and triggers.
- Generator runs once during parsing, output is static.
seq blocks.
advance
Bare text triggers or explicit{{advance}}. Creates a timeline marker without a visual change.
TypeScript Definition
Fromsrc/types/lesson.ts: