05 / Motion, GPU, graphics
Motion is a field on the node.
Entrances, scroll tracks, pins, split text and pointer effects are checked steps on the node. CSS-only effects ship no timeline script, and every page still reads with JavaScript off and with reduced motion on.
A native scroll effect, in bytes.
The motion engine against GSAP 3.15.1 and ScrollTrigger on controlled scenes, median of five cold Chromium runs.
Script for a native scroll effect
Culm
304 B
GSAP 3.15.1
118,275 B
Raw bytes · a view() opacity scroll
Where GSAP leads
On the masked-letter scene, the phone sweep script took 20.62 ms in Culm against 6.34 ms in GSAP. Every row, including that one, is on the comparison page.
Triggers and steps.
A motion is a trigger and either a registered effect or checked steps with matching from and to values.
Triggers
load, enter-view, hover, press, scroll and pointer-x.
Targets
The node, its children, or its text split into lines, words or letters, with an optional mask. A stroked path can draw.
Pins
A scroll track can pin a container for up to 4,000 px and seek in either direction.
Tiers
Native CSS where the browser can do it; a small host script, held to its byte ceiling, where it cannot.
Fallbacks
A page is built to read with JavaScript off and with reduced motion on. The trial gate checked both.
GPU and WebAssembly, opt in.
Shader regions and a bounded WebAssembly field run in a worker, under a generated strict Content Security Policy, and fall back to a static poster.
Opt in
"features": { "gpu": true } in culm.json. A site without it keeps identical HTML, scripts and build identity.
Custom GLSL
A static checker: read-only inputs, 4,096 bytes of source, 64 loop passes, 16 texture reads and an operation budget per pixel.
WebAssembly
One fixed page of memory and no imports, at most 512 bytes. A failing region falls back to its poster while the others paint.
Policy
'wasm-unsafe-eval' only on a page that runs a WebAssembly region. The GPU host loads lazily and is skipped under reduced motion or Save-Data.
Flash limits
A last-pass limiter bounds how fast light can change, and slow frames lower the scale.
Graphics are nodes.
Charts, diagrams, contours and stamps are shape nodes, drawn as SVG from data in the document. The diagram below is one.
Native CSS first: the diagram drifts as you scroll on a CSS view() timeline, with no motion script. This page ships 304 bytes of inline script in this build, Culm's base script alone. With reduced motion on, or in a browser without scroll timelines, it stands still.
Shapes
chart (bar, line, area, donut, spark), diagram, contours, stamp, wave, curve, arc, and marks up to 256.
Export
render writes any node or section as a checked PNG, WebP or SVG, at og, square or poster size.
The rest of Culm