Skip to content

Art and animation, written as code. Illustrations, loops, interactive web art, launch-videos and scored films in dozens of styles, identical on every render.

docs: still --frames/--sheet/--no-bake-cache, the .cache/bakes plate cache, render --from/--to/--poster-frame/--hashes/--blur, verify-export --delivery/--frame, npm test; Van Gogh reference provenance where the almond adaptation is documented

Alex Greenshpunf598449b9881
diff --git a/skills/anidoodle/SKILL.md b/skills/anidoodle/SKILL.md
index 57fa00d..5661628 100644
--- a/skills/anidoodle/SKILL.md
+++ b/skills/anidoodle/SKILL.md
@@ -117,12 +117,13 @@ node tools/emit.mjs intro --out out/intro.html # one self-co
| Tool | What it does |
|---|---|
| `scaffold.mjs` | a project with a still and/or film; `--duration`, `--format` or `--size`, `--fps`, `--bpm` |
-| `still.mjs` / `render.mjs` | one frame, drawn twice with its hash / the whole piece in any format, then a determinism probe |
+| `still.mjs` / `render.mjs` | frames drawn twice with hashes (`--frames a,b,c --sheet` in one browser) / the piece in any format (`--from/--to`, `--poster-frame`, `--hashes`) |
| `gate.mjs` | determinism, contract, dead air, artifact; `--self-test` proves it can fail |
| `registry.mjs` / `gallery.mjs` | the style list from the plates themselves / the gallery sheet |
| `docs-check.mjs` | fails when any doc's style count, length or path disagrees with the code |
-| `verify-export.mjs` | opt-in QA on the rendered file: frame count, duration, first-frame colour, loop seam |
-| `music.mjs` | renders and meters a score (loudness, range, onsets, brightness) |
+| `verify-export.mjs` | QA on the rendered file: frames, duration, score; opt-in first frame, loop seam, `--delivery` |
+| `test.mjs` (`npm test`) | unit suites in `engine/test/`, no browser |
+| `music.mjs` | `vocab` prints a style's vocabulary; `check` gates your composed score; `render`, `meter` |
| `sfx.mjs` | the sound-effects kit: `list`, `one`, `kit <dir>`, `test` |
Four backends, one art core: `playwright`, `html-player`, `remotion`, `hyperframes`.
diff --git a/skills/anidoodle/references/formats.md b/skills/anidoodle/references/formats.md
index d41ddf5..79b13a9 100644
--- a/skills/anidoodle/references/formats.md
+++ b/skills/anidoodle/references/formats.md
@@ -16,6 +16,8 @@ node <skill>/engine/tools/scaffold.mjs ~/art --film intro # something that
post, 2550x3300 letter at 300 dpi.
- **`node tools/still.mjs hero --out out/hero.png`** draws it twice and prints `reproducible`
when both hashes agree. That line is the receipt that the same file will come back tomorrow.
+ Several frames of a moving piece in one browser: `--frames 0,450,900` (or `0-900:150`), with
+ `--sheet out/sheet.jpg` for a contact sheet at 0.4 scale (`working-method.md`).
- **Transparent background**: skip the paper fill and the page stays clear, so a spot
illustration or an icon drops onto any website colour. Leave `g.paper()` off as well: over
clear pixels it lays its grain down as a grey veil. Carry the tooth in the marks instead
@@ -60,10 +62,27 @@ the craft table, then show it.
| APNG | `node tools/render.mjs <name> --out out/x.apng [--width 512]` | alpha loops that play in every browser |
| HTML | `node tools/emit.mjs <name> --out out/x.html` | the piece itself: one offline file that redraws it, with sound, on a double-click |
+Render options that hold for every moving format:
+
+- `--poster-frame N [--poster-fade 6]`: platforms show frame 0 as the thumbnail. The file opens
+ on frame N (the wall of styles, the logo, the prompt written big) and dissolves into the real
+ opening by frame 6. The frame count and the score are unchanged. A delivery whose frame 0 is
+ near-blank gets a warning after the encode.
+- `--blur N`: motion blur, each output frame the average of N subframes over a one-frame shutter,
+ in linear light and weighted by alpha (so a transparent WebM or APNG gets no dark fringe). Held
+ frames come out unchanged; stepped art (`meta.step` > 1, `onTwos`) is never blurred.
+- `--from F --to T`: frames `[F, T)` only, silent, written to `out/<name>.<F>-<T>.<ext>`, never
+ over the finished film. For checking a passage, not for shipping.
+- `--hashes out/x.md5`: the md5 of every frame handed to the encoder, for frame-exact
+ comparisons of two renders before any codec blurs the difference.
+
After any encode, `node tools/verify-export.mjs <name> [--first-frame #hex] [--fidelity-psnr 40]`
-proves the file on disk is the film: size, exact frame count, duration, and optionally the first
-frame's average colour and its fidelity to the source frame. All of it is opt-in beyond the
-container facts, so transparent and non-uniform pieces pass cleanly.
+proves the file on disk is the film: size, exact frame count, duration, the score (an audio
+stream exactly when the film has one, as long as the picture, not silent), and optionally the
+first frame's average colour and its fidelity to the source frame (`--frame N` picks which
+frame `--fidelity-psnr` compares; default 0). All of it is opt-in beyond the container facts,
+so transparent and non-uniform pieces pass cleanly. For a file that ships, add `--delivery`: a
+near-blank frame 0 then FAILS instead of warning; the fix is `render --poster-frame N`.
A still needs a browser only (`npx playwright-core install chromium`). Anything that moves also needs
`ffmpeg`. `gate.mjs` runs on all of them and marks the checks that do not apply to the piece,
diff --git a/skills/anidoodle/references/workflows/adapt-a-style.md b/skills/anidoodle/references/workflows/adapt-a-style.md
index 469cedc..285794f 100644
--- a/skills/anidoodle/references/workflows/adapt-a-style.md
+++ b/skills/anidoodle/references/workflows/adapt-a-style.md
@@ -79,3 +79,10 @@ header before any code:
vermilion; no black anywhere (the darkest note is the contour).
- **NOT**: `paintedOil` models form in depth; this hand keeps the ground flat and decorative with
one step of shadow. The subject is the film's own koi, never the painting's branch.
+
+The reference itself ships at `engine/assets/refs/vangogh-almond-blossom.jpg`, the one image in
+the repo not drawn by code: public domain (Van Gogh died in 1890; a faithful photograph of a 2D
+public-domain work), downloaded from Wikimedia Commons and kept byte-identical, with its source,
+licence and sha256 in `engine/assets/refs/PROVENANCE.json`. The launch films show it only as the
+picture the user attaches in the chat; `adaptAlmond.ts` never reads it. Any reference you ship
+this way gets the same record, and only a work that is actually public domain qualifies.
diff --git a/skills/anidoodle/references/workflows/launch-video-kit.md b/skills/anidoodle/references/workflows/launch-video-kit.md
index ed79ce4..fab2a0b 100644
--- a/skills/anidoodle/references/workflows/launch-video-kit.md
+++ b/skills/anidoodle/references/workflows/launch-video-kit.md
@@ -35,9 +35,10 @@ Add `src/hosts/page-myLaunch.ts` (three lines, copy `page-launchExample.ts`), th
```bash
node tools/still.mjs myLaunch --frame 0 --out out/poster.png # the first frame is the thumbnail
-node tools/render.mjs myLaunch
+node tools/still.mjs myLaunch --frames 0-420:30 --sheet out/sheet.jpg # the cut on one sheet, one browser
+node tools/render.mjs myLaunch # --poster-frame N if frame 0 is quiet
node tools/gate.mjs myLaunch
-node tools/verify-export.mjs myLaunch --file out/myLaunch.mp4
+node tools/verify-export.mjs myLaunch --file out/myLaunch.mp4 --delivery
```
What you get: the first prompt already being typed at frame 0 in a close-up (a hook that reads
@@ -109,7 +110,9 @@ zooms to each click, with the pointer and input log driving the page's own state
## Worked example
`launch2.ts` is anidoodle's content timeline (chat, koi with its code streaming, the wall, the
-brick balloon, the almond hand, the embroidery loop, the web tour, the butterfly film, the end
-card); `launch3.ts` is the cut: data segments spliced with type frames, 77 s on the score's 29
-bars. Study them for pacing, then build yours on the template with your own pictures and your
-own music; anidoodle's launch is one example of the grammar, not a skin to reuse.
+brick balloon, the almond hand (Van Gogh's public-domain *Almond Blossom* as the attached
+reference, `engine/assets/refs/` with its `PROVENANCE.json`; `adapt-a-style.md`), the embroidery
+loop, the web tour, the butterfly film, the end card); `launch3.ts` is the cut: data segments
+spliced with type frames, 77 s on the score's 29 bars. Study them for pacing, then build yours on
+the template with your own pictures and your own music; anidoodle's launch is one example of the
+grammar, not a skin to reuse.
diff --git a/skills/anidoodle/references/workflows/launch-video.md b/skills/anidoodle/references/workflows/launch-video.md
index 3e7f46f..42bb1e1 100644
--- a/skills/anidoodle/references/workflows/launch-video.md
+++ b/skills/anidoodle/references/workflows/launch-video.md
@@ -105,6 +105,8 @@ pieces are examples of the craft, never material for someone else's film.
- **The first frame is the thumbnail.** Platforms and players show frame 1 before play. Make
it legible and on brand (anidoodle's is the wall of styles; the template's is the prompt, big,
mid-sentence); never a blank, a fade from black, or a whole chat window too small to read.
+ If the story opens quiet, render with `--poster-frame N` (frame 0 shows frame N and dissolves
+ into the opening by frame 6), and ship only what passes `verify-export --delivery`.
## The process
@@ -112,15 +114,17 @@ pieces are examples of the craft, never material for someone else's film.
2. **Storyboard**: one line per beat with its length in beats, the words, the transition.
3. **Options sheet**: transitions and type styles side by side as one cheap still sheet (e.g.
three blooms, three lettering media). The person picks; nothing is rendered in full yet.
-4. **One still per scene**, at 0.3-0.5 scale on a contact sheet, reviewed for design.
+4. **One still per scene**, at 0.3-0.5 scale on a contact sheet, reviewed for design:
+ `still.mjs <film> --frames 0,240,610 --sheet out/scenes.jpg` draws them all in one browser
+ (`references/working-method.md`).
5. **Music as an mp3 on a page**, heard by a human. ✋ Approval.
6. **Cut as data**: content scenes on one timeline, the cut as `pic`/`type` segments on the
beat grid (`launchCut.ts`). Re-timing edits the list, never scene code.
7. **Review from the render**: contact sheets per beat, cuts as before/after pairs, DESIGN
first (type over art, spacing, hierarchy), then timing. Render only the changed range
- (`render.mjs --from F --to F`). Give notes in camera words ("slow this zoom to 0.7x",
+ (`render.mjs --from F --to T` writes `out/<film>.<F>-<T>.mp4`, silent). Give notes in camera words ("slow this zoom to 0.7x",
"hold the word 10 frames longer"), never "make it better".
8. **QA**: `gate.mjs <film>` (determinism, contract, dead air; declare real holds in
- `meta.holds`) and `verify-export.mjs <film> --file <mp4> --first-frame #rrggbb` for EVERY
- shape shipped; meter the mix. Keep the review page updated as work lands.
+ `meta.holds`, each with its reason) and `verify-export.mjs <film> --file <mp4> --delivery
+ --first-frame #rrggbb` for EVERY shape shipped; meter the mix. Keep the review page updated as work lands.
9. ✋ **Final approval** on the finished file.
diff --git a/skills/anidoodle/references/working-method.md b/skills/anidoodle/references/working-method.md
index 48c7c8d..11a2d51 100644
--- a/skills/anidoodle/references/working-method.md
+++ b/skills/anidoodle/references/working-method.md
@@ -60,10 +60,23 @@ None of that was drawing. These habits cut it by an order of magnitude:
sheet with three to six variants side by side, picked in one message.
- **Timelines as data.** Scenes on one content timeline, the cut as a list of segments
(`launchCut.ts`). Re-timing edits the list; scene code and its reviews stay valid.
-- **Range renders.** `render.mjs <film> --from F --to F` renders only the passage you changed
- (it writes `out/<film>.<from>-<to>.mp4`, never over the finished film).
-<!-- TODO(A): confirm the still.mjs multi-frame flag and the plate cache name/location once they land on integ/launch-kit -->
-- **Many stills, one browser.** `still.mjs <film> --frames a,b,c` draws several frames in one
- page; one browser per still costs seconds each.
-- **Plate cache.** Baked plates are cached on disk, so a wall of 31 live plates stops
- re-baking (about 60 s) on every still.
+- **Range renders.** `render.mjs <film> --from F --to T` renders frames `[F, T)` only, silent
+ (the score would not line up), and writes `out/<film>.<F>-<T>.mp4`; it refuses an `--out`
+ that is the finished film. For review, not for shipping.
+- **Many stills, one browser.** `still.mjs <film> --frames 0,700,1500` draws every listed frame
+ in one page (one build, one launch, plates baked once); ranges work too, `--frames 0-300:50`
+ is every 50th frame from 0 to 300. Add `--sheet out/sheet.jpg` for a contact sheet of them at
+ `--sheet-scale` (default 0.4). `--out out/dir/` or `--out out/x-{frame}.png` names the PNGs.
+- **Plate cache.** Finished plate frames are kept in `engine/.cache/bakes/<browser version>/`,
+ keyed by a hash of the plate's whole import closure, so a wall of 31 live plates stops
+ re-baking (about 60 s) on every still, and an edited plate simply misses and is drawn again.
+ It is never needed: delete `.cache/` any time. `--no-bake-cache` (or `ANIDOODLE_BAKE_CACHE=0`)
+ draws every plate cold, which is what to do when you suspect the cache.
+- **Frame-exact comparisons.** `render.mjs --hashes out/x.md5` writes the md5 of every frame
+ before the encoder touches it; diff two of those files to prove an engine change left a film
+ byte-identical, or to find the first frame it moved.
+- **Holds are declared, never absorbed.** A word being read, an end card, a loop being watched:
+ put the range in `meta.holds` with its reason in a comment. The gate's dead-air check then
+ knows the stillness is meant. Anything else that sits still is a dead wait: cut it.
+- **`npm test`** (in `engine/`) runs the unit suites in `engine/test/*.test.ts` without a
+ browser (camera moves today). Run it with the gate after any engine change.