Guide · 15 of 15
Videos
A video file is a talk over a board, played in the video studio (/admin/studio/video) one Space press at a time. It lives in content/videos/<slug>.prism. Words pop in with no fade, a scene keeps moving on a real clock while you talk, and nothing on the board is a lesson widget. The electron gas and its cut also work in any lesson scene.
video#
The whole video. The slug must match the file name. lesson: names the lesson the video sends people to.
video "" { title: "" , lang: ar | en, subject: math | physics, [lesson: "" ], shot ... }
shot#
One continuous picture over one or more screens. Its scene keeps its state from screen to screen, so a wire set moving on screen 5 is still moving on screen 8. A shot with no scene is words only. enter: zoom (x, y) pushes the camera into the point (x, y) of the shot before (in that scene's coordinates) and lands on this one.
shot "" { [id: "" ], [enter: zoom (x, y)], [scene <type> { ... }], screen ... }
screen#
What is on the board between two cuts. Every line inside is one Space press, in order: > words, >> big words, set, animate and pause. Words leave when their screen ends. say: is a note for the speaker, shown only in the studio panel. A line split with | (outside $...$) is one press per part, laid out up front so nothing jumps; a line made only of math builds left to right.
screen "" { [say: "" ], <press> ... }
set#
Changes the shot's scene state on a press, at once. The names must be declared in that scene.
set { <name>: <value>, ... }
animate#
Tweens number state on a press. dur defaults to 1000 ms, ease to easeInOut.
animate { <name>: <number>, ... } { [dur: <ms>], [ease: linear | easeIn | easeOut | easeInOut] }
pause#
The "your turn" timer: a pie that runs down over that many seconds while you stay quiet. It goes away on the next press.
pause <seconds>
gas#
Free electrons in a conductor, each on its own random walk that never stops: a straight wire between two corners, or a closed loop of wire through the points. run: starts them moving (they sit still until then), drift: fades in a push towards the second end (round the loop in the order of its points), electrons: shows them, mark: tints one. Positions come from a seed, so the same seed moves the same way every time. On a loop, gap: names a segment (from point i to point i+1) that open: breaks, like an open switch.
gas <id> = (x1, y1) -> (x2, y2) { [props] } OR gas <id> along [(x, y), ...] { width: <number>, [props] }
| prop | type | description |
|---|---|---|
| run | bool | moving (default still) |
| drift | bool | the push is on |
| push | number | drift as a share of the random speed, default 0.2 |
| electrons | bool | show the electrons (default true) |
| mark | bool | tint one electron |
| count | number | how many, default 50 |
| seed | string | default the id |
| speed | number | random speed, scene units a second |
| free | number | mean time between collisions, default 0.35 s |
| r | number | electron radius in pixels |
| lattice | number | spacing of the copper ions, 0 for none |
| width | number | a loop only: how thick the wire is |
| gap | number | a loop only: the segment a switch breaks |
| open | bool | a loop only: the gap is open |
Example
cut#
A dashed cut across a straight gas with a counter under it: every electron that crosses to the right adds one, every one that crosses back takes one away, so it counts the net. The count starts when count: turns true. With nothing pushing, the count stays within a few of zero (each electron has a partner that crosses back a moment after it), and with drift: on it climbs.
cut <id> on <gas> at <x> { [show: <bool>], [count: <bool>] }
Example