A toolbox of film styles made in code for Claude Code: 66 ready to use, and your own. Each style is a style prompt plus a demo film made entirely in code by Claude Opus 5.5, with no video model. By Lemomo. · 一套用代码做片的风格工具箱:66 种现成风格,也能做出你自己的
JavaScript agent-skillsai-agentsai-short-filmai-videoanimationcanvasclaudeclaude-codeclaude-code-pluginclaude-code-skillcreative-codingffmpegfilmmakingmotion-graphicsopus-5-5prompt-librarytext-to-speechthreejsvideo-productionwebgl
Five new styles: what the engine gives you and what a new topic needs
lemomo-ai4b68703de509
diff --git a/styles/chalkboard/DEMO.md b/styles/chalkboard/DEMO.mdindex 328b033..b8ae8e0 100644--- a/styles/chalkboard/DEMO.md+++ b/styles/chalkboard/DEMO.md@@ -66,4 +66,5 @@ The front panel slides back over the rewritten board; on the clean right panel- Code: `index.html` → `js/app.js` (compositor, subtitles, `TEXTS`) → `js/film.js` (every stroke, voice start, subtitle cue and camera key, as data). Engine files are listed in STYLE.md §10. `index.html?lab=hz&chars=…` shows stroke data over the reference font.- Voice lengths are copied into `VO` in `js/film.js`; the picture is timed from them, so a new voice means new timings.- The page bakes about 500 strokes on load (about 10 s), then 20–50 ms per 1080p frame.+- Chalk speeds as set here (`speed` in `writeChar` / `writeLine`, in sizes per second): 9–11 for the 520-unit characters, 16–22 for the title and 短, 40–90 for labels; `lspeed` 90–200 for English. What can be reused, what film.js must give app.js, new characters and the chalk recordings: STYLE.md §10.- Demo pitfalls: arrows inside English lines on the board are drawn from `hz.js` (the font has none); the bronze form's name is written before its hand so the label can be read while the hand waits for the voice.diff --git a/styles/chalkboard/STYLE.md b/styles/chalkboard/STYLE.mdindex 2eff287..8a51235 100644--- a/styles/chalkboard/STYLE.md+++ b/styles/chalkboard/STYLE.md@@ -36,7 +36,7 @@ Not Whiteboard Explainer: that style is a bright glossy board, coloured markers,## 4. Type & subtitles-- Chinese is hand-authored stroke data (centre lines + stroke type per stroke) drawn by the chalk engine, never a font's outline. Every character the topic needs is added to the data and checked against an OFL kai font behind it before shooting.+- Chinese is hand-authored stroke data (centre lines + stroke type per stroke) drawn by the chalk engine, never a font's outline. Every character the topic needs is added to the data and checked against an OFL kai font behind it before shooting (how: §10, *New characters*).- English on the board is a single-line OFL handwriting font (EMS family) drawn by the same engine; symbols missing from the font (arrows, plus) are drawn as strokes.- On the board: keywords only, one line of Chinese, the next line English, a size smaller.- Sizes at 1080p: big characters 300–450 px; labels ≥ 55 px CJK and ≥ 30 px Latin cap height; small writing gets heavier chalk so no stroke is thinner than 3 px.@@ -51,7 +51,9 @@ Not Whiteboard Explainer: that style is a bright glossy board, coloured markers,## 5. Motion quality-- 30 fps, continuous. Chalk speed: big characters ~0.1–0.3 s per stroke, labels ~0.04 s per stroke, with short air time between strokes; writing speeds up rather than making the voice wait.+- 30 fps, continuous (render with `--fps 30`: `core/render/video.mjs` defaults to 24).+- Chalk speed, measured on our demo: a big character takes about 0.1 s per stroke including the air between strokes (a ten-stroke character about 1 s), labels about 0.04 s per stroke. Writing speeds up rather than making the voice wait, but a big character written much faster than about 0.07 s per stroke stops looking like a hand.+- When reading time and chalk speed pinch in a short film, change the words, not the hand. Ways that work (choose per film): fewer and shorter blocks on the board; big characters only for what the lesson tracks, everything else at label size; start a block while the voice is still on the previous line, so it is finished when it is named; write the next block while the last one is still being read in the same frame; hold the frame instead of moving on; make the film longer.- Camera eases in and out (cubic), never bounces except a whip landing.- Things appear only by being written, wiped, revealed by a sliding panel or by drying. Nothing fades in.@@ -70,12 +72,14 @@ The camera always faces the board flat on (no perspective tilt).| Cut on a line crossing a seam | a connection | cause and effect; the same part in two places || Wide shot of the whole wall | summary | the map of what was learnt |+The room is part of the style: at least once the frame opens wide enough to read board, frame, tray and wall as a classroom (where, and what else the room holds, is the film's choice). Close shots may show only slate and frame.+Rules: the subject is never smaller than a third of the frame in close shots; text blocks are never cut by the frame edge while they are read; no empty board for more than half a second. Transitions are hard cuts, a sliding panel or a line across a seam; no dissolves or page flips.## 7. Sound palette- Voice first: it is the loudest element; music sits 15–18 dB under it and comes up only in the pauses.-- Foley: real chalk recordings cut into grains, one grain chain per stroke, level from stroke size; a light knock on landings; the accent chalk slightly softer and duller. A felt pass for the wipe, the low roll of a sliding panel ending on a stop, room tone very low; school sounds (a distant bell) only as punctuation.+- Foley: real chalk recordings cut into grains, one grain chain per stroke, level from stroke size; a light knock on landings; the accent chalk slightly softer and duller. A felt pass for the wipe, the low roll of a sliding panel ending on a stop, room tone very low; school sounds (a distant bell) only as punctuation. Where the recordings come from and how to cut them: §10, *Sound*.- Music: sparse plucked strings (a guqin model or nylon guitar) with marimba and pizzicato bass; a plucked note can be "born" from something drawn. Silence while a question or a verdict is read.- Mix: about −16 LUFS integrated before mastering, true peak ≤ −1.5 dBFS.@@ -97,17 +101,45 @@ Rules: the subject is never smaller than a third of the frame in close shots; te- Small writing at 1080p disappears with the same chalk width as large writing; give small text heavier chalk.- Text written while the camera moves away fails reading time; hold the frame or keep the block in view.- Accent colour spread over arrows and decorations stops meaning anything.+- A soft halo at the chalk's front reads as glow. The demo's `drawFront` (`props.js`) puts a faint radial gradient under its grains: in your copy, drop the gradient and keep the grains.- A wet streak with a hard edge looks like a cut-out.- Board-speak in the voice ("A plus B", component names with no meaning) is not understood: every component is said with what it means the first time it appears.## 10. Engine-- `demo/js/chalk.js`: `Stroke`, `bake(stroke, R)`, `drawStroke(ctx, stroke, t)`: the chalk itself.-- `demo/js/hand.js`: `writeChar(ch, cx, cy, size, t, o)` (teacher or child hand), `writeLine(text, …)` (mixed Chinese and Latin), `writeLatin`, `loadSvgFont`.-- `demo/js/hz.js`: stroke data, `"type x,y x,y …"` in a 100-unit box; add every character a new topic needs here.-- `demo/js/r2d.js`: grain tile and deposit; `demo/js/stage.js`: slates, frame, tray, clock, painted grids.-- `demo/js/app.js`: frame compositor (layers, wipe, wet streak, light), subtitle plate and `TEXTS`.-- Minimal example: `writeChar('水', 800, 600, 400, 0)` after adding 水 to `hz.js`, then `bake` each stroke and draw with `drawStroke(ctx, s, t)`; open `index.html?lab=hz&chars=水` to check the proportions against the reference font.+The demo's code is a working engine; copy it into the project folder and write the film yourself.++**Copy as is:** `js/chalk.js` (`Stroke`, `bake`, `drawStroke`: the chalk), `js/hand.js` (`writeChar(ch, cx, cy, size, clock, o)`, `writeLine` for mixed Chinese and Latin, `writeLatin`, `latinWidth`, `loadSvgFont`; each returns `Stroke[]` with `t0`/`t1` set and `.end` = the time the last stroke ends), `js/r2d.js` (grain tile, deposit), `js/stage.js` (slates, frame, tray, clock, wall, `paintGrid`; world units: slate x 0…6400, y 0…1700, panel width `PW` 3200), `js/post.js`, `js/lab.js`, `tools/foley_lib.py`, `tools/subset.py` (subtitle font cut from the strings in `SUB` in `film.js`), `tools/srt.py`. `js/props.js` too, minus the glow (§9).++**Adapt:** `js/hz.js` (keep its characters, add yours), `index.html` (title), `js/app.js` (the compositor: it draws the layers, wet streak, wipe, light, subtitle plate and exposes `render`, `TEXTS`, `DUR`, `EV`; edit it to the film's board instead of feeding it placeholder data).++**Write yourself:** `js/film.js` (every stroke, time, camera key, voice start and subtitle, as data), the voice lines, the score and mix (`audio.py` is the demo's own score; its chalk-grain part is reusable), `build.sh`. `js/ancient.js` is the demo's old forms of one character: not an engine file.++**What `app.js` reads from `build(W, H)` in `film.js`:**++| Field | What it is |+|---|---|+| `S` | every `Stroke`, each with `layer`: `'FL'` (the sliding front panel, in panel-local units, moved by `slideX`), `'FR'` (the right panel, world units), `'BK'` (the back board, drawn only once the panel has moved), `'WORLD'` (on top, world units, drawn while `t < T.back0`); FL strokes also carry `phase` (`'pre'` = can be wiped, `wiped: true` = removed by the wipe; `'post'` = written after it). `o.R` sets bake resolution (default 2) |+| `DUR` | length in seconds |+| `camAt(t)` | `{cx, cy, s, shot}`: centre in world units, scale for a 1920-wide frame, shot index (motion blur is only taken within one shot) |+| `slideX(t)` | the front panel's offset; `() => 0` if it never moves |+| `TX` | board text for readcheck: `{id, text, layer, box:[x0,y0,x1,y1] in that layer's units, t0, t1}` |+| `SUBS` | subtitle cues `{id, t0, t1, zh, en}` |+| `EV` | sound events for `core/render/events.mjs`: `vo` (voice starts), `sub` (for the .srt), `chalk` (`t, d, len, color, pan, big`, one per stroke) and any of your own |+| `G1`, `G2`, `SMALL`, `T.back0`, `wet`, `wipe` | painted grids on the front panel and back board; when the closing slide starts; the wet streak `{x0, y0, y1, xEnd, bx0, t0, t1}`; the wipe `{t0, t1, w, path}` |++A film without a wet streak, a wipe, grids or a sliding panel removes those parts from its copy of `app.js` (or guards them, e.g. `if (!F.wet) return` at the top of `drawWet`, `if (!F.wipe) return null` in `drawWipeHaze`), and draws `WORLD` strokes on a condition of its own if there is no closing slide. Don't pass dummy fields to keep the compositor quiet.++**New characters.** `hz.js` maps a character to its strokes in standard stroke order (GF 0023-2020); each stroke is `"type x,y x,y …"`: the centre line through its anchor points in a 100 × 100 box, y down. Types: `h` 横, `s` 竖, `p` 撇, `n` 捺, `d` 点, `t` 提, `x` 悬针竖; `z…` for turns (corners pressed); a last letter `g` ends in a hook (its last point is the hook's tip), `p` / `t` in a point, `d` in a dot. Write only the centre line: the slight bow, the rise of horizontals and the pressed entry tick are added by `writeChar`. Symbols (arrows, plus, a tick) are written the same way. A way that works:++1. Take the stroke order and count from a dictionary that shows the standard order, and write down the type sequence first.+2. Set the character large from the reference kai (LXGW WenKai, `fonts/`) on a 100-unit grid, placed as the check page places it so the numbers line up: e.g. with PIL, `ImageFont.truetype(font, 1000)` drawn into a 1000 × 1000 image at `(0, 880)` with `anchor='ls'` (left edge, baseline at 0.88 of the box), with 100-px grid lines; read each stroke's start, corners and end off it and divide by 10. Keep the anchors on the middle of the font's stroke, not its edge.+3. Open `index.html?lab=hz&chars=<new characters>&size=400`: the chalk is drawn over the font in red. Check stroke count and order, which strokes touch or cross and which stop short, the proportion of each component, hook directions and the 撇/捺 feet; then look again at the size the film uses for it. Fix the numbers, not the font.+4. Read it at film size the way a native reader would, before shooting (§9): a structure that looks right at 400 px over the font can still read as another character on its own.++**Sound.** Three CC0 / CC BY recordings of chalk on a board from Wikimedia Commons (URLs in the demo's `build.sh`, credits in `CREDITS`) are cut into tagged grains with `python -I tools/foley_lib.py <out_dir> <name>=<file> …`: `tap`, `stroke` and `squeak` grains plus `index.json` with each grain's length, attack and brightness. The demo's `audio.py` places one grain chain per `chalk` event (length from `d`, level from `len`, the accent chalk low-passed); other recordings can be cut the same way.++**Render.** `node core/render/events.mjs <film>` (events from the page), your mix, `node core/render/video.mjs <film> --fps 30`, `sh core/render/mux.sh <video> <mix> <out> 30 1`, `node core/render/readcheck.mjs <film>`. The page bakes every stroke on load (about 10 s for 500 strokes), then 20–50 ms per 1080p frame. readcheck counts from the first frame a block's box is on screen, which is when its writing starts: leave the reading time after the last stroke yourself (§4).## 11. Variation spacediff --git a/styles/circuit-board/DEMO.md b/styles/circuit-board/DEMO.mdindex 4104fd8..8961bcb 100644--- a/styles/circuit-board/DEMO.md+++ b/styles/circuit-board/DEMO.md@@ -60,6 +60,7 @@ The board's own title block, top right of the corridor board, plotted at 54.8:## Build notes- One command: `sh styles/circuit-board/demo/build.sh` (Chinese voice → `circuit-board.mp4`) or `sh styles/circuit-board/demo/build.sh en` (English voice → `circuit-board-en.mp4`). It cuts the subtitle font, voices and checks every line, exports the events, scores and mixes, renders, masters, writes `circuit-board.srt`, runs the reading-time check and renders the poster and gallery still without the subtitle bar.+- Which files in `src/` are reusable and which are this film's content, and the world-module and scene interfaces: [`STYLE.md`](STYLE.md) §10.- Files in `demo/`: `index.html`; `src/main.js` (timeline: cameras, scenes, subtitles, sound events), `src/world.js` (corridor board, 1 unit ≈ 1 km), `src/city.js` (10 m), `src/house.js` (10 cm), `src/charger.js` (mm), `src/loss.js` (the loss board), `src/levels.js` (nesting), `src/render.js`, `src/post.js`, `src/parts.js`, `src/geo.js`, `src/font.js`, `src/hanzi.js`, `src/palette.js`; `voice/` and `voice_en/` (`lines.json`, `dur.json`), `data/subs_en.json` (English subtitles); `audio.py` → `mix.wav` / `mix_en.wav`; `tools/subset.py` (subtitle font), `tools/srt.py` (subtitles file), `tools/sheet.sh` (0.5 s contact sheet into `out/`).- Reading time: `window.TEXTS(t)` reports every word printed on the boards and `readcheck.mjs` passes on all of them. The subtitle bar follows the voice (about 5.6 characters a second), so it is reported only with `--q subs=1`. `?nosub=1` renders without subtitles.- The page always draws at 1920×1080 and is scaled by CSS, so stills at other sizes keep the framing. 1080p frames take 30–75 ms, about 180–270 ms in the pull-out (several nested boards plus motion-blur sub-frames).diff --git a/styles/circuit-board/STYLE.md b/styles/circuit-board/STYLE.mdindex d9efcd3..09b4c9a 100644--- a/styles/circuit-board/STYLE.md+++ b/styles/circuit-board/STYLE.md@@ -2,6 +2,8 @@> The subject is drawn as a printed circuit board seen from straight above: the world is copper under green solder mask, routes are traces, places are pads, words are white silkscreen, and what flows (power, water, signals, goods) is light running along the copper. The camera rides that light and jumps between the scale of a map and the scale of a single component.> References (grammar only): real PCB design files and assembly drawings (layers, clearances, designators, detail callouts); macro photography of boards (shallow depth of field, gold sheen, soft key light); schematic and single-line diagrams (one symbol stands for one function). Draw your own boards: never copy a real board layout, a logo or a part marking.+>+> **Frame rate: 30 fps.** Pass `--fps 30` to `video.mjs` and `30` to `mux.sh`; this overrides the 24 fps in the DIRECTOR.md and TECHNIQUE.md examples.## 1. Essence, and what it is not@@ -38,6 +40,8 @@ Example: laminate #05190F, pour #1C6A44, rim #4AA977, gold #D9B25B, silk #F2EEE1- Text is world-anchored and **plotted stroke by stroke**; it stays on the board and is still there when the camera pulls back.- Roles: labels (a Chinese line above a smaller English line, same stroke width), board-native text in one language (designators, voltages, timestamps, km, values), micro texture (pinyin tags, notes, REV/sheet lines) which may fade below reading size.- Reading: a label must be fully in frame and stay there for its reading time (≥ 1.5 s + characters at 4.5/s CJK, 15/s Latin). Never let text sit in the depth-of-field bands; never cut text at the frame edge in a held shot. Title caps ≥ 60 px at 1080p.+- Moving camera: `readcheck.mjs` starts a label's clock when it is first fully in frame and stops it the first time it leaves, so a label that slides out during a ride or whip fails even if it comes back. Before plotting a label, check where the camera path takes it for its whole reading time: place it where the path keeps it in frame, print it once the camera settles, or let it be micro texture (under ~9 px tall it is not reported).+- Glyph coverage: the routed font draws only the characters it has. The demo's `hanzi.js` holds just the hanzi its film needed, and the Latin set is capitals, digits, common signs and a few lowercase letters (`a b d e k l m o p s u z`, enough for units like ms, km, kV). A missing character prints as `?` with no error. Check every label string against the font before building, write English labels in capitals (or add the lowercase you need), and route the hanzi you lack (§10, New hanzi).- With a voice, every line gets a subtitle in the bottom safe area: a dark translucent plate, Chinese over English (an open-licence sans, e.g. Noto Sans SC, subset to the characters used; never a system font), 34 px / 24 px at 1080p. The board then prints only the voice's key words and numbers, never whole sentences. Keep picture text above the subtitle band.## 5. Motion quality@@ -95,19 +99,43 @@ When the film explains something, a voice tells it and the board shows it at the- **Text in the blur or under the frame edge.** Depth of field and the vignette eat the top and bottom bands: keep labels out of them, or turn the blur down in reading shots.- **Too-fast holes.** A plunge into a hole under 0.6 s reads only as "darkness". Hold on the hole first, then plunge; come out of another hole the opposite way.- **Precision.** Zooming a single coordinate system over many orders of magnitude breaks the canvas transform. Nest boards (each with moderate units) and convert cameras between levels in double precision.-- **Hanzi in a stroke font.** Automatic skeletons of fonts lose dots and strokes; route each character by hand and proof traditional/simplified forms (鹤 not 鶴, 换 not 換).+- **Hanzi in a stroke font.** Automatic skeletons of fonts lose dots and strokes; route each character by hand and proof traditional/simplified forms (鹤 not 鶴, 换 not 換). A glyph that only works at small size (one component missing, two strokes merged) reads as another character on a title: proof it large (§10).+- **The board edge by accident.** When the camera's view comes near the board outline, `Board` switches to drawing the desk and clips to the board, so a close shot near the edge suddenly shows black desk. Keep the view well inside the outline (the check uses the frame's half-diagonal plus 4% of the board width), or make the board larger than the shot needs; show the edge only when the whole board is the subject.## 10. Engine-All in `demo/src/`:+Reference code in `demo/src/`. Copy what you use into the project's `src/` (never import from `styles/`); edit your copies freely. The build order (subtitle font, voice and check, events, score, render at 30 fps, mux, `.srt`, readcheck, stills) is in `demo/build.sh`.-- `render.js` — `Board`: draws one board (a world module) for a camera `{x,y,z,r}`: laminate, copper (two-pass rim), traces, pads, vias, silk, glow (`acDashes`, `dcStream`, `flow`, `penFlow`, flashes), `texts()` for reading checks.-- `levels.js` — nested boards: `makeLevels`, `toChild`/`toParent`, `baseOf`, `drawLevel` (composites each visible child board into its footprint).-- `font.js` + `hanzi.js` — the routed monoline font; `drawText(ctx, str, x, y, cap, {sw, progress})` plots by stroke length.-- `parts.js` — footprints: `bridge` (diamond rectifier), `xformer`, `reactor`, `capBank`, `chip`, `ecap`, `xfmr`, `ground`, `tag`.-- `geo.js` — `octi` (0/45/90° routing through waypoints), `offset` (parallel lanes), `measure/at/sub`.-- `post.js` — key light, depth of field, motes, window light, vignette.-- Minimal new use: a world module exporting `BOARD`, `TRACES`, `PADS`, `SILK`, `LABELS` (e.g. three warehouses as pads joined by a bus, one `xformer` as a sorting hub) and a scene with one `dcStream` is a complete film board.+**Reusable as is** (no demo content inside):+- `render.js` — `Board(canvas, world, {unit, noDesig})`; `board.frame(cam, sc)` draws one board for a camera `{x, y, z, r}` (world centre, pixels per unit, rotation); `board.texts(cam, sc)` returns the label boxes for `window.TEXTS`; `camFor(worldPt, screenPt, z, r)` builds a camera that puts a world point at a screen point. `unit` is a typical feature size in world units: it sets where textures change octave and small features fade.+- `levels.js` — nested boards: `makeLevels`, `toChild`/`toParent`, `baseOf`, `drawLevel`. Needed only when one board sits inside another.+- `font.js` (+ your `hanzi.js`) — `drawText(ctx, str, x, y, cap, {sw, align, progress})`, `layout`, `textWidth`, `isHanzi`.+- `geo.js` — `octi` (0/45/90° routing through waypoints, `'d'` diagonal first), `offset`, `measure`/`at`/`sub`/`trim`, `frameAt`.+- `parts.js` — footprint builders returning `{pads, silk, keep, …anchors}`: `chip`, `ecap`, `xfmr`, `xformer`, `bridge` (with `flow` paths for conduction glow), `reactor`, `capBank`, `ground`, `tag`, `box`. Add your own the same way.+- `post.js` (key light, depth of field, motes, window light, vignette), `palette.js` (every colour).++**Demo content, to replace:** `main.js` (timeline, cameras, scenes, subtitles, sound events) and the world modules `world.js`, `city.js`, `house.js`, `charger.js`, `loss.js`. `render.js` also carries optional demo-specific keys, skipped when a world doesn't export them: `DAM` (the bare-copper bar), `GENS`, `PENS`, `RESERVOIR`, `RES_FLOW`, `TAIL`, and `sc.water` / `sc.gens`. `loss.js` is the smallest complete world module to read first.++**A world module** exports, in its own units:+- required: `BOARD {x0, y0, x1, y1, r, inset}`, `TRACES [{id, pts, w, layer?: 'bottom'}]` (add `m: measure(pts)` to any trace that carries light), `PADS [{x, y, shape: 'round'|'square'|'rect', r | w, h, hole?}]`;+- optional: `LABELS [{id, text, x, y, cap, sw, align}]` (plotted by `sc.labels[id]`), `SILK [{pts, w, plot?} | {circle, w}]`, `DESIG`, `KEEP` (extra clearances), `VIAS [[x, y, r, bore]]`, `HOLES`, `FIDS`, `TPADS` (pad grids lit by `sc.lit`), `TITLE`, clearances `RIVER`, `LAKES`, `SEA`, `STREETS`, `SLOTS`, `CLEARLINES`, sizes `CLR`, `VIA_R`, `FENCE_R`, `HOLE_R`, and functions `fence()` / `stitch()` returning via positions.+- `RIVER` entries are channels cut **out of the copper** (and are where `sc.water` flows): use them only for something that really is a gap in the board.++**A scene** is the plain object `frame` reads each frame: `{t, labels: {id: 0..1}, ac: [], dc: [], glow: [], flashes: [], lit, after}`.+- `ac` — `{trace, s0, s1, a, lam, amp, phase}` rocking dashes; with `fade` and `v` they travel forward and die away. `dc` — `{trace, head, s0, a, decay, floor, v, minPx, maxPx, headGlow}` a stream behind a head. Both are drawn in the current colour.+- `glow` — `{pts, w, a, c}` any polyline in any light colour, with the bloom; `flashes` — `{p, r, a, c: {h, g}, maxPx}` blooms at a point.+- `after(ctx, M, z)` — draws on top of the finished board (no bloom), for overlays such as a detail-callout circle.++**Your own flows and light, without changing the engine (one way of doing it):** a second flow along a trace (a signal, goods, water in a pipe) is built in your scene from `glow` and `flashes`: each frame cut the trace with `sub(trace.m, s0, s1)` into short pieces (a head, a fading tail, dashes moving at your speed) and push them as `glow` entries with the second light colour (`PAL.water.g` or your own), plus a `flash` with `c: PAL.water` at the head. A new kind of motion or a darkness that only the board (not the light) sits under needs a small hook in **your copy** of `render.js`, e.g. `if (sc.myLight) sc.myLight(glowCtx, z, t, vb)` at the end of `glowLayer` (it then gets the bloom), or a dark fill before the silkscreen pass; a darkening of the whole frame belongs in your `main.js` between the board stack and `post`.++**Page contract:** your `main.js` exposes `window.render(t)`, `DUR`, `TEXTS(t)` (collect `board.texts` for every level drawn), `EV`, `READY`, as in `core/README.md`. Motion blur averages sub-frames of `render(t)`; keep sub-frames within one shot.++**Check the lettering before building:** list every character used in `LABELS`, `DESIG` and silk text that is neither in `HANZI` nor in `GLYPHS` (e.g. a few lines in node importing `font.js`, or `isHanzi` plus the glyph table); the list must be empty.++**New hanzi** (`hanzi.js`): one entry per character, an array of strokes, each stroke a flat list `[x, y, x, y, …]` in a 12 × 12 box (y down), runs at 0/45/90° only. `font.js` chamfers right-angle corners and plots strokes in the order listed, so list them in writing order. A dot is a stroke about one unit long; a hook is a final short 45° run. Keep the same stroke width as the Latin: never vary width per glyph. One way to work:+1. Make a proof page in the project folder: for each character, a 12 × 12 grid, the character from an open-licence font (e.g. Noto Sans SC) faintly underneath as a structure reference, your routed glyph on top via `drawText` at a cap of a few hundred pixels; a second row without the reference; and once at the size it is used in the film. Render it with `core/render/still.mjs`.+2. Read the components and their proportions off the reference and route them by hand (not an automatic skeleton, which drops dots and merges strokes). Reuse shared components from glyphs you already have, so radicals match across the film (e.g. 氵, 扌, 亻 in the demo's `hanzi.js`).+3. Look at the proof image: every component of the reference present, nothing reads as a neighbouring character (声 vs 青, 手 vs 毛), simplified forms. Fix and re-render until it reads without the reference. If a character still won't read, choose another word.## 11. Variation spacediff --git a/styles/desktop-flythrough/DEMO.md b/styles/desktop-flythrough/DEMO.mdindex 5f5bdff..0cde087 100644--- a/styles/desktop-flythrough/DEMO.md+++ b/styles/desktop-flythrough/DEMO.md@@ -54,11 +54,11 @@ Fourteen lines, Chinese, voiced with edge-tts `zh-CN-XiaoxiaoNeural` at `+15 %`## Score structure-120 BPM, D major, a bar = 2 s from 0.0, one chord per bar. Under the voice: string pad, contrabass pizzicato on 1 and 3, a soft synthetic kick, shaker in eighths, a two-note marimba figure from the chord; the music ducks 16 dB while someone speaks and comes back up in the gaps. The marimba head (F♯–A B–D'–C♯') opens the film and returns, with claps, under the pull-back and the closing shot, resolving on a held D chord with horns and vibraphone; four glockenspiel notes on the four curtain-call hops. Accents: glockenspiel on the cat's pop, the badges, the ring and the sharp photo; timpani on the press and the close; a thump and two bell notes as the title lands. Foley comes from the page's events (pitched from `music/harmony.json`); whooshes from the measured camera speed. Mix before the master: −16.0 LUFS, true peak −3.1 dBFS.+120 BPM, D major, a bar = 2 s from 0.0, one chord per bar. Under the voice: string pad, contrabass pizzicato on 1 and 3, a soft synthetic kick, shaker in eighths, a two-note marimba figure from the chord; the music ducks 16 dB while someone speaks and comes back up in the gaps. The marimba head (F♯–A B–D'–C♯') opens the film and returns, with claps, under the pull-back and the closing shot, resolving on a held D chord with horns and vibraphone; four glockenspiel notes on the four curtain-call hops. Accents: glockenspiel on the cat's pop, the badges, the ring and the sharp photo; timpani on the press and the close; a thump and two bell notes as the title lands. Foley comes from the page's events (pitched from `music/harmony.json`); whooshes from the measured camera speed. Mix before the master: −16.0 LUFS, true peak −3.1 dBFS; after `mux.sh`: −14 LUFS, true peak −1.2 dBTP.## Palette & props-Paper mat #e2e8f5 with dots #c4cde3 on light oak; cards and screens near-white, ink #171c2e, accent cobalt #2f5bff (route, badges, send button, the lit window, the drawer), mustard for the bell and the data cubes, the photo's own orange, blue and green, red only for the weak signal bar. Set: two phone cards with full chat interfaces, the compress card with its press, a four-slab server tower with a drawer and an antenna, a title tent, name plates (in the wide shots), the closing title card; props: a pen, a sticky-note pad, a mug of coffee, earbuds with their cable, an eraser.+Paper mat #e2e8f5 with dots #c4cde3 on light oak; cards and screens near-white, ink #171c2e, accent cobalt #2f5bff (route, badges, send button, the lit window, the drawer), mustard for the bell and the data cubes, the photo's own orange, blue and green, red only for the weak signal bar. Type: IBM Plex Mono (labels, sizes), Instrument Sans (pills, titles, subtitles), Noto Sans SC (Chinese, and the fallback of both). Cast: the cat 16 × 16 at 0.0062 per pixel (≈ 0.10 wide, a third of the 0.30 phone card), its copy 8 × 8 at 0.0074 (≈ 0.06); in the closing wide view about 63 and 37 px wide. Set: two phone cards with full chat interfaces, the compress card with its press, a four-slab server tower with a drawer and an antenna, a title tent, name plates (in the wide shots), the closing title card; props: a pen, a sticky-note pad, a mug of coffee, earbuds with their cable, an eraser.## End card@@ -66,7 +66,7 @@ Over the closing wide view, under the title card in the middle of the desk, from## Build notes-- `sh styles/desktop-flythrough/demo/build.sh` (Chinese voice, the library demo) or `… build.sh en` (English voice): fonts (downloaded from Google Fonts and subset) → voice (`core/tts/tts_zh.py`, checked with `core/tts/asr_check.py`) → `audio/vo_timeline.py` (writes `src/vo.js` and `vo/timeline.json`) → events and camera speed → `audio/compose.py` → `audio/foley.py` → `audio/mix.py` → `core/render/video.mjs` → `core/render/mux.sh` → `readcheck.mjs` → poster and style frame. The voice step needs the internet (edge-tts).+- `sh styles/desktop-flythrough/demo/build.sh` (Chinese voice, the library demo) or `… build.sh en` (English voice): fonts (downloaded from Google Fonts and subset) → voice (`core/tts/tts_zh.py`, checked with `core/tts/asr_check.py`) → `audio/vo_timeline.py` (writes `src/vo.js` and `vo/timeline.json`) → events and camera speed → `audio/compose.py` → `audio/foley.py` → `audio/mix.py` → `core/render/video.mjs` → `core/render/mux.sh` → `readcheck.mjs` → poster and style frame. The voice step needs the internet (edge-tts). `tools/subset.py` runs before the voice here only because `src/vo.js` is committed; a new film subsets after `vo_timeline.py`.- Code: `index.html` → `src/main.js` (page contract, speed-capped shutter, `TEXTS`) → `src/film.js` (cards, tower, props, cast, timeline cued to the voice, sound events, reading boxes) and `src/shots.js` (camera keys); `src/captions.js` (subtitles, sign-off, `?nosub=1` for clean stills).- Reading time: `TEXTS` reports the title tent, the two sizes on the compress card, the server's name, the banner, 网慢, the two size tags, the closing title and the sign-off; subtitle cues follow the voice.- Pitfalls of these props: name plates show only in the wide shots; badges stay 3.4 s and leave before the camera moves on; the cat waits beside the photo bubble, not under the subtitle bar; the eraser sits clear of the closing title card.diff --git a/styles/desktop-flythrough/STYLE.md b/styles/desktop-flythrough/STYLE.mdindex 4d1cb5f..eff8195 100644--- a/styles/desktop-flythrough/STYLE.md+++ b/styles/desktop-flythrough/STYLE.md@@ -16,10 +16,10 @@ Not a screen recording (no cursor, no glowing monitor, no real app chrome or log## 2. Materials & rendering-- three.js, physically based, neutral tone mapping. Scale: a card is 0.3–0.7 units wide (1000 canvas px per unit); a character is 1/6–1/10 of a card's width; dots 0.03 apart.+- three.js, physically based, neutral tone mapping. Scale: a card is 0.3–0.7 units wide (1000 canvas px per unit); dots 0.03 apart. A character must be big enough to show its eyes: in the demo about 1/5–1/3 of the card it stands on (0.006–0.0075 units per pixel, so a 16-pixel sprite is about 0.1 wide); smaller casts lose their faces in a medium shot. A character may be scaled for a moment (`scale`) when the story needs it; it reads best on a beat, with a pop's overshoot.- **Light**: one directional sun low from the back-left (about 20° up, so a toy's shadow is two or three times its height), a 4096 soft shadow map that follows the camera target and resizes with distance; a cool-sky / warm-ground hemisphere fill, so shadows read blue and lit faces warm; a faint room environment for highlights; exponential fog thinned as the camera pulls back.- **Desk**: a dotted paper mat (a thin rounded slab whose size is a multiple of two dot spacings, so the printed dots line up with any 3D dots) on a procedural light-oak plane (planks, long soft grain). Soft window-light patches (blurred four-pane shapes, warm, additive, low opacity) lie under the cards. Props are plain primitives in matte or satin materials, placed so each close shot has something soft in front of or behind its subject.-- **Cards and screens**: a rounded slab plus a canvas texture on top with a faint deterministic grain. Print is flat: one ink, mono labels in spaced caps, bold numerals, thin rules; a card head carries two lines (English mono caps over the other language in bold). A phone is a card with a dark bezel and a whole interface: status bar, a header with a name, a few message bubbles, an input field and a send button. Redraw a canvas only when its state changes; quantise continuous changes.+- **Cards and screens**: a rounded slab plus a canvas texture on top with a faint deterministic grain. Print is flat: one ink, mono labels in spaced caps, bold numerals, thin rules; a card head carries two lines (English mono caps over the other language in bold). A phone is a card with a dark bezel and a whole interface of whatever app the story needs: a status bar, a header that names the screen, content filling the screen, controls at the bottom. Redraw a canvas only when its state changes; quantise continuous changes.- **Voxel cast**: instanced bevelled cubes per pixel; depth grows with distance from the silhouette; pure-black pixels are eyes, which protrude and blink (they take the colour of the pixel above). Rig: root (feet, yaw) → hinge (lying flat ↔ standing) → squash (scaled at the feet) → spin. State: `e` (0 flat sticker … 1 full toy), `hinge`, `sq`. The same picture at half resolution is the same character, smaller and chunkier.- **Props**: the same voxel recipe (crosses, ticks, bells) or plain rounded primitives (bricks, presses, drawers, towers, tent cards, stamps). Data that rises out of a card is extruded from its printed shape, so it still reads from above.- **Impact ring**: a thin accent-coloured ring spreads over the paper from an impact and fades in about a second.@@ -31,12 +31,16 @@ Not a screen recording (no cursor, no glowing monitor, no real app chrome or log- Two or three support hues for the cast and props, mid-saturated, never neon; one warm cast colour against the cool ground. **Red only for failure or trouble** (an error, a weak signal), **green only for success**; data in motion may take one bright support hue so it reads apart from the route.- Judge the rendered frame: avoid grey on grey; keep the vignette light and the shadows tinted by the sky fill.- Brand use: the brand colour becomes the accent; the brand's interface colours print on the cards; the ground stays light.+- Two example palettes besides the demo's (starting points, not a menu; the names are the keys of `COL` in `src/cards.js`):+ - *Lilac and violet* (creative tools, music, learning): paper `#e7e4f3`, dot `#cbc5e2`, card `#fcfbff`, ink `#1d1a2e`, mute `#807a96`, line `#e2dfee`, accent `#6b4ce6`; support apricot `#f39a5b`, sky `#5fb4e8`, lemon `#f2c94c`; red `#e2483d`, green `#3fa57a`; haze `#e8e4e6`.+ - *Cool grey and amber* (money, logistics, energy, food): paper `#e5e9ed`, dot `#c8cfd7`, card `#fdfdfc`, ink `#20252b`, mute `#7f8790`, line `#e0e4e8`, accent `#e8890c`; support teal-blue `#2f8fb0`, plum `#8a5a9e`, cream `#f4e3b5`; red `#d23a3a` (keep it clearly apart from the amber), green `#3c9c6e`; haze `#e6e4e1`.## 4. Type & subtitles- **In the world, only keywords and numbers**: step badges (a camera-facing accent pill with a digit and one word), sizes, a name on a screen, a banner, a title card. Text meant to be read is framed above the subtitle area, held still for its reading time, and large enough at the angle it is seen: flat print reads from 55–70° down; a low camera reads a standing tent card.-- **Titles are objects on the desk**: an opening tent card beside the first stop; at the end a large paper card dropped into the empty middle of the desk.+- **Titles are objects on the desk**: an opening tent card beside the first stop; at the end a large paper card dropped onto open desk in the final frame. Where depends on the layout: wherever it covers no station, route or character and sits clear of the subtitle bar (the demo's stops leave the middle free; a zigzag layout may leave the front edge). Leave that space when laying out the desk.- Every face on screen comes from the film's own font files (cards, pills, subtitles); the mono stack falls back to the film's CJK face, never to a system face.+- Three roles: a mono for labels and numbers (spaced caps), a sans with a heavy weight for pills, titles and subtitles, and a CJK (or other script) face both fall back to. The families are free (e.g. DM Mono or JetBrains Mono, Manrope or Space Grotesk, the Noto Sans of the film's language); the roles are not. Pixels belong to the cast, so no pixel font on the print.### Voice-over and subtitles@@ -68,13 +72,13 @@ Not a screen recording (no cursor, no glowing monitor, no real app chrome or log- One take, no cuts, no dissolves. Targets are live subjects; between keys the target follows a Hermite path with live end points; drift is a breath, not a handheld wobble.- At a key where a whip starts, the target rests first (or the camera stutters). A character's take-off is the natural start of a whip. A whip between far-apart stops arcs up mid-way so the stops in between stay in frame.-- Wide shots frame the stations to fill at least 70 % of the frame width. **The film closes on the whole desk**: every stop and the route in one frame, everything moving once, the title landing in the middle.+- Wide shots frame the stations to fill at least 70 % of the frame width. **The film closes on the whole desk**: every stop and the route in one frame, everything moving once, the title landing in open space.## 7. Sound palette- **Score**: bright and warm, acoustic in feel: marimba (with vibraphone under long notes), plucked bass, a soft synthetic kick (a short sine sweep), claps, shaker, a quiet string pad. One key, diatonic chords, about one chord per bar. Under a voice the score is a light bed ducked about 16 dB while someone speaks; the full mallet theme plays where nobody speaks.- **Foley**: every action has a sound. Pop: a marimba note from the current chord plus an upward sweep. Hop: a soft tick. Landing: a felt thump. Press or stamp: a low thump with a crumble. Typing: dry key clicks. Ding: two bell notes from the chord. Camera whip: a whoosh sized by the measured camera speed. Pitched foley takes its notes from the score's chord table and sits on the 16th grid.-- **Mix**: the voice leads (about −16 LUFS before delivery, −14 after); music 15–18 dB under the voice and lifted in the gaps; foley under the voice; true peak at or below −1.5 dBFS. The final chord holds to the last half-second.+- **Mix**: the voice leads (about −16 LUFS before delivery, −14 after); music 15–18 dB under the voice and lifted in the gaps; foley under the voice; the mix peaks under −1.5 dBFS and `mux.sh` masters it to −14 LUFS, true peak −1.2 dBTP. The final chord holds to the last half-second.## 8. Native moves@@ -86,7 +90,7 @@ Not a screen recording (no cursor, no glowing monitor, no real app chrome or log- **Data run.** A stream of small bright cubes runs along the route between two stations. *Fits content like:* a download; a sync; a payment going through.- **Blurry, then sharp.** A picture on a screen card is printed blurred, then snaps sharp as the toy lands in it. *Fits content like:* loading; focus; a draft becoming final.- **UI rises.** Part of the printed interface grows into 3D out of its printed shape. *Fits content like:* progress; a metric climbing; a step badge.-- **Curtain call.** The closing pull-back frames every stop; each hops once, left to right, the characters pop back up, and a title card drops into the middle. *Fits content like:* a recap; a team; a pipeline shown whole.+- **Curtain call.** The closing pull-back frames every stop; each hops once, left to right, the characters pop back up, and a title card drops into open space. *Fits content like:* a recap; a team; a pipeline shown whole.## 9. Pitfalls of the medium@@ -95,6 +99,9 @@ Not a screen recording (no cursor, no glowing monitor, no real app chrome or log- **A standing toy hides the row behind it**: place characters beside or behind the text being read, or off the card, and check every reading frame for overlap.- **Text under the subtitle bar or cut at the frame edge**: keep the fixed vertical offset; show name plates and labels only in the shots that frame them whole; take camera-facing pills away before the camera moves on.- **Screens that read as blank**: a phone card without a whole interface reads as an empty white slab in close-up.+- **Shadows of floating labels**: with the sun at 20°, a pill a few centimetres up throws a long shadow across the card and greys out its print. Labels and pills cast no shadow (`pill()` turns it on: set `castShadow = false`); a real floating object (a bell) may, but no shadow falls across text being read.+- **Characters lost in the wide**: on screen a character is about `width × 1080 / (2 · dist · tan(fov / 2))` px wide. In the closing wide view keep every character at least about 35 px wide (the demo's smallest is about 37 px); otherwise frame closer, bring it forward, or scale it up for the curtain call.+- **Voxels seen edge-on**: a standing sprite seen from far to the side reads as stripes and its eyes vanish; turn it towards the camera (`yaw`) for its key moments, and give a large picture-like sprite a thinner `depthK` (0.6–0.9).- **Whips over bare paper**: a fast move between far-apart cards crosses empty desk; arc it up so the stops in between pass through frame.- **Dead stations**: a stop where only the main action happens looks static; give it one or two small moving things that do not compete with what the voice says.- **Bars and ticks seen from above**: upright 3D bars and standing checkmarks turn into blobs in a top-down view; extrude them along the card or lay them flat.@@ -105,17 +112,23 @@ Not a screen recording (no cursor, no glowing monitor, no real app chrome or log## 10. Engine-In `demo/` (three.js r170 + Canvas 2D; page contract `render(t)`, `DUR`, `EV`, `TEXTS`):--- `src/world.js`: renderer, sun, fog and the desk (`makeWorld({ mat: [w, h] })` lays a dotted mat on light oak); `card(world, canvas, w, h, thick)`, `dotPatch()`, `pill()` (camera-facing label), `rbox()`.-- `src/cards.js`: palette, canvas helpers (`canvas`, `txt`, `tag`, `cardBase` with a two-line head, `grain`, `dotTile`, `tick`, `cross`).-- `src/voxel.js`: `makeMonster(art, cell, name, depthK)` → `set({pos, yaw, e, hinge, sq, tiltX, tiltZ, scale, vis})`, `blink(on)`.-- `src/anim.js`: `hops`, `squash`, `pop`, `beatBounce`, eases.-- `src/camera.js`: `makeRig(ctx, camera, KEYS, SHAKES)`, the live-target rig with resting keys, banking, shakes and the vertical view offset; `src/shots.js` holds the demo's keys.-- `src/post.js`: sub-frame accumulation, back-only depth of field, bloom, grade. `src/main.js`: the page, the speed-capped shutter and `TEXTS` (subtitle-free reading boxes projected from the world).-- `src/captions.js`: subtitle cues from the voice clock (`src/vo.js`, written by `audio/vo_timeline.py`) and the sign-off; `?nosub=1` hides both for clean stills.-- `src/film.js`: the demo's cards, tower, props, cast and timeline.-- `audio/`: `vo_timeline.py` (lines on the clock), `compose.py` (score with the library sampler), `foley.py` (foley from events, pitched from the chord table, whooshes from `tools/camspeed.mjs`), `mix.py` (voice, ducked music, foley).+In `demo/` (three.js r170 + Canvas 2D). Copy the folder into the project; the engine files work as they are, the film is yours to write.++- **Use as is**: `world.js`, `cards.js` (change only `COL`), `voxel.js`, `anim.js`, `camera.js`, `post.js`, `main.js`, `captions.js`, `tools/`.+- **Write your own**: `src/film.js` (cards, props, cast, timeline, events, reading boxes), `src/shots.js` (camera keys), `audio/vo_timeline.py` (its English lines, gaps and length are the demo's), `audio/compose.py` (score); adapt `audio/foley.py` (event types) and `index.html` (title, fonts; empty `#credit`, which holds the library's sign-off).++Conventions:++- **Space**: 1 unit = 1000 canvas px; the mat's top is y = 0; a card's top is at its thickness. Card print reads upright from the +z side (camera `az` 0): the canvas top points to −z.+- `world.js`: `makeWorld({ mat: [w, h], haze })` (mat sizes multiples of 0.06) → `{ renderer, scene, camera, sun, SUNDIR, tex }`. `card(world, canvas, w, h, thick)` → a group centred on the card, `userData.redraw()` after you redraw its canvas. `pill(world, text, { bg, fg, h, size, font, wt })` → a mesh; call `.face(camera)` every frame; it casts a shadow unless you turn it off. `rbox(w, h, d, r)` rounded box geometry. `dotPatch()` (lifted dots) is superseded by the flat ring (§9).+- `cards.js`: `COL` is the whole film's palette (the mat, dots and route read it too); `MONO`, `SANS`, `CJK` are font stacks named in `index.html`'s `@font-face`; `canvas(w, h, scale)` (draw cards at 3–3.4), `txt`, `tag`, `cardBase(c, w, h, en, other)`, `grain`, `tick`, `cross`.+- `voxel.js`: `makeMonster({ w, h, cells: [[i, j, '#hex']] }, cell, name, depthK)`; `j = 0` is the top row; pure black cells are eyes. The root sits at the centre of the feet; at `hinge = 0` the sprite lies face up on the paper with its head towards −z (so it reads as print). `set({ pos, yaw, e, hinge, sq, tiltX, tiltZ, spinX, spinZ, scale, vis })` defaults to a standing toy (`e = 1, hinge = 1`), so pass both for a sticker; `pos` is the feet. Also `.width`, `.height`, `.blink(on)`.+- `anim.js`: `BEAT` and `BAR` are fixed at 120 BPM; change them for another tempo. `hops(t, list, rest)`: `list` in time order, each `{ t0, t1, from, to, h }` starting where the last ended; returns `{ pos, air, dir, lands, takeoffs }`, and `squash(t, lands, takeoffs, air)` turns that into `sq`. `pop(t, t0, dur, jump)` and `beatBounce(t, t0, t1, amp)` return offsets: add their `y` to `pos.y`, multiply their `sq` into yours.+- `camera.js`: `makeRig(ctx, camera, KEYS, SHAKES)`; a key is `[t, target, dist, az, el, fov, offset?, { ease: 1 }?]`, the target a `Vector3` or the name of a live subject `ctx.subj[name](t) → Vector3`; `ease` makes the target rest there (put it where a whip starts). Shakes are `[t, amplitude, decay]`.+- `main.js` expects `film.js` to export `DUR`, `MAT`, `GLYPHS` (characters to preload), `VO`, `END` (`{ credit }`, past `DUR` when there is no sign-off) and `build(ctx)` → `update(t)`. `build` fills `ctx.subj`, pushes sound events `{ t, type, … }` into `ctx.ev`, sets `ctx.fx = { flash }` and `ctx.read = [[id, text, t0, t1, () => corners]]` (the world points of each text meant to be read, reported through `TEXTS`). It also defines `window.DBG(t)`, which `tools/camspeed.mjs` reads. `?n=` sets the sub-frames, `?nosub=1` hides subtitles.+- `captions.js`: cues from `VO` (`{ t0, t1, zh, en }`: `zh` is the spoken line, whatever the language).++Build order (the demo's `build.sh` is the template): fonts → voice (`core/tts`, checked) → `vo_timeline.py` (writes `src/vo.js`, `vo/timeline.json`) → `tools/subset.py` (it reads `src/*.js`, so run it after the subtitles exist) → `core/render/events.mjs` → `LIB=<library> node tools/camspeed.mjs` → `compose.py` (also writes `music/harmony.json`; `foley.py` reads one chord per 2 s bar) → `foley.py` → `mix.py` → `core/render/video.mjs` → `mux.sh` → `readcheck.mjs`; the `.srt` from `vo/timeline.json` with `core/render/srt.py`. Outside `styles/` the scripts' guess of the library root is one level off: export `LIB` and point `compose.py` at it.Minimal start: a to-do card and a calendar card; a ticket sticker pops on beat 1, blinks, hops to the calendar on beat 3 while the camera whips after it, and drops into a day as a printed tag.diff --git a/styles/isometric-picture-book/STYLE.md b/styles/isometric-picture-book/STYLE.mdindex fd8caf9..8aaa003 100644--- a/styles/isometric-picture-book/STYLE.md+++ b/styles/isometric-picture-book/STYLE.md@@ -5,7 +5,7 @@## 1. Essence, and what it is not-- **One real place, full bleed.** A platform, a gate, a cabin, a crossing, a counter: the ground runs off every edge of the frame. No floating board, no frame line, no vignette.+- **One real place, full bleed.** A platform, a gate, a cabin, a crossing, a counter: the ground runs off every edge of the frame. No floating board, no frame line, no vignette. A topic that travels (a parcel, a route, a production line) can still be one place: one continuous ground at one scale, with the stops along it (see §11); what breaks the look is a separate board, a map view or a change of scale for each stop.- **People are the diagram.** Slim figures seen from behind, no faces and no hands, move only when the rule says so. Who moves first, who waits, who sits is the information.- **Type lies on the ground.** Each idea is one key word or number painted on the floor, big and small sizes, one accent character, landing one character at a time.- **The cut-away.** Whatever stands between the camera and the action (a roof, a canopy, the top of a wall, a glass façade) is cut low or lifts off like a paper flap, so the camera always looks into the place from above.@@ -16,7 +16,8 @@ Not **Isometric Infographic**: that style builds a model on a floating board ove## 2. Materials & rendering- True isometric (axes at 30°), Canvas 2D, painter's sort. Every solid and every person is sorted by its **floor footprint** (x + y at floor level), never by the centre of its box: a seat back sorted by its centre height ends up drawn over the passenger sitting behind it.-- Solids are flat-shaded in **three tones per colour**: top lifted toward warm paper, +y face the base colour, +x face dropped toward a warm umber. Curved bodies (a fuselage, a column) are faceted and quantised to the same tones plus one in-between, so they read as round without gradients. No outlines on solids, no shadows, no textures.+- Solids are flat-shaded in **three tones per colour**: top lifted toward warm paper, +y face the base colour, +x face dropped toward a warm umber. Curved bodies (a fuselage, a column) are faceted and quantised to the same tones plus one in-between, so they read as round without gradients. No outlines on solids, no shadows, no textures, no highlight spots (a round tree crown or a ball is a flat disc or a faceted solid in the same tones, never a glint).+- **New objects** (vehicles, machines, buildings, trees) follow the same model: built from boxes, prisms and faceted solids at real size in metres, three tones from the kit's `tri()`, recognisable from their silhouette at a glance, simpler than the people. Vehicles read from the body (cab, cargo box, a band of the subject hue); wheels are small, low and mostly under the body in one dark tone, never thick drums or tyre-and-hub detail.- Ground surfaces carry only their functional markings (painted lanes, chevrons, lead-in lines, stop bars, seat squares) and a faint tile or slab grid.- **Cut-aways** are part of the model: the near wall is cut low and the far wall keeps its windows; a lid is its own solid with a paper-coloured underside, hinged on the far edge so it opens away from the camera; glass is a pale tint with thin mullions and is cut to a parapet whenever it would stand between the camera and type or people.- **People** are billboards anchored at their feet, about 1.6–1.8 m tall: a round hair-dark head with a sliver of skin at the ear, a two-tone torso, separate trouser legs, dark shoes, optional long hair or skirt, a rolling case. Seated people show only shoulders and the back of the head above a low seat back. Walking scissors the legs along the screen; arms counter-swing.@@ -26,14 +27,15 @@ Not **Isometric Infographic**: that style builds a model on a floating board ove## 3. Colour logic- A warm paper neutral for every ground (outdoor concrete a touch cooler, indoor carpet a touch warmer), one dark ink, **one accent reserved for the rule** (the key character, the "stand here" outline, arrows, a lit sign, the winning number, a stretch of floor that matters), one **subject hue** carried by the place itself (seats, livery bands, chairs in a paler tint, sign trim), one marking colour (lead-in lines, a tug, a baggage tractor). People wear four muted tops, so a filled room reads as an even four-colour weave.-- The accent never decorates; it appears only where the rule is.+- The accent never decorates; it appears only where the rule is. It stays small because its rarity is what makes the eye go to it: many frames carry none at all. A path in the accent marks the stretch being explained now (it grows ahead of the walker or the vehicle and fades behind it), not a trail left across the whole film.+- The subject hue and the marking colour must be clearly apart, in hue and in value, from the four tops: people have to stand out from the place they move through (a blue-green place swallows fog-blue people).- Shade toward warm umber and paper, never toward grey or violet: dirty shadows are the fastest way to lose this look.- Example palette: paper #F1E8D8, concrete #EAE2D3, carpet #F2E5CE, ink #2A2E29, accent persimmon #D0573A, subject green #3D6B59 / #A7C2B2, marking ginger #E2AE3A; tops ochre, fog blue, grey violet, oat.## 4. Type & subtitles- Chinese: a serif (Noto Serif SC, 700 for keywords, 500 for particles); Latin and numerals: a book serif (Newsreader). Open-licence fonts only, subset to the characters used.-- **Floor type**: big ≈ 1.5 m on the ground, small ≈ 0.8 m; read along the up-right axis. One phrase per beat; one line where the frame is tight. One accent character or number per phrase, never a single thin stroke (一 in the accent reads as a line, not a character). Characters land ≈ 0.14 s apart: fade and scale 1.22 → 1, pale ghost → ink. A painted title or a pair of numbers may scale up to ×1.6.+- **Floor type**: big ≈ 1.5 m on the ground, small ≈ 0.8 m; read along the up-right axis (coordinates in §10). One phrase per beat; one line where the frame is tight. One accent character or number per phrase, never a single thin stroke (一 in the accent reads as a line, not a character). Characters land ≈ 0.14 s apart: fade and scale 1.22 → 1, pale ghost → ink. A painted title or a pair of numbers may scale up to ×1.6.- Type sits on clear ground: nothing stands on it, nothing raised stands in front of it (see §9), at least 5 % from every frame edge, and clear of the subtitle bar.- Signs in the world (gate signs, group signs, screens) face the camera side of the room at the iso angle, never a flat card facing the lens.- Reading time: every piece of world text stays fully in frame ≥ CJK/4.5 + Latin/15 + 1.5 s.@@ -44,6 +46,7 @@ When the film tells something, a narrator says it and the picture shows it at th## 5. Motion quality+- **30 fps, on ones** (pass `--fps 30` to the render and to `mux.sh`): crowds and walks are judged frame by frame (§9), and the check assumes this rate.- People move only when the rule says so, in order; the order is the point. Walk ≈ 1.5 m/s; nobody moves faster than about 3 m/s on screen, even in a time-lapse: when a process must be compressed, show it as places filling (people settling into their seats) rather than people zipping past.- Everything eases; nothing pops. A beat = one floor phrase + one diagram mark (an outline traced, an arrow grown ahead of the walkers, a light run along a path) + one action.- A rewind runs the same motion backwards, faster, with a counter running down.@@ -54,13 +57,14 @@ When the film tells something, a narrator says it and the picture shows it at th|---|---|---|| slow drift and push (≈ 6–8 % zoom) | calm attention on one rule | a call, a waiting room, a hold to read || follow the head of a line | the order of things | a corridor, a boarding, a procession |+| travel along the ground at the subject's pace | one place after another on the same road | a delivery, a parade route, a line of workshops || rise to wide while a lid opens | revealing a space whole | an interior, a capacity, a grid of places || locked frame | judging, reading | a verdict, a comparison, the last frame || step back to frame one whole incident | cause and effect in one view | one person blocking, one door jamming || tilt down from outside to the people | arrival, cause → people | an opening, a change of place || scale jump (room → building → site) | the result in context | a verdict, an ending |-The angle never changes (iso is fixed); camera moves are translation and zoom. Every move is motivated by the action, and text and subject stay inside the frame at both ends of it. Transitions: a continuous move, a lid opening, a run back along the same path, or a cut on the beat at the same angle. No page turns, wipes, black or blank frames; a pull-out shows its next subject (a mark being drawn) within half a second.+The angle never changes (iso is fixed); camera moves are translation and zoom. Every move is motivated by the action, and text and subject stay inside the frame at both ends of it. Transitions: a continuous move, a lid opening, a run back along the same path, or a cut on the beat at the same angle. No page turns, wipes, black or blank frames; a pull-out shows its next subject (a mark being drawn) within half a second. A lid is a reveal only while it is seen: it finishes turning, paper side up, inside the frame before it glides off away from the camera.## 7. Sound palette@@ -80,30 +84,44 @@ Soft upright piano and vibraphone; a vibraphone note per landing character (keyw## 9. Pitfalls of the medium-- Anything raised by h metres covers the ground h metres up-left of it on screen: a glass wall, a raised walkway, a nose cone or a wing hides type that is metres away. Keep type on the side of the place away from tall objects, or cut those objects down.+- Anything raised by H metres hides what lies behind it (toward −x behind a face that looks +x, toward −y behind a face that looks +y): floor up to H metres back from a long edge, and a person standing there loses everything below the edge's top, vanishing completely within H − 1.7 m. It holds for low objects too: a 0.8 m belt or counter covers floor type 0.8 m behind it, a 3.2 m truck side hides people's legs up to 3.2 m behind it and whole people within 1.5 m, a glass wall or a wing hides type metres away. Keep type and the people who matter on the camera side of tall objects, or cut those objects down; check every frame in which a vehicle passes.+- A path that zigzags (turning at every vehicle or doorway) reads as noise; routes run along the world axes with few right-angle turns, and the walker or vehicle on them heads away from the camera (see the back-view pitfall below).- A crowd folded into a serpentine reads as a solid block; one straight line reads as order. Numbers on the floor beside each person need spacing wide enough for the label (about 1 m).- People walking toward the camera show a back view that looks wrong; route walks up-left, up-right or across.- Seated people disappear behind high seat backs: keep backs low enough that shoulders show.- Sorting boxes by their centre and people by their feet puts furniture over people (see §2).+- Colours passed to the engine as a bare hex string are shaded by `engine.js`'s own `tri()`, which darkens toward violet; always pass `kit.js`'s `tri(colour)` (warm umber). `iso.sphere` adds a white glint unless given `{ hi: false }`.- A simulated crowd sampled by rounding to frames steps on and off when replayed slowly; interpolate. Compressing a long process by moving people faster than ~6 m/s (0.2 m per frame) reads as teleporting.- A camera move can drag a sign or a word across the frame edge, and background details (a far sign, a row of labels) can appear half-cut at the edge of another shot: anything meant to be read needs both ends of the move checked, and background text belongs only to its own shot.-- Check a crowd film frame by frame, not by eye: `demo/tools/motion_check.mjs` renders every frame at 30 fps and lists jumps, stop-start stepping and people standing closer than a body width, from positions the film reports through a one-line hook (documented in the tool).+- Check a crowd film frame by frame, not by eye: `demo/tools/motion_check.mjs` renders every frame at 30 fps and lists jumps, stop-start stepping and people standing closer than a body width, from positions the film reports through a one-line hook (documented in the tool); copying it is in §10.## 10. Engine-- `demo/engine.js` (from iso-infographic): `Iso` with `P()`, queued `box/prism/cyl/bill` (use `bias` to sort solids by their floor footprint) and immediate `boxNow/prismNow/cylNow`.-- `demo/kit.js`: palette, warm three-tone `tri()`, `facet()` (flat-toned polygon by normal), `onPlane()` (draw in metres on a floor or wall plane), `phraseLayout()` / `floorType()` / `phraseBox()` (floor type and its reading box), `drawPerson()` (walk, case, lift), `drawSeated()`, `subtitles()` (two-line cues, hard switch).-- `demo/plane.js`: an extruded and lofted fuselage, the cut-away cabin (`cabinBack`, `cabinFront`), the hinged flap (`lid`, `lidMap`), wings, a rear-engined T-tail, a jet bridge and a tug.-- `demo/places.js`: apron markings, a gate with a glass wall whose height can drop to a parapet (`gateWindow`), painted lanes, group signs, chairs, a line of numbered squares, a baggage train.-- `demo/film.js`: a timeline built from narration line lengths, a deterministic queue simulation (blocking, stow, sit) sampled with interpolation, `seatIn()` and `stowState()` for sitting and stowing, shot functions, `texts()` for readcheck.-- `demo/tools/motion_check.mjs`: the crowd check above.-- Minimal example, not in the demo: a lift lobby with two painted lanes, `floorType()` with 先下后上 on the floor, people billboards stepping out of a box car before the waiting line steps in.+**Copy as they are** into the project folder (they hold no demo content): `demo/engine.js`, `demo/kit.js` and `demo/tools/motion_check.mjs`. `kit.js` re-exports what you need from `engine.js`, so a film imports from `kit.js`. `main.js` and `index.html` are a short page shell (fonts loaded, then `window.DUR`, `SHOTS`, `TEXTS`, `render`, `READY`, as `core/README.md` describes) to rewrite with your own fonts and characters.++**Demo-only, read for technique, don't reuse as props:** `plane.js` (a lofted fuselage, a cut-away cabin, a hinged flap `lid` / `lidMap`), `places.js` (apron markings, a glass wall that drops to a parapet, painted lanes, signs, chairs), `film.js` (a timeline built from narration line lengths, a deterministic queue simulation sampled with interpolation, sitting and stowing, `texts()` for readcheck).++**What the kit gives:**+- World: metres; x runs down-right on screen, y down-left, z up; depth toward the viewer is x + y + z. `kit.js` exports one shared `iso`: set `iso.g = g` and `iso.cam = { x, y, z, k }` each frame (k = pixels per metre; the camera only translates and zooms).+- Solids: queued `iso.box(x, y, z, w, d, h, tri(c), o)`, `prism(footprint, z, h, …)`, `cyl(…, { axis })`, `cone`, `roof`, drawn by `iso.flush()`; `*Now` versions draw at once (inside a cut-away, between back and front walls). `o.bias` corrects the sort: the queue sorts by the box's centre, people by their feet, so a solid that should sort by its footprint gets `bias = −(z + h/2 − floor height)`. `o.faceColor`, `o.decal` for a lit face or markings on it.+- `facet(g, pts3, tri, { out })`: any flat polygon in metres, toned by its normal (`out` points outward), for curved bodies and lids.+- `onPlane(g, x, y, z, plane, fn)`: draw in metres on a plane: `'xy'` floor (u = −y, v = +x), `'yz'` wall facing +x (u = −y, v = −z), `'xz'` wall facing +y (u = +x, v = −z). Markings, signs, windows and screens go through it.+- Floor type: `phraseLayout(P)` with `P = { x, y, z, t0, t1, step, scale, lines: [[[text, kind], …], …] }` (kinds: `B` big ink, `A` big accent, `s` small, `n` / `na` / `ns` numerals, `e` / `en` Latin), then `floorType(g, t, P, L)` every frame. The first line's baseline lies along x = P.x and reads from y = P.y toward −y (up-right); its glyphs fill x ∈ [P.x − size, P.x], and later lines step toward +x. `phraseWorld(P, L)` returns the floor rectangle (keep it clear, §4 and §9), `phraseBox(P, L)` the screen box for `texts()`.+- People: `iso.bill(x, y, floor z, gg => drawPerson(gg, p, pose))` with `p = { h, top, legs, skirt?, hairLong?, bagc? }` (tops and legs from `TOPS` / `LEGS`) and `pose = { walking, phase, bag, lift }` (walk, rolling case, case raised overhead); `drawSeated(gg, p)` for shoulders and head above a seat back. Push `globalThis.__POS?.push({ i, k: 'w' | 's', x, y, a })` where each person is drawn, for the motion check.+- `subtitles(g, t, cues)` (two lines, hard switch) and `subtitleBox()` for the margin check; `tri()`, `C`, `mix`, easing (`ss`, `eo`, `eio`, `seg`).++**What a new topic builds itself:** the place (its ground, markings, cut-away buildings), its vehicles and machines (§2), and any pose beyond walking, carrying a case and sitting. A pose is made like `drawPerson`: a billboard in metres, back view, no face or hands, parts as flat shapes in the top's three tones (a rider, for example, is the seated torso raised to the saddle with two leg quads that swap with the pedal phase). A lid on any building is a `facet` roof turned about its far edge, as `lidMap` does.++**Motion check:** in the copy of `motion_check.mjs`, point the `page.mjs` import at the library's `core/render/page.mjs` (from `films/<name>/tools/` that is `../../../core/render/page.mjs`; outside a clone, an absolute path), then `node <project>/tools/motion_check.mjs <project> --fps 30` from the library root.++Minimal example, not in the demo: a lift lobby with two painted lanes, `floorType()` with 先下后上 on the floor, people billboards stepping out of a box car before the waiting line steps in.## 11. Variation spaceThe agent decides the place, its cut-aways, the cast size, the rules and their order, the narration, the camera path, the pacing and the palette within the colour logic.-- Structures: one rule shown right once; the same group doing it two ways and compared (rewind between); a day in one place as five small rules.+- Structures: one rule shown right once; the same group doing it two ways and compared (rewind between); a day in one place as five small rules; one thing travelling through several stops, one small rule each.+- A travelling topic is one way among others to stage, not a required form. One option: lay the stops along one continuous street, yard or hall, each a cut-away building or a marked stretch of the same ground, and join them with the travelling move, a run back along the path, or a cut on the beat at the same angle; keep each stop to one action and one floor phrase.- Openings: the place empty, then people arrive; the title painted on the ground as the first person walks over it; a tilt down from the building to the room.- Endings: the place empty again with the rule left on the floor; a scale jump out to the building; the last person stepping onto the outlined spot.diff --git a/styles/printed-long-take/DEMO.md b/styles/printed-long-take/DEMO.mdindex 60a0aa9..fb3e345 100644--- a/styles/printed-long-take/DEMO.md+++ b/styles/printed-long-take/DEMO.md@@ -68,7 +68,8 @@ Cut into the day sky as an ink plate over the still wide shot, upper right and a- `sh styles/printed-long-take/demo/build.sh` makes `printed-long-take.mp4` with the English narration; `sh styles/printed-long-take/demo/build.sh zh` makes `printed-long-take-zh.mp4` with the Chinese one. Steps: font subset (`tools/subset.py`, Noto Serif SC 700 from github.com/google/fonts), narration with edge-tts into `voice/<lang>/` and `asr_check.py`, `events.mjs`, `audio.py [zh]` → `mix.wav`, `video.mjs`, `mux.sh`, `tools/srt.py` → `printed-long-take.srt`, `readcheck.mjs`, poster and style frame at 15.4 s.- Files: `index.html` → `scene.js` (renderer, print pass with the subtitle bar, flocks, cameras, sky state, the bridge slow-down `WARP`, `window.TEXTS`, `window.EV`), `timeline.js` (every time and `VO`), `world.js` (terrain, river, volcanoes, trees, bridge and pier, field, `Flock`), `look.js` (materials), `textures.js` (atlases), `props.js` (plate, dial, board, sky type), `audio.py` (narration, score, foley, ducking), `lines_zh.json`, `lines_en.json`, `voice/*/dur.json`, `FACTS.md`, `CREDITS`.-- The subtitle bar is timed on the Chinese reading (`voice/zh/dur.json`) in both versions; English lines finish inside the same cues.+- The subtitle bar is timed on the Chinese reading (`voice/zh/dur.json`) in both versions; English lines finish inside the same cues. Its band is 62% ink here, over a mostly dark picture; STYLE.md asks about 80% for pictures with more paper.+- Rendered at 30 fps (`FPS=30` in `build.sh`), the style's output rate; the print pass's 12 Hz flicker is in `printMat` (`tf`), not tied to it.- `readcheck.mjs` passes on every word in the world (17 pieces). The subtitle bar follows the speech and is left out by its contract; `?subs=1` reports it too.- `?atlas=crane|tree|mist|sun` shows an atlas; `?cam=x,y,z,tx,ty,tz` overrides the camera to check a frame.- Demo-specific pitfalls: the plate and the board must stay fully in frame through their holds; trees are cleared along the camera path (`clearPath`) so the low glide never passes through a crown; the print shot renders two passes during each peel; any time after 10 s written in `timeline.js` is on the timeline before the bridge slow-down.diff --git a/styles/printed-long-take/STYLE.md b/styles/printed-long-take/STYLE.mdindex c7fa0e1..10f4999 100644--- a/styles/printed-long-take/STYLE.md+++ b/styles/printed-long-take/STYLE.md@@ -8,7 +8,7 @@- **Only ink, paper and one red.** Every value is either ink or paper; grey exists only as a density of lines. One red is reserved for one small subject. A warm yellow may appear for the sun, a lamp or one material, never as a second accent.- **Tone is cut, not shaded.** Shadow sides of hills carry knife lines that run down the fall line; skies are parallel horizontal cuts whose width makes the light; snow is paper with a few drift strokes; water is ink with cut ripples.- **Real depth, flat marks.** The scene is built in 3D (terrain, rivers, thousands of trees, buildings), but every surface is drawn with flat marks fixed in world space, so the layers slide past each other like a printed diorama.-- **At least three layers in every frame:** sky / a mountain or forest band / a middle ground of fields, water or snow / a foreground of branches, fences or posts. Ink and paper roughly half and half.+- **At least three layers in every held frame:** sky / a mountain or forest band / a middle ground of fields, water or snow / a foreground of branches, fences or posts. Ink and paper roughly half and half. A pass through steam or a structure is exempt for its half second; an opening inside one material (a cloud, the dark) finds its layers in that material (near wisps rushing past, the body, a gap to what lies beyond) within about a second.- **One continuous move** carries the story; cuts are rare and designed.Not woodcut (flat printed blocks, a mostly static camera, one block per image). Not ukiyo-e (flat colour fields, no depth travel). Not a toon-shaded 3D game (no smooth shading, no gradients, no specular). Not a pencil sketch (no hatching that follows form loosely; every line is a knife cut with a blunt entry and a tapered exit).@@ -16,6 +16,7 @@ Not woodcut (flat printed blocks, a mostly static camera, one block per image).## 2. Materials & rendering- **Render model:** three.js scene at 2× supersampling, box-filtered down in a final print pass. Every material is a small shader that decides "ink or paper" per pixel; there is no lighting except one direction used to choose lit and shadow faces.+- **Two kinds of field.** Every surface is either a paper field carrying ink cuts (lit faces, snow, sand, cloud, foam, steam) or an ink field carrying paper cuts (shadow faces, sky, water, forest, night). A cloud is paper with a few horizontal ink cuts on its underside, not a reversed sky as densely cut. Tone inside a field comes only from the width and density of the cuts.- **Faceted terrain:** mountains and volcanoes are low-poly cones with flat facets. Lit facets are paper with a few fine ink cuts near the terminator; shadow facets are ink with paper cuts running down the slope. Cut spacing is fixed in world units so lines never swim when the camera moves.- **Sky in direction space:** a sphere that travels with the camera; cuts are rows of constant elevation, so they stay horizontal and never slide with translation. Night = sparse wavy wind cuts and square stab stars; day = dense parallel cuts, thicker near the horizon. Words in the sky are plates hung in the same direction space.- **Billboard atlases drawn on canvas:** trees (pines, frosted deciduous trees), animals, steam. Cylindrical billboards for anything standing, spherical with a screen rotation for anything flying. Sample the atlas with a negative mip bias and alpha-test so thin shapes survive at distance.@@ -26,7 +27,7 @@ Not woodcut (flat printed blocks, a mostly static camera, one block per image).## 3. Colour logic- Two values carry everything: ink (a warm black) and paper (a warm off-white). Never pure black or pure white, never a third grey fill.-- **One red, reserved for one subject**, kept small (a crown, a lamp, a flag) and never smaller than about 3 px at 1080p; enlarge it a little rather than lose it.+- **One red, reserved for one subject**, kept small (a crown, a lamp, a flag) and never smaller than about 3 px at 1080p; enlarge it a little rather than lose it. It may carry into the subject's own trace (its ripple, its trail), never onto another object. A flat stab: no outline, highlight or gradient, a thin paper ring only where it sits on ink. When the take follows the red through steam or a whiteout, the red stays on top of the paper.- A warm yellow is allowed for light itself (sun disc, its road on water, warm cuts in a dawn sky, a lamp) and one material at most. It never fills a large area except that one material.- Value order by depth: far mountains paper with ink shadow facets; forest bands solid ink; the middle ground paper; foreground ink silhouettes. Keep the subject on the opposite value of what lies behind it.- Example palette: ink `#16171b`, paper `#ede5cd`, red `#c4332b`, yellow `#dfa443`.@@ -45,12 +46,12 @@ When the film tells a story with a narrator:- **Speech and picture move together.** Each line is spoken while the shot shows what it names; the long take keeps going under the voice, and the silent stretches (a hold to read, a pass through a structure, a flock taking off) are left without words.- **Words in the world carry only keywords and numbers** (a count on a board, a date on a seal). The sentence is in the voice and the subtitle, not on the props.-- **One subtitle bar per spoken line**, at the bottom inside the 5% safe area: one Chinese line above one English line, never wrapped, in the film's serif, paper letters on a translucent ink band. It appears with the line and leaves with it; keep the subject of each shot above it.+- **One subtitle bar per spoken line**, at the bottom inside the 5% safe area: one Chinese line above one English line, never wrapped, in the film's serif, paper letters on an ink band about 80% opaque (thinner bands vanish over paper). It appears with the line and leaves with it; keep the subject of each shot above it.- A second-language version swaps only the voice: the same picture, the same bilingual bar, each line starting at the same moment, finished before the next one starts.## 5. Motion quality-- The camera moves continuously and slowly; the world moves on ones. The print pass flickers on twos (12 fps), so the image breathes like a worn sheet.+- **Output 30 fps** (`--fps 30` for `video.mjs` and `mux.sh`). The camera and the world move on every output frame. Separately, the print pass steps its paper flicker and blotches at 12 Hz inside the shader (`floor(t*12)/12`), whatever the output rate, so the image breathes like a worn sheet.- Easing: long monotone curves; the camera keeps momentum through key positions and decelerates into every hold. No bounce, no shake except one frame for an impact.- Animals are flat silhouettes with three or four poses per action (sleep, wake, call, peck, walk, run, three wing frames, land, leap, bow). Wings cycle on fixed frames; never morph between poses.- Steam, snow and splashes are paper marks: horizontal cut wisps, square stabs, short arcs.@@ -70,6 +71,8 @@ When the film tells a story with a narrator:Framing: the horizon sits on a third; the subject is never smaller than 1/20 of the frame height when it must be recognised; words stay inside the frame with a margin of 5% and never cross another object. Allowed transitions: through a structure, through steam or snow (under half a second of white paper), a match on a falling or rising subject, a sheet peeled from the corner, a seal. Forbidden: fades to black, cross-dissolves, slides, page flips, zoom cuts.+Fitting the high wide to the terrain (options, not a recipe). The sky is in frame only while the camera's pitch plus half its vertical field of view stays above the horizon, so a steep look down at a valley right below loses the sky. Ways round it: stand the camera farther back and higher on a longer lens, so the subject sits at a shallower angle below the horizon; take the printmaker's licence and stretch horizontal distances or compress heights, since each layer is a plane; break a far plane that fills the frame (a sea, a plain) into bands with headlands, islands, boats or tiers of cut density. When the sky is out of frame and words are needed, carve them into something in the world that faces the lens (rock, board, hull, a mark on the water), let the take tilt up into a hold where the sky returns, or keep the words for a later shot where the sky is in frame.+## 7. Sound palette- Three layers. **The world:** the matter of the place (water under ice, frost cracking, wind in three weights, wings, steps on snow, small animal sounds). **The print:** knife through paper or wood, a block's thump, a sheet torn away, a seal pressed; used only on transitions and verdicts, never as a bed. **Music:** a small chamber group of real samples.@@ -96,17 +99,34 @@ Framing: the horizon sits on a third; the subject is never smaller than 1/20 of- **Sliding lines.** Any cut spaced in screen space swims as the camera moves; anchor cuts to world space (or direction space for the sky).- **The road look.** A dark river with a pale bank lip and regular dashes reads as asphalt. Break the rhythm of bank marks and keep the lip narrow.- **Small subjects vanish.** Real-scale animals disappear in a wide frame; draw distant ones up to 3× larger (a printmaker's scale), keep the red at its minimum size.-- **Camera through solids.** Clear trees and posts from the camera path before placing scenery; check every low pass frame by frame.+- **Camera through solids.** Clear trees and posts from the camera path before placing scenery; check every low pass frame by frame. The same holds for every small scatter (reeds, stones, fence posts, grass): one within a metre or two of the lens fills the frame with ink. Sample the camera path and clear every instance inside a radius of it, give near sprites a dithered fade, then step stills through the low passes (`still.mjs --range a:b:0.1` and a contact sheet) and look for frames that are nearly all ink or all paper.+- **Empty paper close up.** A lit facet near the lens becomes a blank sheet. Make facets smaller near the camera path and give near lit faces their few ink cuts, grit or tufts.+- **Words on a moving take.** `readcheck` counts only the first stretch in which a piece is fully in frame, and knows nothing of occlusion or size. Report each piece in `TEXTS(t)` only inside its planned hold, when it is in frame, unobstructed and large enough to read; ease the camera into a hold or slow the clock for it.- **Too many greys from post.** Vignette and blotches darken the paper and make the print look dirty; keep them light.## 10. Engine-- `demo/look.js`: every material. `carveMat(scale)` (faceted terrain cuts), `skyMat` (direction-space sky with `uFront` for carving, `uDense` for day, and `typePlate` for words in the sky), `groundMat(mask, rect)` (snow with a river cut out), `waterMat`, `bankMat`, `concreteMat`, `woodMat`, `billboardMat(tex, mode, opts)` (cylindrical or spherical, `fade` near the camera), `reflectMat`, `crownMat` (minimum-size red points).-- `demo/textures.js`: `pineAtlas`, `frostTreeAtlas` (drawn at 2×), `craneAtlas` with `POSE` and `HEAD` (silhouette poses and where the red sits), `mistAtlas`, `moonCanvas`, `sunCanvas`, `cut()` (the knife stroke used everywhere).-- `demo/world.js`: `buildWorld(scene, proj, clearPath)`, the river ribbon and mask, `volcano(cx, cz, h, r, seed, crater)`, belts and thickets, `Flock` (instanced birds with crowns and reflections, printmaker's scale by distance).-- `demo/props.js`: carved type on canvas (`carvedText`, `plateCanvas`, `boardCanvas`, `skyTypeCanvas`).-- `demo/props.js`, `demo/textures.js` and `demo/look.js` are all the drawing; `demo/scene.js` holds the subtitle bar (`SUBS`, `drawSub`) and the time warp that slows one stretch of the take (`WARP`).-- Minimal example, not in the demo: a lighthouse on a cliff at night: `volcano(0, -800, 120, 400, 7, .8)` for the headland, a white cylinder with `concreteMat`, one red lamp as a `crownMat` point, sea as `waterMat` on a wide ribbon, `skyMat` with `uFront` rising for dawn.+The demo's code splits into a print kit any film can copy and the crane film's own world. Copy files into the project folder; nothing here is a library import.++**Copy as is (any topic):**+- `demo/scene.js`, the render set-up and the print pass: 2× render targets `rtA`/`rtB` and `printMat` (fibre, ink mottling, top blotches, the 12 Hz flicker, vignette; `uWhite` the steam whiteout, `uPeel` with `tB` the sheet peeled onto a second render, `uFresh` ink not quite taken, `tSub` the subtitle canvas laid on last). The demo's whiteout eats the red too (there it is a cut); when the take follows the red through it, mask the red out of `uWhite`. Also the reading-check helpers `boxOf`, `meshBoxes`, `skyBoxes`, and `WARP` (slows one stretch of the clock and moves `TEXTS`, `EV` and the subtitles with it).+- `demo/look.js`: the inks `C` and shared uniforms `U` (`uL` the one light, `uWarm`, `uSun`, `uCam`); `carveMat(scale)` for any faceted solid (fall-line cuts from the face normal: mountains, cliffs, rocks, dunes, roofs); `skyMat` (rows of constant elevation, `uFront` carving the dawn, `uDense` day, `uStars`, and two type plates `tType1/2` with `uRect = (az0, el0, az1, el1)` in radians of absolute direction and `uAmt` the reveal; below the horizon it draws paper); `billboardMat(tex, mode, {fade, warm})`; `toonMat`, `woodMat`, `concreteMat`, `inkMat`, `paperMat`, `hullMat`. `woodMat` and `concreteMat` paint top faces paper (snow) and `concreteMat` has a frozen splash band near the demo's water line: change both for a snowless or dry place.+- `demo/world.js`: `canvasTex(c, mips)`, `billboards(count, mat, pivotBottom)` and `fillBoards(mesh, [[x, y, z, w, h, tile, rot]], cols, rows)` for instanced sprites; `volcano(cx, cz, h, r, seed, crater)` (a faceted cone, not exported). `demo/textures.js`: `cut()` (the knife stroke for anything drawn on canvas), `mistAtlas`, `sunCanvas`, `moonCanvas`. `demo/props.js`: `skyTypeCanvas(lines)` and the `carvedText` it uses (not exported).++**Demo content (read, don't reuse):** `buildWorld` (the whole valley), the river (`RIVER`, `riverDist`, the mask), `groundMat` (snow cut by the river mask), `waterMat` (needs the river's `aRiv` along/across coordinates, so it draws a channel, not a sea), `bankMat`, `iceMat`, `reflectMat`, `crownMat` and `Flock` (bound to the crane atlas, its `HEAD` table and its poses), `pineAtlas`, `frostTreeAtlas`, `craneAtlas`, the plate, dial and board canvases. `crownMat` shows how to keep a red point at a minimum pixel size (`gl_PointSize = max(px, uMin)`); use the idea for your subject.++**What a new topic writes itself:** its ground and terrain (a heightfield or faceted meshes under `carveMat`), its water if any (a sea or lake in world `xz`, with cuts along the wave crests), its subject and scatter atlases drawn with `cut()`, its red mark, its props with words, its `buildWorld`, camera keys and `TEXTS`. A workable order: style frame of the terrain and sky with the print pass, then the subject and its red, then the camera path, then clearing and near-lens checks, then words.++**Rules for a new material** (the look depends on them):+- Choose its field first (§2): paper with ink cuts, or ink with paper cuts.+- Cuts follow the matter: down the fall line on slopes, horizontal in sky, cloud and still water, across the flow in running water, along the crests for waves, along the grain or course for wood and stone, along drifts or furrows on flat ground.+- Spacing is in metres (or radians for the sky), anchored to world or to the object's own coordinates; moving matter may slide along its own coordinate with time.+- Light chooses lit or shadow per face from `uL` with a threshold; no gradient inside a face.+- Fade with distance: once a quarter of a row or more passes in one pixel (`fwidth` of the row coordinate), let the cuts go to the field's value, as `waterMat` does (`k *= 1. - smoothstep(.25, .7, aa)`).+- Flat ground carries sparse, irregular marks; a regular rhythm reads as a road or a grid.+- The red never enters a material; it is its own mark on top (§3). The yellow only for light or the one material.++Minimal example, not in the demo: a lighthouse on a headland at night. A copied `volcano(0, -800, 120, 400, 7, .8)` for the headland under `carveMat`, a cylinder under `concreteMat` without its snow and ice lines, one red lamp as a minimum-size point, a new sea material (ink, paper cuts along the swell, fading to solid ink with distance), `skyMat` with `uFront` rising for dawn, all through the copied print pass.## 11. Variation space