0022. Motion effects on a deterministic clock
Status: accepted (motion-effects change, 11 October 2026)
Context
Section titled “Context”The proposal makes animation part of 1.0. Animated arrows express activity with particles or a
moving dash; effects and stories are computed on the same clock so playing and exporting give
equivalent states; two incompatible animations on the same property are a diagnostic; animation
is the last layer of style precedence; no action moves a node; animated SVG is an explicit subset
with a static alternative and is not considered universally compatible. animate statements were
parsed and validated but never evaluated.
Decision
Section titled “Decision”- Three effects, three channels.
flowdraws particles along a relation,dashmoves a dash along a line or an outline,pulsegrows and fades a halo (a glow on relations). A target takes at most one effect per channel; a second one isanimate.conflict. Each effect hasduration,repeat,delayand, where they apply,direction,particlesandcolor, with defaults per effect;effectis required. - One clock, linear curves. For delay
d, durationDandncycles, the phase at timetis((t − d) mod D)/Dinside[d, d + n·D)and the target is static outside it. Every curve is linear, so the CSS of the animated profile and the frames computed in code agree exactly, and the frame at an instant never depends on the speed of the machine. - A separate, pure package.
@meltemi/diagrams-motionplans the effects against the drawn scene (relation tracks and element bounds, which the layout now records) and returns either the scene at a time (sceneAt) or the scene with a style sheet and classes (animatedScene). The CLI, the editor and, later, the player and the video exporter share it. - CSS, not SMIL or scripts. The animated profile uses CSS keyframes on opacity, motion paths,
dash offsets and scale. Overlays carry
opacity="0"as an attribute, so a viewer without CSS animation, without motion paths (@supports), or asking for reduced motion shows the static picture. - Static by default. Exports draw no effects unless asked (
--motion animatedor--at), so documents and slides never carry animation by accident.
Alternatives considered
Section titled “Alternatives considered”- SMIL
<animateMotion>. Wider support in old viewers, but it cannot honour reduced motion and mixes timing into the markup; CSS keeps one style sheet with a clean fallback. - Eased curves. Easing would read better, but CSS easing and code would have to match to the last decimal; linear curves make equivalence exact.
- Effects moving or scaling boxes. Ruled out by the proposal: composition checks hold for every frame because geometry never changes.
Consequences
Section titled “Consequences”- Stories (change 14) suspend a relation’s local effect while they trace it, on the same clock.
- Video exports (change 17) evaluate
sceneAtper frame and will need an explicit length for effects that repeat forever. - Particles and halos take the theme’s accent and particles ride under their label since decision 0055, which also gives endless effects a default length.