Skip to content

Motion films that never cut to the next slide: every beat grows out of the one before, one continuous camera, continuity measured by an oracle. Product launch films and feature demos, made with a coding agent.

chore: trim tuned defaults and measured numbers from the public build

feitangyuan511193bf1e8a
diff --git a/SKILL.md b/SKILL.md
index 2c62cc2..c01369e 100644
--- a/SKILL.md
+++ b/SKILL.md
@@ -140,7 +140,7 @@ The shutter is real motion blur: each moving frame is several seeks across the o
light; holds are detected and skip it. A capture is a Chrome screenshot (~150 ms; the page itself draws in under 1 ms),
so render.py runs `--workers` browsers in parallel processes (default cores − 2, max 8). A page that defines
`window.__motion(t0, t1)` — the farthest anything travels on screen, camera included — gets as many captures per frame
-as keep copies 6 px apart (4–48); a fixed 8 stepped the one-dot film's 633 px/frame opening into bands. Budget: the
+as keep copies `--gap` px apart, between `--samples-min` and `--samples-max`; if a fast move shows bands, tighten the gap and raise the cap. Budget: the
one-dot camera cut took 103 s for 2,480 captures on 8 workers (one browser: ~0.2 s a capture, ~8.5 minutes) — tell
the user the estimate before starting a long render.
diff --git a/gallery/gallery.html b/gallery/gallery.html
index 9f8438f..046488b 100644
--- a/gallery/gallery.html
+++ b/gallery/gallery.html
@@ -248,40 +248,6 @@ const DEMOS = {
draw(t) { clear(); const [w, s] = this.sc(t); g.save(); g.globalAlpha = w.op; g.translate(960, 540 + w.dy); g.scale(s, s); windowFrame(-700, -420, 1400, 840, { tint: C.peach }); g.restore(); },
track(t) { const [w, s] = this.sc(t); return { window: { x: 960, y: 540 + w.dy, w: 1400 * s, h: 840 * s } }; } },
- // ─────────────── fluid — from ebb ───────────────
- swiftSpring: { group: 'fluid', from: 'ebb', note: "SwiftUI's named springs: .smooth, .snappy, .bouncy — Spring(duration, bounce) as ζ = 1 − b, ω = 2π/d", dur: 1.4,
- draw(t) { clear(); ['smooth', 'snappy', 'bouncy'].forEach((k, i) => { const v = OM.swiftSpring(t - 0.15, k), x = 460 + v * 1000, y = 360 + i * 180;
- g.fillStyle = '#e8e8e4'; g.fillRect(460, y - 2, 1000, 4); g.beginPath(); g.arc(x, y, 34, 0, 7); g.fillStyle = [C.ink, C.red, C.green][i] || C.ink; g.fill(); text('.' + k, 300, y, { size: 30, align: 'left' }); }); },
- track(t) { const o = {}; ['smooth', 'snappy', 'bouncy'].forEach((k, i) => { o[k] = [460 + OM.swiftSpring(t - 0.15, k) * 1000, 360 + i * 180]; }); return o; } },
-
- lightField: { group: 'fluid', from: 'ebb', note: 'a ground of light that is always there: it rises, floods the frame in ≤ 0.4 s, and drains — the same object moving, not a wipe', dur: 2.6,
- level(t) { return t < 1.2 ? 0.5 * OM.ease.smooth(OM.seg(t, 0.1, 1.1)) : t < 1.6 ? OM.lerp(0.5, 1.05, OM.ease.expoOut(OM.seg(t, 1.2, 1.5))) : 1.05 * (1 - OM.ease.smoother(OM.seg(t, 1.6, 2.5))); },
- draw(t) { clear(); g.fillStyle = '#fdfbf7'; g.fillRect(0, 0, 1920, 1080); const f = OM.lightField(this.level(t));
- g.save(); g.translate(f.cx, f.cy); g.rotate(f.tilt); g.scale(f.rx / f.ry, 1); const gr = g.createRadialGradient(0, 0, 0, 0, 0, f.ry);
- [[236, 104, 46, 1], [244, 150, 92, 1], [250, 204, 170, 1], [253, 236, 222, 0.75], [253, 236, 222, 0]].forEach((c, i) => gr.addColorStop(f.stops[i], `rgba(${c.join(',')})`));
- g.fillStyle = gr; g.fillRect(-f.ry, -f.ry, 2 * f.ry, 2 * f.ry); g.restore(); },
- track(t) { const f = OM.lightField(this.level(t)); return { horizon: [960, Math.max(0, f.horizon)] }; } },
-
- ripple: { group: 'fluid', from: 'ebb', note: 'a flood drains as three rings leaving one point, alternating tints; the world shows through the innermost', dur: 2.0,
- draw(t) { clear(); g.fillStyle = '#fdfbf7'; g.fillRect(0, 0, 1920, 1080); card(760, 330, 400, 420); const r = OM.ripple(t, 0.2).r, hole = R => { g.moveTo(960 + R, 540); g.arc(960, 540, Math.max(0.01, R), 0, 7, true); };
- g.beginPath(); g.rect(0, 0, 1920, 1080); hole(r[0]); g.fillStyle = 'rgb(240,120,60)'; g.fill('evenodd');
- g.beginPath(); g.arc(960, 540, r[0], 0, 7); hole(r[1]); g.fillStyle = 'rgb(248,196,158)'; g.fill('evenodd');
- g.beginPath(); g.arc(960, 540, r[1], 0, 7); hole(r[2]); g.fillStyle = 'rgb(252,226,206)'; g.fill('evenodd'); },
- track(t) { const r = OM.ripple(t, 0.2).r; return { ring0: { x: 960, y: 540, w: 2 * r[0], h: 2 * r[0] }, ring2: { x: 960, y: 540, w: 2 * r[2], h: 2 * r[2] } }; } },
-
- silk: { group: 'fluid', from: 'ebb', note: 'domain-warped noise on a 16×20 grid, ramped through a dark fold, drawn up with a blur, one pale wisp', dur: 3.0,
- setup() { this.c = document.createElement('canvas'); this.c.width = 16; this.c.height = 20; this.x = this.c.getContext('2d'); this.im = this.x.createImageData(16, 20); },
- draw(t) { clear(); [['peach', 3, 360], ['ember', 24, 800], ['dusk', 61, 1240]].forEach(([r, seed, x]) => {
- OM.silk(t * 1.5, seed, OM.silk.ramps[r], { out: this.im.data }); this.x.putImageData(this.im, 0, 0);
- g.save(); g.beginPath(); g.roundRect(x, 250, 320, 406, 30); g.clip(); g.imageSmoothingEnabled = true; g.imageSmoothingQuality = 'high'; g.filter = 'blur(26px)'; g.drawImage(this.c, x - 37, 213, 394, 480); g.restore();
- text(r, x + 20, 700, { size: 26, align: 'left', color: C.grey }); }); },
- track(t) { return { card: { x: 520, y: 453, w: 320, h: 406 } }; } },
-
- carouselLoop: { group: 'fluid', from: 'ebb', note: 'a belt that never rests until told to: constant speed after a .smooth start; its clock slows every card with it', dur: 3.2,
- setup() { this.B = OM.carouselLoop({ dur: 3.4, start: 0.2, speed: 420, stop: [2.3, 2.8] }); },
- draw(t) { clear(); const b = this.B.at(t); for (let i = -2; i < 9; i++) { const x = ((i * 300 - b.x) % 3300 + 3300) % 3300 - 600; card(x, 400, 260, 300, { r: 26 });
- g.fillStyle = [C.lilac, C.red, C.green][((i % 3) + 3) % 3]; g.globalAlpha = 0.35; g.fillRect(x + 20, 420 + 120 * (0.5 + 0.5 * Math.sin(b.tau * 3 + i)), 220, 16); g.globalAlpha = 1; } },
- track(t) { const b = this.B.at(t); return { belt: [960 - (b.x % 300), 550] }; } },
};
const q = new URLSearchParams(location.search), name = q.get('demo');
diff --git a/gallery/sheets/carouselLoop.png b/gallery/sheets/carouselLoop.png
deleted file mode 100644
index d824560..0000000
Binary files a/gallery/sheets/carouselLoop.png and /dev/null differ
diff --git a/gallery/sheets/lightField.png b/gallery/sheets/lightField.png
deleted file mode 100644
index 9a513ef..0000000
Binary files a/gallery/sheets/lightField.png and /dev/null differ
diff --git a/gallery/sheets/ripple.png b/gallery/sheets/ripple.png
deleted file mode 100644
index 06c5d6e..0000000
Binary files a/gallery/sheets/ripple.png and /dev/null differ
diff --git a/gallery/sheets/silk.png b/gallery/sheets/silk.png
deleted file mode 100644
index aca1283..0000000
Binary files a/gallery/sheets/silk.png and /dev/null differ
diff --git a/gallery/sheets/swiftSpring.png b/gallery/sheets/swiftSpring.png
deleted file mode 100644
index 425746f..0000000
Binary files a/gallery/sheets/swiftSpring.png and /dev/null differ
diff --git a/references/composition.md b/references/composition.md
index 573dbec..a332448 100644
--- a/references/composition.md
+++ b/references/composition.md
@@ -99,7 +99,7 @@ before acceptance is 1080p30.
**Shutter.** A screenshot is an instant, so a fast move strobes into sharp copies; a camera integrates while its
shutter is open. For each frame render.py seeks several times across the open shutter (180° = half a frame
interval, centred on the frame time) and averages the captures in linear light — `--samples` (8) of them, or, when
-the page defines `__motion`, as many as keep neighbouring copies `--gap` (6) px apart on screen (4–48, set by
+the page defines `__motion`, as many as keep neighbouring copies `--gap` px apart on screen (4–48, set by
`--samples-min` / `--samples-max`). It captures the two ends first; if they are identical the frame is a hold and
is written as is. Because `__seek` is pure this is the real
integral, not a blur filter: a 100 px box moving 167 px/frame at 30 fps left a 173 px streak with a 27 px solid
@@ -203,18 +203,6 @@ dryness — drawn as 56 hair polylines spread across the width:
What didn't read: a few thick, even hairs (a plastic band); width swelling from zero at the touch-down (fans); strokes
under ~140 px (tufts).
-## Fluid grounds — a light field and silk
-
-`OM.lightField` and `OM.silk` are both pure functions of t. Two rules came out of matching them to the references:
-
-- **Compute the fluid small and let the browser blur it.** A 16×20 field upscaled with smoothing and a canvas
- `blur()` is smoother than any full-resolution noise and costs nothing per frame, and it stays deterministic. The detail
- you are tempted to add is what turns silk into a contour map.
-- **Silk needs a fold.** A ramp from dark to light reads as a gradient; put a darker band between two bright hues and
- one thin specular wisp on top, and it reads as cloth catching light.
-- A light field works as punctuation only because it is *always there*: at rest it is a low glow under the content,
- so a flood that fills the frame and drains is the same object moving, not a wipe.
-
## Things that bit
- A `filter: blur()` on an element translated tens of thousands of pixels off-screen painted the
diff --git a/references/motion-library.md b/references/motion-library.md
index ce1ca39..6ce2dd1 100644
--- a/references/motion-library.md
+++ b/references/motion-library.md
@@ -33,44 +33,6 @@ be sought. The sims, which need the hand's history, are built once in `__ready`
sampled with `.at(t)`. Utilities: `clamp`, `lerp`, `seg(t, t0, t1)`, `sstep` / `ssstep`, `spline(knots, t)` (Hermite
through `{t, x, y}` → `[x, y]`), `rng(seed)` for anything random.
-## Curves — choose by t80
-
-t80 = the share of a move's duration spent before 80 % of its travel is done. probe.py reports it for every move
-in a composition and analyze_ref.py for a reference film, so a curve here, a move in your film and a move in the
-reference compare on one number.
-
-| curve | t80 | reads as |
-|---|---|---|
-| `ease.expoIn` | .97 | a launch; exits only |
-| `ease.linear` | .80 | mechanical: a ticker, a tracking shot |
-| `ease.smooth` · `sineInOut` | .71 · .71 | soft S |
-| `ease.smoother` | .67 | the symmetric S Pocket Weather v3 used for every move |
-| `ease.cubicInOut` · `quintInOut` · `expoInOut` | .63 · .58 · .57 | a camera move with weight (`whip`, `zoomThrough`) |
-| `ease.quadOut` | .55 | a gentle arrival |
-| `ease.cubicOut` · `circOut` | .42 · .40 | UI arrival |
-| `ease.quartOut` · `quintOut` | .33 · .28 | a snap |
-| `ease.backOut` | .24 | a snap past the mark and back |
-| `ease.expoOut` | .23 | there almost at once, then settles (`tween`, `morphRect`, `iris` default to it) |
-
-`OM.bezier(x1, y1, x2, y2)` turns any CSS cubic-bezier into a curve; `OM.t80(curve)` measures one;
-`OM.tween(t, t0, t1, curve)` applies one between two times.
-
-Springs are closed forms — `OM.spring(tau, zeta, omega)` — so they seek like a curve:
-
-| ζ, ω | 80 % at | settles ±2 % | overshoot | used by |
-|---|---|---|---|---|
-| .5, 28 | 0.067 s | 0.29 s | 16 % | `tick` |
-| .5, 26 | 0.073 s | 0.31 s | 16 % | `letterDrop` |
-| .6, 22 | 0.093 s | 0.27 s | 9.5 % | `wordRise` |
-| .47, 17 | 0.109 s | 0.49 s | 19 % | `maskRise` |
-| .62, 18 | 0.116 s | 0.33 s | 8 % | `popIn` |
-| .7, 16 | 0.140 s | 0.37 s | 5 % | the calm window hold |
-| .78, 14 | 0.172 s | 0.26 s | 2 % | `flyThrough` |
-
-A spring reaches 80 % within a quarter to a third of its settle time — a snap with an overshoot chosen by ζ.
-`OM.settle(ζ, ω)` gives the settle time so the next beat can start on it; `OM.springVel` is its exact velocity
-(× the distance, it feeds `squash`); `OM.ring(tau, decay, omega)` is the decaying wobble after a hit.
-
## enter — something arrives
| move | returns | what it is | from |
@@ -155,35 +117,3 @@ entrances and the other carries stay under 50. **At 30 fps every number doubles*
cross verify's 80. Render with render.py's default shutter and they smear as far as they travel. The `blur` that
`liftOut` and `flyThrough` return is a CSS filter for depth; it does not replace the shutter.
-## Candidates — measured, not yet in a film
-
-A move enters `lib/motion.js` only after a film that used it was accepted: it is written inside that film's
-comp.html first, then promoted with a test, a gallery sheet and a row above. The
-moves below were measured frame by frame from references and have not been in an accepted film of ours: **HF** — the
-Higgsfield × Claude Opus 5.5 launch (41 s, 24 fps, x.com/higgsfield/status/2102451022216179935); **PK** — Pinckus's
-part of Flatwhite Motion's Rednote Buildathon piece (7.5 s, 30 fps, x.com/Pinckus102xz/status/2101491848179331220, made
-in Cavalry); **FL** — two fluid-ground references: David Ch's Shipper launch (49.9 s, 60 fps,
-x.com/chhddavid/status/2102666619029999989) and Nazday's Elera post carousel (16 s, 60 fps, 1600×1200,
-x.com/nazmijavierl/status/2102712897701097828) — the FL rows are promoted, see *fluid* above. Build them in the film from these numbers, not from memory; promote them when the film is accepted. Times
-are the reference's, sizes at 1080p.
-
-| candidate | what it is | measured |
-|---|---|---|
-| `glowPress` | a key lit from inside — no cursor; the lit state is the click | attack 1 frame, no ease-in; fill base → cream (rgb 212,122,102 → 250,208,193), brightest at +0.17 s; scale → 0.8 in 0.15 s; a radial halo in the base hue reaches 2.3× the key's width on the first frame, 2.7× at +0.17 s; hold 0.45 s while a white specular runs round the bevel; release 0.13 s back to base, left a shade lighter (219,142,121). 0.67 s in all, the camera drifting through it (8.29 s) |
-| `glowBox` | an emphasis pill that lights the scene, then becomes the next one | born as a blurred glow at ~40 % width, full width in 0.2 s; label typed at ~23 cps, the newest glyph magenta for one frame; the whole ground takes a lime cast while it is on (spill); hard cut in to 2.9× with the ground defocused; a heartbeat to 0.8× and back (14.6 s); then it grows past 1.4× until its halo whites out the frame, and the next scene builds on that white (13.72–15.05 s). probe reads the bloom as a fade through the ground — list it in `__meta.cuts` |
-| `contourGlow` | the model picks a part: a stroke that follows the silhouette, not a box | ~8–10 px; frame 1 soft amber, frame 2 crisp lime, then thins to nothing — 0.35 s; several parts at once, slightly staggered (16.08 s). Canvas: the cutout's alpha dilated, filled `source-in` |
-| `heatType` | typing whose newest glyphs are hot and cool to ink; the line above cools to grey when the next begins | leading glyphs lime → magenta, ink after ~0.3 s (prompt 6.0–7.6 s); status lines reveal left to right with the same hot edge (9.1–10.0 s) |
-| `focusIn` | rack-focus entrance: blur, a little extra scale and opacity settle together | the film's most used entrance — the big status text (10.6 s), the 4-up variants (28.3 s), the hero card |
-| `wavefront` | stagger by position, not index: many items arrive as flat mattes along a front, then fill with texture | ~120 parts, magenta mattes sweeping in over ~0.5 s, texture following (15.1–15.7 s) |
-| `scanBox` · `countUp` | a detection box: stroke, label typed, value counted up, colour = verdict | yellow 42 → 67 %, red 16 %, green 84 → 96 % whose tint fill blinks twice at 12 fps (17.0–19.5 s) |
-| `punchLadder` | hard cuts in on one subject, each a step tighter | cuts at 16.08, 16.92, 17.75, 18.5 s through the parts field, each ~1.5–1.8× tighter; ANALYZE's 2.9× cut-in (14.26 s) is a one-step ladder |
-| `exposure` | a flash to white that starts a `morphRect`: the photo is taken, then shrinks into the attachment | 5.38–6.0 s |
-| `ghost` | a part arrives as a translucent tinted preview, then solidifies | orange ghost wheels (24.5–25.0 s) |
-| `belt` (PK) | bands chase round a closed path — a conveyor that carries the title | boundaries along the arc length, each band a stroke with round caps (155 px on a 984 × 330 stadium); the ring unrolls from one point, runs on an expo start then creeps; one band laps and swallows the rest to end the beat (0–1.0 s). Code: `bandState` |
-| `reel` (PK) | a slot reel with a pill as its window | index = Σ spring(t − tᵢ, .56, 34) over the step times; neighbours in the pill's colour one pitch above and below, fading by distance; the pill's width follows the fractional index; steps accelerate then brake (0.22 → 0.13 → 0.30 s) and land on the word the next beat needs (1.7–2.9 s). Code: `reelPos`, `reel` |
-| `echo` (PK) | grey copies of the landed word stack above and below it, a staircase | copies spring out of the source (ζ .7, ω 26, 0.04 s apart) to ±1, ±2 rows with small x offsets, grey #3a3a3a under the source; retract into it before the next beat (2.9–3.3 s) |
-| `lateType` (PK) | typing where one glyph arrives late (NEXT WRLD → WORLD) | ~14 cps, the late glyph ~0.25 s behind; reads as live input rather than a title (0.1–0.6 s) |
-| `paintIn` (PK) | a part snaps in unpainted and takes its colour a beat later | grey #c2c2c2 at scale .55 and 0.35 rad, spring ζ .55 ω 20, colour at +0.09 s (3.4–4.0 s) |
-| `iconCycle` (PK) | one part changes shape and icon on an accelerating cadence while a word cloud types out around it | swaps 0.26 → 0.16 s apart, each a 0.84 → 1 pop; new words take the current icon's colour, older ones dim to grey; for the last ~0.6 s rows fill the frame edge to edge, then a hard cut (4.4–6.0 s) |
-
-`glowPress`, `glowBox` and `heatType` share one colour logic — hot when new, cooling to ink — so build them together.
diff --git a/references/reference-deconstruction.md b/references/reference-deconstruction.md
index 23d66b4..fa74e41 100644
--- a/references/reference-deconstruction.md
+++ b/references/reference-deconstruction.md
@@ -37,30 +37,6 @@ What to read off it:
the hits. That contrast is the whole trick.
- **Cut count.** 7 in 26 s. A cut every second is not this genre.
-## The motion line — how things move
-
-The energy map says *when*. The `motion:` line says *how*, from optical flow at 30 fps, 320 px wide:
-
-```
-motion: peak 260 px/frame @30 · 15 moves · median t80 0.73 · soft curves 83 % of travel · smear 1.07 over 95 fast frames (sharp: no shutter blur)
-```
-
-(Pocket Weather v3.) Read off it:
-
-- **t80** — the share of a move's duration spent before 80 % of its travel is done. .80 is linear, .67 a
- symmetric S-curve, .42 cubic-out, .23 an expo-out snap that arrives at once and settles for the rest. Both our
- films sit at .70–.73: everything eases in *and* out. A reference well below that moves on snaps and springs —
- pick `ease.expoOut` / `quartOut` and `OM.spring`, not `smoother` (curve table in motion-library.md).
-- **smear** — whether fast frames are smeared *along* their motion. Under .78 the clip was rendered with motion
- blur (render.py's 180° shutter reads .64–.69; Pocket Weather v3 re-rendered with it .69); ~.9 and up are sharp
- copies (motion-web .88, v3 as drafted 1.07 — both strobe on their fastest moves). A smeared reference means: keep
- the shutter on, render.py's default.
-- **peak** — px per frame, normalised to 1920 wide. It reads up to ~30 % low on fast, small objects; the exact
- number for a composition comes from probe.py.
-
-It is a fingerprint of the dominant motion, not a track per element. `verify_promo.py draft.mp4 --ref ref.mp4`
-prints yours next to the reference's.
-
## The contact sheets
Look for, and write down:
@@ -92,7 +68,7 @@ stopped at draft 1: a new topic on the reference's beats was 「完全抄袭复
follow from it. Copied parts without the rule read as clip-art; the rule applied to your own subject reads as the style.
2. **The tool behind the look.** Made in Cavalry, where path-offset bands, duplicator echoes and per-glyph typing are
cheap — so the film is full of them. Knowing that separates the signature from what was merely easy there. In `f(t)`
- each is a few lines (motion-library.md → *Candidates*, PK rows).
+ each is a few lines.
3. **Numbers, not impressions.** Palette hex from full frames, grid pitch from one pixel row, type size from cap height
at 1080p, rivet and screw radii as a share of the part. They go at the top of the comp.
4. **Its objects, our carries.** The reference hard-cuts between beats. The study carried every boundary with the
diff --git a/scripts/render.py b/scripts/render.py
index fe3db11..bb064ed 100644
--- a/scripts/render.py
+++ b/scripts/render.py
@@ -170,8 +170,8 @@ def main():
ap.add_argument("--final", action="store_true", help="3840×2160 at 60 fps (sets --fps 60 --scale 2) — only once the cut is accepted")
ap.add_argument("--shutter", type=float, default=180.0, help="shutter angle in degrees; 0 = no motion blur")
ap.add_argument("--samples", type=int, default=8, help="captures per moving frame when the page has no window.__motion")
- ap.add_argument("--gap", type=float, default=6.0, help="px between neighbouring captures, for a page with window.__motion")
- ap.add_argument("--samples-min", type=int, default=4); ap.add_argument("--samples-max", type=int, default=48)
+ ap.add_argument("--gap", type=float, default=24.0, help="px between neighbouring captures, for a page with window.__motion")
+ ap.add_argument("--samples-min", type=int, default=4); ap.add_argument("--samples-max", type=int, default=12)
ap.add_argument("--workers", type=int, default=max(1, min(8, (os.cpu_count() or 3) - 2)), help="browsers rendering in parallel processes")
ap.add_argument("--width", type=int, default=1920); ap.add_argument("--height", type=int, default=1080)
ap.add_argument("--dur", type=float, default=None); ap.add_argument("--sfx", default=None); ap.add_argument("--crf", type=int, default=16)