Skip to content

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 种现成风格,也能做出你自己的

Evidence Films ready for the skill: sources and licences per style, clean-clone builds, README news

lemomo-ai474302d6c81a
diff --git a/README.md b/README.md
index 4f02914..ec39070 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ Pick a style, bring your own story, and let your coding agent direct the film.<b
<sub>Official repo: [github.com/lemomo-ai/lemo-opuscar](https://github.com/lemomo-ai/lemo-opuscar) · by Lemomo ([@lemomo_ai](https://x.com/lemomo_ai))</sub>
-**New: [all 98 styles of OPUSCAR 98](https://lemomo-ai.github.io/lemo-opuscar/opuscar98/#styles)**: for every film, its style (2D or 3D), a frame, a style prompt you can reuse, and how its shots were directed.
+**New: [Evidence Films](https://lemomo-ai.github.io/lemo-opuscar/#evidence-films)**, a new category of 8 styles that film real material: satellite imagery, laser scans, open city data, open-hardware CAD, microscope slides, archive plates. Every number on screen is measured or sourced. [See them below](#evidence-films).
</div>
@@ -78,6 +78,8 @@ Films go into `films/<name>/` inside the repo.
> Make a 45-second film in the **watercolor** style about the coffee farm my family runs. Warm female narrator.
+> Make a 40-second **LiDAR Survey** film about the old quarry in the hills behind our town, from public laser-scan data.
+
Name the style in English or Chinese; the [style index](styles/README.md) lists them all.
It asks you once, up front: anything it can't decide about your topic, whether you have your own **voice, music or other material**, and whether you want to see a **storyboard** first. Say yes and it stops once to show you the key shots in the real style; otherwise it goes straight to the finished film.
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 58205ac..74ae5dc 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -12,7 +12,7 @@
<sub>官方仓库:[github.com/lemomo-ai/lemo-opuscar](https://github.com/lemomo-ai/lemo-opuscar) · 作者 Lemomo([@lemomo_ai](https://x.com/lemomo_ai))</sub>
-**最新:[OPUSCAR 98 的 98 种风格全部公开](https://lemomo-ai.github.io/lemo-opuscar/opuscar98/#styles)**:每部片的风格(标明 2D 还是 3D)、截图、可以直接拿去用的风格提示词、镜头设计和导演编排。
+**最新:新分类[「实证影像」](https://lemomo-ai.github.io/lemo-opuscar/#evidence-films)上线,共 8 种风格**:拍的都是真实素材,包括卫星影像、激光扫描、开放城市数据、开源硬件 CAD、显微切片和档案底片,画面上每个数字都是实测的或有出处。[往下看](#实证影像)。
</div>
@@ -74,6 +74,8 @@ claude
> 用**油画厚涂**风格做一支 30 秒的片子,讲我家那只每天在窗台等我下班的橘猫。
+> 用**点云测绘**风格做一支 40 秒的片子,讲我们镇后山那座废弃的采石场,数据用公开的激光扫描。
+
风格用中文名、英文名或文件夹名都行,全部风格见[风格索引](styles/README.md)。
它开工前只问你一次:主题里它定不了的事、你有没有自己的**配音、音乐或其他素材**、要不要先看**分镜故事板**。要看的话,它会停一次,给你看用真实风格画出来的关键镜头;不看就直接做完成片。
diff --git a/TECHNIQUE.md b/TECHNIQUE.md
index 30fd18d..b585302 100644
--- a/TECHNIQUE.md
+++ b/TECHNIQUE.md
@@ -26,6 +26,8 @@ Everything else installs in tiers, from the library root (`$LIB` in skill mode).
| `sh tools/fetch.sh instruments <lib>` | a sample library: `freepats`, `karoryfer`, `salamander`, `vcsl`, `vsco2ce` or `all` | 70–400 MB each |
| `sh tools/fetch.sh hdri` | HDRIs for 3D styles | 12 MB |
+Some styles need packages of their own (a LiDAR reader, a slide-scan decoder, a CAD importer); the style's `STYLE.md` lists them. They are packages, not system tools: install them yourself into a private venv or `node_modules` in the project folder, never into `$LIB/.venv`.
+
A synthesized score needs no big download; `sampler.py` names the library to fetch when an instrument is missing. A pack needs about twice its size free while it unpacks. Downloads come from npm, PyPI, GitHub Releases and Hugging Face (`HF_ENDPOINT` sets a mirror).
## 2. The picture is a function of time
@@ -140,7 +142,9 @@ Write an original score from the cue map, in the instruments of the style's soun
## 11. Assets, credits and fonts
-Only CC0, CC BY or OFL material, each listed in the film's `CREDITS` with its source and licence; `core/audio/sampler.py credits(names)` writes the lines for the instruments you used.
+Only CC0, CC BY or OFL material, each listed in the film's `CREDITS` with its source and licence; `core/audio/sampler.py credits(names)` writes the lines for the instruments you used. Public-domain works count as CC0; "no known restrictions" does not. Data or images under other open licences (ODbL, CC BY-SA, open-hardware licences) only after you have named the licence and its terms (attribution, share-alike) to the user and they agree. The user's own material is fine as it is.
+
+A film that states facts (the Evidence Films styles) keeps a `FACTS.md` in the project folder: each claim with its source URL and the quoted wording, or the measurement that produced it.
Fonts: Google Fonts (OFL), self-hosted in the project. The typefaces a `STYLE.md` names are not in the library; download them (`https://github.com/google/fonts/tree/main/ofl/<family>`) into the project's `fonts/`. `core/fonts/` holds a few Latin display fonts and a Chinese display font with only about 200 glyphs, not enough for running Chinese text. For Chinese, subset a CJK font to the characters you use: the Google Fonts CSS API with `&text=` returns just those glyphs (`https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@700&text=<URL-encoded characters>`). Download the font file it points to into the project's `fonts/` and load it with `@font-face`; don't link Google Fonts at render time.
diff --git a/plugin/skills/lemo-opuscar/SKILL.md b/plugin/skills/lemo-opuscar/SKILL.md
index 3736005..dc4e268 100644
--- a/plugin/skills/lemo-opuscar/SKILL.md
+++ b/plugin/skills/lemo-opuscar/SKILL.md
@@ -1,6 +1,6 @@
---
name: lemo-opuscar
-description: Direct and produce a short film made entirely in code, in one of the styles of the Lemo-Opuscar library (e.g. Impasto Oil Painting 油画厚涂, Watercolor Brush 水彩笔刷, Chinese Ink Wash 中国水墨, Ukiyo-e 浮世绘, Whiteboard Explainer 白板讲解). Use when the user asks for a video, film, short, promo, explainer or animation (视频、短片、动画、宣传片) in a named style; when they want a film made about their own topic and haven't chosen a style (help them choose); or when they ask which film styles there are. Not for editing or converting existing video files.
+description: Direct and produce a short film made entirely in code, in one of the styles of the Lemo-Opuscar library (e.g. Impasto Oil Painting 油画厚涂, Watercolor Brush 水彩笔刷, Ukiyo-e 浮世绘, Satellite Briefing 卫星简报, Exploded Teardown 产品拆解, Microscope Story 显微叙事). Use when the user asks for a video, film, short, promo, explainer or animation (视频、短片、动画、宣传片) in a named style, including data, science and product explainers built from real material such as satellite imagery, laser scans, CAD files or archive scans (数据解说、科普、产品拆解); when they want a film made about their own topic and haven't chosen a style (help them choose); or when they ask which film styles there are. Not for editing or converting existing video files.
---
# Lemo-Opuscar
@@ -8,7 +8,7 @@ description: Direct and produce a short film made entirely in code, in one of th
The styles, guides and tools live in the Lemo-Opuscar library (github.com/lemomo-ai/lemo-opuscar). This skill fetches it and hands you over to it.
1. **Get the library.** Run `sh "<skill base directory>/scripts/setup.sh"`. It clones or updates the library (default `~/lemo-opuscar`; a clone the user is standing in is used as it is) and prints `LIB=<path>` on its last line.
-2. **Install the core tools early.** Start `sh "<skill base directory>/scripts/setup.sh" deps` right away, in the background if you can: it takes a few minutes the first time. Add `deps voice` or `deps music` later, only if the film needs them (`$LIB/TECHNIQUE.md` §1). Report missing system tools in your one round of questions; don't install system software yourself.
+2. **Install the core tools early.** Start `sh "<skill base directory>/scripts/setup.sh" deps` right away, in the background if you can: it takes a few minutes the first time. Add `deps voice` or `deps music` later, only if the film needs them (`$LIB/TECHNIQUE.md` §1). Report missing system tools (Node, ffmpeg, Python) in your one round of questions; don't install system software yourself. Packages a style needs (its `STYLE.md` lists them) you install yourself, into the project folder.
3. **Follow the library.** Read `$LIB/AGENTS.md` and do what it says: finding the style, the one round of questions, the treatment, production and delivery.
What changes in skill mode:
diff --git a/styles/archive-lighttable/DEMO.md b/styles/archive-lighttable/DEMO.md
index b96a0d9..2b6b54a 100644
--- a/styles/archive-lighttable/DEMO.md
+++ b/styles/archive-lighttable/DEMO.md
@@ -82,6 +82,6 @@ demo/
FACTS.md, CREDITS, TREATMENT.md, PRODUCTION_LOG.md, stills/styleframe.jpg
```
-- `sh demo/build.sh` takes about 4 minutes on Apple silicon (the picture renders in about 40 s with 4 workers; the master pass is the slowest step). `FETCH=1` first re-downloads about 100 MB of scans and rebuilds the textures (about 25 s).
+- `sh demo/build.sh` takes about 4 minutes on Apple silicon (the picture renders in about 40 s with 4 workers; the master pass is the slowest step). From a clean clone it first fetches what git does not hold: the fonts from Google Fonts (`tools/fonts.py`), the Kokoro model and the salamander, vsco2ce and vcsl sample libraries (`tools/fetch.sh`), and about 100 MB of Library of Congress scans, which `tools/prep.py` turns into textures (about 25 s). `FETCH=1` forces the fonts and scans again.
- Checks it runs: `asr_check.py` with `small.en` (two lines carry an `asr` field: Whisper writes "17th, 1903" for the spoken date and hears "four flights" as "for flights"), the cue grid, subtitle single-line widths measured with the real fonts (widest 648 px against 1500 px), `readcheck.mjs`.
- Demo-specific pitfalls: loc.gov item pages sit behind a Cloudflare challenge, so the catalogue records come from the Library's SRU server (`lx2.loc.gov:210/lcdb`) and the files from `tile.loc.gov`; in the first-flight plate the sky can be unmixed exactly against a smooth membrane, but the sand cannot, so below the horizon only strong marks are cut (lower wing, skids, struts; a vertical-line filter catches thin struts) and the rest stays on the ground; the fourth-flight scan is low in contrast and gets its own levels in the positive; the clipping is a low-resolution copy, so the camera never pushes past about 0.66 zoom on it.
diff --git a/styles/archive-lighttable/STYLE.md b/styles/archive-lighttable/STYLE.md
index 6d9a9b5..d3f5afd 100644
--- a/styles/archive-lighttable/STYLE.md
+++ b/styles/archive-lighttable/STYLE.md
@@ -1,28 +1,30 @@
# Archive Light Table — Style Prompt
> Real archive objects (glass negatives, slides, letters, telegrams, clippings, drawings) lie on a cool, backlit light table. A loupe comes down on one of them, and inside the glass the object comes alive: a negative turns positive, a line of type lights up, a number lifts off the page, a photograph opens into depth. Precise catalogue numbers, dates and readings are pinned to the objects. Clean, modern and quiet, with no vintage filter.
-> References (grammar only): archive documentaries that push into still photographs (respect for the object, the slow approach); visual investigations that annotate real imagery (one line, one reading, one source per screen); product macro films (glass edges, transmitted light, a steady slow push). Copy none of their layouts, typefaces, shots or music, and never name them in the film.
+> References (grammar only): archive documentaries that push into still photographs; visual investigations that annotate real imagery (one line, one reading, one source per screen); product macro films (glass edges, transmitted light). Copy none of their layouts, typefaces, shots or music, and never name them in the film.
## 1. Essence, and what it is not
- **The objects are real**: scans of public-domain or licensed archive items, at their true proportions, with their real damage (broken corners, emulsion edges, folds, pencil marks). Nothing in them is drawn or generated.
- **Light comes from below**: the table glows a near-white cool grey; film and glass transmit it, paper glows warm at its edges, opaque things read darker than the table.
- **The loupe is the camera's door**: every dive into an object goes through a loupe that lands on it. The inside of the lens is where the object changes state.
-- **Catalogue truth**: every object carries its real identifier, date and title from the holding institution, and the numbers on screen come from the record.
+- **Catalogue truth**: every object carries its real identifier, date and title from its holder; numbers on screen come from the record.
- **One signal colour** for marks, readings and anchors; everything else is the archive's own greys and paper tones.
-Not Halftone Dossier (no newsprint dots, no aged-paper grade, no typewriter case file; this is a clean modern light table under neutral light), not Satellite Briefing (objects on a table, not the ground from orbit), not Data Storytelling (no charts; the numbers live on the objects), not a keynote (no slides, header bars or centred title layouts).
+**Sources and licences.** Open collections with masters and catalogue records: the Library of Congress (files on `tile.loc.gov`; records from its SRU server `lx2.loc.gov:210/lcdb` when loc.gov pages are blocked), Smithsonian Open Access (CC0), the Rijksmuseum (CC0), NARA, Europeana (check each item's rights statement). CC0, public domain and CC BY (credited) are fine. "No known restrictions", CC BY-SA and other terms are not CC0: name the terms to the user and ask. For brand history, ask the user for their scans, archive numbers and right to use them. Never stand a generated image in for an archive object. Keep a `FACTS.md` in the project folder (claim, source URL, quoted wording, or how a figure was derived) and deliver it with the film.
+
+Not Halftone Dossier (no newsprint dots, no aged-paper grade), not Satellite Briefing (objects on a table, not the ground from orbit), not Data Storytelling (no charts; the numbers live on the objects), not a keynote (no slides or header bars).
## 2. Materials & rendering
- **One world, one camera**: every object is a textured quad on the table with a centre, rotation and scale (texture px → world units at true size). The camera is a 2D centre, zoom and roll; the table and every mark go through the same world → screen function.
-- **The light table**: an emissive surface (≈ 0.97 white, slightly cool) with a soft falloff, diffuser noise at two scales, a brushed-aluminium frame and a dark desk beyond it. It can be switched off (ambient ≈ 0.04) and flicker on.
-- **Glass negatives**: transmission from the scan's positive, `T = 0.035 + 0.9 · (1 − pos)^1.25`, tinted with a warm silver-gelatin base; the emulsion mask comes from the scan (white margin connected to the border = no glass), so broken corners show the table through. Dust and hairline scratches are procedural and anchored to the table.
+- **The light table**: an emissive surface (≈ 0.97 white, slightly cool), soft falloff, diffuser noise, an aluminium frame and a dark desk beyond. It can be switched off (ambient ≈ 0.04) and flicker on.
+- **Glass negatives**: transmission from the scan's positive, `T = 0.035 + 0.9 · (1 − pos)^1.25`, with a warm silver-gelatin tint; the emulsion mask comes from the scan (white margin touching the border = no glass), so broken corners show the table. Dust and scratches are procedural, anchored to the table.
- **Paper**: backlit, its colour is transmission (paper tone × light); lit lines get darker ink and brighter paper; unlit text can dim to bring one line forward.
-- **The loupe**: inside the lens, each pixel maps back to the table through the magnification (≈ 2.5×), with a pincushion term (k ≈ 0.16 at the rim) and a slightly different k per RGB channel for edge colour fringes. Around it: a black anodised retaining ring with a bevel highlight, a clear acrylic skirt that refracts the table, and a foot that glows on the light. On landing and lifting it scales by about 1.35× and casts a soft top-light shadow.
-- **The photograph space**: after the push the lens stops being a lens. Inside, a photo can gain depth: a ground-plane nearness map (zero at the horizon, rising linearly with the row below it), cut-out layers for upright subjects, and the background behind them filled. A dolly and a lateral shift drive parallax, and the subject layer may drift. Upright things left on the ground plane lean, so put the dolly's centre of expansion between them.
+- **The loupe**: inside the lens each pixel maps back to the table through the magnification (≈ 2.5×) with a pincushion term (k ≈ 0.16 at the rim), slightly different per RGB channel for colour fringes. Around it: a black ring with a bevel highlight and a clear acrylic skirt that refracts the table and glows at its foot. Landing and lifting, it scales by about 1.35× and casts a soft shadow.
+- **The photograph space**: after the push the lens stops being a lens. A photo gains depth from a ground-plane nearness map (zero at the horizon, linear in the row below it), cut-out layers for upright subjects and a filled background; a dolly and a lateral shift drive parallax, and a subject layer may drift. Things left on the ground plane lean: centre the dolly between them.
- **Sampling**: all texture reads inside the branching lens code use explicit gradients (`textureGrad`), otherwise quads that cross a branch pick a wrong mip level and leave dashed seams.
-- **Marks** live on a 2D canvas above the picture: hairlines 1.5–3 px, rings, crop corners, underlines that draw on, leaders. Table marks are clipped out where the loupe is; marks inside a photograph go through that photograph's forward mapping, parallax included.
+- **Marks** live on a 2D canvas above the picture: hairlines 1.5–3 px, rings, crop corners, underlines, leaders. Table marks are clipped out under the loupe; marks inside a photograph use its forward mapping, parallax included.
- **Post**: a light vignette and fine moving grain (heavier inside photographs). No film damage, no sepia, no halftone.
## 3. Colour logic
@@ -36,9 +38,9 @@ Example (our demo): table #F7F9FB, ink #15171A, signal #FF5A1F, caption plates r
## 4. Type & subtitles
-- **Roles**: a monospace for identifiers, dates and readings (IBM Plex Mono, 17–34 px; readings 74–120 px); a sans for labels in the film's language (Noto Sans SC 21–36 px); a serif only for titles and the one name a photograph carries (Noto Serif SC 600, 60–76 px); a sans for the English subtitle line (IBM Plex Sans). OFL, self-hosted, CJK subset.
+- **Roles**: a monospace for identifiers, dates and readings (e.g. IBM Plex Mono, 17–34 px; readings 74–120 px); a sans for labels in the film's language (e.g. Noto Sans SC or Inter, 21–36 px); a serif only for titles and the one name a photograph carries (60–76 px). OFL, self-hosted, CJK subset when needed.
- **Labels attach to objects**: an anchor dot and ring, a vertical leader, then the text. A reading sits in a dark caption plate with a small label above and the source (the catalogue number or the original wording) below.
-- **Subtitles** are a caption strip: one line of Chinese and one of English at the bottom centre, on a dark plate with a 3 px signal-coloured edge. One line per language, never wrapped; split long lines into cues. Hold ≥ max(1.8 s, speech + 0.6 s).
+- **Subtitles** are a caption strip at the bottom centre, on a dark plate with a 3 px signal-coloured edge. If the film is bilingual, the film's language goes on top. Hold ≥ max(1.8 s, speech + 0.6 s).
- **Quote the source when you can**: a crop of the actual line, or the record's wording in quotation marks, beats a paraphrase.
## 5. Motion quality
@@ -52,21 +54,21 @@ Example (our demo): table #F7F9FB, ink #15171A, signal #FF5A1F, caption plates r
| Move | What it expresses | Can serve |
|---|---|---|
-| table glide (pan and roll, z ≈ 0.2–0.35) | surveying an archive; moving from one piece of evidence to the next | a timeline of documents; a set of products; a family album |
+| table glide (pan and roll) | surveying; moving to the next piece of evidence | a timeline of documents; a product family; an album |
| loupe landing + push into the lens | choosing one object; "look closer" | the claim; the key photograph; a signature |
| inside the lens: tracking along a line | reading | a letter, a ledger line, a caption, a spec |
| photograph space: dolly + parallax | being there | the event itself; the founding moment; the place |
-| rise out of the lens | stepping back to the table, the evidence noted | a transition between objects; a summary |
+| rise out of the lens | stepping back, the evidence noted | a transition; a summary |
| pull back to the whole table | scale; everything at once | an index, a timeline, a closing |
Framing: at a reading moment the subject fills at least a third of the frame height; readings and labels stay clear of the subtitle strip (bottom 140 px). Transitions are made by the loupe (land, push, rise, lift) and the glide; no cuts, fades to black or page turns between objects.
## 7. Sound palette
-- **Ambience**: the light table's ballast hum (100 Hz and harmonics, a little tube hiss), the starter clicks when it switches on; room tone. Inside a photograph the hum gives way to that place's air (wind, surf, a street).
-- **Foley**: the loupe on glass (a short clack with a high glass ring), paper slides and sweeps for glides and lit lines, ticks for scales and counters, a pen or wax-pencil stroke for a verdict, soft clicks as labels land.
+- **Ambience**: the light table's ballast hum (100 Hz and harmonics), starter clicks, room tone. Inside a photograph the hum gives way to that place's air.
+- **Foley**: the loupe on glass (a clack with a high ring), paper sweeps for glides and lit lines, ticks for scales and counters, a pen stroke for a verdict, soft clicks as labels land.
- **Music**: restrained and small: a felt piano, a few strings, glass or bowed metal for the moments of seeing. Build by subdivision and register, not by drums. Leave real silences before a reveal or a verdict; the first sound after them should be the loupe, the place or the verdict.
-- **Voice**: a calm documentary narrator, short sentences that state what the object says; spell numbers out in the script and show digits on screen. Music about 10 dB under the voice and ducked further while it speaks; mix to −14 LUFS.
+- **Voice**: a calm narrator, short sentences that state what the object says. Music about 10 dB under the voice, ducked while it speaks; −14 LUFS.
## 8. Native moves
@@ -74,29 +76,29 @@ Framing: at a reading moment the subject fills at least a third of the frame hei
- **The line lights up.** On paper inside the lens one line of type brightens while the rest dims, an underline draws under it, and one word or number lifts out into a reading card. *Fits content like:* a ledger entry; a patent claim; the first order on an invoice.
- **Into the photograph.** The lens rim grows past the frame while the view inside widens; the photograph gains layered depth and a subject drifts. *Fits content like:* the first shop front; a launch day crowd; an expedition camp.
- **Measuring on the photograph.** A ruler laid on the ground plane in perspective, with ticks that crowd toward the horizon and a counter that lands on the recorded figure, marked as a schematic when it is one. *Fits content like:* a race distance; a bridge span; a building's height.
-- **Two records, held side by side.** Two caption cards, each with a crop of its source, held still for at least 2.5 s before one is struck. *Fits content like:* a misprinted date; two versions of a founding story; specification against delivery.
+- **Two records, held side by side.** Two caption cards, each with a crop of its source, held still until both are read before one is struck. *Fits content like:* a misprinted date; two versions of a founding story; specification against delivery.
- **The table becomes the index.** Pull back to the whole table; each object's tag flies into one list with its identifier and its reading. *Fits content like:* a company timeline; a collection catalogue; a product family.
## 9. Pitfalls of the medium
-- **Over-magnifying a weak scan**: plan the push so the interior stays under about 1.5 screen px per scan px; pick the item with the scan size in mind.
+- **Over-magnifying a weak scan**: keep the lens interior under about 1.5 screen px per scan px; choose items by scan size.
- **The loupe sweeping over empty table**: lay objects close together, land the loupe straight onto the object (drop in, don't slide in), and glide the camera over objects, not gaps.
- **Shear in the photograph space**: one depth map for a photo with people or machines in it tears them apart. Cut upright subjects into layers, fill behind them, and keep 2.5D moves small enough that the fill is barely seen.
-- **Labels that scroll away**: a label anchored to a moving table leaves the frame before it can be read; hold the camera, or put the caption in a plate fixed on screen.
-- **Mip seams**: see §2 (explicit gradients).
+- **Labels that scroll away**: a label on a moving table leaves the frame before it is read; hold the camera, or fix the caption on screen.
- **Vintage creep**: no sepia, no halftone, no paper-ageing overlay. The age is in the objects, not the grade.
## 10. Engine
-- `demo/film.js`: `IT` (the table: centre, rotation, scale per object), `toW()` / `toT()` (texture ↔ world), `CAM` keys and `w2s()`, `dive()` (the loupe's landing point, landing and lifting times, and the inside of the lens as tracks), `shot(t)` (lens state, photograph-space parallax, develop), `int2s()` (photograph → screen for marks), the fragment shader (`lightTable`, `paper`, `negative`, `parallax`, the lens rim and skirt), the overlay (`annot`, `measure`, `compare`, `indexPanel`).
+- `demo/film.js`: `IT` (objects: centre, rotation, scale), `toW()` / `toT()` (texture ↔ world), `CAM` keys and `w2s()`, `dive()` (loupe point, land/lift times, lens interior as tracks), `shot(t)`, `int2s()` (photograph → screen for marks), the shader (`lightTable`, `paper`, `negative`, `parallax`, rim and skirt), the overlay (`annot`, `measure`, `compare`, `indexPanel`).
- `demo/tools/prep.py`: emulsion masks from scans, difference matting of a subject against a smooth sky, ground-only cuts, push-pull fill.
- Minimal example, not in the demo: put one 35 mm slide (`IT.slide = {c, r, k, size}`), a loupe landing with `dive(toW(IT.slide, p), t0, t1, keysS, keysC)`, and light one line with `band()`.
+- **Extra packages and packs**: none beyond `setup.sh deps voice music` (numpy, scipy, Pillow, soxr are in the core tier). A score in this palette needs sample libraries: `sh tools/fetch.sh instruments salamander` (piano), `vsco2ce` (strings), `vcsl` (glass, bowed vibraphone). Anything else a film needs goes into a private venv or `node_modules` in the project folder, never into `$LIB/.venv`.
## 11. Variation space
The agent decides the objects, their order, the story, which native moves to spend and where, the camera path, the subject of the photograph space, and the signal colour.
-- **Three structures**: one number traced through three documents to a verdict; a company's founding told as five objects in date order, each dive revealing one person; a single photograph explored in three dives (the place, the people, the date written on the back).
+- **Three structures**: a company's founding told as five objects in date order, each dive revealing one person; a single photograph explored in three dives (the place, the people, the date on the back); a before/after pair of plans and photographs of one building.
- **Three openings**: the table switching on in the dark; a loupe already on a plate, rising to reveal the table; a hand-written date on an envelope filling the frame.
- **Three endings**: the index of everything on the table; the last photograph held in depth with one line of text; the light table switching off, leaving one object glowing.
diff --git a/styles/archive-lighttable/demo/CREDITS b/styles/archive-lighttable/demo/CREDITS
index 2db41e2..6afebe3 100644
--- a/styles/archive-lighttable/demo/CREDITS
+++ b/styles/archive-lighttable/demo/CREDITS
@@ -34,6 +34,7 @@ VOICE
- Kokoro-82M (hexgrad), voice bm_george, Apache License 2.0; run locally via kokoro-onnx (MIT) through core/tts/tts.py.
Speech check: faster-whisper small.en (MIT; OpenAI Whisper weights, MIT).
-FONTS (SIL Open Font License 1.1, licence texts in fonts/; Chinese fonts subset with the Google Fonts API &text=)
+FONTS (SIL Open Font License 1.1; tools/fonts.py fetches every face from Google Fonts and the licence texts from
+github.com/google/fonts into fonts/; Chinese faces subset with the CSS2 API &text=)
- IBM Plex Mono, IBM Plex Sans — IBM
- Noto Sans SC, Noto Serif SC — Google / Adobe
diff --git a/styles/archive-lighttable/demo/build.sh b/styles/archive-lighttable/demo/build.sh
index 1e0f05b..6c48347 100644
--- a/styles/archive-lighttable/demo/build.sh
+++ b/styles/archive-lighttable/demo/build.sh
@@ -1,8 +1,8 @@
#!/bin/sh
# One command: 《差两秒》 Two Seconds Short (Archive Light Table demo)
# sh demo/build.sh voice, checks, cues, picture, score + mix, master, subtitles, checks, poster
-# FETCH=1 sh demo/build.sh first re-download the Library of Congress scans (~100 MB), rebuild the textures
-# and the font subsets
+# FETCH=1 sh demo/build.sh first re-download the fonts and the Library of Congress scans (~100 MB), rebuild the textures
+# (a clean clone fetches fonts, scans, the voice model and the sample libraries by itself; needs setup.sh deps voice)
set -e
HERE=$(cd "$(dirname "$0")" && pwd) # .../<slug>/demo
FILM=$(cd "$HERE/.." && pwd) # .../<slug>
@@ -14,6 +14,15 @@ NAME=archive-lighttable
RAW="$HERE/assets/raw"
cd "$LIB"
+# fonts (gitignored): every face the page uses, from Google Fonts
+if [ "${FETCH:-0}" = "1" ] || [ ! -f "$HERE/fonts/IBMPlexMono-400.woff2" ] || [ ! -f "$HERE/fonts/NotoSansSC-400.woff2" ]; then
+ mkdir -p "$HERE/fonts"; "$PY" -I "$HERE/tools/fonts.py" "$HERE"
+fi
+# the voice model and the three sample libraries the score uses (skipped when present)
+[ -f core/tts/kokoro-v1.0.onnx ] || sh tools/fetch.sh voice
+for l in salamander vsco2ce vcsl; do [ -d "core/audio/instruments/$l" ] || sh tools/fetch.sh instruments $l; done
+
+# archive scans and textures (gitignored): keyed on a texture the page reads
if [ "${FETCH:-0}" = "1" ] || [ ! -f "$HERE/assets/tex/p1_fly.png" ]; then
mkdir -p "$RAW"
T=https://tile.loc.gov/storage-services/master/pnp
@@ -21,7 +30,6 @@ if [ "${FETCH:-0}" = "1" ] || [ ! -f "$HERE/assets/tex/p1_fly.png" ]; then
curl -sSL -o "$RAW/loc_cph3b18080u.tif" "$T/cph/3b10000/3b18000/3b18000/3b18080u.tif"
curl -sSL -A "LemoOpuscar/1.0" -o "$RAW/telegram_mcc061.jpg" "https://upload.wikimedia.org/wikipedia/commons/7/72/Telegram_Orville_Wright_17_dec_1903.jpg"
"$PY" -I "$HERE/tools/prep.py" "$HERE" # plates, masks, the Flyer / Wilbur layers and the cleaned background
- "$PY" -I "$HERE/tools/fonts.py" "$HERE"
fi
# voice: Kokoro (bm_george), speech-to-text check with the small English model
diff --git a/styles/archive-lighttable/demo/index.html b/styles/archive-lighttable/demo/index.html
index 938e854..9873023 100644
--- a/styles/archive-lighttable/demo/index.html
+++ b/styles/archive-lighttable/demo/index.html
@@ -1,8 +1,8 @@
<!doctype html>
<html><head><meta charset="utf-8"><title>差两秒 · Two Seconds Short · Archive Light Table</title>
<style>
-@font-face{font-family:'PM';src:url(fonts/IBMPlexMono-Regular.ttf);font-weight:400}
-@font-face{font-family:'PM';src:url(fonts/IBMPlexMono-Medium.ttf);font-weight:500}
+@font-face{font-family:'PM';src:url(fonts/IBMPlexMono-400.woff2);font-weight:400}
+@font-face{font-family:'PM';src:url(fonts/IBMPlexMono-500.woff2);font-weight:500}
@font-face{font-family:'PS';src:url(fonts/IBMPlexSans-400.woff2);font-weight:400}
@font-face{font-family:'PS';src:url(fonts/IBMPlexSans-500.woff2);font-weight:500}
@font-face{font-family:'SC';src:url(fonts/NotoSansSC-400.woff2);font-weight:400}
diff --git a/styles/archive-lighttable/demo/tools/fonts.py b/styles/archive-lighttable/demo/tools/fonts.py
index 292b92e..4572587 100644
--- a/styles/archive-lighttable/demo/tools/fonts.py
+++ b/styles/archive-lighttable/demo/tools/fonts.py
@@ -1,6 +1,7 @@
-"""Fonts. Chinese: Noto Sans SC 400/500 and Noto Serif SC 600 subset to the characters in film.js + timeline.js
-(Google Fonts CSS2 API, &text=). English subtitles: IBM Plex Sans 400/500 (latin). IBM Plex Mono is copied from the
-library's satellite-briefing demo (OFL). usage: python -I tools/fonts.py <demo_dir>"""
+"""Every font the page uses, fetched from Google Fonts (all SIL OFL 1.1) into fonts/:
+Noto Sans SC 400/500/600 and Noto Serif SC 600 subset to the characters in film.js + timeline.js (CSS2 API, &text=);
+IBM Plex Sans 400/500 and IBM Plex Mono 400/500 for Latin (subset to printable ASCII + a few signs);
+the licence texts from github.com/google/fonts. usage: python -I tools/fonts.py <demo_dir>"""
import sys, os, re, urllib.request, urllib.parse
D = sys.argv[1]
src = ''.join(open(os.path.join(D, f), encoding='utf-8').read() for f in ('film.js', 'timeline.js'))
@@ -12,9 +13,14 @@ UA = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML,
get = lambda u: urllib.request.urlopen(urllib.request.Request(u, headers={'User-Agent': UA}), timeout=60).read()
for fam, w, out, txt in (('Noto Sans SC', 400, 'NotoSansSC-400.woff2', text), ('Noto Sans SC', 500, 'NotoSansSC-500.woff2', text), ('Noto Sans SC', 600, 'NotoSansSC-600.woff2', text),
('Noto Serif SC', 600, 'NotoSerifSC-600.woff2', text),
- ('IBM Plex Sans', 400, 'IBMPlexSans-400.woff2', latin + '·×→−—’'), ('IBM Plex Sans', 500, 'IBMPlexSans-500.woff2', latin + '·×→−—’')):
+ ('IBM Plex Sans', 400, 'IBMPlexSans-400.woff2', latin + '·×→−—’'), ('IBM Plex Sans', 500, 'IBMPlexSans-500.woff2', latin + '·×→−—’'),
+ ('IBM Plex Mono', 400, 'IBMPlexMono-400.woff2', latin + '·×→−—’'), ('IBM Plex Mono', 500, 'IBMPlexMono-500.woff2', latin + '·×→−—’')):
css = get('https://fonts.googleapis.com/css2?family=' + urllib.parse.quote(fam) + f':wght@{w}&text=' + urllib.parse.quote(txt)).decode()
urls = re.findall(r'url\((https://[^)]+)\)', css)
assert len(urls) == 1, css[:400]
data = get(urls[0]); open(os.path.join(D, 'fonts', out), 'wb').write(data)
print(out, len(data), 'bytes')
+for fam, out in (('ibmplexmono', 'OFL-ibmplexmono.txt'), ('ibmplexsans', 'OFL-ibmplexsans.txt'),
+ ('notosanssc', 'OFL-notosanssc.txt'), ('notoserifsc', 'OFL-notoserifsc.txt')):
+ open(os.path.join(D, 'fonts', out), 'wb').write(get(f'https://raw.githubusercontent.com/google/fonts/main/ofl/{fam}/OFL.txt'))
+print('licence texts written')
diff --git a/styles/briefing-board/DEMO.md b/styles/briefing-board/DEMO.md
index 16d79cf..34fc786 100644
--- a/styles/briefing-board/DEMO.md
+++ b/styles/briefing-board/DEMO.md
@@ -56,7 +56,7 @@ Judgement frames widen 1,768 → 1,945 → 2,361 → 3,205 board px (28 % → 50
- Right third (never in shot before the reveal): four photo prints with magnets (suspension, cable-stayed, arch, and the side-view ship whose lettering was wiped), a source card ("数据来源"), two sticky notes with the sums (1,208 − 1,000 = 208; 2,023 ÷ 1,000 ≈ 2), a small navigation-clearance sketch without numbers, the verdict "船决定跨度" (400 px, "船" red) at the right middle with a leader from the circled 2,023, and the end card.
- Subtitles: frosted strip, Chinese Noto Sans SC 500 42 px over English Archivo 500 29 px, blue tick at left; every cue measured on one line per language (`tools/subcheck.mjs`).
-## End card
+## Title card
A printed card pinned at the bottom right of the wall from the start, seen only in the reveal: "船说了算", a red rule, "ENGINEERING / BRIEFING BOARD", "工程简报板", "LemoLab × Claude Opus 5.5". It is part of the final wall (the poster) and is on screen for the last three seconds. The "LemoLab × Claude Opus 5.5" sign-off belongs to this library's demo only; a user's film carries no LemoLab credit and no copy of this card.
@@ -69,15 +69,16 @@ demo/
kit/objects/ cut-outs + meta (anchors L/R for bridges, bow/stern for the ships)
kit/tools/ prep_object.py, sky_key.py, mirror_span.py, stretch_span.py, redraw_stays.py,
redraw_suspension.py, repair_hangers.py, clean_lettering.py, ship_anchors.py,
- make_print.py, rebuild_objects.sh, fetch_fonts.py
+ make_print.py, rebuild_objects.sh; fetch_fonts.py, fetch_sources.py, kit_env.sh
scenes/_gen_film.py the film as data → scenes/film.json, audio/cues.json
audio/lines.json narration (Kokoro) audio/mix.py score, foley, voice, mix
tools/ camcheck.mjs + camplot.py, rescheck.mjs, subcheck.mjs, cuecheck.py, rhythm_report.py, final_asr.py
- sources/ photos (candidates/, licence trail in candidates.json), cached masks, derived/
+ sources/ candidates/candidates.json (every photo looked at: URL, author, licence, evidence;
+ the six used ones with sha256); photos, masks and derived/ are downloaded or rebuilt
```
-1. `sh demo/build.sh`: speech check → scene → cue check → reading check → camera check (incl. judgement frames) → resolution check → events → render (960 frames, 5 workers) → mix → subtitles (+ one-line check) → mux (−14 LUFS, grain 1) → poster and styleframe → rhythm report → speech check on the final mix → camera plot.
-2. Objects: `sh demo/kit/tools/rebuild_objects.sh` recreates every cut-out from the photos at their own resolution (BiRefNet ONNX masks are cached in `sources/masks/`).
+1. `sh demo/build.sh` (library set up with `setup.sh deps voice music`): fetches what git does not hold — fonts from Google Fonts (`fetch_fonts.py`: Archivo and IBM Plex Mono from github.com/google/fonts, the CJK subsets through the CSS API), the six photos from Commons (`fetch_sources.py`, ~470 MB), a private `demo/.venv` with onnxruntime and the BiRefNet model (`kit_env.sh`, ~970 MB unless cached), the voice model and the freepats / vsco2ce / vcsl samples — and cuts the objects again (`rebuild_objects.sh`); then speech check → scene → cue check → reading check → camera check (incl. judgement frames) → resolution check → events → render (960 frames, 5 workers) → mix → subtitles (+ one-line check) → mux (−14 LUFS, grain 1) → poster and styleframe → rhythm report → speech check on the final mix → camera plot.
+2. Objects: `sh demo/kit/tools/rebuild_objects.sh` recreates every cut-out from the photos at their own resolution (BiRefNet masks are cached in `sources/masks/`; a recomputed mask can differ by a pixel or two from ours).
3. Stills and thumbnails: a scene JSON that `extends` `scenes/film.json` with its own `cam` and `t`, rendered by `node demo/kit/batch.mjs`.
-Pitfalls tied to this demo: the first cut rode each dimension line close and never showed the cable-stayed or suspension bridge whole; viewers lost what was being tested ("too fast"). The fix was the judgement frame per bridge, held, widening each time, with the voice and the verdict inside the hold. Text first glimpsed during a move failed the reading check, so every label block is pinned where the camera rests and each new row is framed with the previous row's result. The first cut-outs were downscaled and the close-ups upsampled them (a blocky ship); every object is now cut at full resolution and `rescheck.mjs` caps each zoom. Keyed stays turned into stair-steps and arch hangers vanished against the hills; stays and suspension cables are now measured and redrawn, the arch hangers continued to the deck. Name tags at a fixed offset overlapped the wider numbers; they are placed from the number's measured advance width. The stretched suspension photo allows z 1.38 at most, so its landing close-up is on the near tower, which is not stretched. The photographed suspension bridge has the proportions of a 500 m span; scaled uniformly to 2,023 m its towers would be far too tall, so only the main span is stretched. A road sign, a water-level gauge, a ship's name and container logos were removed (lettering). The pier clacks masked "piers" in the voice; they were lowered.
+Bridge-specific choices: each landing is met close on a pylon top, an arch rib, the hangers or a pier's foot; stays, main cables and hangers are redrawn as clean lines at the positions measured in the photos. Pitfalls tied to this demo: the first cut rode each dimension line close and never showed the cable-stayed or suspension bridge whole; viewers lost what was being tested ("too fast"). The fix was the judgement frame per bridge, held, widening each time, with the voice and the verdict inside the hold. Text first glimpsed during a move failed the reading check, so every label block is pinned where the camera rests and each new row is framed with the previous row's result. The first cut-outs were downscaled and the close-ups upsampled them (a blocky ship); every object is now cut at full resolution and `rescheck.mjs` caps each zoom. Keyed stays turned into stair-steps and arch hangers vanished against the hills; stays and suspension cables are now measured and redrawn, the arch hangers continued to the deck. Name tags at a fixed offset overlapped the wider numbers; they are placed from the number's measured advance width. The stretched suspension photo allows z 1.38 at most, so its landing close-up is on the near tower, which is not stretched. The photographed suspension bridge has the proportions of a 500 m span; scaled uniformly to 2,023 m its towers would be far too tall, so only the main span is stretched. A road sign, a water-level gauge, a ship's name and container logos were removed (lettering). The pier clacks masked "piers" in the voice; they were lowered.
diff --git a/styles/briefing-board/STYLE.md b/styles/briefing-board/STYLE.md
index 12e9a4c..912cae2 100644
--- a/styles/briefing-board/STYLE.md
+++ b/styles/briefing-board/STYLE.md
@@ -1,108 +1,102 @@
# Engineering Briefing Board — Style Prompt
-> One real whiteboard wall, filmed: window light on enamel, ghosts of erased marker, an aluminium frame and a tray. Cut-out photographs of real things land on it with weight; tags, magnets, a steel ruler and stamps are pinned to it; marker ink draws itself in three colours with fixed meanings. The camera never leaves the wall: it rides the lines from fact to fact, and only at the end pulls back to show the whole briefing at once.
+> One real whiteboard wall, filmed: window light on enamel, ghosts of erased marker, frame and tray. Cut-out photographs of real things land on it with weight; tags, magnets, a ruler and stamps are pinned to it; marker ink draws itself in three colours with fixed meanings. The camera rides the lines from fact to fact and only at the end pulls back to show the whole briefing.
> References (grammar only): explainers filmed on a map wall; the long pull-back over a wall covered in work; drafting conventions (plan above elevation, dimension lines, hatching). Never copy them or name them in the film.
## 1. Essence, and what it is not
1. **A physical board in a room**: enamel, window falloff, a sliding reflection, ghosts of earlier work, frame and tray.
-2. **Real things on it**: cut-out photographs a few millimetres off the board, shadowed by one window, parallaxing.
+2. **Real things on it**: cut-out photographs of the real objects, a few millimetres off the board, shadowed by one window, parallaxing. They are evidence: never a generated image presented as a real object.
3. **Ink that means something**: graphite for names and rules, blue for water and measurement, red only for the decision; rejected ideas erased to ghosts.
4. **One continuous wall**: no pages; the camera travels along lines, projections and leaders.
5. **The whole wall, once**: every shot is a crop of the final briefing, seen whole only in the last pull-back, as a poster.
-Not **Whiteboard Explainer** (`whiteboard`: a visible hand drawing line art on a flat page): here the board is a filmed object and subjects are photographs. Not **Data Storytelling** (`dataviz`: flat charts): comparisons are dimension lines in real units beside real objects. Not **Isometric Infographic**: no 3D icons. Not a keynote: no headers, chapter numbers, centred bullets, "object left, number right", page turns.
+Not **Whiteboard Explainer** (a hand drawing line art on a flat page): the board is a filmed object, subjects are photographs. Not **Data Storytelling**: comparisons are dimension lines in real units beside real objects. Not a keynote: no headers, centred bullets, page turns.
## 2. Materials & rendering
- **Board (z 0)**: procedural enamel, wiped ghost strokes, smudges, a window falloff, a sliding diagonal reflection; the frame shadows a warm grey wall.
-- **Ink (multiply)**: flat colour at about 90 %, lighter core, round caps; a wet-tip glint rides each stroke. Lettering: a marker font revealed glyph by glyph, with seeded per-glyph tilt, baseline and size jitter. Erasing leaves a blurred ghost (about 7 %) and a little haze.
-- **Prints (z ≈ 6–14)**: photographs cut out at full resolution (BiRefNet; polygons for hulls), clean edges, one shared grade (lower saturation, a touch warmer, lifted blacks). Thin structure (stays, cables, hangers) is measured in the photo and redrawn as clean lines in one steel colour. Shadow = blurred silhouette along one light vector, softer the higher the object. **No frame upsamples a photo**: ≥ 1 source px per screen px at its largest, measured; cap the zoom or find a bigger source.
+- **Ink (multiply)**: flat colour at about 90 %, lighter core, round caps, a wet-tip glint on the stroke being drawn. Lettering: a marker font revealed glyph by glyph with seeded tilt and baseline jitter. Erasing leaves a blurred ghost (about 7 %).
+- **Prints (z ≈ 6–14)**: photographs cut out at full resolution (a matting model, or a hand polygon / mask), clean edges, one shared grade (lower saturation, a touch warmer, lifted blacks). Thin structure (cables, wires, masts, railings) is measured in the photo and redrawn as clean lines in one colour. Shadow = blurred silhouette along one light vector, softer the higher the object. **No frame upsamples a photo**: ≥ 1 source px per screen px at its largest, measured; cap the zoom or find a bigger source.
- **Secondary layer** (only where the camera never goes before the end): the photos as pinned prints, a source card, sums on sticky notes, a small sketch. Texture and proof for the final wall, lighter than the main line.
-- **Props (z ≈ 8–26)**: magnetic tags, round magnets, a brushed-steel ruler, printed cards, a pitted rubber-stamp impression; the tray (z 70) is nearest the lens.
-- **Camera**: perspective scale per height (parallax), optional depth of field, motion blur by averaging sub-frames over a 180° shutter; light grain in ffmpeg. Only subtitles are screen-space.
+- **Props (z ≈ 8–26)**: magnetic tags, magnets, a steel ruler, printed cards, a pitted stamp impression; the tray (z 70) nearest the lens.
+- **Camera**: parallax by height, sub-frame motion blur (180° shutter), light grain. Only subtitles are screen-space.
## 3. Colour logic
- Ground: the enamel and its light falloff; the wall around is neutral warm grey.
-- Ink: graphite = names, rules, facts; blue = water and measurement (rivers, dimensions, projection lines, measured numbers); red = the decision (a rejection, the key word of a verdict, the one mark to notice); grey for drafting only (extension lines, ground hatching).
-- Red is rare: two or three red marks per frame at most, never on a red object.
-- Full colour belongs to the photographs; props stay neutral; a red magnet is a verdict.
+- Ink: graphite = names, rules, facts; blue = water and measurement (dimensions, projection lines, measured numbers); red = the decision (a rejection, the key word of a verdict, the one mark to notice); grey for drafting only (extension lines, hatching).
+- Red is rare: two or three red marks per frame at most, never on a red object. Full colour belongs to the photographs; props stay neutral; a red magnet is a verdict.
## 4. Type & subtitles
-- **Marker lettering**: a single-weight marker face, Latin and CJK in one family (ours: LXGW Marker Gothic, OFL, subset — re-run when words change). Content 100–160 board px; a verdict 230–400.
-- **Printed labels** (tags, cards, stamps): a sturdy sans (Noto Sans SC 700/900); credit lines in a monospace (IBM Plex Mono). A tag holds one to three words.
-- **Subtitles**: a frosted acrylic strip at the bottom centre with a blue marker tick; bilingual films stack primary over secondary (ours: Chinese 42 px over English 29 px). **Each language is one line**: `nowrap`, measured in the page against a 1,500 px safe width; a long line becomes two cues. Key content stays above the strip (bottom 14 %).
-- **Reading time**: subtitles ≥ max(1.8 s, speech + 0.6 s); board text stays fully in frame for CJK ÷ 4.5 + other ÷ 15 + 1.5 s from the moment it appears, so the camera rests where words are written. In the final wall the smallest text meant to be read is ≥ 20 px on screen.
+- **Marker lettering**: a single-weight marker face covering every script the film uses (ours: LXGW Marker Gothic, OFL, subset — re-run when words change). Content 100–160 board px; a verdict 230–400.
+- **Printed labels** (tags, cards, stamps): a sturdy sans; credit lines in a monospace. A tag holds one to three words.
+- **Subtitles**: a frosted acrylic strip at the bottom centre with a blue marker tick. If the film is bilingual, the film's language sits on top. **One line per language**: `nowrap`, measured in the page against a 1,500 px safe width; a long line becomes two cues. Key content stays above the strip (bottom 15 %).
+- **Reading time**: subtitles ≥ max(1.8 s, speech + 0.6 s); board text stays fully in frame for CJK ÷ 4.5 + other ÷ 15 + 1.5 s from when it appears. In the final wall, text meant to be read is ≥ 20 px on screen.
## 5. Motion quality
- 24 fps on ones; nothing is stepped.
- Camera: overlapping eased moves, velocity ∝ u^a (1−u)^b (a, b ≈ 1.5–4), so speed and acceleration never jump; b > a gives inertia. A hand-held breath (≤ 3 px) underneath; shake only on an impact.
-- Weight: prints are lowered from the camera side, land, bounce and settle as the shadow tightens; two magnets clack on to pin them; tags swing; removed magnets pop toward the lens; struck things jolt and spring back. **The camera meets a landing close**, briefly, on a structural detail (a pylon top, an arch rib, hangers, a pier's foot), then pulls out to the judgement frame.
-- Blurred in motion, sharp wherever words are read. No flat second: every 1–2 beats something lands, draws or swings, or the camera drifts; only designed silences go still.
-- Ink draws at the speed of a hand; dimension lines draw from one witness line to the other and land with an arrowhead tap.
-- Never: dissolves, scale-pops on text, bouncy UI easing, frictionless slides, text fading in by itself.
+- Weight: prints are lowered from the camera side, land, bounce and settle as the shadow tightens; magnets clack on to pin them; tags swing; removed magnets pop toward the lens; struck things jolt and spring back. The camera may meet a landing close, briefly, on the object's most telling detail, then pulls out.
+- Blurred in motion, sharp where words are read. Every 1–2 beats something lands, draws or swings; only silences and judgement holds go still.
+- Ink draws at the speed of a hand; dimension lines land with an arrowhead tap.
+- Never: dissolves, scale-pops on text, bouncy UI easing, text fading in by itself.
## 6. Camera grammar
| Move | What it expresses | Can serve |
|---|---|---|
-| Ride a line (track with the pen or a dimension) | measuring; "how far does it go?" | a comparison of lengths; a route; a timeline |
+| Ride a line (with the pen or a dimension) | measuring; "how far does it go?" | lengths compared; a route; a timeline |
| Tilt along projection lines | the same quantity in another view | plan → elevation; a total → its parts |
| Slow push-in, slight Dutch tilt | tension, an approaching problem | a collision; a deadline; an overrun |
| Pull back and sideways | stepping back to state a rule | a constraint; a turn in the argument |
-| Whip with the line, overshoot, settle | a result that exceeds | a record; an outlier; a breakthrough |
+| Whip with the line, overshoot, settle | a result that exceeds | a record; an outlier |
| Rise along a leader line | from evidence to verdict | a conclusion; a recommendation |
| Staircase framing (each new item with the previous result) | comparison in sequence | rankings; tests; options |
-| Judgement frame: the whole item, the limit it is tested against and the verdict, held ≥ 2.5 s | a test the viewer can check | pass / fail against a threshold; a budget against a cap |
+| Judgement frame: the whole item, the limit and the verdict, held ≥ 2.5 s | a test the viewer can check | pass / fail against a threshold; a budget against a cap |
| Long pull-back to the whole wall | scale; everything at once | the end of an argument; a summary |
-Framing: like a film, not a slide — off-centre, cropped, close. The first frame holds a readable subject; the first strong action hits within 0.5 s. When items are tested against a limit, each gets a judgement frame — wider each time if the items grow — and the verdict lands only after the camera has settled. Before the final reveal, at most about 60 % of the board's width, never both side edges, and never the zone kept for the reveal. Transitions are moves (a line, a projection, a leader, a moving object); no cuts by default, no fades or zoom-to-fit.
+Framing: off-centre, cropped, close. The first frame holds a readable subject; the first strong action hits within 0.5 s. Items tested against a limit each get a judgement frame (wider each time if they grow); the verdict lands after the camera settles. Before the reveal: ≤ about 60 % of the board's width, never both side edges, never the reveal's zone. Transitions are moves; no cuts, fades or zoom-to-fit.
## 7. Sound palette
- Room: an air-conditioning bed and traffic through the window, about 20 dB under the voice — audible, not a hiss; silences keep only this.
-- The medium's foley: felt-tip squeaks scaled to stroke length, nib taps, magnet clacks (a pitch per magnet in a row), suction pops, print landings (board thump, paper slap, low-end weight), a ruler's ring, eraser felt, a stamp's thud.
-- The subject's own sound arrives early as a J-cut.
-- Music: a small rhythmic ensemble, walking to brisk — bass, a light kit, wooden percussion, low brass stabs for verdicts (or mallets); no piano-and-strings pad. Landings, stamps and arrows sit on the beat (eighths, sixteenths); divide the beat to accelerate.
-- The first sound after a silence is a physical impact or the subject's sound. Voice about 8–10 dB over the music, ducked; −14 LUFS. Voice: calm, briefing-room confident.
+- Foley: felt-tip squeaks scaled to stroke length, nib taps, magnet clacks (a pitch per magnet in a row), suction pops, print landings (board thump, paper slap), a ruler's ring, eraser felt, a stamp's thud.
+- The subject's own sound arrives early as a J-cut; the first sound after a silence is an impact or the subject's sound.
+- Music: a small rhythmic ensemble, walking to brisk — bass, a light kit, wooden percussion, low brass stabs for verdicts (or mallets); no piano-and-strings pad. Landings, stamps and arrows sit on the beat. Voice calm, briefing-room confident, about 8–10 dB over the music; −14 LUFS.
## 8. Native moves
-- **The whole-wall reveal.** Design the wall as a poster first (hierarchy, a reading path, filling the frame), then plan every shot as a crop of it; keep one zone (secondary layer, verdict, end card) for the reveal alone. *Fits:* a product roadmap; a case laid out as evidence; a household budget.
-- **The subject passes through the answer.** The real thing moves through the chosen solution, its sound first; the camera pans with it and the pull-back starts from it. *Fits:* a parcel along the chosen route; a train over the new viaduct.
-- **Ride the dimension line.** A quantity is drawn as a real length to one scale; the camera rides the tip and stops where the number stops. *Fits:* battery ranges of four cars; how high each tower crane lifts.
-- **Projection lines.** Dashed lines carry an edge from one view to another so two drawings share a scale. *Fits:* a floor plan above a section; a trail map above its elevation profile.
-- **Magnets as countable things.** Units clack on in rhythm, pop off when a rule removes them. *Fits:* a staffing plan; seats in a vote; servers cut by an optimisation.
-- **Erase to a ghost.** A rejected idea is wiped but stays faintly visible. *Fits:* a first design under its revision; last year's plan under this year's.
-- **The stamp.** A verdict lands with a thud and a jolt. *Fits:* approved / rejected options; passed / failed tests; a void clause.
-- **The physical answer.** A real prop laid down as the solution. *Fits:* one cable instead of five; the single tool that spans every case.
-- **Leader to the verdict.** An arrow from the deciding number to the conclusion, ridden by the camera. *Fits:* the metric that decides a hire; the cheapest option after all costs; the bottleneck in a process.
+- **The whole-wall reveal.** Design the wall as a poster first (hierarchy, reading path, filling the frame), then plan every shot as a crop of it; keep one zone (secondary layer, verdict, title card) for the reveal alone. *Fits:* a product roadmap; a household budget.
+- **The subject passes through the answer.** The real thing moves through the chosen solution, its sound first. *Fits:* a parcel along the chosen route; a train over the new viaduct.
+- **Ride the dimension line.** A quantity drawn as a real length to one scale; the camera rides the tip. *Fits:* battery ranges of four cars.
+- **Projection lines.** Dashed lines carry an edge from one view to another so two drawings share a scale. *Fits:* a trail map above its elevation profile.
+- **Magnets as countable things.** Units clack on in rhythm, pop off when a rule removes them. *Fits:* seats in a vote.
+- **Erase to a ghost.** A rejected idea wiped but faintly visible. *Fits:* last year's plan under this year's.
+- **The stamp.** A verdict lands with a thud and a jolt. *Fits:* passed / failed tests.
+- **The physical answer.** A real prop laid down as the solution. *Fits:* one cable instead of five.
+- **Leader to the verdict.** An arrow from the deciding number to the conclusion. *Fits:* the bottleneck in a process.
## 9. Pitfalls of the medium
-- **Slide feel.** Headers, margins, centred layouts, "picture left, number right". Fix: write where things are, crop off-centre, one idea per frame.
-- **Blur over empty board.** Fix: ride a line or a moving object so the move has content.
-- **Text glimpsed in passing** fails the reading time. Fix: place words where the camera rests; frame each new item with the last result.
-- **Photos that don't belong together.** Fix: one grade, one light vector, one viewpoint family (elevations together, plan views together).
-- **Thin parts lost or stair-stepped** (cables, hangers). Fix: find them with a top-hat sky key, redraw clean lines at the measured positions; continue hangers lost against hills to the deck.
+- **Text glimpsed in passing** fails the reading time. Fix: words where the camera rests; frame each new item with the last result.
+- **Only close-ups.** The viewer never sees the whole object against the limit. Fix: detail → judgement frame → hold → verdict → move on.
+- **Photos that don't belong together.** Fix: one grade, one light vector, one viewpoint family.
+- **Thin parts lost or stair-stepped** by the matte. Fix: key them against the clean background, redraw clean lines at the measured positions.
- **Upsampled photos** go soft in close-ups. Fix: full-resolution cuts, large sources, a per-frame check.
-- **Weightless landings.** Fix: meet them close on a detail, contact shadow, bounce, pins and clacks.
-- **Only close-ups.** The viewer never sees the whole object against the limit and the verdict passes unread. Fix: detail → judgement frame → hold → verdict → move on.
-- **A sparse final wall.** Fix: fill the frame; a quiet secondary layer in the zone never visited; no empty middle.
-- **Lettering in photos** (signs, gauges, hull names, logos). Fix: paint out, cut, or choose another photo.
-- **The wall seen too early** spends the ending. Fix: measure every frame's visible share of the board before rendering.
-- **Too small at the end.** Fix: size the hierarchy for the poster; small tags are texture.
+- **Lettering in photos** (signs, names, logos). Fix: paint out, cut, or choose another photo.
+- **The wall seen too early** spends the ending; **a sparse or tiny final wall** wastes it. Fix: measure every frame's visible share; size the hierarchy for the poster; a quiet secondary layer, no empty middle.
-## 10. Engine
+## 10. Sources, facts, engine
-- `demo/kit/board.js` — the renderer: `setScene`, `renderScene(canvas, t)`, `camAt(t)` (base + Σ eased moves + shakes + breath; `bease(u, a, b)`), elements `print`, `tag`, `magnet`, `ruler`, `card`, `stamp`, `ink` (`line`, `dim`, `write`, `hatch`, `ring`, `wake`; `erase` on any ink; `jolts` on any object), `shade` (passing window shadows), `sceneTexts(t)` for `readcheck.mjs`, `subCheck()` for one-line subtitles. Field reference: `demo/kit/README.md`.
-- `demo/kit/batch.mjs` — renders scene JSONs (stills, thumbnails, cards) in one browser; a still `extends` a film's world with its own camera and time.
-- `demo/kit/tools/` — cut-outs (`prep_object.py`, `sky_key.py`, `mirror_span.py`, `stretch_span.py`), thin-structure redraws (`redraw_stays.py`, `redraw_suspension.py`, `repair_hangers.py`), `clean_lettering.py`, `make_print.py`, `rebuild_objects.sh`, `fetch_fonts.py`. `demo/scenes/_gen_film.py`: a world as data. Checks in `demo/tools/`: `camcheck.mjs` (visible share, speed), `rescheck.mjs` (source px per screen px), `subcheck.mjs`, `cuecheck.py`, `rhythm_report.py`, `final_asr.py`.
+- **Photos**: Wikimedia Commons (read each file page's licence and author), national libraries and archives (e.g. the Library of Congress: check each item's rights statement), agency media pages, Flickr Commons. Fine: CC0, public domain, CC BY (credit it). CC BY-SA, "no known restrictions" (≠ CC0) or other terms: name them to the user and ask first. For the user's own product, site or people, ask for their photos. No licensable photo of a real thing → draw it in marker as a sketch; never a generated image presented as the real object.
+- **Facts**: keep a `FACTS.md` in the project folder (each claim on screen or in the voice, its source URL, the quoted wording, or the measurement method) and deliver it with the film. List every photo in `CREDITS` with source, author and licence.
+- **Extra packages and packs** (beyond `setup.sh deps voice music`): `onnxruntime` and the BiRefNet-general matting model (MIT, ~970 MB: https://github.com/danielgatis/rembg/releases/download/v0.0.0/BiRefNet-general-epoch_244.onnx, path in `$BIREFNET_ONNX`) for cut-outs; `fonttools` only to subset CJK fonts offline. The agent installs them itself into a private venv in the project folder (`demo/kit/tools/kit_env.sh` does venv and model), never into `$LIB/.venv`. Without the model: cut with `prep_object.py --poly` (hand polygon) or `--mask` (a mask image).
+- **Engine** (copy into the project): `demo/kit/board.js` (camera, prints, tags, magnets, ruler, cards, stamp, ink, erasing, `sceneTexts(t)`, `subCheck()`; fields in `demo/kit/README.md`), `demo/kit/batch.mjs` (stills), `demo/kit/tools/` (cut-outs, line redraws, lettering wipe, prints, fonts), checks in `demo/tools/` (`camcheck.mjs` visible share and judgement frames, `rescheck.mjs`, `subcheck.mjs`).
-A minimal world that is not ours (two parking options by walking distance; `node demo/kit/batch.mjs park.json`, after `fetch_fonts.py park.json` for new characters):
+A minimal world (`node demo/kit/batch.mjs park.json`; `fetch_fonts.py park.json` first for new characters):
```json
{ "dur": 6, "t": 5.5, "board": { "w": 4000, "h": 2400 }, "hand": 0, "cam": { "x": 1500, "y": 1000, "z": 0.8, "moves": [] },
@@ -115,7 +109,7 @@ A minimal world that is not ours (two parking options by walking distance; `node
## 11. Variation space
-The agent decides per film: structure, which objects are photographed, plan vs elevation, the wall's reading path, opening, ending, camera path, pacing. Users may bring their own photos or generated images; they own those licences (list them in `CREDITS`).
+The agent decides per film: structure, which objects are photographed, plan vs elevation, the wall's reading path, opening, ending, camera path, pacing.
- **Three structures:** one measurement that keeps growing until it breaks a limit; a before/after where the erased first plan stays as a ghost under the second; a checklist stamped item by item as the camera moves down the wall.
- **Three openings:** a stamp on a finished drawing, then back to see why; one number written large, then the line that measures it; a photo dropped onto an empty corner.
@@ -123,4 +117,4 @@ The agent decides per film: structure, which objects are photographed, plan vs e
---
-How our demo was made (story, shots, score, end card, build): [DEMO.md](DEMO.md). Read it after your treatment exists.
+How our demo was made (story, shots, score, title card, build): [DEMO.md](DEMO.md). Read it after your treatment exists.
diff --git a/styles/briefing-board/demo/.gitignore b/styles/briefing-board/demo/.gitignore
new file mode 100644
index 0000000..823d126
--- /dev/null
+++ b/styles/briefing-board/demo/.gitignore
@@ -0,0 +1,2 @@
+# local caches of the demo build (the matting model); the private venv (.venv/) is ignored repo-wide
+.models/
diff --git a/styles/briefing-board/demo/CREDITS b/styles/briefing-board/demo/CREDITS
index 82ba4bb..e8a6405 100644
--- a/styles/briefing-board/demo/CREDITS
+++ b/styles/briefing-board/demo/CREDITS
@@ -35,12 +35,13 @@ PHOTOGRAPHS (Wikimedia Commons; cut out at the photo's own resolution with BiRef
(measured positions) redrawn as clean lines (represents the bridge type, not a real bridge).
The four "print_*" objects are the same photographs, uncropped, on a white photo-paper border, pinned at the
top right of the wall. No real bridge, ship, company or place is named or readable in the film. The licence
-trail of every download is in sources/candidates/candidates.json (local).
+trail of every photo looked at is in sources/candidates/candidates.json; kit/tools/fetch_sources.py downloads
+the six used ones from Commons.
The whiteboard, its light and ghosts, the frame and tray, magnets, tags, the steel ruler, the cards and sticky
notes, the clearance sketch, the rubber stamp and all marker ink are drawn in code.
-FONTS (SIL Open Font License 1.1; texts in kit/fonts/)
+FONTS (SIL Open Font License 1.1; texts in kit/fonts/; all from Google Fonts, fetched by kit/tools/fetch_fonts.py)
- LXGW Marker Gothic, The LXGW Marker Gothic Project Authors (subset)
- Noto Sans SC, Adobe / Google (subset)
- Archivo, Omnibus-Type
@@ -58,7 +59,7 @@ MUSIC AND SOUND
trombone, tuba, horn, tubular bells, glockenspiel, vibraphone)
TOOLS
-- Segmentation: BiRefNet-general (MIT), run through onnxruntime (MIT).
+- Segmentation: BiRefNet-general (MIT; ONNX export from https://github.com/danielgatis/rembg/releases), run through onnxruntime (MIT).
- Rendering: headless Chromium (Playwright); ffmpeg.
FACTS
diff --git a/styles/briefing-board/demo/build.sh b/styles/briefing-board/demo/build.sh
index 21c6dea..6a19c97 100755
--- a/styles/briefing-board/demo/build.sh
+++ b/styles/briefing-board/demo/build.sh
@@ -1,8 +1,12 @@
#!/bin/sh
# Engineering Briefing Board — "The Ship Decides": one-command build.
-# voice (+ speech check) → scene → checks → picture → score and sound → subtitles → master → poster.
-# Objects in kit/objects/ are already prepared (rebuild them with kit/tools/rebuild_objects.sh, about 3 minutes);
-# the Chinese font subsets in kit/fonts/ come from kit/tools/fetch_fonts.py (needs a network).
+# fetch what git does not hold → voice (+ speech check) → scene → checks → picture → score and sound → subtitles → master → poster.
+# From a clean clone (library set up with `setup.sh deps voice music`) the first run also downloads:
+# fonts (Google Fonts, OFL) → kit/fonts/ kit/tools/fetch_fonts.py
+# the six source photos (Commons, licences in candidates.json) kit/tools/fetch_sources.py (~470 MB)
+# a private venv demo/.venv (onnxruntime …) + the BiRefNet model kit/tools/kit_env.sh (~970 MB unless cached)
+# and cuts every object again kit/tools/rebuild_objects.sh (~3 min)
+# the voice model and the freepats / vsco2ce / vcsl samples tools/fetch.sh (library packs)
set -e
HERE=$(cd "$(dirname "$0")" && pwd)
LIB=${LIB:-$(cd "$HERE/../../.." && pwd)} # <repo>/films/<name>/demo or <repo>/styles/<slug>/demo
@@ -12,7 +16,14 @@ PY="$LIB/.venv/bin/python"
NAME=$(basename "$(dirname "$HERE")")
OUT="$HERE/.."
cd "$HERE"
-[ -f audio/vo/dur.json ] || "$PY" "$LIB/core/tts/tts.py" audio/lines.json audio/vo
+# fetch / prepare only what is missing; every test keys on a git-ignored file
+for f in Archivo-VF.ttf IBMPlexMono-Medium.ttf IBMPlexMono-SemiBold.ttf LXGWMarkerGothic-sub.woff2 NotoSansSC-500-sub.woff2 NotoSansSC-700-sub.woff2 NotoSansSC-900-sub.woff2; do
+ [ -f "kit/fonts/$f" ] || { python3 kit/tools/fetch_fonts.py; break; }
+done
+for j in kit/objects/*.json; do [ -f "${j%.json}.png" ] || { sh kit/tools/rebuild_objects.sh; break; }; done
+[ -f "$LIB/core/tts/kokoro-v1.0.onnx" ] && [ -f "$LIB/core/tts/voices-v1.0.bin" ] || (cd "$LIB" && sh tools/fetch.sh voice)
+for l in freepats vsco2ce vcsl; do [ -d "$LIB/core/audio/instruments/$l" ] || (cd "$LIB" && sh tools/fetch.sh instruments $l); done
+[ -f audio/vo/L9.wav ] || "$PY" "$LIB/core/tts/tts.py" audio/lines.json audio/vo
"$PY" "$LIB/core/tts/asr_check.py" audio/lines.json audio/vo --lang en
python3 scenes/_gen_film.py # scenes/film.json + audio/cues.json
python3 tools/cuecheck.py
diff --git a/styles/briefing-board/demo/kit/README.md b/styles/briefing-board/demo/kit/README.md
index 3ae875c..b1f5097 100644
--- a/styles/briefing-board/demo/kit/README.md
+++ b/styles/briefing-board/demo/kit/README.md
@@ -13,9 +13,11 @@ kit/
RESCHECK (source px per screen px of every print at time t)
batch.mjs scene JSON → PNG/JPG, many at once, any size
objects/ the object library: <id>.png (cut-out) + <id>.json (size, anchors, credit, how it was cut)
- fonts/ LXGW Marker Gothic + Noto Sans SC (subsets), Archivo, IBM Plex Mono — all OFL
+ fonts/ LXGW Marker Gothic + Noto Sans SC (subsets), Archivo, IBM Plex Mono — all OFL, fetched by tools/fetch_fonts.py
tools/
- prep_object.py photo → cut-out object (BiRefNet ONNX mask, optional polygon / sky key, clean edge, shared grade)
+ kit_env.sh the cut-out tools' private venv (demo/.venv: numpy, scipy, Pillow, onnxruntime) and the BiRefNet model
+ fetch_sources.py the source photos listed as used in sources/candidates/candidates.json (Commons URLs, licences)
+ prep_object.py photo → cut-out object (BiRefNet ONNX mask, or a polygon / mask image without it; sky key, clean edge, shared grade)
sky_key.py a mask for thin things shot against a clear sky (cables, stays), to add to BiRefNet's
redraw_stays.py stay cables measured from the sky key and redrawn as clean lines (pylon stays in front)
redraw_suspension.py main cables (fitted parabolas) and hangers (measured) redrawn as clean lines
diff --git a/styles/briefing-board/demo/kit/objects/beam.json b/styles/briefing-board/demo/kit/objects/beam.json
index 3b1ef76..0ba1ee0 100644
--- a/styles/briefing-board/demo/kit/objects/beam.json
+++ b/styles/briefing-board/demo/kit/objects/beam.json
@@ -28,6 +28,7 @@
"mask_max": null,
"thin_region": null,
"thin_color": null,
+ "radial": null,
"patch": [],
"poly": null,
"cut": [],
diff --git a/styles/briefing-board/demo/kit/tools/fetch_fonts.py b/styles/briefing-board/demo/kit/tools/fetch_fonts.py
index 5775308..5449d2a 100644
--- a/styles/briefing-board/demo/kit/tools/fetch_fonts.py
+++ b/styles/briefing-board/demo/kit/tools/fetch_fonts.py
@@ -1,46 +1,59 @@
#!/usr/bin/env python3
-"""Subset the Chinese fonts (OFL, Google Fonts) to the characters a scene uses.
+"""Fetch every font the page uses from Google Fonts (all SIL Open Font License 1.1) into kit/fonts/.
- python3 kit/tools/fetch_fonts.py scenes/film.json [more scene files…]
+ python3 kit/tools/fetch_fonts.py [scenes/film.json …] [--latin-only]
-Collects every character from tags, marker lettering, stamps, cards and subtitles,
-asks the Google Fonts CSS API for just those glyphs (&text=) and saves the woff2 files
-into kit/fonts/. Needs a network connection; run it again when the words change.
-Fonts: LXGW Marker Gothic (marker lettering), Noto Sans SC 500 / 700 / 900 (subtitles,
-tags, stamp). Both SIL Open Font License 1.1.
+- Latin faces, whole files from github.com/google/fonts (ofl/): Archivo (variable, wdth + wght) as
+ Archivo-VF.ttf, IBM Plex Mono Medium / SemiBold; plus each family's OFL.txt.
+- Chinese faces, subset to the characters the scenes use: LXGW Marker Gothic 400 (marker lettering) and
+ Noto Sans SC 500 / 700 / 900 (subtitles, tags, stamp, cards), through the Google Fonts CSS API with
+ &text= (a few kB each instead of megabytes). Run it again when the words change.
+Characters are collected from tags, marker lettering, stamps, cards and subtitles of the scene files
+(default: scenes/film.json). Needs a network connection; standard library only.
"""
import json, os, sys, urllib.parse, urllib.request, re
-HERE = os.path.dirname(os.path.abspath(__file__)); KIT = os.path.dirname(HERE)
+HERE = os.path.dirname(os.path.abspath(__file__)); KIT = os.path.dirname(HERE); FD = os.path.join(KIT, 'fonts')
UA = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 Chrome/120 Safari/537.36'
+GF = 'https://raw.githubusercontent.com/google/fonts/main/ofl/'
+LATIN = {'Archivo-VF.ttf': 'archivo/Archivo%5Bwdth,wght%5D.ttf',
+ 'IBMPlexMono-Medium.ttf': 'ibmplexmono/IBMPlexMono-Medium.ttf',
+ 'IBMPlexMono-SemiBold.ttf': 'ibmplexmono/IBMPlexMono-SemiBold.ttf'}
+LICENCES = {'OFL-Archivo.txt': 'archivo', 'OFL-IBMPlexMono.txt': 'ibmplexmono',
+ 'OFL-LXGWMarkerGothic.txt': 'lxgwmarkergothic', 'OFL-NotoSansSC.txt': 'notosanssc'}
BASE = '0123456789,.:;!?()-–—+×·%米 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz,。:;!?、()“”'
+def get(url, timeout=60):
+ return urllib.request.urlopen(urllib.request.Request(url, headers={'User-Agent': UA}), timeout=timeout).read()
+
def chars(scene_files):
s = set(BASE)
for f in scene_files:
d = json.load(open(f))
for e in d.get('elements', []):
- for k in ('text',):
- if isinstance(e.get(k), str): s |= set(e[k])
+ if isinstance(e.get('text'), str): s |= set(e['text'])
for l in e.get('lines', []) or []:
if isinstance(l.get('text'), str): s |= set(l['text'])
for q in d.get('subs', []):
s |= set(q.get('zh', '')) | set(q.get('en', ''))
return ''.join(sorted(c for c in s if c.strip()))
-def fetch(family, weight, text, out):
+def subset(family, weight, text, out):
q = f'https://fonts.googleapis.com/css2?family={family.replace(" ", "+")}:wght@{weight}&text={urllib.parse.quote(text)}'
- css = urllib.request.urlopen(urllib.request.Request(q, headers={'User-Agent': UA}), timeout=30).read().decode()
- url = re.search(r'url\((https://[^)]+)\)', css).group(1)
- data = urllib.request.urlopen(urllib.request.Request(url, headers={'User-Agent': UA}), timeout=60).read()
- open(out, 'wb').write(data); print(out, len(data), 'bytes')
+ url = re.search(r'url\((https://[^)]+)\)', get(q, 30).decode()).group(1)
+ data = get(url); open(out, 'wb').write(data); print(out, len(data), 'bytes')
if __name__ == '__main__':
- files = sys.argv[1:] or [os.path.join(os.path.dirname(KIT), 'scenes', 'film.json')]
- txt = chars(files)
- print(len(txt), 'characters')
- fd = os.path.join(KIT, 'fonts'); os.makedirs(fd, exist_ok=True)
- fetch('LXGW Marker Gothic', 400, txt, os.path.join(fd, 'LXGWMarkerGothic-sub.woff2'))
+ args = [a for a in sys.argv[1:] if not a.startswith('--')]
+ os.makedirs(FD, exist_ok=True)
+ for name, path in {**LATIN, **{k: v + '/OFL.txt' for k, v in LICENCES.items()}}.items():
+ out = os.path.join(FD, name)
+ if not os.path.exists(out):
+ data = get(GF + path); open(out, 'wb').write(data); print(out, len(data), 'bytes')
+ if '--latin-only' in sys.argv: sys.exit(0)
+ files = args or [os.path.join(os.path.dirname(KIT), 'scenes', 'film.json')]
+ txt = chars(files); print(len(txt), 'characters')
+ subset('LXGW Marker Gothic', 400, txt, os.path.join(FD, 'LXGWMarkerGothic-sub.woff2'))
for w in (500, 700, 900):
- fetch('Noto Sans SC', w, txt, os.path.join(fd, f'NotoSansSC-{w}-sub.woff2'))
- open(os.path.join(fd, 'chars.txt'), 'w').write(txt)
+ subset('Noto Sans SC', w, txt, os.path.join(FD, f'NotoSansSC-{w}-sub.woff2'))
+ open(os.path.join(FD, 'chars.txt'), 'w').write(txt)
diff --git a/styles/briefing-board/demo/kit/tools/fetch_sources.py b/styles/briefing-board/demo/kit/tools/fetch_sources.py
new file mode 100644
index 0000000..25f48d5
--- /dev/null
+++ b/styles/briefing-board/demo/kit/tools/fetch_sources.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env python3
+"""Download the source photos the demo's cut-outs are made from, as recorded in
+sources/candidates/candidates.json (every entry with "used": true): original_url → sources/candidates/<file>.
+
+ python3 kit/tools/fetch_sources.py [--all]
+
+Each record already holds the Commons page, author, licence and the licence evidence (the file page's
+template); this script prints them as it goes. Files that exist are kept; a recorded sha256 is checked
+(a mismatch is only a warning: Commons files can be re-uploaded). About 470 MB, two Library of Congress
+TIFFs being most of it. --all also fetches the candidates that were looked at but not used.
+Standard library only.
+"""
+import hashlib, json, os, sys, urllib.request, time
+
+HERE = os.path.dirname(os.path.abspath(__file__)); DEMO = os.path.dirname(os.path.dirname(HERE))
+SRC = os.path.join(DEMO, 'sources', 'candidates')
+UA = 'LemoOpuscar-demo-fetch/1.0 (https://github.com/lemomo-ai/lemo-opuscar; library demo rebuild)'
+
+def sha256(p):
+ h = hashlib.sha256()
+ with open(p, 'rb') as f:
+ for b in iter(lambda: f.read(1 << 20), b''): h.update(b)
+ return h.hexdigest()
+
+def fetch(url, out):
+ tmp = out + '.part'
+ for attempt in range(4):
+ try:
+ with urllib.request.urlopen(urllib.request.Request(url, headers={'User-Agent': UA}), timeout=120) as r, open(tmp, 'wb') as f:
+ while True:
+ b = r.read(1 << 20)
+ if not b: break
+ f.write(b)
+ os.replace(tmp, out); return
+ except Exception as e:
+ print(' retry', attempt + 1, e); time.sleep(5 * (attempt + 1))
+ raise SystemExit(f'could not download {url}')
+
+if __name__ == '__main__':
+ recs = json.load(open(os.path.join(SRC, 'candidates.json')))
+ for r in recs:
+ if not (r.get('used') or '--all' in sys.argv): continue
+ out = os.path.join(SRC, r['file']); os.makedirs(os.path.dirname(out), exist_ok=True)
+ print(f"{r['file']}: {r['license']} · {r['author']} · {r['commons_url']}")
+ if not os.path.exists(out):
+ fetch(r['original_url'], out)
+ if r.get('sha256') and sha256(out) != r['sha256']:
+ print(f" WARNING: {r['file']} differs from the recorded file (sha256); the cut-out parameters may need a look")
+ print('sources ready in', SRC)
diff --git a/styles/briefing-board/demo/kit/tools/kit_env.sh b/styles/briefing-board/demo/kit/tools/kit_env.sh
new file mode 100644
index 0000000..aaf9079
--- /dev/null
+++ b/styles/briefing-board/demo/kit/tools/kit_env.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+# The cut-out tools' own environment, kept out of the library's .venv:
+# demo/.venv a private venv with numpy, scipy, Pillow and onnxruntime (made with uv when present)
+# the matting model BiRefNet-general ONNX (MIT, about 970 MB), found at $BIREFNET_ONNX, demo/.models/,
+# or ~/.rembg/models/birefnet-general/ (an existing rembg cache), else downloaded into demo/.models/.
+# Source it from the demo folder (DEMO=<demo> . kit/tools/kit_env.sh) to get $KPY and $BIREFNET_ONNX; idempotent.
+# Without the model, prep_object.py still cuts with --poly (a hand polygon) or --mask (a mask image).
+KIT_DEMO=${DEMO:-$(pwd)}
+LIB=${LIB:-$(cd "$KIT_DEMO/../../.." && pwd)}
+KPY="$KIT_DEMO/.venv/bin/python"
+if ! "$KPY" -c "import numpy, scipy, PIL, onnxruntime" 2>/dev/null; then
+ echo "kit_env: making the private venv $KIT_DEMO/.venv (numpy scipy pillow onnxruntime)"
+ BASEPY="$LIB/.venv/bin/python"; [ -x "$BASEPY" ] || BASEPY=python3
+ if command -v uv >/dev/null 2>&1; then
+ uv venv --quiet --python "$BASEPY" "$KIT_DEMO/.venv" && uv pip install --quiet --python "$KPY" numpy scipy pillow onnxruntime
+ else
+ "$BASEPY" -m venv "$KIT_DEMO/.venv" && "$KPY" -m pip install --quiet --disable-pip-version-check numpy scipy pillow onnxruntime
+ fi
+fi
+MODEL_URL=https://github.com/danielgatis/rembg/releases/download/v0.0.0/BiRefNet-general-epoch_244.onnx
+if [ -z "$BIREFNET_ONNX" ] || [ ! -f "$BIREFNET_ONNX" ]; then
+ for m in "$KIT_DEMO/.models/birefnet-general.onnx" "$HOME/.rembg/models/birefnet-general/birefnet-general.onnx"; do
+ [ -f "$m" ] && { BIREFNET_ONNX=$m; break; }
+ done
+fi
+if [ -z "$BIREFNET_ONNX" ] || [ ! -f "$BIREFNET_ONNX" ]; then
+ BIREFNET_ONNX="$KIT_DEMO/.models/birefnet-general.onnx"; mkdir -p "$KIT_DEMO/.models"
+ echo "kit_env: downloading the matting model (about 970 MB) → $BIREFNET_ONNX"
+ curl -fL --retry 3 -o "$BIREFNET_ONNX.part" "$MODEL_URL" && mv "$BIREFNET_ONNX.part" "$BIREFNET_ONNX"
+fi
+export KPY BIREFNET_ONNX
diff --git a/styles/briefing-board/demo/kit/tools/prep_object.py b/styles/briefing-board/demo/kit/tools/prep_object.py
index 715d92d..1015cf3 100644
--- a/styles/briefing-board/demo/kit/tools/prep_object.py
+++ b/styles/briefing-board/demo/kit/tools/prep_object.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
"""Turn one photo into a kit object: kit/objects/<id>.png + <id>.json.
- $LIB/.venv/bin/python kit/tools/prep_object.py <raw image> <id> [options]
+ $KPY kit/tools/prep_object.py <raw image> <id> [options] ($KPY: the private venv, see kit/tools/kit_env.sh)
Steps: rotate / crop → mask (BiRefNet, a mask file, a polygon, or both combined) → clean the edge
(tighten, erode, anti-alias, decontaminate the fringe colour) → shared grade (so photos from
@@ -25,8 +25,10 @@ Options
--anchor name=nx,ny anchor in output-normalised coordinates (repeatable; kept on re-runs)
--anchor-px name=x,y anchor in cropped-image pixels, converted after the trim
--credit FILE.json {title, author, licence, source} merged into meta
-Model: BiRefNet-general ONNX (MIT), path from $BIREFNET_ONNX or ~/.rembg/models/birefnet-general/birefnet-general.onnx.
-Requires numpy, scipy, Pillow, onnxruntime (all in the library's .venv).
+Model: BiRefNet-general ONNX (MIT, ~970 MB), from $BIREFNET_ONNX, demo/.models/birefnet-general.onnx or
+~/.rembg/models/birefnet-general/birefnet-general.onnx; download:
+https://github.com/danielgatis/rembg/releases/download/v0.0.0/BiRefNet-general-epoch_244.onnx (kit/tools/kit_env.sh does it).
+Without the model, --poly alone (or --mask) still cuts. Requires numpy, scipy, Pillow, onnxruntime (private venv).
"""
import argparse, json, os, sys, hashlib
import numpy as np
@@ -36,7 +38,8 @@ from scipy import ndimage as ndi
HERE = os.path.dirname(os.path.abspath(__file__))
OBJ = os.path.join(os.path.dirname(HERE), 'objects')
CACHE = os.path.join(os.path.dirname(os.path.dirname(HERE)), 'sources', 'masks')
-MODEL = os.environ.get('BIREFNET_ONNX') or os.path.expanduser('~/.rembg/models/birefnet-general/birefnet-general.onnx')
+MODEL = next((m for m in (os.environ.get('BIREFNET_ONNX'), os.path.join(os.path.dirname(os.path.dirname(HERE)), '.models', 'birefnet-general.onnx'),
+ os.path.expanduser('~/.rembg/models/birefnet-general/birefnet-general.onnx')) if m and os.path.exists(m)), None)
def birefnet(img):
@@ -45,6 +48,8 @@ def birefnet(img):
key = os.path.join(CACHE, 'birefnet_' + hashlib.md5(img.tobytes()).hexdigest()[:16] + '.png')
if os.path.exists(key):
return np.asarray(Image.open(key).convert('L'), np.float32) / 255
+ if MODEL is None:
+ return None
import onnxruntime as ort
sess = ort.InferenceSession(MODEL, providers=['CPUExecutionProvider'])
x = np.asarray(img.resize((1024, 1024), Image.BICUBIC), np.float32) / 255
@@ -128,6 +133,9 @@ def main():
alpha = load(a.mask)
else:
alpha = birefnet(img)
+ if alpha is None:
+ if not a.poly: sys.exit('no BiRefNet model (see kit/tools/kit_env.sh): give --poly or --mask to cut without it')
+ alpha = np.ones((img.height, img.width), np.float32) # the polygon alone makes the cut
if a.mask_mul: alpha = alpha * load(a.mask_mul)
if a.mask_max: # add thin parts, but only those connected to the main object (no clouds, no birds)
extra = load(a.mask_max)
diff --git a/styles/briefing-board/demo/kit/tools/rebuild_objects.sh b/styles/briefing-board/demo/kit/tools/rebuild_objects.sh
index 3ddb7ab..2fd4a62 100755
--- a/styles/briefing-board/demo/kit/tools/rebuild_objects.sh
+++ b/styles/briefing-board/demo/kit/tools/rebuild_objects.sh
@@ -1,15 +1,19 @@
#!/bin/sh
# Rebuild every object in kit/objects/ from its source photo, exactly as used in the film.
-# Sources (licences in demo/CREDITS) live in sources/candidates/; masks are cached in sources/masks/.
-# Needs the library's Python (numpy, scipy, Pillow, onnxruntime) and the BiRefNet-general ONNX model
-# ($BIREFNET_ONNX, default ~/.rembg/models/birefnet-general/birefnet-general.onnx).
+# Sources (licences in demo/CREDITS and sources/candidates/candidates.json) are downloaded into sources/candidates/
+# by kit/tools/fetch_sources.py; BiRefNet masks are cached in sources/masks/.
+# The tools run in a private venv (demo/.venv: numpy, scipy, Pillow, onnxruntime) with the BiRefNet-general ONNX
+# model; kit/tools/kit_env.sh makes both when missing. About 3 minutes after the downloads.
# Everything is cut at the photo's own resolution (tools/rescheck.mjs proves no frame upsamples a photo).
set -e
KIT=$(cd "$(dirname "$0")/.." && pwd); DEMO=$(dirname "$KIT")
LIB=${LIB:-$(cd "$DEMO/../../.." && pwd)}
-PY=${PY:-"$LIB/.venv/bin/python"}
+cd "$DEMO"
+python3 kit/tools/fetch_sources.py
+. kit/tools/kit_env.sh
+PY="$KPY"
T="kit/tools"; SRC="sources/candidates"; M="sources/masks"; D="sources/derived" # relative: the metas record portable paths
-cd "$DEMO"; mkdir -p "$M" "$D"
+mkdir -p "$M" "$D"
# ship, seen from straight above (CC BY 4.0, BAW): rotated so the bow points down, hull polygon keeps its shadow out
"$PY" "$T/prep_object.py" "$SRC/ship_top/ship_top_1.jpg" ship --rotate 90 --crop 740,190,1230,2820 \
diff --git a/styles/briefing-board/demo/sources/candidates/candidates.json b/styles/briefing-board/demo/sources/candidates/candidates.json
index 42dc527..ba5f9d9 100644
--- a/styles/briefing-board/demo/sources/candidates/candidates.json
+++ b/styles/briefing-board/demo/sources/candidates/candidates.json
@@ -15,7 +15,8 @@
"credit": "Containerschiffe auf der Elbe zwischen Wedel und Hamburg",
"license_evidence": "{{cc-by-4.0}} {{FlickreviewR|status=passed|author=BAW_Bundesanstalt für Wasserbau|sourceurl=https://flickr.com/photos/64906758@N07/55103130595|archive=|reviewdate=2026-03-09 22:10:22|reviewlicense=cc-by-4.0|reviewer=FlickreviewR 2}}",
"description": "Blick auf die Ladung des Containerschiffes \"EVER ARM\"",
- "used": true
+ "used": true,
+ "sha256": "ec8f2bdb4346d839c773b872771c63a171c88af309e660d344d2459af95a7468"
},
{
"file": "ship_top/ship_top_2.jpg",
@@ -87,7 +88,8 @@
"credit": "Own work",
"license_evidence": "{{self|Cc-zero}}",
"description": "The feeder ship Harrison outbound on the Elbe river near the town of Cuxhaven",
- "used": true
+ "used": true,
+ "sha256": "19c05a7a784391d2c2c653428bc011fc73357dc2914af132829e86fc3d8d8f37"
},
{
"file": "ship_side/ship_side_2.jpg",
@@ -231,7 +233,8 @@
"credit": "Own work",
"license_evidence": "{{PD-self}}",
"description": "Kiiminkijoki Bridge is a road bridge over Kiiminkijoki river in Haukipudas. The concrete box girder bridge was completed in 1954.",
- "used": true
+ "used": true,
+ "sha256": "2be81a278af5dfa32f01dca1cd3da87b2c9d8cc90642673cc81f3dbe3244aad0"
},
{
"file": "beam/beam_4.jpg",
@@ -321,7 +324,8 @@
"credit": "Library of Congress\nCatalog: http://lccn.loc.gov/2015632042\nImage download: https://cdn.loc.gov/master/pnp/highsm/31900/31967a.tif\nOriginal url: http://hdl.loc.gov/loc.pnp/highsm.31967",
"license_evidence": "{{PD-Highsmith}}",
"description": "Title: Fort Henry Bridge] Wheeling, West Virginia\nPhysical description: 1 photograph : digital, tiff file, color.\nNotes: Purchase; Carol M. Highsmith Photography, Inc.; 2015; (DLC/PP-2015:055).; Credit line: West Virginia Collection within the Carol M. Highsmith Archive, Library of Congress, Prints and Photographs Division.; Forms part of: West Virginia Collection within the Carol M. Highsmith Arc",
- "used": true
+ "used": true,
+ "sha256": "957e5d433b048d05b91efa456600751adbcdbb013ac95e4f804ae420d5d9231c"
},
{
"file": "arch/arch_2.tif",
@@ -412,7 +416,8 @@
"credit": "Library of Congress\n\nCatalog: http://lccn.loc.gov/2015631874\nImage download: https://cdn.loc.gov/master/pnp/highsm/31700/31799a.tif\nOriginal url: http://hdl.loc.gov/loc.pnp/highsm.31799",
"license_evidence": "{{PD-Highsmith}}",
"description": "Title: East Huntington bridge, Huntington, West Virginia\nPhysical description: 1 photograph : digital, tiff file, color.\n\nNotes: Purchase; Carol M. Highsmith Photography, Inc.; 2015; (DLC/PP-2015:055).; Credit line: West Virginia Collection within the Carol M. Highsmith Archive, Library of Congress, Prints and Photographs Division.; Forms part of: West Virginia Collection within the Carol M. Highs",
- "used": true
+ "used": true,
+ "sha256": "e714e492d781dfb50bd2427cae1bb7757d65fe573274d6e27f1872ef9e987d66"
},
{
"file": "cable/cable_2.tiff",
@@ -538,7 +543,8 @@
"credit": "bear mountain bridge west II",
"license_evidence": "{{cc-by-2.0}} {{User:FlickreviewR/reviewed-pass|russimages|https://flickr.com/photos/81751903@N08/14104379089|2017-10-28 23:56:23|cc-by-2.0|}}",
"description": "bear mountain bridge west II",
- "used": true
+ "used": true,
+ "sha256": "fcb038926db9e4acd0ea1861240c25714b13fd52d411fbecf6f6850caf63ef21"
},
{
"file": "suspension/suspension_2.jpg",
diff --git a/styles/data-physical/DEMO.md b/styles/data-physical/DEMO.md
index fe29f67..656e256 100644
--- a/styles/data-physical/DEMO.md
+++ b/styles/data-physical/DEMO.md
@@ -76,6 +76,7 @@ demo/
FACTS.md, CREDITS, TREATMENT.md, PRODUCTION_LOG.md, stills/styleframe.jpg
```
+- Needs `setup.sh deps voice` (Kokoro and faster-whisper; the Whisper `small.en` model downloads on the first check). `build.sh` fetches what git doesn't hold, only when missing: the studio HDRI (`sh tools/fetch.sh hdri`, 12 MB), the Kokoro model (`fetch.sh voice`), the sample libraries `vsco2ce`, `vcsl`, `freepats` (`fetch.sh instruments <lib>`, ~1 GB together), and the font subsets (`tools/fonts.mjs` from the Google Fonts CSS2 API, OFL: Noto Sans SC, Noto Serif SC, Inter, JetBrains Mono) whenever a `.woff2` named in `fonts.css` is missing. The walnut veneer textures are in git (`core/assets/polyhaven/`), the data CSVs in `demo/data/`.
- `sh demo/build.sh` takes about 7 minutes on Apple silicon; the picture (945 frames, 2× supersampled, acrylic transmission) is ~55 s with 3 workers, the speech check most of the rest.
- Checks it runs: `asr_check.py` (small.en, 7/7), subtitle single-line widths with the real fonts (widest 836 px against 1100 px), `readcheck.mjs` (all pass), `holdcheck.py` (2014 pair held 2.77 s, 2020/2021 held 2.67 s before their verdicts).
- Demo-specific pitfalls: aluminium and clear acrylic first read as the same white plates, so the acrylic got a teal tint and attenuation and the aluminium full metalness; long warm shadows turned the far aluminium brown until the two cool rims were added; the 2014 and 2020/2021 reading columns collided with the verdict plate until they were kept below y = 430; the 2025 stack sat behind the subtitle strip until the crane's target was dropped below the top; the top-view puck engraving reads upright only with yaw π/2 + 0.30 for this camera.
diff --git a/styles/data-physical/STYLE.md b/styles/data-physical/STYLE.md
index 268f66f..6b9aaf1 100644
--- a/styles/data-physical/STYLE.md
+++ b/styles/data-physical/STYLE.md
@@ -1,7 +1,7 @@
# Data Physicalization — Style Prompt
> Real statistics built as real objects: every unit is a countable piece of material (a plate, a block, a coin, a bar) stacked to exact scale on a crafted base, shot like a product in a studio — soft key, long shadows, shallow depth of field, physically based materials. The camera reads a number at the edge of one plate, follows the data as it grows, and pulls back until the chart is an installation.
-> References (grammar only): data-sculpture and physical-visualisation practice (one unit = one object, the object is the axis); product and still-life photography (a warm key at a low angle, a cool rim, a seamless sweep); annual-report editorial design (one reading per screen, a source line, a quiet grotesk). Copy none of their objects, layouts, typefaces or music, and never name them in the film.
+> References (grammar only): data-sculpture and physical-visualisation practice (one unit = one object, the object is the axis); product and still-life photography (a warm key at a low angle, a cool rim, a seamless sweep); annual-report editorial design (one reading per screen, a source line, a quiet grotesk). Copy none of them; never name them in the film.
## 1. Essence, and what it is not
@@ -10,16 +10,17 @@
- **Studio light, real matter.** Metal reflects an HDRI, wood shows grain, acrylic transmits; nothing glows, nothing is outlined, no fake UI.
- **Growth is assembly.** Data increases by pieces being placed, one after another, with weight and sound; it never scales or morphs.
- **The pull-back.** At least once the chart is revealed as a made thing: a dial, a table piece, a landscape of stacks.
+- **Every number has a source on screen**: real published statistics (or the user's own figures), credited in frame.
-Not Isometric Infographic (no diorama icons, no flat colour coding), not Glass Product Render (the object is data, not a product), not Data Storytelling (no paper chart, no axes drawn in ink), not Dark Tech Keynote (light, warm studio; no black stage or neon), not Brick Toy (no toy proportions, no studs, no characters).
+Not Isometric Infographic (no icons, no flat colour coding), not Glass Product Render (the object is data), not Data Storytelling (no paper chart or inked axes), not Dark Tech Keynote (no black stage or neon), not Brick Toy (no toy proportions, no characters).
## 2. Materials & rendering
-- **Pieces**: thin boxes or cylinders instanced in the thousands; each piece has a few-millimetre random offset and yaw, a ±7 % value change, and a gap so thin that only the light shows the layers. The jitter and the gap are what make a stack read as stacked rather than as a bar.
+- **Pieces**: thin boxes or cylinders instanced in the thousands, each with a few-millimetre random offset and yaw, a ±7 % value change and a hairline gap: that is what makes a stack read as stacked, not as a bar.
- **Material per series**, chosen so two series separate in one glance at thumbnail size: brushed metal against tinted acrylic, pale wood against dark stone, copper coins against paper. A third material (e.g. brass) only for the ruler pieces, shared by every series.
- **Base**: a real-texture slab (wood veneer, stone) with inlaid marks: a tick ring, the series' paths, the labels of categories or years, cut into the surface at the base's own scale, lit with the scene.
-- **Rendering**: PBR (metalness/roughness, normal maps, transmission for acrylic), an HDRI at low intensity for reflections only, a warm directional key at 20–35° that casts long soft shadows, one or two cool rim lights so metal and acrylic separate from wood at distance; GTAO, physical depth of field (CoC from the real focus distance), 2× supersampling, a light vignette.
-- **Screen space only for type**: readings, verdicts, subtitles, the end card. Every reading is pinned to its object through the same world → screen function as the camera.
+- **Rendering**: PBR (transmission for acrylic), an HDRI at low intensity for reflections only, a warm key at 20–35° with long soft shadows, one or two cool rims so metal and acrylic separate from wood at distance; GTAO, physical depth of field, 2× supersampling, a light vignette.
+- **Screen space only for type**: readings, verdicts, the source line, subtitles, the title card. Every reading is pinned to its object through the same world → screen function as the camera.
- **Post**: grain light (the background is pale), no lens flares, no chromatic aberration.
## 3. Colour logic
@@ -33,18 +34,19 @@ Example (our demo): sweep #C4BEB4, walnut base, aluminium #C8CCD1 (metal), acryl
## 4. Type & subtitles
-- **Roles**: a light grotesk for numbers (Inter 200–300; the hero reading 130–170 px, a stack reading 46–56 px); a sans for labels and verdicts in the film's language (Noto Sans SC 500, 24–46 px); a monospace for units, years and the sign-off (20–24 px); a serif only for the title. OFL, self-hosted, CJK subset.
+- **Roles**: a light grotesk for numbers (e.g. Inter 200–300; the hero reading 130–170 px, a stack reading 46–56 px); a sans for labels and verdicts in the film's language (e.g. Noto Sans SC 500, 24–46 px); a monospace for units, years and source lines (20–24 px); a serif only for the title. OFL, self-hosted, CJK subset.
- **A reading** = a dot on the object, a 1.4 px leader, a small swatch of the series' material, the category line, then the value and unit, on a translucent paper plate (~84 %). Two readings of one pair stack in one column, larger value on top.
+- **The source line** (dataset, publisher, year, licence, e.g. "数据:IRENA (2026),经 Our World in Data 整理 · CC BY 4.0") is in frame with the data, small (20–22 px, ink at ~60 %) in a corner away from the subtitles, at least from the first reading to the summary, and on the title card.
- **A verdict** sits in the upper-left third on its own plate in the accent colour, underlined by a growing rule; it appears only after the readings it judges have been still for ≥ 2.5 s.
-- **Subtitles**: bottom-left, a 2 px ink rule and a paper plate fading right; film language on top, second language below; each line one line only, measured with the real font (`nowrap`), split into two cues rather than wrapped. Hold ≥ max(1.8 s, speech + 0.6 s).
-- Labels hold ≥ characters ÷ 4.5 + 1.5 s (CJK) / letters ÷ 15 + 1.5 s; a rolling counter reports its landing value; nothing below 20 px at 1080p.
+- **Subtitles**: bottom-left, a 2 px ink rule and a paper plate fading right; if the film is bilingual, the film's language on top; each line one line only, measured with the real font (`nowrap`), split into two cues rather than wrapped. Hold ≥ max(1.8 s, speech + 0.6 s).
+- Labels hold ≥ CJK characters ÷ 4.5 + 1.5 s / letters ÷ 15 + 1.5 s; a counter reports its landing value; nothing below 20 px.
## 5. Motion quality
- On ones, 24 fps; the camera never stops (2–5 % creep on holds).
-- **Cascade**: a stack assembles bottom-to-top in 0.5–1.0 s, each piece dropping a few centimetres with an ease-out; landing times follow a slight power curve so the top arrives with a flourish.
-- **Feed**: a year's increase arrives as single pieces entering from out of frame with a quintic ease-out and a half-turn of yaw that unwinds — "placed", not "dropped" — at 8–16 pieces per second, a counter rolling with the pieces actually landed.
-- **The last object** falls with gravity (ease-in), lands with one small damped bounce, its shadow tightening as it comes down.
+- **Cascade**: a stack assembles bottom-to-top in 0.5–1.0 s, each piece dropping a few centimetres with an ease-out.
+- **Feed**: one period's increase arrives piece by piece from out of frame, quintic ease-out, a yaw that unwinds ("placed", not "dropped"), 8–16 pieces per second, the counter rolling with the pieces landed.
+- **A single heavy object** falls with gravity, lands with one small damped bounce, its shadow tightening.
- Readings fade in with a 16 px rise and draw their leader; they leave by fading, never by sliding.
- Never moves: the base, a piece once landed, the ruler pieces.
@@ -64,9 +66,9 @@ The subject fills at least a third of the frame height at key moments; readings
## 7. Sound palette
- **The material's own sound** is the foley: metal plates tick bright and short (inharmonic partials 3–8 kHz), acrylic toks duller (1–3 kHz), wood knocks, coins ring. A cascade is a burst of these at the landing times, scaled down as density rises.
-- **The ruler sings**: every ruler piece (each 10th) rings a pitched mallet note (glockenspiel for metal, glass harp for acrylic), climbing a pentatonic scale with the count — the chart becomes an arpeggio.
+- **The ruler sings**: every ruler piece (each 10th) rings a pitched mallet note, one timbre per series (e.g. glockenspiel for metal, glass harp for acrylic), climbing a pentatonic scale with the count — the chart becomes an arpeggio.
- **Score**: mallets and air — marimba ostinato, bowed and struck vibraphone, harp, glass, a soft synth pad and a pulse bass with audible 2nd/3rd harmonics; horns for a turn. Accelerate by subdivision (8ths → 16ths), not tempo.
-- **Impacts**: the turn and the last object land on punch (60–120 Hz) + bass drum + timpani + a bell; the last object is the loudest moment of the film.
+- **Impacts**: a turn or a last object lands on punch (60–120 Hz) + bass drum + timpani + a bell; the two or three designed impacts are the loudest moments.
- **Silence**: a 0.3–0.6 s suck-out (music and foley −30 dB) before each designed impact; a thin studio-air bed stays.
- **Mix**: voice ~10 dB over music, ruler notes under the voice, −14 LUFS, true peak ≤ −1.2 dBTP. Voice: calm, precise, short sentences.
@@ -82,18 +84,25 @@ The subject fills at least a third of the frame height at key moments; readings
- Two materials too alike (bright aluminium vs clear acrylic) read as one series: give one a tint or a finish change, and check at thumbnail size.
- Long shadows and warm reflections turn metal brown at distance: add a cool rim light and keep the base darker than the pieces.
-- Thousands of thin pieces moiré at 2–3 px per layer: rely on per-piece value and offset (random, not periodic), 2× supersampling, and hide the gap at distance.
-- A reading that follows a moving object can leave the frame: clamp it to a safe box and keep a hold where the camera slows.
+- Thin pieces moiré at 2–3 px per layer: random per-piece value and offset, 2× supersampling.
+- A reading pinned to a moving object can leave the frame: clamp it to a safe box.
- Counters that roll by time instead of by landed pieces lie; tie them to the object count.
- Rounding to whole pieces can invert close values; when two values are within one unit, say so on screen or choose a finer unit.
-- Transmission (acrylic) shows the background through itself and streaks at low angles: keep roughness ≥ 0.2 and attenuation tinted.
+- Transmission streaks at low angles: acrylic roughness ≥ 0.2, tinted attenuation.
## 10. Engine
-- `demo/set.js` — the physical set: `buildSet(scene)` (HDRI, warm key + cool rims, walnut base with inlay canvas, instanced pieces per material, the engraved puck), the schedule `SHEETS`/`EVENTS` (landing time of every piece, cascade or feed), `landed(stack, t)`. Change `PAIRS` (series, radii, angles), `GW_PER_SHEET`, `BRASS_EVERY` and the materials to build any paired or single series.
-- `demo/film.js` — camera keys in cylindrical coordinates (`track` from `core/lib.js`) with depth-of-field focus on a target point, the reading kit (`pairLabels`, `verdict`, `plate`, `swatch`), the counter, subtitles with `SUBCHECK`, `TEXTS` for readcheck, `EV` for the mix.
-- `demo/mix.py` — material foley (`tick_alu`, `tok_acr`), ruler notes on a pentatonic ladder, the score on the timeline grid, suck-outs, master to −14.4 LUFS.
-- Minimal example, not in the demo: set `PAIRS` to one series of monthly values, `GW_PER_SHEET` to the month's unit, place them on a 12-position circle and replace the puck's engraving with the annual total.
+- `demo/set.js` — `buildSet(scene)` (HDRI, warm key + cool rims, base with inlay canvas, instanced pieces per material, the last object) and the landing schedule (`SHEETS`, `EVENTS`, `landed(stack, t)`); change `PAIRS`, the unit and the materials for any single or paired series.
+- `demo/film.js` — cylindrical camera keys (`track`, `core/lib.js`) with focus on a target point, the reading kit (`pairLabels`, `verdict`, `plate`, `swatch`), counter, subtitles (`SUBCHECK`), `TEXTS`, `EV`. `demo/mix.py` — material foley (`tick_alu`, `tok_acr`), ruler notes, suck-outs, master.
+- **Extra packages and packs**: beyond `setup.sh deps` only the studio HDRI, `sh tools/fetch.sh hdri` (Poly Haven, CC0, 12 MB); with narration `setup.sh deps voice`; for a sampled score `sh tools/fetch.sh instruments vsco2ce` / `vcsl` / `freepats`. The walnut veneer is in `core/assets/polyhaven/`. Anything you add (a spreadsheet reader, other textures) goes into a private venv / node_modules in the project folder, never into `$LIB/.venv`.
+- Minimal example, not in the demo: one series of twelve monthly values on a 12-position circle, the annual total engraved on the last object.
+
+### Sources, licences, facts
+
+- **Statistics for a new topic**: Our World in Data (each chart's "About this data" names the original source; CC BY 4.0 — credit both), World Bank Open Data (CC BY 4.0), Eurostat (CC BY 4.0), US Census / BLS / EIA (public domain); UN Data, IRENA, IEA free tables and other national statistics offices (e.g. 国家统计局): check each dataset's terms. Search the portal for the indicator, download the CSV, keep the file and its metadata in the project's `data/`.
+- **Licences**: CC0, public domain and CC BY are fine with a credit. ODbL, CC BY-SA, "no known restrictions" or "free for non-commercial use" are not CC0: name the terms to the user and ask before using them. Textures and HDRIs: Poly Haven / ambientCG (CC0).
+- **The user's own numbers** (annual report, ESG data, sales): ask for them and for the document they come from; never invent or round them into a better story. Never let generated images stand in for real data or material.
+- **Keep a FACTS.md in the project folder** — each on-screen number and spoken claim, its source URL, the quoted wording or row, and how any derived value (ratio, difference, units per piece) was computed — and deliver it with the film.
## 11. Variation space
@@ -105,4 +114,4 @@ Decided per film: the unit and its materials, the base and its shape, which seri
---
-How our demo was made (story, shots, score, end card, build): [DEMO.md](DEMO.md). Read it after your treatment exists.
+How our demo was made (story, shots, score, title card, build): [DEMO.md](DEMO.md). Read it after your treatment exists.
diff --git a/styles/data-physical/demo/build.sh b/styles/data-physical/demo/build.sh
index 362f55a..d527c6c 100644
--- a/styles/data-physical/demo/build.sh
+++ b/styles/data-physical/demo/build.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# One command: 《两条螺旋》Two Spirals (Data Physicalization demo)
-# sh demo/build.sh fonts (first run) → voice → speech check → events → picture → score + mix → master → .srt → checks → poster
+# sh demo/build.sh packs + fonts (when missing) → voice → speech check → events → picture → score + mix → master → .srt → checks → poster
set -e
HERE=$(cd "$(dirname "$0")" && pwd) # .../<slug>/demo
FILM=$(cd "$HERE/.." && pwd) # .../<slug>
@@ -11,7 +11,15 @@ PY="$LIB/.venv/bin/python"
NAME=data-physical
cd "$LIB"
-[ -f "$HERE/fonts.css" ] || node "$HERE/tools/fonts.mjs" "$HERE" # OFL font subsets from Google Fonts
+# packs that are not in git (each fetched only when missing)
+[ -f core/assets/polyhaven/photo_studio_loft_hall_2k.hdr ] || sh tools/fetch.sh hdri # Poly Haven studio HDRI (CC0, 12 MB)
+[ -f core/tts/kokoro-v1.0.onnx ] || sh tools/fetch.sh voice # Kokoro model (setup.sh deps voice installs the Python side)
+for l in vsco2ce vcsl freepats; do [ -d "core/audio/instruments/$l" ] || sh tools/fetch.sh instruments $l; done # CC0 samples for the score
+# fonts: the .woff2 subsets are gitignored; fetch them (Google Fonts, OFL) whenever one that fonts.css names is missing
+NEED_FONTS=0
+[ -f "$HERE/fonts.css" ] || NEED_FONTS=1
+for f in $(grep -o 'fonts/[^)]*\.woff2' "$HERE/fonts.css" 2>/dev/null); do [ -f "$HERE/$f" ] || NEED_FONTS=1; done
+if [ "$NEED_FONTS" = 1 ]; then node "$HERE/tools/fonts.mjs" "$HERE"; fi
# voice: Kokoro (af_heart), then a speech-to-text check with the small English model
node "$HERE/tools/export.mjs" "$HERE" > /dev/null || true
diff --git a/styles/lidar-survey/DEMO.md b/styles/lidar-survey/DEMO.md
index b910394..43c0c1b 100644
--- a/styles/lidar-survey/DEMO.md
+++ b/styles/lidar-survey/DEMO.md
@@ -80,6 +80,7 @@ demo/
```
- `sh demo/build.sh` takes about 5 minutes on Apple silicon (the picture renders in ~30 s with 3 workers; Kokoro and the Whisper check take most of the rest). With no data yet, or `FETCH=1`, it first fetches and builds the data (~3 minutes, ~350 MB in `assets/raw/`).
+- Fonts (Barlow Condensed, IBM Plex Mono, Noto Sans SC) are not in git: `tools/fonts.py` fetches them from github.com/google/fonts when missing and subsets the CJK font. The data tools run in a private venv (`assets/raw/.venv`: laspy, lazrs, scikit-image, fonttools) that build.sh creates.
- Checks it runs: `asr_check.py` with `small.en` (0 mismatches), cue overlap from real voice durations, cue grid, subtitle single-line widths with the real fonts (widest 595 px against 1100 px), `readcheck.mjs`, motion per second (no flat stretch > 1 s, no cut-like jump).
- Data notes: the EPT copy is Web Mercator; everything is converted to a local metric frame around 41.8875° N, 72.1960° W. The provider's class 1 mixes vegetation and buildings; low vegetation just above the ground survives a cut at 0 m, so the plane finishes at −6 m. The ground model is triangulated from class-2 returns (1.3 M) at 0.5 m.
- Demo-specific pitfalls: the leaf-off canopy reads as a flat carpet from more than ~150 m, so the peel is shot low and close; a pond in the north-east has no returns (a black hole outside the window); the regular scan-line striping of the ground returns is strongest at grazing angles; the second scan must start just outside the frame or the first frames jump.
diff --git a/styles/lidar-survey/STYLE.md b/styles/lidar-survey/STYLE.md
index 0f23d01..c0fcfbd 100644
--- a/styles/lidar-survey/STYLE.md
+++ b/styles/lidar-survey/STYLE.md
@@ -1,7 +1,7 @@
# LiDAR Survey — Style Prompt
> Real airborne laser points of a real place, floating in the dark as a measured cloud; a scan line or a cutting plane passes through them and the points condense into a solid, raking-lit surface, which is then measured with hairline instruments. One designed camera move carries the whole film: the cloud is something you fly through, not a picture you look at.
-> References (grammar only): survey and archaeology lidar visualisations (the cloud as evidence, colour as height, the canopy removed to show the ground); architectural section drawings (a cut through the subject, dimensioned); museum and science film cadence (one reading per screen, held). Copy none of their layouts, colour ramps, typefaces or music, and never name them in the film.
+> References (grammar only): survey and archaeology lidar visualisations (colour as height, the canopy removed); architectural section drawings (a cut, dimensioned); museum film cadence (one held reading per screen). Copy none of their layouts, ramps, typefaces or music, and never name them in the film.
## 1. Essence, and what it is not
@@ -11,11 +11,11 @@
- **Measurement in hairlines**: one reading at a time, in the accent, attached to what it measures; numbers from the points or an official source.
- **Dark, quiet, exact**: near-black ground, restrained colour, no glow except at the front.
-Not Sci-fi Hologram HUD (no invented interface, no cyan wireframe fantasy: the points are real and sparse where the survey was sparse), not Satellite Briefing (photographs from above; here the subject is a 3D cloud flown through), not Blueprint (no drafting sheet), not Low-poly Isometric (no stylised diorama), not Glass Product Render (no studio object).
+Not Sci-fi Hologram HUD (no invented interface: the points are real, sparse where the survey was), not Satellite Briefing (photographs from above; here a 3D cloud flown through), not Blueprint, not Low-poly Isometric, not Glass Product Render.
## 2. Materials & rendering
-- **Points**: GL points sized in world units (0.12–0.3 m) with a pixel floor of one output pixel; soft round discs; opaque by default (depth-tested), additive only for a ghost layer. Colour from height above ground or class, brightness from return intensity. Fog to the background colour with distance.
+- **Points**: GL points sized in world units (0.12–0.3 m), floor of one output pixel, soft discs, opaque and depth-tested (additive only for a ghost layer); colour from height or class, value from intensity; distance fog.
- **Quantise for the browser**: uint16 positions (2 cm / 1 cm) plus a byte each for height above ground, class, intensity, seed.
- **Height above ground** for every return (minus a ground model triangulated from class-2 returns) drives the colour ramp, the cutting plane and the ruler.
- **The solid surface**: a 0.5–1 m mesh of the ground or surface model, smooth normals, baked short-radius AO, a low raking sun (20–35°), faint contours, crests lightened. Display exaggeration of micro relief (×2–3) only with an on-screen note; measure on undistorted data.
@@ -40,15 +40,15 @@ Example (our demo): background #05080A, canopy #1F3F35 → #5C9A7A → #E2F3DC,
- **Roles**: light condensed numerals for readings (110–130 px, e.g. Barlow Condensed 300); a monospace for instruments, coordinates, counts and source lines (19–22 px, e.g. IBM Plex Mono); a sans for labels in the film's language (24–36 px, e.g. Noto Sans SC 500). OFL, self-hosted, CJK subset to the characters used.
- **Instruments** in one corner: place, coordinates, area, data source, point count, any exaggeration; they change only when the medium does.
- **Readings** in the right third beside what they measure: label, number, source/method line; a leader when the feature is in frame; a rolling counter reports its landing value.
-- **Subtitles**: a transcript strip bottom-left (2 px rule, plate fading right); bilingual = one line per language, measured with the real font, split rather than wrapped.
+- **Subtitles**: a transcript strip bottom-left (2 px rule, plate fading right), one line per language measured with the real font, split rather than wrapped; if bilingual, the film's language on top.
- Nothing below 19 px at 1080p. Hold subtitles ≥ max(1.8 s, speech + 0.6 s); labels ≥ characters ÷ 4.5 + 1.5 s (CJK), letters ÷ 15 + 1.5 s (Latin).
## 5. Motion quality
-- On ones, 24 fps; the camera never stops (holds keep a slow push or orbit); keys interpolated as a C1 spline over time in target / distance / heading / pitch, never with `lookAt` from a nadir pose.
+- On ones, 24 fps; the camera never stops; keys as a C1 spline in target / distance / heading / pitch (no `lookAt` from nadir).
- The front moves on an ease, slowest where the subject is; a cutting plane steps on the beat (eased steps, short holds) so the layers read.
- Points appear behind a front or by height, never by random fade-in across the whole frame.
-- Readings land with a small pop; traced features light up along their length in order, like a signal travelling a network.
+- Readings land with a small pop; traced features light up along their length in order.
- Never moves: the points relative to each other (no wobble, no noise displacement), the instruments' positions.
## 6. Camera grammar
@@ -63,15 +63,15 @@ Example (our demo): background #05080A, canopy #1F3F35 → #5C9A7A → #E2F3DC,
| Lateral track | travelling a feature | a wall, a road, a pipeline, a coast |
| Push to a section | the detail that proves it | a cross-section, a clearance, a height |
-Subject at key moments ≥ a third of the frame height; readings in the right third; instruments in a corner; nothing in the subtitle strip. Transitions are fronts and planes (photo → points, points → surface, surface → cut), never crossfades or hard cuts inside the cloud.
+Subject ≥ a third of the frame height at key moments; readings right third; instruments in a corner; nothing in the subtitle strip. Transitions are fronts and planes, never crossfades or hard cuts inside the cloud.
## 7. Sound palette
- **Instrument sounds**: FM pings, fine crackle as points arrive, noise sweeps tied to a front, ticks that divide (8ths → 16ths → 32nds) to accelerate, a descending pitched blip per peeled layer, a ratchet while a counter rolls, a ping when a reading lands.
- **Weight and synthesis**: timpani, bass drum, gran cassa for condensations and cuts, a reversed swell into the main impact; low-passed detuned-saw pads; a pulse bass with audible 2nd/3rd harmonics.
-- **Dry until the turn**: electronics before the reveal; one organic, wooden or bowed timbre (marimba, bowed vibraphone) arrives when the solid surface does, and plays the found features.
+- **Dry and wet**: one option is electronics while the subject is still points, and a single organic, wooden or bowed timbre (marimba, bowed vibraphone) for the found features once the surface exists.
- **Beds**: the place's own ambience (wind in leaves, water, traffic) at the start and the end as J- and L-cuts; a thin air bed in between.
-- **Silence**: a near silence (music and pulse gone, air only) right before the condensation; the first sound after it is the impact.
+- **Silence**: a near silence (air only) before the main reveal; the first sound after it is the impact.
- **Mix**: voice ~10 dB over the music and ducking it; impacts outside the bus compressor; −14 LUFS, true peak ≤ −1.2 dBTP. Voice: a calm, plain narrator, short declarative lines.
## 8. Native moves
@@ -85,8 +85,9 @@ Subject at key moments ≥ a third of the frame height; readings in the right th
## 9. Pitfalls of the medium
-- **Licences**: USGS 3DEP (public domain), AHN (CC0), national/state portals (check each: CC BY or non-commercial). Not commercial scans or Google 3D tiles. Credit the agency and project in `CREDITS`.
-- **Size**: fetch an EPT subset by box and depth (laspy + lazrs), not whole tiles.
+- **Finding data for a new place**: USGS 3DEP (US) as Entwine Point Tiles per project at `https://s3-us-west-2.amazonaws.com/usgs-lidar-public/<project>/ept.json`, projects and footprints in `boundaries/resources.geojson` of github.com/hobuinc/usgs-lidar; bare-earth scouting through the 3DEP elevation ImageServer. OpenTopography (catalogue of many collections, licence per dataset). AHN (Netherlands, CC0). National portals, e.g. England's Environment Agency LiDAR (OGL), France IGN LiDAR HD (Licence Ouverte), Spain PNOA-LiDAR (CC BY 4.0), Finland NLS (CC BY 4.0), New Zealand LINZ (CC BY 4.0); read each portal's terms. Fetch a subset by box and depth, not whole tiles.
+- **Licences**: public domain, CC0, CC BY and attribution-only government licences are fine, with credit in `CREDITS`. ODbL, CC BY-SA, "no known restrictions" (not CC0) or non-commercial terms: name them to the user and ask first. Never commercial scans or Google 3D tiles. Ask the user for their own scans (a site survey, a drone or terrestrial scan, their BIM) when the film is about their asset. Never stand in a generated or invented cloud for real evidence.
+- **Facts**: keep a FACTS.md in the project folder (claim, source URL, quoted wording, or the measurement method) and deliver it with the film.
- **Coordinates**: EPT copies are often Web Mercator: convert to a local east/north/up frame first; check the vertical datum against known ground.
- **Leaf-off vs leaf-on**: leaf-off lidar reaches the ground but its canopy is sparse; say which season each layer is.
- **Classification is the provider's**: class 1 mixes vegetation, buildings and noise; drop 7 and 18; finish a cut below 0 m or low vegetation stays as stripes.
@@ -99,16 +100,17 @@ Subject at key moments ≥ a third of the frame height; readings in the right th
- `demo/film.js`: point shader (front, cutting plane, lift, ghost, window), surface shader (light, AO, contours, feature field, section), photo shader, camera spline (`camAt`), overlay (`reading`, `drawSection`, `subtitles`, readcheck registry).
- `demo/tools/`: `fetch_ept.py` (EPT subset), `terrain.py` (local frame, DTM), `walls.py` (relief model), `trace.py` (snap a tracing, measure), `profile.py` (section from raw returns), `build_data.py` (binaries + facts).
+- **Extra packages and packs** (beyond `setup.sh deps voice music`): Python `laspy`, `lazrs` (LAZ decoding), `scikit-image` (relief and ridge tools), `fonttools` + `brotli` (CJK subset). They are not in the library's `.venv`: the agent installs them itself into a private venv in the project folder (the demo uses `demo/assets/raw/.venv`), never into `$LIB/.venv`. Fonts come from github.com/google/fonts (ofl/), fetched by script.
- Minimal example, not in the demo: a building scan. Points coloured by class, a vertical front sweeping the street; behind it a 1 m surface model; one reading (roof height above the street).
## 11. Variation space
The agent decides the place and dataset, which classes to peel or keep, the fronts and their directions, the camera route, the readings, the accent within the colour logic, and whether a photo or a map opens the film.
-- **Structures**: a corridor flown from end to end with readings at three stations; a before/after of two surveys of the same place (erosion, construction) swapped by a front; a single object scanned, cut and dimensioned.
+- **Structures**: a corridor flown end to end with three readings; two surveys of one place (erosion, construction) swapped by a front; one object scanned, cut and dimensioned.
- **Openings**: a black frame the scan paints in line by line; a street-level photograph that dissolves into its own returns; a top-down map that tilts up into the cloud.
- **Endings**: the cloud pulls back to show the whole survey tile; the removed layer returns as a ghost; the last reading holds while the points fade to the instruments.
---
-How our demo was made (story, shots, score, end card, build): [DEMO.md](DEMO.md). Read it after your treatment exists.
+How our demo was made (story, shots, score, title card, build): [DEMO.md](DEMO.md). Read it after your treatment exists.
diff --git a/styles/lidar-survey/demo/CREDITS b/styles/lidar-survey/demo/CREDITS
index 30775d3..5cc8fbf 100644
--- a/styles/lidar-survey/demo/CREDITS
+++ b/styles/lidar-survey/demo/CREDITS
@@ -32,8 +32,9 @@ FACTS
FONTS (SIL Open Font License 1.1, licence texts in fonts/)
- Noto Sans SC — Google / Adobe, variable font from github.com/google/fonts (ofl/notosanssc), subset to the
characters used (tools/fonts.py)
-- Barlow Condensed — The Barlow Project Authors (readings, English subtitle line)
-- IBM Plex Mono — IBM (instruments, source lines)
+- Barlow Condensed — The Barlow Project Authors (readings, English subtitle line), github.com/google/fonts (ofl/barlowcondensed)
+- IBM Plex Mono — IBM (instruments, source lines), github.com/google/fonts (ofl/ibmplexmono)
+ All fonts are fetched by tools/fonts.py when missing (they are not in git).
VOICE
- Kokoro-82M (hexgrad), voice bm_george, Apache License 2.0; run locally via kokoro-onnx (MIT) through the
diff --git a/styles/lidar-survey/demo/build.sh b/styles/lidar-survey/demo/build.sh
index 5ce501b..b1a23df 100644
--- a/styles/lidar-survey/demo/build.sh
+++ b/styles/lidar-survey/demo/build.sh
@@ -2,7 +2,8 @@
# One command: 《林下的田》 The Fields Under the Forest (LiDAR Survey demo)
# sh demo/build.sh voice, checks, events, picture, score + mix, master, subtitles, checks, poster
# FETCH=1 sh demo/build.sh first re-download and rebuild the data: USGS 3DEP points (EPT, ~50 MB), NAIP 2016 photo,
-# Noto Sans SC; DTM, wall tracing, wall profile, binaries for the page (~3 min, ~350 MB in assets/raw)
+# DTM, wall tracing, wall profile, binaries for the page (~3 min, ~350 MB in assets/raw)
+# Fonts are fetched from Google Fonts by tools/fonts.py whenever they are missing (they are not in git).
set -e
HERE=$(cd "$(dirname "$0")" && pwd) # .../<slug>/demo
FILM=$(cd "$HERE/.." && pwd) # .../<slug>
@@ -14,18 +15,18 @@ DPY="$HERE/assets/raw/.venv/bin/python" # data tools need laspy + l
NAME=lidar-survey
cd "$LIB"
-if [ "${FETCH:-0}" = "1" ] || [ ! -f "$HERE/assets/raw/build/points.bin" ]; then
- [ -x "$DPY" ] || { python3 -m venv "$HERE/assets/raw/.venv" && "$DPY" -m pip install -q laspy lazrs numpy scipy pillow scikit-image fonttools brotli; }
+# style-specific packages live in a private venv inside the project, not in $LIB/.venv
+[ -x "$DPY" ] || { python3 -m venv "$HERE/assets/raw/.venv" && "$DPY" -m pip install -q laspy lazrs numpy scipy pillow scikit-image fonttools brotli; }
+# data: keyed on a gitignored artefact, so a clean clone always rebuilds it
+if [ "${FETCH:-0}" = "1" ] || [ ! -f "$HERE/assets/raw/build/points.bin" ] || [ ! -f "$HERE/assets/raw/build/naip.jpg" ]; then
"$DPY" -I "$HERE/tools/fetch_ept.py" "$HERE/assets/raw/ept" 14 USGS_LPC_CT_Statewide_B8_2016 -72.2005,-72.1915,41.8830,41.8920
"$DPY" -I "$HERE/tools/walls.py" "$HERE/assets/raw/ept" "$HERE/assets/raw/work" # DTM + local relief (+ a ridge review image)
"$DPY" -I "$HERE/tools/trace.py" "$HERE/assets/raw/work" "$HERE/data" # snap data/walls_traced.json -> data/walls.json
"$DPY" -I "$HERE/tools/profile.py" "$HERE/assets/raw/ept" "$HERE/data" C 20 80 # data/profile_C.json
"$DPY" -I "$HERE/tools/build_data.py" "$HERE/assets/raw/ept" "$HERE/assets/raw/work" "$HERE/data" "$HERE/assets/raw/build"
"$DPY" -I "$HERE/tools/fetch_naip.py" "$HERE/assets/raw/build"
- mkdir -p "$HERE/assets/raw/fonts"
- [ -f "$HERE/assets/raw/fonts/NotoSansSC.ttf" ] || curl -sL -o "$HERE/assets/raw/fonts/NotoSansSC.ttf" "https://github.com/google/fonts/raw/main/ofl/notosanssc/NotoSansSC%5Bwght%5D.ttf"
fi
-"$DPY" -I "$HERE/tools/fonts.py" "$HERE"
+"$DPY" -I "$HERE/tools/fonts.py" "$HERE" # fetches Barlow Condensed, IBM Plex Mono, Noto Sans SC (Google Fonts, OFL) if missing; CJK subset
# voice: Kokoro (bm_george), speech-to-text check with the small English model, cues from the real durations
node "$HERE/tools/export.mjs" "$HERE" > /dev/null || true
diff --git a/styles/lidar-survey/demo/tools/fonts.py b/styles/lidar-survey/demo/tools/fonts.py
index 5099be0..a1e8bbd 100644
--- a/styles/lidar-survey/demo/tools/fonts.py
+++ b/styles/lidar-survey/demo/tools/fonts.py
@@ -1,8 +1,25 @@
-"""Subset Noto Sans SC (OFL, variable) to every character in film.js and timeline.js.
-usage: fonts.py <demo_dir> (source font: assets/raw/fonts/NotoSansSC.ttf, fetched by build.sh)"""
-import os, sys
+"""Fetch every font the page uses from Google Fonts (github.com/google/fonts, OFL) if missing, and subset
+Noto Sans SC (variable) to the characters in film.js and timeline.js.
+usage: fonts.py <demo_dir> -> fonts/*.ttf, fonts/NotoSansSC-sub.woff2 (source CJK font cached in assets/raw/fonts/)"""
+import os, sys, urllib.request
from fontTools import subset
D = sys.argv[1]
+GF = "https://github.com/google/fonts/raw/main/ofl/"
+FILES = { # local path (relative to the demo) -> Google Fonts path
+ "fonts/BarlowCondensed-Light.ttf": "barlowcondensed/BarlowCondensed-Light.ttf",
+ "fonts/BarlowCondensed-Regular.ttf": "barlowcondensed/BarlowCondensed-Regular.ttf",
+ "fonts/BarlowCondensed-Medium.ttf": "barlowcondensed/BarlowCondensed-Medium.ttf",
+ "fonts/IBMPlexMono-Regular.ttf": "ibmplexmono/IBMPlexMono-Regular.ttf",
+ "fonts/IBMPlexMono-Medium.ttf": "ibmplexmono/IBMPlexMono-Medium.ttf",
+ "assets/raw/fonts/NotoSansSC.ttf": "notosanssc/NotoSansSC%5Bwght%5D.ttf",
+}
+for rel, src in FILES.items():
+ p = os.path.join(D, rel)
+ if os.path.exists(p) and os.path.getsize(p) > 10000: continue
+ os.makedirs(os.path.dirname(p), exist_ok=True)
+ b = urllib.request.urlopen(GF + src, timeout=300).read()
+ if len(b) < 10000: raise SystemExit(f"font download failed: {GF + src}")
+ open(p, "wb").write(b); print("fetched", rel, len(b), "bytes")
chars = set()
for f in ("film.js", "timeline.js"):
chars |= set(open(os.path.join(D, f), encoding="utf-8").read())
diff --git a/styles/microscope/DEMO.md b/styles/microscope/DEMO.md
index 34162da..1fa4142 100644
--- a/styles/microscope/DEMO.md
+++ b/styles/microscope/DEMO.md
@@ -76,12 +76,12 @@ demo/
mix.py score, foley, room, voice, mix -> out/mix.wav + out/stems/
config.json circle centres, nucleus guess, the roll the scan direction is computed for
tools/ plates.py (registration, cleaning, plates, collagen masks and counts, tissue axis), nucleus.py,
- fonts.py, export.mjs (voice lines, cues, number check), subcheck.mjs, cuecheck.py, finalasr.py
+ fonts.py (all fonts), export.mjs (voice lines, cues, number check), subcheck.mjs, cuecheck.py, finalasr.py
assets/ raw/Ventana-1.bif (227 MB, gitignored), plates/ (plates, ROI overlays, plates.json, nucleus.json)
FACTS.md, CREDITS, TREATMENT.md, PRODUCTION_LOG.md, stills/styleframe.jpg
```
-- `sh demo/build.sh` takes about 5 minutes on Apple silicon (the picture renders in ~20–90 s with 4 workers; the final speech check is the slowest step). `FETCH=1` re-downloads the slide and rebuilds every plate and measurement (about a minute after the download). The slide reader runs in its own `demo/.venv` (tifffile, imagecodecs).
+- `sh demo/build.sh` takes about 5 minutes on Apple silicon (the picture renders in ~20–90 s with 4 workers; the final speech check is the slowest step). In a fresh clone it first downloads the slide (227 MB), rebuilds the plates and measurements (about a minute) and fetches the fonts (Barlow Condensed and IBM Plex Mono from github.com/google/fonts, Noto Sans SC / Noto Serif SC subsets from the Google Fonts API); `FETCH=1` forces all of that again. The slide reader runs in its own `demo/.venv` (tifffile, imagecodecs).
- Checks it runs: `asr_check.py` with `small.en` (decimals are written as Whisper writes them in each line's `asr`), the script's numbers against the measurements (`export.mjs` fails on a mismatch), the cue grid, single-line subtitle widths with the real fonts (widest 642 px against 960), `readcheck.mjs`, speech-to-text on the final mix, black frames.
- Plates: slide photo 1251 × 3685 (21.2 µm/px), scan levels 5/4/3 whole with a 0.3 mm feather, level 2 whole (6144 × 5376, 1 µm/px), levels 1 and 0 as 5120 × 3584 crops around the nucleus. About 400 MB of decoded images per render worker.
- Demo-specific pitfalls: the scanner tray's clips at the slide's far end could only be filled roughly, so that end stays out of frame in every shot; the slide photo's resolution tag was trusted only after the tissue's centroid matched the scan through AOI0 (19 µm); with fields between 2.6 and 2.8 mm the level-2 plate flips in and out, so the circles are held at 2.6–2.7 mm to keep the turret quiet during a reading; the scan direction of the counting mask is computed for the roll in `config.json` and must follow the camera if the roll changes.
diff --git a/styles/microscope/STYLE.md b/styles/microscope/STYLE.md
index 5fd5b61..f3a4d08 100644
--- a/styles/microscope/STYLE.md
+++ b/styles/microscope/STYLE.md
@@ -1,27 +1,27 @@
# Microscope Story — Style Prompt
> Real, licence-clean microscopy of a real specimen, seen as it is, and one continuous change of scale that carries the viewer from the glass slide in the hand to a single cell. Focus breathes when the magnification changes, a focal plane sweeps when the camera lands, and every scale bar, field of view and reading comes from the image's own metadata.
-> References (grammar only): Charles and Ray Eames' *Powers of Ten* (one continuous change of scale with a readout riding along); premium microscope and medical-instrument launch films (dark bench, glass catching light, restrained marks, clean instrument sound); the instrument conventions of digital-pathology viewers (scale bar, field of view, magnification). Copy none of their layouts, interfaces, typefaces or music, and never name them in the film.
+> References (grammar only): Charles and Ray Eames' *Powers of Ten* (one continuous change of scale with a readout riding along); premium microscope launch films (dark bench, glass catching light, restrained marks, clean instrument sound); digital-pathology viewers' instruments (scale bar, field of view, magnification). Copy none of their layouts, interfaces, typefaces or music; never name them in the film.
## 1. Essence, and what it is not
- **The specimen is a photograph**: a real micrograph or whole-slide scan of the actual sample, CC0, public domain or CC BY. Nothing on the specimen is drawn, retouched or generated. A whole-slide image (WSI) is the ideal source: one sample, one registered pyramid from millimetres to microns, with the pixel size in its metadata.
- **Scale is the camera**: one log-space dive (and, when the story wants it, the climb back) through nested plates of the same sample. The scale bar shortens and jumps in a 1-2-5 sequence, the field-of-view readout rolls, the magnification steps.
- **Focus has a grammar**: a rack-in from soft at the start, a short breath (blur + a hint of field change) each time the magnification changes, a focal-plane sweep across the frame when the camera lands.
-- **Readings are measured**: every number is computed from the file (pixel size × pixels) by a method written down in the demo's `FACTS.md`, and the screen says how it was measured. Describe what was measured; never diagnose.
+- **Readings are measured**: every number is computed from the file (pixel size × pixels) and the screen says how it was measured. Describe what was measured; never diagnose. Keep a `FACTS.md` in the project folder (claim, source URL, quoted wording, or the measurement method) and deliver it with the film.
- **One reading per screen**, in the single accent colour.
-Not Satellite Briefing (no grey analyst grade; the stain keeps its colour), not Sci-fi Hologram HUD (no glowing wireframes, crosshairs or invented interfaces), not Data Storytelling (no chart paper; the chart is the specimen), not a keynote (no slides, header bars or chapter numbers).
+Not Satellite Briefing (no grey grade; the stain keeps its colour), not Sci-fi HUD (no glowing wireframes or crosshairs), not Data Storytelling (no chart paper), not a keynote (no slides or header bars).
## 2. Materials & rendering
- **Plates**: the WSI pyramid levels as plates in one world frame (level-0 pixels), the coarse levels whole and alpha-feathered at the scan edge, the fine levels as crops around where the camera lands. Each frame draws the finest plate that is downsampled no more than ~1.45×, and blends the next level in between 2.2× and 1.45×: no seams and no visible upsampling, because every level is the same sample, already registered.
- **The naked-eye plate**: the scanner's own photo of the whole slide (many WSI files carry one), registered through the scan's area-of-interest metadata and checked against the tissue's centroid. Cut the glass out of the scanner tray, remove the line-sensor streaks, and fill any manufacturer's printed logo with the surrounding frosted glass. Below ~30 mm of field the photo would be upsampled: let the cover glass become clean glass (its dust leaves the focal plane).
- **One grade for every plate**: glass normalised to a warm white, a little density and chroma in the stain, nothing else. No false colour, no film emulation.
-- **The bench**: graphite under a slow pool of light; a soft shadow lifts the slide off it.
+- **The bench**: graphite under a slow pool of light; a soft shadow under the slide.
- **Focus**: screen-space Gaussian blur on a frame rendered with a margin (so edges never go dark); the focal sweep is a tilted sharp front crossing a softened frame. A light illumination vignette, nothing more.
- **Marks** in screen space but anchored to the specimen through one world → screen function: hairlines 1.5–2.5 px with a dark or light halo, circles drawn on as arcs with cardinal ticks, dimension lines with end ticks, leader lines with one elbow. Counted pixels are shown as a mask revealed behind a scan front, then kept as a faint trace.
-- **Frosted panels** (dark translucent glass over a blurred copy of the frame) for every reading, the instruments, the subtitles and the source credit, so white type reads on glass and on stain alike and nothing has to switch colour mid-shot.
+- **Frosted panels** (dark translucent glass over a blurred copy of the frame) for readings, instruments, subtitles and the credit: white type reads on glass and stain alike, nothing switches colour mid-shot.
## 3. Colour logic
@@ -36,7 +36,7 @@ Example (our demo): glass #F4F1EC, bench #0B0D0F → #2A3036, ink #181B1F, panel
- **Roles**: a light condensed grotesk for readings and the scale bar (40–72 px, e.g. Barlow Condensed); a monospace for instruments and pixel counts (20 px, e.g. IBM Plex Mono); a sans in the film's language for labels (20–34 px, e.g. Noto Sans SC); a serif only for the title. OFL, self-hosted, CJK subset.
- **Instruments** live in one frosted panel in a corner: scale bar with its value, field of view, magnification with a small nosepiece glyph that turns a quarter on every change. The source credit in a small panel in the opposite corner.
- **Readings** sit in a frosted panel beside what they measure, joined by a leader: a small label above ("collagen share of tissue area"), the number large in the accent, the method or the raw counts below.
-- **Subtitles**: a frosted strip at the bottom; bilingual = one line per language, never wrapped. Measure each line with the real font and split long lines into two cues.
+- **Subtitles**: a frosted strip at the bottom; if the film is bilingual, one line per language with the film's language on top, never wrapped. Measure each line with the real font and split long lines into two cues.
- Nothing below 20 px at 1080p. Hold labels ≥ characters ÷ 4.5 + 1.5 s (CJK); a reading that rolls is reported by its landing value.
## 5. Motion quality
@@ -62,7 +62,7 @@ At key moments the measured structure fills a third of the frame height or more;
## 7. Sound palette
- **Instrument foley**: the objective turret (a click, a detent, a small metal ring), a focus servo, pen on glass for each line drawn, a band-passed scan travelling left to right with counter ticks that speed up, a soft filtered sweep for the focal plane.
-- **Music**: hard-mallet vibraphone in 8ths and 16ths, marimba ticks, bowed vibraphone and water glasses for pads and the motif, glockenspiel for each reading that lands, a pulse bass with 2nd/3rd harmonics, timpani and bass drum under the landings. Suspended chords until the smallest scale, then a resolution.
+- **Music**: hard-mallet vibraphone in 8ths and 16ths, marimba ticks, bowed vibraphone and water glasses for pads and the motif, glockenspiel for each reading that lands, a pulse bass with 2nd/3rd harmonics, timpani and bass drum under the landings. Harmony stays open and light; the score is the user's to shape.
- **Beds**: a quiet lab room (fan, a little mains hum).
- **Silence** before the verdict and before the climb; the first sound after it is the reading or the turn.
- **Mix**: voice ~10 dB over music, music ducked under it; −14 LUFS. Voice: a calm, exact narrator; numbers spelled out for the TTS, digits on screen.
@@ -73,22 +73,24 @@ At key moments the measured structure fills a third of the frame height or more;
- **Counting the colour.** Draw a circle, let a scan front cross it, light up every counted pixel and roll the share up to its landing value; show the raw counts underneath. *Fits content like:* collagen in tissue; porosity in a ceramic; coverage of a coating; pigment in a sample.
- **Two circles, one verdict.** Measure one place, truck to another at the same scale, then frame both and say what differs. *Fits content like:* treated against untreated; edge against centre; before against after.
- **The focal sweep and the ring.** Land, sweep the focal plane across the frame, ring one structure and give its size. *Fits content like:* a nucleus; a grain; a fibre's diameter.
-- **The climb back.** Pull out to the eye's scale with the scale bar jumping backwards; the title written on the glass.
+- **The climb back.** Pull out to the eye's scale with the scale bar jumping backwards; a title card written on the glass.
## 9. Pitfalls of the medium
- **Licences**: most microscopy on the web is CC BY-NC or all rights reserved. Usable: CC0 whole-slide scans (e.g. the OpenSlide test data: check each file's licence line), public-domain government micrographs (NIH, CDC PHIL, NASA, USGS), CC BY collections (Cell Image Library, Wellcome Collection), with every file listed in `CREDITS`. Not usable: CC BY-SA without agreement, NC images, journal figures, AI images.
+- **Finding material for a new topic**: search by organ, stain or material plus "whole slide" in the OpenSlide test data, NCI Imaging Data Commons (TCGA/CPTAC slides, licence per collection), the Cell Image Library, Wellcome Collection, Wikimedia Commons (filter by licence) and NIH/CDC galleries; prefer a file whose metadata carries its pixel size. CC BY-SA, ODbL or "no known restrictions" are not CC0: name the terms to the user and ask before using them. For a product, a lab or a brand, ask the user for their own scans (SVS/NDPI/MRXS, SEM TIFFs with a scale) first. Never stand in a generated image for a real specimen.
- **Different samples never zoom into each other**: two micrographs of "the same thing" at two scales are two specimens. Use one pyramid; if you must join sources, cut on a focus breath and say so.
- **Pixel size**: read it from the file (XMP `ScanRes`, TIFF resolution, OME `PhysicalSizeX`); a slide-photo's resolution tag can be trusted only after checking against the scan.
- **Upsampling** shows as mush beyond ~1.6×: end the dive at the scan's real resolution.
-- **Tile seams and stitching**: some scanners overlap tiles; check the joint info, frame out visible seams.
+- **Tile seams**: some scanners overlap tiles; check the joint info, frame out visible seams.
- **Labels and logos** on the slide: barcodes and IDs are part of the object; manufacturer logos are not — fill or crop them.
- **Claims**: a stain's colour means what the stain protocol says, nothing more; measured shares are of the drawn region and the stated threshold, never a clinical score.
## 10. Engine
-- `demo/film.js`: similarity camera keys with log-spiral interpolation (`camAt`), plate selection by downsampling ratio and coverage, objective events from the actual level changes, focus (rack, breaths, sweep), frosted `panel()`, marks, readings, the text registry for `window.TEXTS`, `window.SUBCHECK`, `window.EV`.
+- `demo/film.js`: log-spiral camera (`camAt`), plate selection by downsampling ratio and coverage, objective events from real level changes, focus, frosted `panel()`, marks, readings, `TEXTS` / `SUBCHECK` / `EV`.
- `demo/tools/plates.py`: slide-photo registration and cleaning, graded plates, collagen mask and the scan's cumulative curve, the tissue axis. `nucleus.py`: membrane edge on 72 rays, least-squares circle.
+- **Extra packages and packs** (beyond `setup.sh deps voice`): `tifffile` + `imagecodecs` read TIFF-based slides (Ventana BIF, Aperio SVS, Hamamatsu NDPI, generic pyramidal TIFF; `demo/tools/plates.py` is written for BIF: its label page, XMP and AOI); MRXS, SCN, VMS and others need `openslide-python` with the OpenSlide library (`brew install openslide`), or an adapter of your own. Install them yourself into a private venv in the project folder, not into `$LIB/.venv`.
- Minimal example, not in the demo: a coated steel sample: one SEM pyramid, a dive to one crack, a circle counting coverage, a ring around one grain.
## 11. Variation space
@@ -101,4 +103,4 @@ The agent decides the specimen, the stain or modality, what is counted, the came
---
-How our demo was made (story, shots, score, end card, build): [DEMO.md](DEMO.md). Read it after your treatment exists.
+How our demo was made (story, shots, score, title card, build): [DEMO.md](DEMO.md). Read it after your treatment exists.
diff --git a/styles/microscope/demo/build.sh b/styles/microscope/demo/build.sh
index 81346b9..ffa508d 100644
--- a/styles/microscope/demo/build.sh
+++ b/styles/microscope/demo/build.sh
@@ -2,8 +2,9 @@
# One command: 《量出来的蓝》 Measured Blue (Microscope Story demo)
# sh demo/build.sh fonts -> voice + speech check -> cues -> events -> picture -> score + mix -> master
# -> subtitles -> checks -> poster and style frame
-# FETCH=1 sh demo/build.sh first re-download the slide (Ventana-1.bif, 227 MB, CC0) and rebuild every plate
-# and measurement (tools/plates.py, tools/nucleus.py): about 1 minute
+# FETCH=1 sh demo/build.sh first re-download the slide (Ventana-1.bif, 227 MB, CC0), rebuild every plate
+# and measurement (tools/plates.py, tools/nucleus.py) and re-fetch the fonts.
+# Without FETCH, whatever is missing (slide, plates, fonts) is fetched or rebuilt.
# Needs the library's core tier and voice tier (Kokoro, faster-whisper); the slide reader gets its own .venv here.
set -e
HERE=$(cd "$(dirname "$0")" && pwd) # .../<slug>/demo
@@ -18,7 +19,8 @@ if [ ! -x "$VPY" ]; then python3 -m venv "$HERE/.venv"; "$HERE/.venv/bin/pip" in
RAW="$HERE/assets/raw/Ventana-1.bif"
SHA=2eb05cd8f628c36408c3fde09beeeebaaae90181c4f840d5475ec7594bdcbbb6
-if [ "${FETCH:-0}" = "1" ] || [ ! -f "$HERE/assets/plates/plates.json" ]; then
+# keyed on gitignored artefacts: a clean clone has plates.json (tracked) but no plate images, fonts or slide
+if [ "${FETCH:-0}" = "1" ] || [ ! -f "$HERE/assets/plates/c1.jpg" ] || [ ! -f "$HERE/assets/plates/roiB.png" ]; then
if [ "${FETCH:-0}" = "1" ] || [ ! -f "$RAW" ]; then
mkdir -p "$HERE/assets/raw"
curl -L --fail -o "$RAW" https://openslide.cs.cmu.edu/download/openslide-testdata/Ventana/Ventana-1.bif
@@ -26,7 +28,9 @@ if [ "${FETCH:-0}" = "1" ] || [ ! -f "$HERE/assets/plates/plates.json" ]; then
echo "$SHA $RAW" | shasum -a 256 -c -
"$VPY" -I "$HERE/tools/plates.py" "$HERE" # plates, registration, collagen counts, tissue axis
"$VPY" -I "$HERE/tools/nucleus.py" "$HERE" 13297 9265 # the measured nucleus (level-0 px, approx. centre)
- "$VPY" -I "$HERE/tools/fonts.py" "$HERE" # Noto Sans SC / Noto Serif SC subsets
+fi
+if [ "${FETCH:-0}" = "1" ] || [ ! -f "$HERE/fonts/NotoSerifSC-600.woff2" ] || [ ! -f "$HERE/fonts/BarlowCondensed-Light.ttf" ]; then
+ "$VPY" -I "$HERE/tools/fonts.py" "$HERE" # Barlow Condensed, IBM Plex Mono, Noto Sans/Serif SC subsets
fi
cd "$LIB"
diff --git a/styles/microscope/demo/tools/fonts.py b/styles/microscope/demo/tools/fonts.py
index ecaeaa8..3993f01 100644
--- a/styles/microscope/demo/tools/fonts.py
+++ b/styles/microscope/demo/tools/fonts.py
@@ -1,5 +1,7 @@
-"""Subset the Chinese fonts to the characters the film uses (Google Fonts CSS2 API, &text=), OFL.
-usage: python -I tools/fonts.py <demo_dir> -> fonts/NotoSansSC-400.woff2, -500.woff2, NotoSerifSC-600.woff2"""
+"""Fetch every font the page uses (all OFL, from Google Fonts):
+ Latin Barlow Condensed Light/Regular, IBM Plex Mono Regular/Medium <- github.com/google/fonts ofl/
+ CJK Noto Sans SC 400/500, Noto Serif SC 600, subset to the characters in film.js + timeline.js (CSS2 API &text=)
+usage: python -I tools/fonts.py <demo_dir> -> fonts/*.ttf, fonts/*.woff2"""
import sys, os, re, urllib.request, urllib.parse
D = sys.argv[1]
src = ''.join(open(os.path.join(D, f), encoding='utf-8').read() for f in ('film.js', 'timeline.js'))
@@ -8,6 +10,12 @@ text = ''.join(cjk) + '0123456789%.,:;-+()/°=· ' + ''.join(chr(c) for c in ran
print(len(cjk), 'chars:', ''.join(cjk))
UA = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120 Safari/537.36'
get = lambda u: urllib.request.urlopen(urllib.request.Request(u, headers={'User-Agent': UA}), timeout=60).read()
+os.makedirs(os.path.join(D, 'fonts'), exist_ok=True)
+GH = 'https://raw.githubusercontent.com/google/fonts/main/ofl/'
+for rel in ('barlowcondensed/BarlowCondensed-Light.ttf', 'barlowcondensed/BarlowCondensed-Regular.ttf',
+ 'ibmplexmono/IBMPlexMono-Regular.ttf', 'ibmplexmono/IBMPlexMono-Medium.ttf'):
+ data = get(GH + rel); open(os.path.join(D, 'fonts', rel.split('/')[1]), 'wb').write(data)
+ print(rel.split('/')[1], len(data), 'bytes')
for fam, w, out in (('Noto Sans SC', 400, 'NotoSansSC-400.woff2'), ('Noto Sans SC', 500, 'NotoSansSC-500.woff2'), ('Noto Serif SC', 600, 'NotoSerifSC-600.woff2')):
css = get('https://fonts.googleapis.com/css2?family=%s:wght@%d&text=%s' % (urllib.parse.quote(fam), w, urllib.parse.quote(text))).decode()
urls = re.findall(r'url\((https://[^)]+)\)', css); assert len(urls) == 1, css[:300]
diff --git a/styles/satellite-briefing/DEMO.md b/styles/satellite-briefing/DEMO.md
index 15b4e09..383e20e 100644
--- a/styles/satellite-briefing/DEMO.md
+++ b/styles/satellite-briefing/DEMO.md
@@ -85,7 +85,7 @@ demo/
FACTS.md, CREDITS, TREATMENT.md, PRODUCTION_LOG.md, stills/styleframe.jpg
```
-- `sh demo/build.sh` takes about 2 minutes on Apple silicon (the picture renders in ~20 s with 3 workers). `FETCH=1` first rebuilds the imagery (~25 minutes, ~3 GB of cached arrays in `assets/raw/`).
+- `sh demo/build.sh` takes about 2 minutes on Apple silicon (the picture renders in ~20 s with 3 workers). In a fresh clone the plates, raw scenes and fonts are not in git: the first run fetches and rebuilds the imagery (~25 minutes, ~3.5 GB in `assets/raw/`) and downloads the fonts (`tools/fonts.py`: Barlow Condensed and IBM Plex Mono from github.com/google/fonts, Noto SC subsets); `FETCH=1` forces it again. The score needs `sh tools/fetch.sh instruments <lib>` for vsco2ce, vcsl and freepats, the voice `setup.sh deps voice`.
- Checks it runs: `asr_check.py` with `small.en` (the base model hears "sea" as "C"), cue grid, subtitle single-line widths measured with the real fonts (widest line 578 px against 1100 px), `readcheck.mjs`, motion per second (no stretch over 1 s below 0.6 mean pixel change; the slowest second of the film is 1.06), the impact ranking.
- Plates: region mosaics 3917 × 2652 at ~190 m for six years; detail plates at ~32–40 m for the landing, Muynak and Kok-Aral; Blue Marble world (4096 × 2048) and Central Asia. All sampled in one shader pass; memory about 1 GB of textures per render worker.
- Demo-specific pitfalls: the 1977 Landsat 2 mosaic needs nearest-neighbour resampling, dropout-row repair, streak cleaning at 12° on land and one L1GS scene to close a hole in the north-west bay; the 1989 scene of path 161 on 16 August carries a dust plume across the sea and is excluded (`exclude` in `tools/plates_spec.json`); a dike-bounded polder 10–15 km west of Muynak has a straight edge that can read as a seam: it is dimmed while the port is centred and slides out of frame before the range line; the water masks need contour pieces along plate borders removed or a straight line appears in the North Aral; the map's place names other than 咸海 were dropped because a dive gives them less than the reading time they need.
diff --git a/styles/satellite-briefing/STYLE.md b/styles/satellite-briefing/STYLE.md
index af54371..8fb341c 100644
--- a/styles/satellite-briefing/STYLE.md
+++ b/styles/satellite-briefing/STYLE.md
@@ -1,7 +1,7 @@
# Satellite Briefing — Style Prompt
> Real satellite imagery of a real place, graded down to an analyst's grey, with thin white measurement lines drawn on the ground: a lock-on reticle, outlines, a range line, one reading. One continuous zoom built from stacked imagery plates carries the viewer from orbit to the ground and back, and time can run inside one locked frame.
-> References (grammar only): open-source investigation films that annotate satellite pictures (thin lines on imagery, one claim per screen, the measuring gesture as the plot); Charles and Ray Eames' *Powers of Ten* (one continuous change of scale with a readout riding along); NASA Earth Observatory's *World of Change* (one place, one frame, time running). Copy none of their layouts, typefaces, icons or music, and never name them in the film.
+> References (grammar only): open-source investigation films that annotate satellite pictures (thin lines on imagery, one claim per screen, measuring as the plot); the Eameses' *Powers of Ten* (one continuous change of scale with a readout); NASA Earth Observatory's *World of Change* (one place, time running). Copy none of their layouts, typefaces, icons or music; never name them in the film.
## 1. Essence, and what it is not
@@ -11,17 +11,17 @@
- **Scale is the camera**: one zoom from orbit to the ground built from nested plates, with an altitude readout and a scale bar from the same camera.
- **One finding per screen**, in the single accent colour.
-Not Data Storytelling (a chart on paper; here the map is a photograph), not Sci-fi Hologram HUD (no glowing wireframes or invented interface chrome), not Blueprint (no drafting sheet), not Isometric Infographic (no diorama; real nadir or oblique views), not a keynote (no slides, header bars or chapter numbers).
+Not Data Storytelling (a chart on paper), not Sci-fi Hologram HUD (no glowing wireframes or invented chrome), not Blueprint, not Isometric Infographic (real nadir or oblique views, no diorama), not a keynote (no slides, header bars or chapter numbers).
## 2. Materials & rendering
-- **Plates**: georeferenced rasters with a lon/lat bounding box, sampled in a shader by the point the camera ray hits, nested by resolution (world → region → detail) with feathered edges so a finer plate dissolves into the coarser one as the camera descends.
-- **Globe**: ray–sphere from a perspective camera, a thin atmosphere rim, limb shading at orbit only. Pass |C|² − R² from double precision; float32 alone fails at a few tens of kilometres.
+- **Plates**: georeferenced rasters with a lon/lat box, sampled in a shader where the camera ray hits the ground, nested by resolution (world → region → detail) with feathered edges so finer plates dissolve in as the camera descends.
+- **Globe**: ray–sphere from a perspective camera, a thin atmosphere rim, limb shading at orbit only; compute |C|² − R² in double precision (float32 fails below a few tens of km).
- **Time**: dated plates share one grid. A soft scan front (a satellite pass, never a hairline) swaps them: north → south forward, south → north for a rewind. Growth can run outward from the old edge, ordered by a distance map.
-- **The analyst's grade** (one uniform from colour to grey): luminance, local contrast from coarser mip levels, clarity around a wide mean, a shoulder so salt, snow and cloud stay below white, toned blue-black → cool silver that stops near 65 % grey, a fifth of the original chroma. White belongs to the marks.
-- **Marks**: a 2D overlay through the same world → screen function: hairlines 1.2–2.6 px with a 3–4 px dark halo, dashes for history and claims, corner brackets, ticks, leader lines. Lines draw on; outlines print behind the scan.
+- **The analyst's grade** (one uniform from colour to grey): luminance with local contrast and clarity, a shoulder so salt, snow and cloud stay below white, toned blue-black → cool silver up to ~65 % grey, a fifth of the chroma. White belongs to the marks.
+- **Marks**: a 2D overlay through the same world → screen function: hairlines 1.2–2.6 px with a dark halo, dashes for history and claims, brackets, ticks, leader lines. Lines draw on; outlines print behind the scan.
- **Screen space only for instruments** (altitude, scale bar, imagery credit) and the transcript strip. Everything else is anchored to the ground.
-- **The claim layer** is a printed map drawn in the same shader from a distance field of the historical outline: paper grain that stays a few pixels wide at any zoom, a halftone in the ink, coast and waterlines, graticule, rivers, the serif name. Exact at every altitude.
+- **The claim layer** is a printed map drawn in the shader from a distance field of the old outline: paper grain a few pixels wide at any zoom, halftone ink, coast and waterlines, graticule, the serif name.
- **Post**: light grain in ffmpeg, a vignette, directional blur only on whip pans.
## 3. Colour logic
@@ -36,9 +36,9 @@ Example (our demo): ground #070B0E → #A1A7A9, marks #F2F5F6, reading #FFBE55,
## 4. Type & subtitles
-- **Roles**: a light condensed grotesk for the reading (96–130 px, e.g. Barlow Condensed); a monospace for instruments, coordinates and dates (20–34 px, e.g. IBM Plex Mono); a sans for labels in the film's language (24–42 px, e.g. Noto Sans SC); a serif only for the claim layer and the title. The map speaks serif, the analyst sans. OFL, self-hosted, CJK subset.
-- **Labels attach to the ground** with a leader line. The reading sits in the right third beside what it measures: a small label above, a source note below ("Landsat, measured", "World Bank").
-- **Subtitles are a transcript strip** at the bottom left: a 2 px white rule, a dark plate fading right, left-aligned. Bilingual = two single lines, the film's language on top: measure each with the real font (`nowrap`) and split into two cues rather than wrap or shrink.
+- **Roles**: a light condensed grotesk for the reading (96–130 px, e.g. Barlow Condensed); a monospace for instruments and dates (20–34 px, e.g. IBM Plex Mono); a sans for labels in the film's language (24–42 px); a serif only for the claim layer and the title. OFL, self-hosted, CJK subset to the characters used.
+- **Labels attach to the ground** with a leader line. The reading sits in the right third beside what it measures, label above, source note below ("Landsat, measured").
+- **Subtitles are a transcript strip** at the bottom left: a 2 px white rule, a dark plate fading right, left-aligned, each line on one line (measure with the real font, `nowrap`; split a long sentence into two cues). If the film is bilingual, the film's language on top.
- Nothing below 20 px at 1080p, the imagery credit included.
- Hold subtitles ≥ max(1.8 s, speech + 0.6 s); a rolling counter reports its landing value; labels stay ≥ characters ÷ 4.5 + 1.5 s (CJK).
@@ -46,14 +46,14 @@ Example (our demo): ground #070B0E → #A1A7A9, marks #F2F5F6, reading #FFBE55,
- The camera never stops: distance interpolates in log space, segments ease, holds keep a 2–5 % creep or a slow rotation. No frozen frame longer than a second.
- Marks arrive by being made: a line grows, an outline prints behind the scan, a counter rolls and lands with a small pop, a reticle snaps with overshoot.
-- Time changes are scans, never dissolves; their spacing tells the speed (equal steps for steady change, shrinking steps for a collapse), and the camera moves with them: a slow orbit or push that accelerates as the steps shorten and brakes on the last one.
+- Time changes are scans, never dissolves; their spacing tells the speed, and the camera moves with them (accelerating as the steps shorten, braking on the last).
- Never moves: the ground under its annotations, the instrument positions.
## 6. Camera grammar
| Move | What it expresses | Can serve |
|---|---|---|
-| Oblique orbit, limb in frame | scale, context, distance | an opening; a return; an end card |
+| Oblique orbit, limb in frame | scale, context, distance | an opening; a return; a title card |
| Dive (log zoom, tilt to nadir) | going to look for yourself | a reveal; checking a claim |
| Locked nadir frame, slow creep | evidence, comparison | time running in one place; a measurement |
| Push-in on a point | singling out | one town, one dam, one field |
@@ -61,52 +61,52 @@ Example (our demo): ground #070B0E → #A1A7A9, marks #F2F5F6, reading #FFBE55,
| Whip pan with blur | a new subject at the same altitude | the counter-example; "meanwhile" |
| Climb back to orbit | consequence, perspective | an ending; a summary |
-At key moments the subject fills at least a third of the frame height; reading right, subtitles bottom left, instruments in the corners, no label in the subtitle strip. Transitions: scan-line swaps, a map layer switched off, zooming through plates, whip pans, the reticle opening into the end card. Avoid crossfades between unrelated places and hard cuts inside a zoom.
+At key moments the subject fills a third of the frame height; reading right, subtitles bottom left, instruments in the corners. Transitions: scan-line swaps, a map layer switched off, zooming through plates, whip pans, the reticle opening into a title card. No crossfades between unrelated places, no hard cuts inside a zoom.
## 7. Sound palette
-- **Telemetry**: FM pings (the lock-on ping is a key sound worth bringing back), dry ticks on the grid that divide to accelerate, filtered-noise scans (rising for a rewind, falling for forward time), servo whines for the reticle, a ratchet for a range line.
+- **Telemetry**: FM pings (a lock-on ping worth bringing back), dry ticks on the grid that divide to accelerate, noise scans (rising for a rewind, falling forward), servo whines, a ratchet for a range line.
- **Weight**: timpani, bass drum, gran cassa, bowed cymbal, a tam-tam reversed when time runs backwards. Measurements land on a pitched hit.
- **Synthesis**: a pulse bass with audible 2nd and 3rd harmonics, detuned-saw pads under a low-pass, risers for dives.
- **Beds**: orbit hum, radio hiss, data chatter; the place's own ambience (wind, water, a far horn), sparingly, often as J- or L-cuts.
-- **Dry until the turn**: electronics, skins and metal, then one organic wet timbre (glass, water, bowed metal) arrives with the turn.
-- **Silence**: music and foley stop, a thin bed stays, impacts may decay into it; the first sound after it is the turn. A short suck-out (0.2–0.45 s, music and foley down 25 dB) before the heaviest impacts makes them land: the claim torn away, a hard stop, a structure closing.
-- **Mix**: voice ~10 dB over music; the two or three designed impacts are the loudest moments (keep them out of the bus compressor, give them mid-range body such as a low-brass stab); −14 LUFS, true peak ≤ −1.2 dB. Voice: a calm analyst, short declarative lines.
+- **One option for the shape**: keep the palette dry (electronics, skins, metal) and let one wet timbre (glass, water, bowed metal) mark the turn.
+- **Silence**: music and foley stop, a thin bed stays, impacts may decay into it; the first sound after it is the turn. A short suck-out (0.2–0.45 s, music and foley down ~25 dB) before the heaviest impacts makes them land.
+- **Mix**: voice ~10 dB over music; the two or three designed impacts are the loudest moments (out of the bus compressor, with mid-range body, e.g. a low-brass stab); 20–60 Hz about 15 dB under the full band (high-pass ~40 Hz, impact weight at 60–120 Hz); −14 LUFS, true peak ≤ −1.2 dB. Voice: a calm analyst, short declarative lines.
## 8. Native moves
-- **The map against the photograph.** The camera falls into the printed map of the claim until it fills the frame; a scanner bar tears it away and the ground is underneath; the name outlives the page. *Fits content like:* a lake still on maps but gone; a cleared concession forest; an old coastline; a planned city never built.
-- **Time rings in a locked frame.** Dated plates scan in one by one; each leaves its outline, and the band lost between two rings flashes. *Fits content like:* a glacier's retreat; a city's sprawl; a delta's erosion; a fire scar season after season.
-- **The range line.** Mark the destination, grow a ticked line from A to B, chase the tip while the reading counts up beside it, land on the number, pull back to show the whole distance. *Fits content like:* how far a shore moved; a village to its well; a camp to the border; a dam to the town downstream.
+- **The map against the photograph.** The camera falls into the printed map of the claim; a scanner bar tears it away and the ground is underneath; the name outlives the page. *Fits content like:* a lake still on maps but gone; a cleared concession forest; a planned city never built.
+- **Time rings in a locked frame.** Dated plates scan in one by one; each leaves its outline, the band lost between two rings flashes. *Fits content like:* a glacier's retreat; a city's sprawl; a fire scar season after season.
+- **The range line.** Mark the destination, grow a ticked line from A to B, chase the tip while the reading counts up, land on the number, pull back to show the whole distance. *Fits content like:* how far a shore moved; a village to its well; a camp to the border.
- **The dive and the climb.** One zoom from orbit to the ground, or back. *Fits content like:* locating anything; a scale reveal; an ending that returns one place to the planet.
- **Colour returns where the story turns.** Only the subject regains true colour inside the grey. *Fits content like:* an irrigated field; a refilled reservoir; a regrown forest.
-- **The reticle becomes the frame**: the lock-on brackets open out to hold the end card.
+- **The reticle becomes the frame**: the lock-on brackets open out to frame a title card or the last reading.
## 9. Pitfalls of the medium
- **Licences**: not usable: Google Earth/Maps, Bing, Esri World Imagery, Mapbox Satellite, Planet, Maxar, news photos, AI-generated imagery. EOX Sentinel-2 cloudless is CC BY 4.0 only for 2016 (2018 onward is NC). Raw Copernicus Sentinel data need "Contains modified Copernicus Sentinel data [year]"; check the user's rules. Public domain or free with credit: USGS Landsat (1972 on, worldwide), USGS NAIP (US, ~1 m), NASA Blue Marble, MODIS, VIIRS. Burn a readable credit into the picture and list every asset in `CREDITS`.
-- **Getting it**: Landsat Collection 2 from the Microsoft Planetary Computer STAC (no account; its data API reprojects a scene to a lon/lat box) or USGS EarthExplorer; MODIS, VIIRS and Blue Marble by date from the NASA GIBS WMS. Log every request.
-- **Seams**: paths imaged on other days disagree. One date per path, neighbours a day apart, each scene gain-matched to a homogeneous reference on stable land, feathered overlaps, holes filled from the same year only (an outline dated 1989 must be 1989).
-- **Old sensors**: Landsat MSS (to 1992) lacks blue and shortwave infrared and drops scan lines: nearest-neighbour resampling, thin near-zero rows as nodata filled from same-year scenes, residual streaks at the scan angle cleaned on land only (never on the measured water), colour matched to a modern mosaic. Inspect every year at full contrast: one bright streak across a lake reads as a render error.
+- **Finding imagery for a new place**: search by bounding box and date in the Planetary Computer STAC (Landsat C2, Sentinel-2 L2A; no account) or USGS EarthExplorer; MODIS/VIIRS and Blue Marble from NASA GIBS; outlines from Natural Earth. Log every request. OSM (ODbL), CC BY-SA and "no known restrictions" are not CC0: name the terms and ask the user first. Ask for the user's own surveys or GIS layers when the place is theirs. Never fill a gap with generated imagery presented as evidence.
+- **Seams**: paths imaged on other days disagree. One date per path, each scene gain-matched on stable land, feathered overlaps, holes filled from the same year only.
+- **Old sensors**: Landsat MSS (to 1992) has no blue or SWIR and drops scan lines: nearest-neighbour resampling, near-zero rows as nodata filled from same-year scenes, scan-angle streaks cleaned on land only. Inspect every year at full contrast.
- **Plumes and haze** cross water as bright diagonal bands: swap the scene for another date of the same year rather than painting it out.
- **Edges**: resampling against nodata darkens scene rims (erode the mask); drop contour pieces along a plate border. Real straight edges (dikes, polders) can read as seams: frame them out or label them.
-- **Grey mush at close range**: low-altitude salt or sand flattens into one grey; raise local contrast for that range only and dim outside the measured corridor.
+- **Grey mush at close range**: raise local contrast for that altitude only and dim outside the measured corridor.
- **Water and cloud**: MNDWI where shortwave infrared exists, only the basin you measure; clouds read as features in grey, so use the dry season.
-- **Facts**: every number from an official source or labelled as measured, with method and scene IDs on file; measure on the date you show.
+- **Facts**: keep a FACTS.md in the project folder (claim, source URL, quoted wording, or the measurement method with scene IDs and dates) and deliver it with the film. Measure on the date you show.
## 10. Engine
- `demo/engine.js`: `makeCamera({lat, lon, d, tilt, heading, sx, sy})`, `project()` / `unproject()`, the WebGL2 plate shader (nested plates, time scans, growth map, analyst grade, printed-map layer, whip blur).
- `demo/overlay.js`: hairlines, brackets, `readout`, the measured single-line `subtitle` strip, `text` with a registry for `window.TEXTS`.
-- `demo/tools/`: `fetch_landsat.py` (STAC, one date per path, compositing with a source map, same-year gap fill), `plates.py` (normalisation, streak cleaning, water masks, areas), `vectors.py` (shorelines, distances), `mapfield.py` (the printed map), `growth.py`.
-- Minimal example, not in the demo: a glacier: one plate per date, NDSI instead of MNDWI, one outline per year, a locked nadir camera while three scans print three rings.
+- `demo/tools/`: `fetch_landsat.py` (STAC, one date per path, same-year gap fill), `plates.py` (normalisation, streak cleaning, water masks, areas), `vectors.py` (shorelines, distances), `mapfield.py` (the printed map), `growth.py`.
+- **Extra packages and packs**: none beyond `setup.sh deps voice` and the sample packs the score uses (`sh tools/fetch.sh instruments <lib>` for vsco2ce, vcsl, freepats in the demo). Imagery uses only the standard library, numpy, SciPy, Pillow (no GDAL); allow 3–4 GB for cached scenes. Anything more (rasterio, pyproj) goes in a private venv in the project folder, not `$LIB/.venv`.
## 11. Variation space
The agent decides the place or places, whether there is a claim layer, which dates, the structure, the camera path, the accent hue and where colour comes back.
-- **Structures**: a locked time-lapse of one place ending in one push-in; a route that tracks a river from source to mouth with a reading at each stop; a comparison that whips between two places at one scale.
-- **Openings**: a ground-level detail (one building, one boat) that climbs to reveal its scale; a black frame a scan line paints in row by row; an oblique orbit with a searching reticle.
+- **Structures**: a locked time-lapse of one place ending in a push-in; a river followed from source to mouth with a reading at each stop; two places compared at one scale with whip pans.
+- **Openings**: a ground-level detail that climbs to reveal its scale; a black frame a scan line paints in; an oblique orbit with a searching reticle.
- **Endings**: the climb back to orbit; a last measurement that lands and holds in silence; the claim layer redrawn to match the ground.
---
diff --git a/styles/satellite-briefing/demo/build.sh b/styles/satellite-briefing/demo/build.sh
index 321107b..72171b1 100644
--- a/styles/satellite-briefing/demo/build.sh
+++ b/styles/satellite-briefing/demo/build.sh
@@ -2,18 +2,20 @@
# One command: 《地图上还写着海》 The Map Still Says Sea (Satellite Briefing demo)
# sh demo/build.sh voice, events, picture, score + mix, master, subtitles, checks, poster
# FETCH=1 sh demo/build.sh first re-download and rebuild the imagery (Landsat via Planetary Computer,
-# Blue Marble via NASA GIBS, Natural Earth, font subsets): ~25 min, ~3 GB in assets/raw
+# Blue Marble via NASA GIBS, Natural Earth): ~25 min, ~3.5 GB in assets/raw
+# In a fresh clone (plates, raw scenes and fonts are not in git) the imagery and fonts are fetched automatically.
set -e
HERE=$(cd "$(dirname "$0")" && pwd) # .../<slug>/demo
FILM=$(cd "$HERE/.." && pwd) # .../<slug>
-LIB=${LIB:-$(cd "$HERE/../../.." && pwd)} # films/<slug>/demo or styles/<slug>/demo -> library root
+LIB=${LIB:-$(cd "$HERE/../../.." && pwd)} # styles/<slug>/demo -> library root
export LIB
[ -f "$LIB/core/render/video.mjs" ] || { echo "set LIB to the library folder"; exit 1; }
PY="$LIB/.venv/bin/python"
NAME=satellite-briefing
cd "$LIB"
-if [ "${FETCH:-0}" = "1" ] || [ ! -f "$HERE/assets/vectors.json" ]; then
+# the test keys on gitignored artefacts: a clean clone has the tracked vectors.json/plates.json but no plates
+if [ "${FETCH:-0}" = "1" ] || [ ! -f "$HERE/assets/plates/r2025.jpg" ] || [ ! -f "$HERE/assets/plates/mapfield.png" ]; then
mkdir -p "$HERE/assets/raw/ne"
for f in ne_10m_lakes_historic ne_10m_rivers_lake_centerlines; do
curl -sL -o "$HERE/assets/raw/ne/$f.geojson" "https://raw.githubusercontent.com/nvkelso/natural-earth-vector/master/geojson/$f.geojson"
@@ -27,6 +29,9 @@ if [ "${FETCH:-0}" = "1" ] || [ ! -f "$HERE/assets/vectors.json" ]; then
"$PY" -I "$HERE/tools/vectors.py" "$HERE"
"$PY" -I "$HERE/tools/mapfield.py" "$HERE" # the printed map (distance field, relief) + rivers
"$PY" -I "$HERE/tools/growth.py" "$HERE" # North Aral: 2001 -> 2009 growth order
+fi
+# fonts (gitignored): Barlow Condensed + IBM Plex Mono from github.com/google/fonts, Noto SC subsets from the CSS2 API
+if [ ! -f "$HERE/fonts/BarlowCondensed-Light.ttf" ] || [ ! -f "$HERE/fonts/IBMPlexMono-Medium.ttf" ] || [ ! -f "$HERE/fonts/NotoSerifSC-600.woff2" ]; then
"$PY" -I "$HERE/tools/fonts.py" "$HERE"
fi
diff --git a/styles/satellite-briefing/demo/tools/fonts.py b/styles/satellite-briefing/demo/tools/fonts.py
index c31f39c..a2e5cbe 100644
--- a/styles/satellite-briefing/demo/tools/fonts.py
+++ b/styles/satellite-briefing/demo/tools/fonts.py
@@ -1,4 +1,7 @@
-"""Subset the Chinese fonts to the characters the film uses (Google Fonts CSS2 API, &text=).
+"""Fonts for the page, all OFL from Google Fonts, into demo/fonts/:
+ - Latin: Barlow Condensed (Light/Regular/Medium/SemiBold) and IBM Plex Mono (Regular/Medium), downloaded whole
+ from github.com/google/fonts (ofl/), with their OFL.txt;
+ - Chinese: Noto Sans SC 400/500 and Noto Serif SC 600, subset to the characters the film uses (CSS2 API, &text=).
usage: python -I tools/fonts.py <demo_dir> -> fonts/NotoSansSC-400.woff2, -500.woff2, NotoSerifSC-600.woff2
Characters are collected from film.js, overlay.js and timeline.js (every CJK char + full-width punctuation),
plus the Latin digits and signs so mixed strings render in one face."""
@@ -12,6 +15,16 @@ print(len(cjk), 'CJK chars:', ''.join(cjk))
UA = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120 Safari/537.36'
def get(url):
return urllib.request.urlopen(urllib.request.Request(url, headers={'User-Agent': UA}), timeout=60).read()
+GF = 'https://raw.githubusercontent.com/google/fonts/main/ofl/'
+LATIN = [('barlowcondensed', f'BarlowCondensed-{w}.ttf', 'OFL-barlow.txt') for w in ('Light', 'Regular', 'Medium', 'SemiBold')] + \
+ [('ibmplexmono', f'IBMPlexMono-{w}.ttf', 'OFL-ibmplexmono.txt') for w in ('Regular', 'Medium')]
+os.makedirs(os.path.join(D, 'fonts'), exist_ok=True)
+for fam, fn, lic in LATIN:
+ dst = os.path.join(D, 'fonts', fn)
+ if not os.path.exists(dst):
+ data = get(GF + fam + '/' + fn); open(dst, 'wb').write(data); print(fn, len(data), 'bytes')
+ if not os.path.exists(os.path.join(D, 'fonts', lic)):
+ open(os.path.join(D, 'fonts', lic), 'wb').write(get(GF + fam + '/OFL.txt'))
for fam, w, out in (('Noto Sans SC', 400, 'NotoSansSC-400.woff2'), ('Noto Sans SC', 500, 'NotoSansSC-500.woff2'), ('Noto Serif SC', 600, 'NotoSerifSC-600.woff2')):
css = get('https://fonts.googleapis.com/css2?family=' + urllib.parse.quote(fam) + f':wght@{w}&text=' + urllib.parse.quote(text)).decode()
urls = re.findall(r'url\((https://[^)]+)\)', css)
diff --git a/styles/teardown/DEMO.md b/styles/teardown/DEMO.md
index ca7d53b..e22a3a6 100644
--- a/styles/teardown/DEMO.md
+++ b/styles/teardown/DEMO.md
@@ -79,6 +79,6 @@ demo/
FACTS.md, CREDITS, TREATMENT.md, PRODUCTION_LOG.md, stills/styleframe.jpg
```
-- `sh demo/build.sh` takes about 3 minutes on Apple silicon (picture about 60 s with 4 workers). `FETCH=1` first re-downloads the CAD at the pinned commit and rebuilds `data/` and the font subsets (needs npm for occt-import-js).
+- `sh demo/build.sh` takes about 3 minutes on Apple silicon (picture about 60 s with 4 workers). In a clean clone it first rebuilds what git does not carry: `data/case.bin` and `data/pcb.json` from the CAD at the pinned commit (network, and npm for a temporary occt-import-js), the fonts from Google Fonts, and any missing library pack (HDRI, Kokoro, the vcsl / freepats / vsco2ce samples). `FETCH=1` forces the CAD and fonts.
- Checks it runs: `asr_check.py` with `small.en` (two lines carry the words Whisper writes: "RP 2040", "19.05 millimeters"), subtitle single-line widths with the real fonts (widest 552 px against 1500), `readcheck.mjs` (all 19 texts pass), `motioncheck.py` (no one-frame black tiles; motion per second).
- Demo-specific pitfalls: the v4 board file is a panel with breakaway tabs, so the board outline is the 3x6 plate outline inset 0.4 mm (the plate's 21 cutouts sit 0.4 mm off the switch footprints, measured, and corrected); the case STEP has y up and must be flipped and shifted onto the board (offsets in `tools/step2mesh.mjs`), checked by the four screw holes; the project logo footprint is skipped at extraction; the Kokoro voice reads "RP2040" badly, so the spoken text says "R P twenty forty".
diff --git a/styles/teardown/STYLE.md b/styles/teardown/STYLE.md
index 8d3af83..3d145b6 100644
--- a/styles/teardown/STYLE.md
+++ b/styles/teardown/STYLE.md
@@ -1,7 +1,7 @@
# Exploded Teardown — Style Prompt
> A real product, built from its own engineering files (CAD, PCB layout, bill of materials), lit like a studio packshot and taken apart in front of the camera: the layers lift on one axis, the camera travels between them, every part is named with the numbers its files contain, and it closes again into one object.
-> References (grammar only): hardware-launch exploded films (layer stagger and orbit timing), repair-guide teardowns (the order in which a product is opened, the macro on the one part that matters), technical illustration and engineering drawing (leader lines, dimension lines with ticks and extension lines). Never copy their products, layouts, typefaces or music, and never name them in the film.
+> References (grammar only): hardware-launch exploded films (layer stagger, orbit timing), repair-guide teardowns (opening order, the macro on the part that matters), engineering drawing (leaders, dimension lines). Never copy their products, layouts, typefaces or music, or name them in the film.
## 1. Essence, and what it is not
@@ -17,13 +17,17 @@ It is not a glass product render (one object, material beauty, no disassembly),
## 2. Materials & rendering
-- Real-time PBR (three.js `MeshPhysicalMaterial`) rendered at 2× and downsampled, with ambient occlusion, a light depth of field whose blur grows naturally as the camera comes close (one aperture value for wide and macro: the circle of confusion follows 1/focus − 1/z), a high-threshold bloom that only lights emitters and hot speculars, and a vignette.
-- Each material keeps its physical character: textured plastics with soft sheen (roughness 0.55–0.7), lacquered or coated boards with a thin clearcoat, solder mask over copper that shows the traces as a raised, slightly lighter relief, exposed pads metallic, machined metals with a tight highlight, rubber fully matte.
+- Real-time PBR (three.js `MeshPhysicalMaterial`) at 2× and downsampled, ambient occlusion, a depth of field with one aperture for wide and macro (blur follows 1/focus − 1/z, so it grows as the camera comes close), a high-threshold bloom for emitters only, a vignette.
+- Each material keeps its character: plastics with soft sheen (roughness 0.55–0.7), boards with a thin clearcoat and traces as a raised, lighter relief under the mask, metallic pads, tight highlights on machined metal, matte rubber.
- **Boards are painted from their layout files**: copper pours, every trace, via, pad and drill, silkscreen, on both sides, at 14–20 px per millimetre, with roughness, metalness and bump maps from the same drawing. Components stand at their footprint positions with their package sizes.
-- Light: a warm key (about 5500 K) from above front, a cool rectangular rim from behind that follows the camera so edges always separate from the ground, a large soft top light, an HDRI at low intensity for reflections. A practical fill appears only where the camera goes inside the object.
+- Light: a warm key from above front, a cool rectangular rim behind that follows the camera so edges separate from the ground, a soft top light, a low HDRI for reflections; a practical fill only where the camera goes inside.
- Background: a dark graphite seamless sweep (screen-space radial gradient), floor visible only as soft shadow.
- Effects anchored to the world (leaders, dimension lines, glows) are projected from 3D points every frame; only subtitles and title cards live in screen space.
+**Where the geometry comes from.** For the user's own product, ask for its STEP / IGES / KiCad / other CAD exports, BOM and spec sheet before anything else. For a public product, look for open hardware (GitHub, GitLab, OSHWA certification list, Hackaday.io, Printables/Thingiverse sources with the original CAD) and component datasheets from the maker. CC0, public domain, CC BY and MIT are fine with credit; CERN-OHL (-P, -W, -S), CC BY-SA, GPL hardware and "no known restrictions" are not the same thing: name the terms to the user and ask before using them. Without files, build only from published dimensions (datasheet, spec page), say on screen or in the voice that it is a model, and show no number you could not source. Never stand in a generated image for the real part.
+
+Keep a FACTS.md in the project folder (claim, source URL, quoted wording, or the measurement method for anything measured from the CAD) and deliver it with the film.
+
## 3. Colour logic
- The product brings its own colours; the frame around it is neutral and dark, so the product is always the brightest, most saturated thing.
@@ -33,10 +37,10 @@ It is not a glass product render (one object, material beauty, no disassembly),
## 4. Type & subtitles
-- Names: a CJK sans at medium weight (Noto Sans SC 500, 28–32 px). Specs and numbers: a monospaced face (JetBrains Mono 15–22 px) so digits line up and read as measurement. English subtitle and title line: a neutral grotesque (Inter).
+- Names: a clean sans at medium weight in the film's script (28–32 px; Noto Sans SC 500 in our demo). Specs and numbers: a monospaced face (15–22 px; JetBrains Mono) so digits line up and read as measurement. A neutral grotesque (Inter) for Latin running text.
- Label structure is fixed: a two-digit index in the accent, the name, one spec line. Units always written (mm, MB, ×n for counts). A label carries at most one fact the voice does not say.
- Dimension text sits on a small dark plate, follows the line's angle and is never upside down.
-- Subtitles: a centred strip at the bottom, Chinese line above, English below, one line each, a soft shadow and no box. Hold every cue ≥ max(1.8 s, speech + 0.6 s); every label stays fully in frame for CJK ÷ 4.5 + other ÷ 15 + 1.5 s.
+- Subtitles: a centred strip at the bottom with a soft shadow and no box; if the film is bilingual, the film's language on top. Hold every cue ≥ max(1.8 s, speech + 0.6 s); every label stays fully in frame for CJK ÷ 4.5 + other ÷ 15 + 1.5 s.
## 5. Motion quality
@@ -44,20 +48,20 @@ It is not a glass product render (one object, material beauty, no disassembly),
- **Separation**: smooth start, fast middle, long settle (ease-in-out cubed); layers leave top first, 0.15–0.2 s apart; repeated parts (keys, screws) fan out in a wave ordered by distance from a corner.
- **Closing**: bottom first, quicker (about 1 s per layer), the last layer lands with a real mechanical response (a key travels its stroke and returns; nothing bounces like rubber unless it is rubber).
- While held apart, layers may float a millimetre or two with offset phases; during macro shots they hold perfectly still.
-- Labels draw in: anchor dot, leader growing along its length, then text sliding in 10 px. They leave with a short fade before the parts move again.
+- Labels draw in (anchor dot, leader growing, text sliding 10 px) and fade out before the parts move again.
- Never moves: the floor, the light rig's relation to the camera, the label column's x position.
## 6. Camera grammar
| Move | What it expresses | Can serve |
|---|---|---|
-| Continuous orbit while layers separate | the whole object, its order of assembly | a reveal; a structure overview; a count of parts |
-| Grazing macro dolly across a surface | touch, material, finish | an opening; a texture; a premium detail |
-| Dive between layers, looking up or down | being inside the product | a hidden component; the "how it works" part |
-| Slow push on one component, still subject | the one part that matters | a chip, a sensor, a connector, a seal |
-| Rise through the stack | moving from one subsystem to the next | a transition between two stops |
-| Fast pull back to the whole | return, synthesis | the closing; a before/after |
-| High three-quarter drift with dimensions | scale and precision | sizes, pitch, thickness |
+| Orbit while layers separate | the whole, its order of assembly | a reveal; a structure overview |
+| Grazing macro dolly | touch, material, finish | an opening; a texture |
+| Dive between layers | being inside | a hidden component; how it works |
+| Slow push on one still part | the part that matters | a chip, a sensor, a seal |
+| Rise through the stack | one subsystem to the next | a transition between stops |
+| Fast pull back | return, synthesis | a closing; a before/after |
+| High three-quarter drift | scale and precision | sizes, pitch, thickness |
- At key moments the subject fills at least a third of the frame height. Labels live in a column on the free side (shift the projection with a view offset rather than moving the object), subtitles in the bottom 12 %.
- Transitions are camera moves through the object itself. No cuts to black, no slide transitions, no split screens.
@@ -65,7 +69,7 @@ It is not a glass product render (one object, material beauty, no disassembly),
## 7. Sound palette
-- Instruments: tuned mallets (marimba, vibraphone, bowed vibraphone, glockenspiel, glass), a round electric bass, a short synthetic kick, closed hi-hat and claves. Precise and dry outside the object; sustained and airy inside it.
+- Instruments: tuned mallets (marimba, vibraphone, glockenspiel, glass), a round bass, a short synthetic kick and small dry percussion. Precise and dry outside the object; sustained and airy inside it.
- Foley is the material: hollow plastic clacks for keycaps or housings, a switch click with a low thock, dry taps for boards, inharmonic rings for small machined metal, a soft thud for the enclosure, airy swooshes for layers lifting and for camera dives, a fine pen hiss when a dimension line draws, a tiny tick per label.
- Every separation and every landing has its sound, panned to where the part is.
- Silence: at least two near-silences (room tone only) before the big separations or the turn back; the first sound after each is the most important hit around it.
@@ -74,23 +78,23 @@ It is not a glass product render (one object, material beauty, no disassembly),
## 8. Native moves
-- **The wave lift.** Repeated parts rise in a wave across the object. *Fits content like:* the cells of a battery pack; the tiles of a solar panel; the drawers of a modular shelf; the pixels of an LED wall.
-- **Inside the gap.** The camera enters the space between two lifted layers and looks at the hidden face of a part. *Fits content like:* the back of a phone's logic board; the inside of a drone's arm; the underside of a camera sensor module.
-- **The leader that lands on the part.** A macro label whose line ends on the component itself. *Fits content like:* a pressure sensor in a running shoe; the gasket in a waterproof case; the motor driver in a robot vacuum.
+- **The wave lift.** Repeated parts rise in a wave across the object. *Fits content like:* battery cells; solar tiles; the drawers of a modular shelf.
+- **Inside the gap.** The camera enters the space between two lifted layers to see a hidden face. *Fits content like:* the back of a logic board; the inside of a drone arm; the underside of a sensor module.
+- **The leader that lands on the part.** A macro label whose line ends on the component. *Fits content like:* a pressure sensor in a shoe; a gasket in a waterproof case; a motor driver.
- **Dimensions drawn on the thing.** After closing, the real outline gets dimension lines in perspective. *Fits content like:* the thickness of a laptop lid; the footprint of a router; the bore of a valve.
-- **One real keystroke.** A part performs its true mechanical motion once (a key press, a hinge, a latch) before or after the teardown. *Fits content like:* a camera shutter; a buckle; a folding phone's hinge.
+- **One real motion.** A part performs its true mechanical motion once (a press, a hinge, a latch). *Fits content like:* a camera shutter; a buckle; a folding hinge.
- **Lights on inside.** Emitters inside the product switch on while it is apart. *Fits content like:* status LEDs; a backlit display; an indicator ring.
## 9. Pitfalls of the medium
- **Invented numbers.** A size that no file gives. Fix: measure it from the CAD and say "measured" in the facts file, or leave it out.
- **Mixed-up revisions.** Plates, cases and boards from different versions of a project. Fix: check hole positions and stack heights across the files (they must coincide), and pin the commit.
-- **Panelised boards.** Layout files often contain a panel with breakaway tabs, not the board outline. Fix: take the outline from a plate or case file of the same revision, or flood-fill from a known interior point.
-- **Zero-length edges.** Duplicate outline points give zero normals; shading turns into NaN and bloom spreads it into black squares. Fix: clean outlines and repair zero normals; scan every frame for black tiles that appear for one frame only.
+- **Panelised boards.** Layout files may hold a panel with breakaway tabs. Fix: take the outline from a plate or case of the same revision, or flood-fill from an interior point.
+- **Zero-length edges.** Duplicate outline points give zero normals → NaN → black squares after bloom. Fix: clean outlines, repair zero normals, scan frames for one-frame black tiles.
- **Overshooting camera splines.** Catmull-Rom over unevenly spaced keys flies past a macro stop. Fix: monotone interpolation per component.
-- **Labels too short for their text.** Macro stops last about three seconds. Fix: one fact per label, open the label before the camera settles, check with `readcheck`.
-- **Over-bright light sweeps.** Area lights in millimetre scenes blow plastics to white. Fix: keep sweeps at a fraction of the key and the bloom threshold above the brightest diffuse surface.
-- **Brand marks on parts.** Chip tops, connector shells and project logos can carry trademarks. Fix: plain package tops; drop logo footprints when reading the layout.
+- **Labels too short.** Macro stops last about three seconds. Fix: one fact per label, opened before the camera settles; check with `readcheck`.
+- **Over-bright light sweeps.** Area lights blow plastics to white. Fix: sweeps at a fraction of the key, bloom threshold above the brightest diffuse surface.
+- **Brand marks on parts.** Chip tops and connector shells carry trademarks. Fix: plain package tops; drop logo footprints unless the product is the user's own.
- **Crushed blacks.** Black plastics against a black ground disappear. Fix: lift them to a dark grey and let the rim light separate them.
## 10. Engine
@@ -100,20 +104,22 @@ All in `demo/src/` (three.js r170, the library's `core/three/post.js` and `core/
- `parts.js`: `keycapGeometry(w, d, h)` (lofted shell with a spherical dish and a stem), `switchGeometries()`, `loft(rings)`, `shapeFrom(outline, holes, circles)` (KiCad outline to extrusion), `inset`, `hexSpacer`, `screwGeometry`.
- `pcbtex.js`: `paintPCB(data, side, outline, box, ppm)` paints colour, roughness/metalness and bump maps from extracted layout data.
- `comps.js`: `buildBackParts(data, group, y, materials)` places package bodies at footprint positions and returns anchors.
-- `overlay.js`: anchored labels (`label`), perspective dimension lines (`dimension`), subtitles, end card, the readcheck text registry, the subtitle width check.
+- `overlay.js`: anchored labels (`label`), perspective dimension lines (`dimension`), subtitles, title card, readcheck texts, subtitle width check.
- `main.js`: layers, explode and gap functions, the camera keys (orbit or eye/target, monotone), lights, `window.EV` for the mixer.
-- `tools/extract_pcb.py`, `tools/kicad_geom.py`, `tools/sexp.py`: read any `.kicad_pcb` (outline loops, tracks, zones, pads, silkscreen, footprints). `tools/step2mesh.mjs`: STEP to mesh with occt-import-js.
+- `tools/extract_pcb.py`, `kicad_geom.py`, `sexp.py`: read any `.kicad_pcb` (outlines, tracks, zones, pads, silkscreen, footprints; plain Python). `tools/step2mesh.mjs`: STEP to mesh.
+
+**Extra packages and packs**, beyond `setup.sh deps [voice] [music]`: `occt-import-js` (npm, LGPL-2.1, not in the library's package.json) to triangulate STEP files, and the studio HDRI (`sh tools/fetch.sh hdri`). Install the npm package yourself into a private `node_modules` in the project folder (as `tools/fetch_cad.sh` does in a temp folder), never into `$LIB`.
-Minimal example, not in the demo: read a plate file with `extract_pcb.py`, build `slab(shapeFrom(outline, cutouts), 1.5, …)` for a 1.5 mm aluminium plate, give it `MeshStandardMaterial({ metalness: 1, roughness: .35 })`, and orbit it with three `CAM` keys.
+Minimal example, not in the demo: read a plate file with `extract_pcb.py`, extrude `shapeFrom(outline, cutouts)` 1.5 mm as aluminium (`metalness: 1, roughness: .35`) and orbit it with three `CAM` keys.
## 11. Variation space
Decided per film: which product and revision, which layers to separate and in what order, how many stops inside and which parts deserve them, the camera route, whether to open from the whole or from a detail, the product's palette and the accent, the voice.
-- **Three structures**: a single orbit with two stops (structure first, one hero part); a "how it works" path that follows a signal or a flow through the layers (input → board → output); a comparison of two revisions taken apart side by side, held still before each difference is named.
+- **Three structures**: one orbit with two stops; a "how it works" path following a signal or flow through the layers; two revisions taken apart side by side, each held still before a difference is named.
- **Three openings**: a part performing its real motion in macro; the closed product turning in silence on the seamless; a single component floating alone before the rest of the product assembles around it.
-- **Three endings**: the product closed with its dimensions drawn on it; the product closing while the camera pulls back to a top view that becomes a technical drawing; the product apart one last time, frozen, with every part labelled as a printable sheet.
+- **Three endings**: closed with its dimensions drawn on it; closing into a top view that becomes a technical drawing; apart one last time, frozen, every part labelled like a printable sheet.
---
-How our demo was made (story, shots, score, end card, build): [DEMO.md](DEMO.md). Read it after your treatment exists.
+How our demo was made (story, shots, score, title card, build): [DEMO.md](DEMO.md). Read it after your treatment exists.
diff --git a/styles/teardown/demo/build.sh b/styles/teardown/demo/build.sh
index 131b080..c38cb5c 100644
--- a/styles/teardown/demo/build.sh
+++ b/styles/teardown/demo/build.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# One command: 《二十一键》 21 Keys, Opened (Exploded Teardown demo)
# sh demo/build.sh voice → checks → events → picture → score + mix → master → .srt → checks → poster
-# FETCH=1 sh demo/build.sh first rebuild the CAD data from foostan/crkbd (pinned commit) and the font subsets
+# FETCH=1 sh demo/build.sh first rebuild the CAD data from foostan/crkbd (pinned commit) and the fonts
set -e
HERE=$(cd "$(dirname "$0")" && pwd) # .../teardown/demo
FILM=$(cd "$HERE/.." && pwd) # .../teardown
@@ -12,10 +12,17 @@ PY="$LIB/.venv/bin/python"
NAME=teardown
cd "$LIB"
-if [ "${FETCH:-0}" = "1" ] || [ ! -f "$HERE/data/pcb.json" ]; then
- sh "$HERE/tools/fetch_cad.sh"
+# prep: everything below is gitignored, so a clean clone rebuilds it (FETCH=1 forces it)
+# data/case.bin (+ data/pcb.json): the CAD from foostan/crkbd at a pinned commit (needs network, npm for occt-import-js)
+# fonts: Noto Sans SC subsets, Inter, JetBrains Mono from Google Fonts
+# library packs: the studio HDRI, the Kokoro model, the sample libraries the score uses (vcsl, freepats, vsco2ce)
+if [ "${FETCH:-0}" = "1" ] || [ ! -f "$HERE/data/case.bin" ]; then sh "$HERE/tools/fetch_cad.sh"; fi
+if [ "${FETCH:-0}" = "1" ] || [ ! -f "$HERE/fonts/NotoSansSC-500.woff2" ] || [ ! -f "$HERE/fonts/Inter.ttf" ] || [ ! -f "$HERE/fonts/JetBrainsMono.ttf" ]; then
python3 -I "$HERE/tools/fetch_fonts.py"
fi
+[ -f core/assets/polyhaven/photo_studio_loft_hall_2k.hdr ] || sh tools/fetch.sh hdri
+[ -f core/tts/kokoro-v1.0.onnx ] || sh tools/fetch.sh voice
+for l in vcsl freepats vsco2ce; do [ -d "core/audio/instruments/$l" ] || sh tools/fetch.sh instruments $l; done
# voice: Kokoro am_michael, speech-to-text check with the small English model; then cues from the real durations
node "$HERE/tools/export.mjs" "$HERE" > /dev/null || true
diff --git a/styles/teardown/demo/tools/fetch_fonts.py b/styles/teardown/demo/tools/fetch_fonts.py
index 38caf5f..87dad3e 100644
--- a/styles/teardown/demo/tools/fetch_fonts.py
+++ b/styles/teardown/demo/tools/fetch_fonts.py
@@ -1,4 +1,5 @@
-# Subset Noto Sans SC (OFL) to the characters the overlay uses, via the Google Fonts CSS API (text=)
+# Fonts (all SIL OFL 1.1, from Google Fonts): Noto Sans SC subset to the characters the overlay uses (CSS API text=),
+# Inter and JetBrains Mono as variable TTFs from github.com/google/fonts, plus their licence texts
# usage: python3 -I tools/fetch_fonts.py (run from the film folder; needs network)
import re, urllib.parse, urllib.request, pathlib
here = pathlib.Path(__file__).resolve().parent.parent
@@ -10,5 +11,13 @@ for w in (400, 500):
url = f'https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@{w}&text=' + urllib.parse.quote(chars)
css = urllib.request.urlopen(urllib.request.Request(url, headers={'User-Agent': UA}), timeout=30).read().decode()
furl = re.search(r'url\((https://[^)]+)\)', css).group(1)
+ (here / 'fonts').mkdir(exist_ok=True)
(here / 'fonts' / f'NotoSansSC-{w}.woff2').write_bytes(urllib.request.urlopen(furl, timeout=30).read())
print(len(chars), 'chars:', chars)
+
+GF = 'https://github.com/google/fonts/raw/main/ofl/'
+for url, name in [(GF + 'inter/Inter%5Bopsz,wght%5D.ttf', 'Inter.ttf'), (GF + 'inter/OFL.txt', 'OFL-inter.txt'),
+ (GF + 'jetbrainsmono/JetBrainsMono%5Bwght%5D.ttf', 'JetBrainsMono.ttf'), (GF + 'jetbrainsmono/OFL.txt', 'OFL-jetbrainsmono.txt'),
+ (GF + 'notosanssc/OFL.txt', 'OFL-notosanssc.txt')]:
+ (here / 'fonts' / name).write_bytes(urllib.request.urlopen(urllib.request.Request(url, headers={'User-Agent': UA}), timeout=60).read())
+print('fonts ready in', here / 'fonts')
diff --git a/styles/white-model/STYLE.md b/styles/white-model/STYLE.md
index 7d3f333..9dcb279 100644
--- a/styles/white-model/STYLE.md
+++ b/styles/white-model/STYLE.md
@@ -1,26 +1,29 @@
# Projection on White Model — Style Prompt
> A pure white massing model of a real place stands on a plinth in a dark room, and a projector paints data onto it as light: one layer at a time, falling on the surfaces that face it, spilling a little past the plate. The model never changes; only the light on it does.
-> References (grammar only): projection-mapped planning models in city galleries and architecture exhibitions (the dark room, the soft throw, colour that exists only on white surfaces); tilt-shift and macro model photography (shallow depth of field at rooftop height, the model as an object on a table); editorial data graphics (one figure, one label, one source per layer). Copy none of their layouts, typefaces, colours or music, and never name them in the film.
+> References (grammar only): projection-mapped planning models in city galleries (the dark room, the soft throw, colour only on white surfaces); macro model photography (shallow focus at rooftop height); editorial data graphics (one figure, one label, one source per layer). Copy none of their layouts, typefaces, colours or music, and never name them in the film.
## 1. Essence, and what it is not
-- **The model is real geometry of a real place**: building footprints and heights from open data, extruded at a stated scale (1:1000, 1:2000…). Nothing on the model is invented or "representative".
+- **The model is real geometry of a real place**: building footprints and heights from open data (§2), extruded at a stated scale (1:1000, 1:2000…). Nothing on the model is invented or "representative", and no generated image ever stands in for the place.
- **The model is white; data is light.** Colour is never painted into the material: it is projected, so it brightens surfaces that face the projector, fades on walls turned away, stops at the edge of the throw and reaches a little onto the plinth.
- **Layers arrive one at a time**, each with its own gesture of light (a wash, a pop-on, a rising level, a moving sun), and each answers the question the last one raised.
- **A physical room**: house lights, a projector that strikes and switches, a plinth, darkness around it. Lights out is where the data starts; lights up is where it ends.
- **Every number on screen is computed from the same buildings** that are on the table.
-Not Isometric Infographic (no orthographic diorama, no icons; a perspective camera in a room), not Low-poly Island (no invented terrain, no colour in the material), not Sci-fi Hologram HUD (no glowing wireframes or invented interface; the light lands on matter), not Satellite Briefing (no imagery; a model on a table), not Blueprint (no drafting sheet), not a laser-scan or point-cloud film (no scan lines sweeping across; light is projected, not measured).
+Not Isometric Infographic (no diorama or icons), not Low-poly Island (no invented terrain), not Sci-fi Hologram HUD (no wireframes; light lands on matter), not Satellite Briefing (no imagery), not a laser-scan or point-cloud film (no scan lines; light is projected, not measured).
## 2. Materials & rendering
-- **Model**: matte white (sRGB ≈ #F3F3F1, roughness ≈ 0.9), crisp edges, walls between touching parts of one building removed so no coplanar faces flicker. Water is a darker satin inlay in the base plate; bridges are low white slabs. A thin base plate (foam board) on a dark satin plinth.
-- **Light model**: house light = one soft key + a neutral studio environment (no warm HDRI cast) + ambient occlusion on close shots. Projection = a term added to the lit surface in the material shader: `colour × max(0.42 + 0.58 · N·toProjector) × throw mask × master`, scaled by the surface albedo, reduced on water. Never a texture on the mesh.
+- **Model**: matte white (≈ #F3F3F1, roughness ≈ 0.9), crisp edges; water a darker satin inlay in the base plate; bridges low white slabs; a thin base plate on a dark satin plinth.
+- **Light model**: house light = one soft key + a neutral studio environment + AO on close shots. Projection = a term added to the lit surface in the shader: `colour × (0.42 + 0.58 · max(N·toProjector, 0)) × throw mask`, scaled by albedo, reduced on water. Never a texture on the mesh.
+- **Building data is the material.** First look for the place's own open 3D or footprint-with-height data: 3DBAG (Netherlands, CC BY 4.0), PLATEAU (Japan, CC BY 4.0-compatible), city open-data portals (footprints with heights or floors, zoning, plans). Fine: CC0, public domain, CC BY (credited in CREDITS and on screen). OpenStreetMap and Overture (ODbL), CC BY-SA and "no known restrictions" are not CC0: name the terms to the user and ask first. For their own site, ask the user for their data (plan, city model, survey heights).
+- **Layers depend on what exists.** Construction years per building are a Dutch luxury (BAG); elsewhere they are often missing. Substitute what the data does hold and the medium can still project: heights or floor counts, footprint area, zoning or plan status, a boundary, sun and shadow (always computable). Never invent a year layer.
- **A layer is state, not a picture**: per-building attributes (year, height, rank, flags) live in vertex data; the shader decides each frame what colour the projector gives them.
- **The sun is a real directional light** with shadow maps, computed from the place's latitude and a real date and time (NOAA/Meeus solar position). The projector can trace what the sun does (a shadow footprint) but never fakes a shadow.
- **Post**: physical depth of field (stronger on close shots), bloom only above the projection highlights, vignette, light grain in ffmpeg. GTAO only on close shots: on wide grazing views it bands.
- **Screen space only for the 2D layer**: readouts, pins, measured lines and subtitles go through the camera's world → screen function so they stay pinned to the model.
+- **Keep a FACTS.md in the project folder** (claim, source URL, quoted wording, or the measurement method) and deliver it with the film; every number on screen is computed by a script from the same data as the model.
## 3. Colour logic
@@ -30,22 +33,20 @@ Not Isometric Infographic (no orthographic diorama, no icons; a perspective came
- The sun is warm, its shade is a projected deep blue; data colours are put away when the sun arrives.
- Never colour the model in the house light; never use more than two layer palettes on screen at once.
-Example (our demo): pre-1940 #FFA13D; 1940–64 #2A46FF, 1965–89 #2F98FF, 1990–2009 #6FDCFF, 2010–25 #E6FBFF; height #1A1440 → #5A35D6 → #E2509A → #FFE7C4; shade #1C2C66; sun #FFD9AD.
-
## 4. Type & subtitles
- **Roles**: a light grotesk for the figure (Inter Tight 200, 120–140 px), a sans for labels in the film's language (Noto Sans SC 300/500, 20–36 px), a monospace for instruments, years and coordinates (IBM Plex Mono, 18–22 px). OFL, self-hosted, CJK subset.
-- **Readout in the left third**: index + layer name, one figure, one label, one source line, a legend bar in the layer's colours. One readout per layer.
+- **Readout in the left third**, one per layer: index + layer name, one figure, one label, one source line, a legend bar.
- **Pins**: a hairline from a roof or a ground point up to a tag on a dark plate (title 26 px + one sub line 20 px).
- **Identity label** top-left, quiet: place, scale, data sources.
-- **Subtitles** centred at the bottom on a soft dark gradient, no box; bilingual = film language line above, second language below, each a single line measured with the real fonts; split into two cues rather than wrap.
+- **Subtitles** centred at the bottom on a soft dark gradient, no box, measured with the real fonts; if the film is bilingual, the film's language on top, each language on a single line, split into two cues rather than wrap.
- Nothing below 18 px at 1080p. Hold subtitles ≥ max(1.8 s, speech + 0.6 s); labels ≥ characters ÷ 4.5 + 1.5 s (CJK), letters ÷ 15 + 1.5 s (Latin).
## 5. Motion quality
- The camera moves continuously and slowly; it changes speed with the layers, never stops dead.
-- **Light is the actor.** Each layer arrives by a gesture of light with a soft edge: a wash that spreads from the projector axis, buildings switching on one by one with a short flash, a soft level of light climbing every facade, the sun's clock running. No thin hard line sweeping the table.
-- House lights cut fast (0.25 s, a relay), come back slowly (1 s). The projector strikes with a brief flicker.
+- **Light is the actor.** Each layer arrives by a soft-edged gesture of light: a wash spreading from the projector axis, buildings switching on one by one with a short flash, a level climbing every facade, the sun's clock running. No hard line sweeping the table.
+- House lights cut fast (a relay, 0.25 s) and return slowly (1 s); the projector strikes with a brief flicker.
- Counters roll while the light moves and land when it lands; measured lines grow from A to B with ticks.
- What never moves: the model, the plinth, the pins' anchors on the model.
@@ -60,20 +61,20 @@ Example (our demo): pre-1940 #FFA13D; 1940–64 #2A46FF, 1965–89 #2F98FF, 1990
| Side-on track along a line | a measured distance on the model | a shadow, a corridor, a route, a view line |
| Pull back as the house lights return | the data stops; the object remains | an ending; a reset between topics |
-At key moments the subject fills at least a third of the frame height; readouts in the left third, subtitles bottom centre, pins never over the readout. Transitions are light changes on one take (lights out, a layer replacing another, a projector going dark); avoid cuts, fades to black between unrelated places, and wipes.
+At key moments the subject fills a third of the frame height; readouts left third, subtitles bottom centre, pins never over the readout. Transitions are light changes on one take (lights out, a layer replacing another, the projector going dark), not cuts, fades or wipes.
## 7. Sound palette
-- **The room**: gallery room tone, the projector fan (a low hum with harmonics and filtered air) that rises when the lamp strikes, relays for the house lights, a lamp strike (a high zap and a low thump), the air of a light wash (band-passed noise that slides and settles).
-- **Light as sound**: mallets and glass for things switching on (marimba, glockenspiel, hand chimes, glass), bowed vibraphone for held light, a rising mallet line and air riser for a climbing level, one glass note per highlighted building.
-- **Weight**: timpani, gran cassa, gong and a low brass stab for a historical blow; warm low brass (horns, trombones, tuba) for the sun.
+- **The room**: room tone, the projector fan (hum + filtered air) rising when the lamp strikes, relays for the house lights, a lamp strike (zap + thump), the air of a light wash (sliding band-passed noise).
+- **Light as sound**: mallets and glass for things switching on, bowed vibraphone for held light, a rising mallet line and air riser for a climbing level, one glass note per highlighted building.
+- **Weight**: timpani, gran cassa, gong, low brass for a heavy fact; warm low brass for a turn.
- **Floor**: contrabass and cellos only as a floor under the chords; no generic piano and strings melody.
- **Silence**: the projector goes dark and everything stops but a thin fan hum before the turn; a short suck-out before the heaviest hit. The first sound after the silence is the turn.
- **Mix**: voice about 10 dB over the music; the two designed impacts are the loudest moments; −14 LUFS, true peak ≤ −1.2 dB. Voice: calm, short declarative lines, numbers spoken plainly.
## 8. Native moves
-- **Lights out, lamp on.** The model in house light, a relay, darkness, the projector strikes and the first layer arrives. *Fits content like:* a product's site before and after; a district before a plan is shown; any film that needs "now look closer".
+- **Lights out, lamp on.** House light, a relay, darkness, the lamp strikes, the first layer arrives. *Fits content like:* a site before and after; a district before a plan is shown; any "now look closer".
- **The hole.** Light only the set that answers a question (built before a date, owned by one party, inside a zone) and let the absence draw the shape. *Fits content like:* a war-damaged centre; a flood plain with no housing; land a company owns; a protected zone.
- **Layers by time.** Buildings switch on in the decade they were built, each layer faster than the last, a year counter rolling. *Fits content like:* a new town's growth; a campus master plan by phase; a port's expansion; a developer's portfolio by year.
- **The rising level.** A soft level of light climbs every facade at once; low buildings finish first, the tallest last, the reading rides up with it. *Fits content like:* building heights; sea-level or flood depth; floor counts; a height limit being tested.
@@ -83,26 +84,25 @@ At key moments the subject fills at least a third of the frame height; readouts
## 9. Pitfalls of the medium
-- **Wall normals**: extruded footprints wound the wrong way show their inside faces (walls look see-through and streaky). Compute each wall's outward normal from ring orientation and wind the triangles to match.
-- **Shared walls** between parts of one building z-fight; skip the overlap below the lower neighbour.
+- **Wall normals** wound the wrong way show inside faces (walls look hollow): derive the outward normal from ring orientation. **Shared walls** between parts z-fight: skip the overlap below the lower neighbour.
- **Warm HDRIs turn the white model beige**: use a neutral studio environment.
- **GTAO on wide grazing views** produces wedge-shaped dark bands; keep it on close shots only.
-- **A low sun lights facades, not roofs**: shoot the sun layer from the sunlit side (or side-on) or it reads as a dull grey city.
-- **Narrow shadows vanish** in a city full of shadows: trace the one that matters with the projector (fill + edge) and measure it.
+- **A low sun lights facades, not roofs**: shoot from the sunlit side or side-on. **Narrow shadows vanish** among all the others: trace the one that matters (fill + edge) and measure it.
- **Hairline scan lines read as laser scanning**: give every projection front a wide soft edge or switch buildings individually.
- **Floating labels**: anchor pins on the tallest part of a building, not on its footprint centroid.
- **Numbers from mixed sources** (official height vs measured roof): say which on screen ("roof", "measured").
## 10. Engine
-- `demo/studio.js` — `makeStudio(W, H, model)`: renderer, post, room, neutral environment, the projection material (`projMaterial(kind)` injects `projLight()` and `roofGlow()` into MeshStandardMaterial), the merged city mesh (`buildCity` with shared-wall removal and outward normals), plate with water inlay, plinth, house light (index 0) and sun (index 1, masked in the light loop). Uniforms `U` drive every layer.
-- `demo/tools/prep.py` — open data → `model.json` (parts, building years and heights, bridge decks), water mask, a sun table for any date, a heightfield shadow of one building, and `stats.json` with every on-screen number.
-- `demo/overlay.js` — readout, pin, measured range line, subtitle strip, end card; registers texts for readcheck.
+- `demo/studio.js` — `makeStudio(W, H, model)`: renderer, post, room, the projection material (`projMaterial(kind)` injects `projLight()` / `roofGlow()` into MeshStandardMaterial), the city mesh (`buildCity`: outward normals, shared walls removed), plate, plinth, house light (index 0) and sun (index 1). Uniforms `U` drive every layer.
+- `demo/tools/prep.py` — **3DBAG + BGT only**: it reads 3DBAG fields (`b3_h_70p`, `b3_h_maaiveld`, `oorspronkelijkbouwjaar`) and Dutch RD coordinates (`tools/rd.py`). Another source needs its own adapter that writes the same `model.json`: `{size:[w,d] model metres, b:[[year|0, height_m], …] per building, p:[[building_index, height_model_m, [[[x,z],…] outer ring, …holes]], …] per roof part, decks:[[[x,z],…]]}`, with x east, z south, 1 unit = 1 model metre; plus `water.png` (plate-sized mask) and a `stats.json` with every on-screen number. `tools/sun.py` (solar position, any place and date) and the heightfield shadow are source-independent.
+- `demo/overlay.js` — readout, pin, measured range line, subtitle strip, title card; registers texts for readcheck.
+- **Extra packages and packs**: none beyond `setup.sh deps` (+ `voice`, `music` for narration and score); downloads are plain `curl` from the data portal. Reprojecting another country's data may need pyproj or shapely: the agent installs them itself into a private venv in the project folder, not into `$LIB/.venv`.
- Minimal example, not in the demo: set `U.uPreC` to a station and `U.uPreR` growing to light everything within walking distance; or put a flood height in `U.uHgtF` with `U.uHgtBand` held at 1 and leave it still.
## 11. Variation space
-Decide per film: the place and its scale, which layers and in what order, the colour of each layer within the colour logic, the opening (lights on or lights already out), the camera path, the ending, the pace.
+Decide per film: place and scale, which layers in what order, their colours, the opening, the camera path, the ending, the pace.
- **Structures**: a question answered layer by layer; a plan versus today (the plan's buildings switching on in a second colour); one building's story told by its neighbours.
- **Openings**: a macro glide over white roofs; darkness and a single pick-out; the plinth from across the room as the house lights fall.
@@ -110,4 +110,4 @@ Decide per film: the place and its scale, which layers and in what order, the co
---
-How our demo was made (story, shots, score, end card, build): [DEMO.md](DEMO.md). Read it after your treatment exists.
+How our demo was made (story, shots, score, title card, build): [DEMO.md](DEMO.md). Read it after your treatment exists.
diff --git a/styles/white-model/demo/build.sh b/styles/white-model/demo/build.sh
index 1df487f..2c09589 100644
--- a/styles/white-model/demo/build.sh
+++ b/styles/white-model/demo/build.sh
@@ -22,7 +22,10 @@ if [ "${FETCH:-0}" = "1" ] || [ ! -f "$HERE/assets/raw/l13_0.json" ]; then
fi
mkdir -p "$HERE/data" "$HERE/out"
"$PY" -I "$HERE/tools/prep.py" "$HERE" > "$HERE/out/prep.log" # model.json, water.png, zshadow.png, stats.json (every number on screen)
-[ -f "$HERE/fonts/fonts.css" ] || "$PY" -I "$HERE/tools/fonts.py" "$HERE"
+# fonts (gitignored .woff2, subset from Google Fonts): fetch when any is missing
+for f in NotoSansSC-300 NotoSansSC-500 InterTight-200 InterTight-400 IBMPlexMono-400; do
+ [ -f "$HERE/fonts/$f.woff2" ] || { "$PY" -I "$HERE/tools/fonts.py" "$HERE"; break; }
+done
# voice: Kokoro (bm_george), speech-to-text check with the small English model, cues from the real durations
node "$HERE/tools/export.mjs" "$HERE" > /dev/null || true
diff --git a/styles/white-model/demo/tools/fonts.py b/styles/white-model/demo/tools/fonts.py
index 7e59e79..f37a3e8 100644
--- a/styles/white-model/demo/tools/fonts.py
+++ b/styles/white-model/demo/tools/fonts.py
@@ -1,5 +1,5 @@
"""Subset the film's fonts to the characters it uses (Google Fonts CSS2 API, &text=), all OFL.
-usage: python -I tools/fonts.py <demo_dir> -> fonts/*.woff2 + fonts/fonts.css"""
+usage: python -I tools/fonts.py <demo_dir> -> fonts/*.woff2 + fonts/fonts.css + fonts/OFL-*.txt"""
import sys, os, re, urllib.request, urllib.parse
D = sys.argv[1]
src = ''.join(open(os.path.join(D, f), encoding='utf-8').read() for f in ('main.js', 'overlay.js', 'timeline.js', 'studio.js'))
@@ -20,3 +20,6 @@ for fam, w, alias, out in (('Noto Sans SC', 300, 'SC', 'NotoSansSC-300.woff2'),
css.append(f"@font-face{{font-family:'{alias}';src:url({out}) format('woff2');font-weight:{w}}}")
print(out, len(data), 'bytes')
open(os.path.join(D, 'fonts', 'fonts.css'), 'w').write('\n'.join(css) + '\n')
+# licence texts from github.com/google/fonts (ofl/<family>/OFL.txt)
+for fam, out in (('notosanssc', 'OFL-notosanssc.txt'), ('intertight', 'OFL-intertight.txt'), ('ibmplexmono', 'OFL-ibmplexmono.txt')):
+ open(os.path.join(D, 'fonts', out), 'wb').write(get(f'https://raw.githubusercontent.com/google/fonts/main/ofl/{fam}/OFL.txt'))