Skip to content

armgit / raea

Public Imported from GitHub
0

Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.

Docs: a page for every CLI verb and every SDK import path on raea.io/docs

shinyobjectz2881f190bb8c
diff --git a/docs/manual/reference/cli/add.md b/docs/manual/reference/cli/add.md
new file mode 100644
index 00000000..a1ae04ad
--- /dev/null
+++ b/docs/manual/reference/cli/add.md
@@ -0,0 +1,39 @@
+---
+title: "raea add"
+summary: "Add, remove and install npm packages for a project, with no Node or npm: raea.lock and node_modules."
+order: 28
+sources: ["io/npm/src/lib.rs"]
+---
+
+A composition can import npm packages. `raea add` resolves them, fetches each tarball once into a store every project
+shares (`~/.raea/npm/store`, checked against the registry's hash) and lays out `node_modules` the way pnpm does. The
+resolution is kept in `raea.lock` beside `package.json`, so an install with nothing new asks the registry nothing.
+
+```sh
+raea add d3-shape@^3 culori
+raea add --dev @types/d3-shape
+raea remove culori
+raea install --offline
+```
+
+Install scripts never run, since there is no Node to run them; a package that needs one is named in the report.
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea add PKG[@RANGE]... [--dev] | remove NAME... | install [--offline] [--in DIR] (npm packages for the project: raea.lock, node_modules)
+```
+
+Headless: it needs nothing running and opens no window. Takes any number of arguments besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--dev` | – | Add the packages as dev dependencies. |
+| `--in` | `DIR` | The project folder holding `package.json` (the current folder by default). |
+| `--offline` | – | With `install`: use only what `raea.lock` and the store already have, asking the registry nothing. |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/app.md b/docs/manual/reference/cli/app.md
new file mode 100644
index 00000000..f3aac5ff
--- /dev/null
+++ b/docs/manual/reference/cli/app.md
@@ -0,0 +1,47 @@
+---
+title: "raea app"
+summary: "Run, check headless and package a desktop app written as one TSX file on @raea/ui."
+order: 6
+sources: ["engine/cli/src/cli.rs", "engine/rune/src/main.rs"]
+---
+
+`raea app` takes a desktop app written in React on `@raea/ui` and runs it in a window (`run`), runs it headless
+through scripted steps and writes a PNG after each one (`check`), or packages it as a Mac app (`bundle`). The web
+target draws it with Blitz on Bevy; the native target with Rune. The app's `export const app` picks the target, and
+`--target` overrides it.
+
+```sh
+raea app run signin.tsx
+raea app check signin.tsx --png out/ # 00-mount.png, a PNG after each step, tree.json
+raea app check signin.tsx --target native --script steps.json --png out/native/
+raea app bundle signin.tsx -o "Sign In.app"
+```
+
+The check's steps find elements by `data-testid`. Read the PNGs it writes: `tree.json` gives each element's role,
+label, text and box.
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea app run|check|bundle APP.tsx [--target web|native] [--size WxH] [--script steps.json] [--png DIR] [-o App.app] (a TSX app on @raea/ui: its window, the headless check, a Mac app; web is Blitz on Bevy, native is Rune; the app's `export const app` sets the target, web when it doesn't; raea rune ... is --target native)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 2 arguments besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--png` | `DIR` | Where `check` writes its PNGs and `tree.json`. |
+| `--script` | `steps.json` | The steps `check` runs, when they aren't in the app's own file. |
+| `--size` | `WxH` | The window's size in pixels. |
+| `--target` | `web\|native` | Draw with Blitz on Bevy (`web`) or with Rune (`native`), over what the app's `export const app` says. |
+| `-o` | `App.app` | Where `bundle` writes the Mac app. |
+
+<!-- generated:end -->
+
+## See also
+
+- [Apps](../../guides/apps.md) walks through writing, checking and bundling an app on both targets.
diff --git a/docs/manual/reference/cli/blender.md b/docs/manual/reference/cli/blender.md
new file mode 100644
index 00000000..ad7ab7e3
--- /dev/null
+++ b/docs/manual/reference/cli/blender.md
@@ -0,0 +1,29 @@
+---
+title: "raea blender"
+summary: "Run a Blender Python script headless, with raea's library of mesh scripts: convert, decimate, repair, split, bake, rig, cloth."
+order: 104
+sources: ["apps/tools/src/blender.rs"]
+---
+
+`raea blender run` runs `blender --background --python SCRIPT.py -- ARGS` with the Blender [`raea setup
+blender`](setup.md) found. A script named `blender/X.py` that the project doesn't have is copied in from raea's
+library first: `convert`, `decimate`, `repair`, `split`, `bake`, `rig` and `cloth`. The copy is the project's own
+to change.
+
+```sh
+raea blender run blender/decimate.py -- model.glb 0.3 model-low.glb
+raea blender run blender/repair.py -- scan.glb scan-fixed.glb
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea setup blender [--check] [--download] (find Blender or download the LTS into ~/.raea/tools/blender, and install its MCP add-on)
+raea blender run SCRIPT.py [ARGS...] (blender --background --python SCRIPT.py -- ARGS, headless; blender/X.py missing from the project is copied from the library: convert, decimate, repair, split, bake, rig, cloth)
+```
+
+Headless: it needs nothing running and opens no window. Its arguments go to a parser of its own, whose forms are listed above.
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/brand.md b/docs/manual/reference/cli/brand.md
new file mode 100644
index 00000000..81133bbc
--- /dev/null
+++ b/docs/manual/reference/cli/brand.md
@@ -0,0 +1,28 @@
+---
+title: "raea brand"
+summary: "Read a brand kit from a website on this machine: colours, fonts and logos into brand/ and BRAND.md."
+order: 29
+sources: ["engine/cli/src/brand.ts", "engine/cli/src/scrape.ts"]
+---
+
+`raea brand` reads a company's website from this machine and writes the project's brand kit: `brand/brand.css` (its
+colours and fonts as CSS variables), `brand/brand.json`, `BRAND.md` (what it found, in words) and the logos in
+`media/brand/`. When a plain fetch sees too little, as on a site that draws itself with JavaScript, it says so, and
+an agent can read the site in its browser instead.
+
+```sh
+raea brand acme.com
+raea brand https://acme.com/shop
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea brand DOMAIN|URL (the brand kit read from its website on this machine: brand/brand.css, brand/brand.json, BRAND.md, logos in media/brand; says when a plain fetch saw too little)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/bundle.md b/docs/manual/reference/cli/bundle.md
new file mode 100644
index 00000000..ba05b439
--- /dev/null
+++ b/docs/manual/reference/cli/bundle.md
@@ -0,0 +1,35 @@
+---
+title: "raea bundle"
+summary: "Bundle a composition into one JavaScript file that render_bundle draws, on the Mac or the iPhone."
+order: 5
+sources: ["engine/cli/src/cli.rs", "runtime/bundle/src/lib.rs"]
+---
+
+`raea bundle` runs the bundler `raea render` uses and stops there: the composition, its components and the SDK in
+one JavaScript file. `raea render --bundle` draws such a file, and so does raea on the iPhone. With `--portable`,
+the media the composition imports is copied next to the bundle and named relatively, so the two can travel together.
+
+```sh
+raea bundle piece.tsx --composition-bundle -o out/piece.comp.js --portable out/
+raea render --bundle out/piece.comp.js --dir out/ --frame 0 -o check.png
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea bundle EDIT.tsx --composition-bundle -o OUT.js [--portable DIR] (a composition for render_bundle, on the Mac or the iPhone)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--composition-bundle` | – | Bundle a composition, with the entry that steps its Clock frame by frame. Without it the file is bundled as a plain script, as `raea run` bundles one. |
+| `--portable` | `DIR` | Copy every media file the composition imports into `DIR/media` and name it relatively in the bundle. |
+| `-o` | `OUT.js` | Where the bundle goes. |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/check.md b/docs/manual/reference/cli/check.md
new file mode 100644
index 00000000..4f4f903b
--- /dev/null
+++ b/docs/manual/reference/cli/check.md
@@ -0,0 +1,53 @@
+---
+title: "raea check"
+summary: "Check a composition's text in a second, or an export against the floor: text, contrast, safe areas, freezes, flashing, cues and loudness."
+order: 42
+sources: ["apps/check/src/lib.rs", "apps/check/src/quick.rs"]
+---
+
+`raea check` has two speeds. On a composition with `--quick`, it renders three stills and measures the text:
+clipped, cramped, inside the safe areas, large enough to read. That takes about a second, so run it after every save.
+On an exported video, it measures everything the floor asks of a finished piece. Each finding is ranked P0 (broken)
+to P3 (polish), says where it is and how to fix it, and the command exits 1 while a P0 or P1 stands.
+
+```sh
+raea check piece.tsx --quick --platform tiktok
+raea render piece.tsx -o piece.mp4 --manifest render.json
+raea check piece.mp4 --manifest render.json --words words.json --platform tiktok -o check.json
+```
+
+What a full check can see depends on what you give it. The file alone gives loudness, true peak, sound that stops
+dead, frozen stretches and blotching in dark areas. The render's manifest adds text clipped off the frame, text under
+the platform's buttons, captions held too briefly and caption contrast. The transcript adds cues away from their
+word and music fighting the voice; the perception adds text over a face. A taste file adds the person's own rules,
+each a P1 when broken, since their rule beats the floor's default.
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea check EDIT.tsx --quick [--shape S] [--platform P] [--taste T] [-o check.json] (three stills of a composition checked for text: clipped, cramped, safe areas, sizes; about a second)
+raea check VIDEO.mp4 [--manifest render.json] [--words W.json] [--perception P.json] [--shape 16:9|9:16|4:5|1:1] [--platform tiktok|reels|shorts] [--taste taste.ts|DIR] [-o check.json] (an export against the floor: clipped text, contrast, safe areas, freezes, flashing, cues, loudness, blotching, a placeholder brand kit; P0-P3)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--manifest` | `render.json` | The manifest `raea render --manifest` wrote for this export: where each element was on each frame, for the text, contrast and safe-area checks. |
+| `--perception` | `P.json` | Where the face is on each frame (the `perception.json` `raea cut` writes), to find text over a face. |
+| `--platform` | `P` | Check the safe areas against this platform's buttons and captions. |
+| `--quick` | – | Check a composition's text from three stills instead of checking an export. |
+| `--shape` | `S` | The delivery's aspect ratio, for its safe areas. |
+| `--taste` | `T` | The person's taste files: the rules in them that carry a `check` are applied too. |
+| `--words` | `W.json` | The transcript, to check cues against their words and the voice against the music. |
+| `-o` | `check.json` | Write the findings as JSON, for a later review or for `raea next`. |
+
+<!-- generated:end -->
+
+## See also
+
+- [Rendering and checking](../../concepts/rendering.md) lists what the full check measures and how loudness is set.
diff --git a/docs/manual/reference/cli/context.md b/docs/manual/reference/cli/context.md
new file mode 100644
index 00000000..c7a923df
--- /dev/null
+++ b/docs/manual/reference/cli/context.md
@@ -0,0 +1,30 @@
+---
+title: "raea context"
+summary: "Print what to read before working on a project: its taste, brief and look, the floor and its modes' guides."
+order: 123
+sources: ["engine/cli/src/guide.rs", "apps/workspace/src/doctor.rs"]
+---
+
+`raea context` gathers, in reading order, everything an agent should read before it touches a project: the person's
+taste and the workspace's house rules, the project's brief and look, the floor and the guides its modes call for. It
+runs [`raea doctor`](doctor.md)'s checks too, and prints `CONTEXT_STALE` when they find something to fix first.
+
+```sh
+raea context ~/Studio/acme/projects/spring-launch
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea context PROJECT (what to read before working on a project: taste, brief, look, the floor and its modes' guides)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
+
+<!-- generated:end -->
+
+## See also
+
+- [How an agent should use raea](../../start/agents.md) gives the whole order of work.
diff --git a/docs/manual/reference/cli/controller.md b/docs/manual/reference/cli/controller.md
new file mode 100644
index 00000000..b9db8372
--- /dev/null
+++ b/docs/manual/reference/cli/controller.md
@@ -0,0 +1,39 @@
+---
+title: "raea controller"
+summary: "Read and change the workspace's controllers: its settings and workflows, each a TypeScript file."
+order: 25
+sources: ["apps/workspace/src/controllers.rs"]
+---
+
+Controllers are a workspace's settings and workflows, each `controllers/ID.ts` exporting `controller({...})` from
+`raea/brief`. A field is named by its path, `controller.group.field`. A project can override a field for itself,
+and its value then wins, as git config's scopes do. Every change is a commit, by "you" unless `--by` names someone.
+
+```sh
+raea controller ls
+raea controller get delivery.format.aspect-ratio
+raea controller set delivery.format.aspect-ratio 9:16 --by agent
+raea controller set delivery.format.aspect-ratio 16:9 --project # this project only
+raea controller write controllers/delivery.ts
+raea controller rm delivery
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea controller ls [--json] | raea controller get PATH [--json] | raea controller set PATH VALUE [--project] [--by NAME] | raea controller write FILE.ts [--by NAME] | raea controller rm ID [--by NAME] (the workspace's controllers, controllers/ID.ts; PATH is controller.group.field; every change a commit)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 3 arguments besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--by` | `NAME` | Who made the change, for its commit (`you` by default). An agent passes its own name. |
+| `--json` | – | With `ls` and `get`: print JSON instead of text. |
+| `--project` | – | With `set`: change the value for the current project only, in its `.raea/project`. |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/cut.md b/docs/manual/reference/cli/cut.md
new file mode 100644
index 00000000..aa2a3974
--- /dev/null
+++ b/docs/manual/reference/cli/cut.md
@@ -0,0 +1,40 @@
+---
+title: "raea cut"
+summary: "Cut a take to the lines it says, transcribing it first, and write cuts.ts and words.json."
+order: 63
+sources: ["engine/cli/src/index.ts"]
+---
+
+`raea cut` cuts a take under the project's `media/` folder by what it says: give it the lines you want and it cuts
+in the pauses around each one. A take without a `TAKE.words.json` is transcribed first, on this machine. It writes
+`cuts.ts` (the cut) and `words.json` (every word kept, with its timing) beside the edit, and `raea render` reads
+both from there, so captions and cues follow the cut without any wiring.
+
+```sh
+raea cut interview.mp4 "We started in a garage" "Now we ship to forty countries"
+raea cut interview.mp4 --at 12.4-18.9 --at 31-36.2
+raea cut broll.mp4 --at 4-7 --append
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea cut TAKE "line" ... | --at A-B ... [--append] (cuts.ts and words.json: a take under media/ cut in the pauses around each line it says, transcribed first if it has no TAKE.words.json; or at those seconds)
+```
+
+Headless: it needs nothing running and opens no window. Takes any number of arguments besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--append` | – | Add these lines or stretches to the end of the existing cut, instead of replacing it. |
+| `--at` | `A-B` | Cut at these seconds (`12.4-18.9`) instead of by lines. Repeatable. |
+
+<!-- generated:end -->
+
+## See also
+
+- [Cutting by words](../../guides/words.md) cues parts on phrases and builds captions that follow the cut.
diff --git a/docs/manual/reference/cli/doctor.md b/docs/manual/reference/cli/doctor.md
new file mode 100644
index 00000000..7513e8b5
--- /dev/null
+++ b/docs/manual/reference/cli/doctor.md
@@ -0,0 +1,34 @@
+---
+title: "raea doctor"
+summary: "Find what doesn't match this version of raea: old brief files, an older workspace format, an agent's stale skill."
+order: 47
+sources: ["apps/workspace/src/doctor.rs"]
+---
+
+`raea doctor` looks for drift between a project and the raea you have: brief files raea no longer reads, a workspace
+or project file missing what this version writes or not included from the repository's git config, and an agent's
+copy of the raea skill from another version. It reads files and git config only, so it's quick.
+[`raea context`](context.md) runs the same checks and says when it finds something.
+
+```sh
+raea doctor
+raea doctor --fix
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea doctor [--fix] [DIR] (what doesn't match this raea: old brief files, an older workspace format, an agent's skill from another version)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--fix` | – | Fix what can be fixed safely (set missing keys, add the git include, update the skill) and say what's left. |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/export-game.md b/docs/manual/reference/cli/export-game.md
new file mode 100644
index 00000000..3c868f9e
--- /dev/null
+++ b/docs/manual/reference/cli/export-game.md
@@ -0,0 +1,44 @@
+---
+title: "raea export-game"
+summary: "Package a game as a program of its own: a Mac app or a command-line program."
+order: 4
+sources: ["apps/game/src/export.rs"]
+---
+
+`raea export-game` packs a game's bundle, its media and fonts, and raea's game player into one program that runs
+without raea installed. Name the output `Something.app` for a Mac app; anything else becomes a folder with a command
+in it. The program is signed ad hoc so it runs on this Mac; to hand it to others it needs a Developer ID signature and
+notarization.
+
+```sh
+raea export-game game.tsx -o "Ball Run.app" --icon icon.png
+raea export-game game.tsx -o ball-run --target mac-cli
+```
+
+The exported program can test itself: it plays its own run with the key sets of `--keys` and reports how it went.
+A game that plays notes or instruments must declare `@raea/audio` in its `raea.plugins`, or the export stops
+rather than ship a silent game.
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea export-game EDIT.tsx -o OUT [--target mac-app|mac-cli] [--name NAME] [--icon PNG] [--keys SETS] [--player BIN] [--no-strip] (a game as a program of its own: a Mac app or a command)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--icon` | `PNG` | A square PNG made into the app's icon (an `.icns` in the bundle). Mac apps only. |
+| `--keys` | `SETS` | The key sets the program's self-test cycles through: sets split by commas, keys in a set joined by `+`, an empty set for none, such as `ArrowRight,ArrowRight+ArrowUp,`. Arrows, space and a run-and-jump by default. |
+| `--name` | `NAME` | The program's name, as the Dock and menu bar show it (from the file name by default). |
+| `--no-strip` | – | Keep the player's symbols instead of stripping them, for debugging a crash. The symbols are kept in `~/Library/Caches/raea/dsym` either way. |
+| `--player` | `BIN` | The game player binary to ship, in place of the newest `raea-game` beside this raea. |
+| `--target` | `mac-app\|mac-cli` | A Mac app bundle or a command-line program; from `-o` by default (`.app` is an app). |
+| `-o` | `OUT` | Where the program goes: `NAME.app`, or a folder. |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/frame.md b/docs/manual/reference/cli/frame.md
new file mode 100644
index 00000000..a9c15ddc
--- /dev/null
+++ b/docs/manual/reference/cli/frame.md
@@ -0,0 +1,33 @@
+---
+title: "raea frame"
+summary: "Say how a take fits the edit: a talking take for <FaceFrame>, a screen recording for <ScreenFit>, from where its face is."
+order: 64
+sources: ["engine/cli/src/index.ts"]
+---
+
+`raea frame` looks at a take and says how it should sit in the composition. A talking take gets a `<FaceFrame>`
+that keeps the face where the frame wants it; a screen recording gets a `<ScreenFit>`. It reads where the face is
+and says which of the two fits, and how.
+
+```sh
+raea frame media/interview.mp4
+raea frame media/demo.mov --at 8
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea frame TAKE [--at S] (how a take fits the edit: a talking take for <FaceFrame>, a screen for <ScreenFit>, from where its face is)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--at` | `S` | Look at the take at this second rather than at its start. |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/gen.md b/docs/manual/reference/cli/gen.md
new file mode 100644
index 00000000..6c8a0153
--- /dev/null
+++ b/docs/manual/reference/cli/gen.md
@@ -0,0 +1,42 @@
+---
+title: "raea gen"
+summary: "Generate images, video, music, sound, speech, 3D models and text through made.app, fal, Replicate, OpenRouter, Modal or ComfyUI."
+order: 102
+sources: ["io/gen/src", "io/gen-comfy/src"]
+---
+
+`raea gen` makes generated media through the services you've connected: made.app, fal, Replicate, OpenRouter, Modal
+or a ComfyUI server. One prompt makes one file; a flow (`FLOW.ts` or `FLOW.json`) chains steps, and `plan` says
+what a flow will cost before `run` spends anything. `--max-cents` caps what a call may spend. A generated 3D model
+is checked and fitted: its real height, its origin at the bottom centre. ComfyUI workflows go both ways: import one
+as a flow, export a flow as one, or run a workflow as it is.
+
+```sh
+raea gen models --kind image
+raea gen image "a ceramic mug on a sunlit table, product photo" --aspect 4:5 -o media/
+raea gen mesh "a mid-century armchair" --h 0.8
+raea gen check chair.glb --h 0.8 --solid -o chair-fixed.glb
+raea gen plan flow.ts && raea gen run flow.ts --max-cents 200
+raea gen comfy import workflow.json -o flow.json
+raea gen balance
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea gen models [--kind image|video|audio] [--query WORDS] | balance | types [-o FILE] | flow FLOW.ts [-o FLOW.json]
+raea gen image|video|music|sfx|speech|mesh|text "PROMPT" [--model M] [--image FILE]... [--seconds S] [--aspect W:H] [-o DIR] [--max-cents N] [--plan] (mesh: --model tripo:H3.1|tripo:P2|fal:<endpoint>)
+raea gen mesh "PROMPT" [--image FILE] [--h METRES] [--dims W,D,H] [--turn DEG] (the model checked and fitted: its real height, origin at the bottom centre)
+raea gen check MODEL.glb [--h METRES] [--dims W,D,H] [--turn DEG] [--faces N | --seen METRES] [--parts a,b] [--rig] [--solid] [-o FIXED.glb] [--json]
+raea gen plan FLOW.json|FLOW.ts [--exact] | raea gen run FLOW.json|FLOW.ts [-o DIR] [--max-cents N] [--exact] [--comfy-on-replicate] [--no-local] [--no-tripo]
+raea gen comfy import WORKFLOW.json [-o FLOW.json] | comfy export FLOW.json|FLOW.ts [-o WORKFLOW.json] | comfy needs WORKFLOW.json [-o NEEDS.json]
+raea gen comfy run WORKFLOW.json [-o DIR] (any workflow as it is, on the ComfyUI server: its input files uploaded, every output fetched)
+raea gen comfy view WORKFLOW.json [-o FILE] | comfy set WORKFLOW.json CHANGES.json (nodes, settings by name, links, groups; edits written back)
+raea gen comfy schema [URL] | comfy coverage DIR | comfy up
+```
+
+Headless: it needs nothing running and opens no window. Its arguments go to a parser of its own, whose forms are listed above.
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/guide.md b/docs/manual/reference/cli/guide.md
new file mode 100644
index 00000000..098939a7
--- /dev/null
+++ b/docs/manual/reference/cli/guide.md
@@ -0,0 +1,31 @@
+---
+title: "raea guide"
+summary: "Print raea's craft guides: the floor read before any edit, the modes, the notes and the 3D guides."
+order: 122
+sources: ["engine/cli/src/guide.rs", "sdk/guides"]
+---
+
+raea ships its craft as guides an agent reads before it works. `raea guide` alone lists them; `raea guide NAME`
+prints one. `craft` is the floor, read before any edit. The modes (`pitch`, `explain`, `story`, `play`, `tool`)
+are read when a brief names one. The notes (`quieter`, `bolder`, `layout`, `polish` and the rest) say what a note
+from a person asks for, and are read before acting on it. `bevy` and `bevy/NAME` cover 3D.
+
+```sh
+raea guide
+raea guide craft
+raea guide pitch
+raea guide quieter
+raea guide bevy/lights
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea guide [NAME] (craft, the floor read before any edit; the modes: pitch, explain, story, play, tool; motion, music, layout and the rest; bevy and bevy/NAME for 3D)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/hook.md b/docs/manual/reference/cli/hook.md
new file mode 100644
index 00000000..eee263ec
--- /dev/null
+++ b/docs/manual/reference/cli/hook.md
@@ -0,0 +1,26 @@
+---
+title: "raea hook"
+summary: "Claude Code's PostToolUse hook: the quick text check after an agent saves a composition."
+order: 48
+sources: ["apps/check/src/quick.rs"]
+---
+
+`raea hook claude` is meant to be run by Claude Code, not by hand. Installed as a PostToolUse hook (`raea skills
+install` sets it up), it runs `raea check --quick` on a composition each time the agent saves one, and hands the
+findings back to the agent, so clipped or cramped text is caught on the edit that caused it.
+
+```sh
+raea skills install --agent claude # installs the skill and this hook
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea hook claude (Claude Code's PostToolUse hook: the quick check after a composition is saved)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/index.md b/docs/manual/reference/cli/index.md
new file mode 100644
index 00000000..4a48ae1d
--- /dev/null
+++ b/docs/manual/reference/cli/index.md
@@ -0,0 +1,121 @@
+---
+title: "CLI"
+summary: "Every raea verb: what it does, its forms, where it runs and each flag."
+order: 1
+sources: ["engine/cli/src/cli.rs", "engine/cli/src/usage.rs", "tools/manual-ref/cli.ts"]
+---
+
+`raea` is one program with a verb for each job. Each verb has a page here with its forms, where it runs, every flag
+it takes and what each one does. The forms and flags are generated from the binary itself (`raea help --json`), so
+they match the version they were made from; the prose around them is written by hand.
+
+## How every verb behaves
+
+- **Help.** `raea help` (or `raea` alone) lists every verb's forms. `raea help --json` gives the same as data: each
+ verb's forms, its flags, how many values each flag takes, how many arguments it takes and where it runs.
+- **Strict arguments.** A verb refuses a flag or an argument its forms don't name, rather than ignoring it, so a
+ typo is caught. The four verbs with parsers of their own (`media`, `gen`, `physics`, `blender`) list their own forms.
+- **Output.** A verb prints its result on stdout and exits 0. When it can't do what it was asked, it prints a line
+ starting with `REFUSED` that says why and what to do instead, and exits 1. A file refused again is told what
+ changed since the last refusal.
+- **Where it runs.** Almost every verb is headless: it needs nothing running and opens no window, so it works over
+ SSH, in CI and from an agent. `raea library` needs the raea app running, and adding a folder waits for a person's
+ yes in the app.
+- **Sessions.** Each `render` and `play` records its session; [`raea traces`](traces.md) lists them.
+- **Version.** `raea --version` prints the version. The agent skill and these pages match it.
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json` -->
+
+## Make
+
+Render, play and package what you wrote.
+
+| Verb | What it does |
+| --- | --- |
+| [`raea render`](render.md) | Render a composition to an MP4, a PNG or a folder of frames, on the GPU and headless. |
+| [`raea play`](play.md) | Play a game live in a window, or headless with scripted keys, snapshots and a timing report. |
+| [`raea export-game`](export-game.md) | Package a game as a program of its own: a Mac app or a command-line program. |
+| [`raea bundle`](bundle.md) | Bundle a composition into one JavaScript file that render_bundle draws, on the Mac or the iPhone. |
+| [`raea app`](app.md) | Run, check headless and package a desktop app written as one TSX file on @raea/ui. |
+| [`raea run`](run.md) | Run a TypeScript program on the engine, headless, and print what it prints. |
+
+## Projects
+
+The workspace, its projects and what a project holds.
+
+| Verb | What it does |
+| --- | --- |
+| [`raea init`](init.md) | Add a project's starting files where they're missing: edit.tsx, cuts.ts, components/ and AGENTS.md. |
+| [`raea workspace`](workspace.md) | Make, adopt or show a workspace: the git repository that holds a studio's projects and controllers. |
+| [`raea project`](project.md) | Make a project in the workspace, list them, or move one between inline and a repository of its own. |
+| [`raea controller`](controller.md) | Read and change the workspace's controllers: its settings and workflows, each a TypeScript file. |
+| [`raea spec`](spec.md) | Print a spec file's default export as JSON, checked against its schema: briefs, scripts, taste, plans and controllers. |
+| [`raea part`](part.md) | Copy a ready-made part into the project's components/, to use and change as your own. |
+| [`raea add`](add.md) | Add, remove and install npm packages for a project, with no Node or npm: raea.lock and node_modules. |
+| [`raea brand`](brand.md) | Read a brand kit from a website on this machine: colours, fonts and logos into brand/ and BRAND.md. |
+| [`raea library`](library.md) | Search and manage the person's media libraries in the raea app: folders and drives indexed on this machine, searched by meaning. |
+
+## Check
+
+What's wrong before anyone watches it.
+
+| Verb | What it does |
+| --- | --- |
+| [`raea check`](check.md) | Check a composition's text in a second, or an export against the floor: text, contrast, safe areas, freezes, flashing, cues and loudness. |
+| [`raea judge`](judge.md) | Judge a 3D scene's review sheets blind, by a model on a frozen rubric or a fresh agent session, with the pass decided in code. |
+| [`raea scene`](scene.md) | Find floating, sunk and clipping 3D parts, say what each part rests on, and meter a shot's light. |
+| [`raea solid`](solid.md) | Measure, view and export a solid: parts built from code with exact volumes, joints and parameters. |
+| [`raea next`](next.md) | The two or three most useful next steps for a project, read from its brief, compositions, renders and checks. |
+| [`raea doctor`](doctor.md) | Find what doesn't match this version of raea: old brief files, an older workspace format, an agent's stale skill. |
+| [`raea hook`](hook.md) | Claude Code's PostToolUse hook: the quick text check after an agent saves a composition. |
+| [`raea traces`](traces.md) | List the sessions raea apps left, newest first, with how each ended and its glitches, or tell one in full. |
+
+## Footage
+
+Takes, cuts and the camera, from your own media.
+
+| Verb | What it does |
+| --- | --- |
+| [`raea media`](media.md) | Probe, cut, measure and encode media natively, the same on the Mac and the iPhone, with no ffmpeg. |
+| [`raea cut`](cut.md) | Cut a take to the lines it says, transcribing it first, and write cuts.ts and words.json. |
+| [`raea frame`](frame.md) | Say how a take fits the edit: a talking take for <FaceFrame>, a screen recording for <ScreenFit>, from where its face is. |
+| [`raea track`](track.md) | Solve a clip's camera on this machine, so 3D can stand in its world with <Matchmove>. |
+| [`raea splat`](splat.md) | Train footage of a real place or thing into a 3D Gaussian splat for <Splat>, on this Mac's GPU. |
+| [`raea mezz`](mezz.md) | Make an intra-only ProRes copy of each long-GOP source over 1080p, so scrubbing it is smooth. |
+| [`raea neural`](neural.md) | Run DLSS 5 neural rendering over a render's frames on the Mac, through your own MLX-DLSS build and weights. |
+
+## Sound
+
+Music read, foley and instruments made on this machine.
+
+| Verb | What it does |
+| --- | --- |
+| [`raea song`](song.md) | Read a song's energy map: beats, bars, sections, builds, drops, stops, hits and cuts per bar. |
+| [`raea sounds`](sounds.md) | Search open sample libraries for instruments and drums, and fetch one for a Sampler. |
+| [`raea sao`](sao.md) | Make a sound effect from a description with Stable Audio Open, on this machine. |
+| [`raea tokensynth`](tokensynth.md) | Make an instrument's notes from a description of its timbre with TokenSynth, on this machine. |
+| [`raea setup-audio`](setup-audio.md) | Install or check the local audio models: Stable Audio Open for foley and TokenSynth for instruments. |
+
+## Generate and 3D tools
+
+Generated media, physics bakes and Blender.
+
+| Verb | What it does |
+| --- | --- |
+| [`raea gen`](gen.md) | Generate images, video, music, sound, speech, 3D models and text through made.app, fal, Replicate, OpenRouter, Modal or ComfyUI. |
+| [`raea physics`](physics.md) | Make the bakes <Physics> and <Goo> play: rigid bodies, soft goo, and parts cut out of a .glb. |
+| [`raea blender`](blender.md) | Run a Blender Python script headless, with raea's library of mesh scripts: convert, decimate, repair, split, bake, rig, cloth. |
+
+## Agents and setup
+
+What an agent reads, and the tools raea installs.
+
+| Verb | What it does |
+| --- | --- |
+| [`raea guide`](guide.md) | Print raea's craft guides: the floor read before any edit, the modes, the notes and the 3D guides. |
+| [`raea context`](context.md) | Print what to read before working on a project: its taste, brief and look, the floor and its modes' guides. |
+| [`raea skill`](skill.md) | Print the agent skill this raea ships, matched to its version, or one of its references. |
+| [`raea skills`](skills.md) | Install raea's agent skill where Claude Code, Codex, Kimi or Gemini read skills, with its MCP server and hook. |
+| [`raea setup`](setup.md) | Find Blender, or download its current LTS, and install its MCP add-on. |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/init.md b/docs/manual/reference/cli/init.md
new file mode 100644
index 00000000..b6b6570c
--- /dev/null
+++ b/docs/manual/reference/cli/init.md
@@ -0,0 +1,28 @@
+---
+title: "raea init"
+summary: "Add a project's starting files where they're missing: edit.tsx, cuts.ts, components/ and AGENTS.md."
+order: 22
+sources: ["engine/cli/src/index.ts"]
+---
+
+`raea init` writes the files a project starts from, in the current folder, and only the ones that aren't there yet:
+`edit.tsx` (the composition), `cuts.ts`, `components/` and `AGENTS.md` (what an agent working here should know).
+Running it again in a project that has them all says there's nothing to make. It never overwrites a file.
+
+```sh
+mkdir spring && cd spring && raea init
+```
+
+For a project inside a workspace, with its brief and folders, use [`raea project new`](project.md).
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea init (a project's files where they're missing: edit.tsx, cuts.ts, components/, AGENTS.md)
+```
+
+Headless: it needs nothing running and opens no window. Takes no arguments besides its flags.
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/judge.md b/docs/manual/reference/cli/judge.md
new file mode 100644
index 00000000..8a2c6486
--- /dev/null
+++ b/docs/manual/reference/cli/judge.md
@@ -0,0 +1,42 @@
+---
+title: "raea judge"
+summary: "Judge a 3D scene's review sheets blind, by a model on a frozen rubric or a fresh agent session, with the pass decided in code."
+order: 43
+sources: ["apps/judge/src/lib.rs"]
+---
+
+`raea judge` reads the sheets [`raea render --review`](render.md) makes (`colour.png`, `clay.png`) and has them
+judged without the code or the conversation that made them: by clef-omni on a frozen rubric (the default), or by a
+fresh Kimi or Claude session on the judge prompt. The scores come back as data, and whether the scene passes is
+decided in code from them. clef only advises until it has been calibrated against a person's or an agent's eye.
+
+```sh
+raea render scene.tsx --review review/
+raea judge review/ --brief brief.ts
+raea judge review/ --by claude --target reference.png --json
+raea judge eye review/ composition=4 light=3 --pass yes # record your own scores, for calibration
+raea judge calibrate
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea judge DIR [--by clef|kimi|claude] [--brief brief.ts] [--target T.png] [--json] [--dry] | judge eye DIR (CATEGORY=SCORE ... [--pass yes|no] | --by kimi|claude) | judge calibrate [--json] (a --review folder's sheets judged blind: clef-omni on the frozen rubric, or a fresh kimi or claude session on the judge prompt; the pass decided in code; clef advises until calibrated against your eye or an agent's)
+```
+
+Headless: it needs nothing running and opens no window. Takes any number of arguments besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--brief` | `brief.ts` | The project's brief, so the judge knows what the scene is for. |
+| `--by` | `clef\|kimi\|claude` | Who judges: clef-omni on the rubric (default), or a fresh Kimi or Claude session. With `judge eye`, the agent whose eye is recorded. |
+| `--dry` | – | Print what the judge would be asked, with its images, without asking. |
+| `--json` | – | Print the verdict as JSON: each score, the defects found and the pass. |
+| `--pass` | `yes\|no` | With `judge eye`: whether you'd pass it, recorded with your scores. |
+| `--target` | `T.png` | A reference image the colour sheet is judged against. |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/library.md b/docs/manual/reference/cli/library.md
new file mode 100644
index 00000000..a369df53
--- /dev/null
+++ b/docs/manual/reference/cli/library.md
@@ -0,0 +1,40 @@
+---
+title: "raea library"
+summary: "Search and manage the person's media libraries in the raea app: folders and drives indexed on this machine, searched by meaning."
+order: 30
+sources: ["engine/cli/src/library.ts"]
+---
+
+Libraries are folders and drives the raea app indexes on this machine, so footage, stills and sounds can be found by
+what's in them rather than by file name. `raea library` talks to the app's host, so the app must be running. A folder
+an agent adds waits for the person to say yes in the app.
+
+```sh
+raea library search "a dog running on a beach" --kind video --limit 5
+raea library search "a door creaking open" --sound
+raea library new "Stock footage"
+raea library add "Stock footage" /Volumes/Footage
+raea library status
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea library [new NAME [--cloud] | add LIBRARY PATH | files LIBRARY | tag SHA TAGS | status | scan ...] | raea library search "WORDS" [--library LIBRARY] [--kind KIND] [--limit N] [--sound] (the person's libraries in the raea app: folders and drives indexed on this machine, searched by meaning; a folder an agent adds waits for the person's yes)
+```
+
+Needs the raea app's host running on this machine; then waits for a person's click in the raea app (to add a folder). Takes any number of arguments besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--cloud` | – | With `new`: keep the library's index in raea cloud, searchable from the web and other devices (Pro), rather than on this Mac. |
+| `--kind` | `KIND` | With `search`: only `video`, `image` or `audio`. |
+| `--library` | `LIBRARY` | With `search`: search this library only. |
+| `--limit` | `N` | With `search`: how many results (10 by default). |
+| `--sound` | – | With `search`: rank by how things sound, for a described sound effect. |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/media.md b/docs/manual/reference/cli/media.md
new file mode 100644
index 00000000..8280cc63
--- /dev/null
+++ b/docs/manual/reference/cli/media.md
@@ -0,0 +1,51 @@
+---
+title: "raea media"
+summary: "Probe, cut, measure and encode media natively, the same on the Mac and the iPhone, with no ffmpeg."
+order: 62
+sources: ["io/media/src", "engine/cli/src/cli.rs"]
+---
+
+`raea media` does the media work agents used to reach for ffmpeg and ffprobe for, on raea's own decoders and
+encoders: probing a file, pulling a still or a contact sheet, reading loudness and motion, finding cuts and freezes,
+trimming, joining and encoding. It works the same on every platform raea runs on, and nothing calls an ffmpeg binary.
+
+```sh
+raea media probe take.mov # duration, size, fps, codec and audio, as JSON
+raea media still take.mov --at 12.5 -o at-12.png
+raea media sheet piece.mp4 -o sheet.png # a contact sheet of the whole piece
+raea media loudness piece.mp4 # integrated LUFS and true peak
+raea media cuts footage.mp4 --threshold 0.08 # where the shots change
+raea media trim take.mov --from 12 --to 18.5 -o line.mp4
+```
+
+`raea ffmpeg ...` and `raea ffprobe ...` read the command lines models write by habit and run them as these verbs;
+what they can't read is refused with the verb or edit that does it.
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+`raea media VERB ...`: the agent's media work, native and the same on the Mac and the iPhone (docs/media.feature M1).
+What agents used ffmpeg and ffprobe for, on raea-media (the platform's decoders and encoders, Symphonia's audio):
+
+ raea media probe FILE duration, size, fps, codec, audio (JSON)
+ raea media still FILE --at S -o OUT.png|.jpg the frame showing at S
+ raea media sheet FILE... [--n 12] [--width 240] -o OUT a contact sheet (n frames of one file, or each file's middle)
+ raea media audio FILE [--rate 16000] [--mono] [--from S --to S] -o OUT.wav|- (- is f32le on stdout)
+ raea media loudness FILE [--from S --to S] integrated LUFS, mean and peak dB, true peak
+ raea media motion FILE [--from S --to S] [--fps 6] how much the picture changes (mean luma difference, YDIF)
+ raea media cuts FILE [--threshold 0.08] shot changes (ffmpeg's scene score)
+ raea media freezes FILE [--noise 0.001] [--min 2] held pictures (ffmpeg's freezedetect)
+ raea media proxy FILE [--height 720] -o OUT.mp4 a smaller copy
+ raea media trim FILE --from S --to S -o OUT.mp4 a stretch, frame-exact (re-encoded)
+ raea media concat A B ... -o OUT.mp4 one after another (same aspect)
+ raea media encode --size WxH [--fps 60] [--quality Q] [--audio FILE] -o OUT.mp4 raw RGBA frames on stdin, signed
+
+`raea ffmpeg ...` and `raea ffprobe ...` read the command lines models write by reflex and run them as these verbs; what
+they can't read is refused with the verb or edit that does it. No ffmpeg binary is involved.
+```
+
+Headless: it needs nothing running and opens no window. Its arguments go to a parser of its own, whose forms are listed above.
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/mezz.md b/docs/manual/reference/cli/mezz.md
new file mode 100644
index 00000000..4383fca6
--- /dev/null
+++ b/docs/manual/reference/cli/mezz.md
@@ -0,0 +1,34 @@
+---
+title: "raea mezz"
+summary: "Make an intra-only ProRes copy of each long-GOP source over 1080p, so scrubbing it is smooth."
+order: 67
+sources: ["engine/cli/src/verbs.rs", "io/media/src/mezz.rs"]
+---
+
+Footage from phones and cameras is long-GOP: most frames are stored as changes from others, so jumping around in it
+is slow. `raea mezz` makes an intra-only ProRes copy of each such source over 1080p, which raea then reads instead
+when you scrub. Given an edit, it also copies just the stretches the edit shows of sources too long to copy whole.
+It takes files and folders, and looks a few levels down.
+
+```sh
+raea mezz --check media/
+raea mezz media/ edit.tsx
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea mezz [--check] PATH... (an intra-only ProRes copy of each long-GOP source over 1080p, for smooth scrubbing; --check says which would get one)
+```
+
+Headless: it needs nothing running and opens no window. Takes any number of arguments besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--check` | – | Say which sources would get a copy, and which already have one, without making any. |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/neural.md b/docs/manual/reference/cli/neural.md
new file mode 100644
index 00000000..421ea5a3
--- /dev/null
+++ b/docs/manual/reference/cli/neural.md
@@ -0,0 +1,41 @@
+---
+title: "raea neural"
+summary: "Run DLSS 5 neural rendering over a render's frames on the Mac, through your own MLX-DLSS build and weights."
+order: 68
+sources: ["engine/neural/src/lib.rs"]
+---
+
+`raea neural mlxdlss` feeds a render's frames, with the motion vectors and depth raea writes beside them, to
+MLX-DLSS, which runs DLSS 5's neural rendering on Apple silicon. It's an optional integration: the `mlxdlss` binary
+and the weights are yours. The weights are NVIDIA's, extracted from your own DLSS install, and never ship with raea.
+Set `RAEA_MLXDLSS` to the binary and `RAEA_DLSS_MODEL` (or `--model`) to the weights. Each shot runs on its own,
+so a face never carries over a cut.
+
+```sh
+raea render piece.tsx --aov -o frames/
+raea neural mlxdlss frames/ -o neural/ --steady 0.25
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea neural mlxdlss DIR -o OUT [--model M.dlssmodel] [--intensity X] [--profile P] [--skin-structure X] [--local-structure X] [--steady A] (DLSS 5 neural rendering on a `render --aov` folder, with its motion and depth: your own MLX-DLSS build and weights, RAEA_MLXDLSS and RAEA_DLSS_MODEL)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 2 arguments besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--intensity` | `X` | How strongly the network repaints, passed to MLX-DLSS. |
+| `--local-structure` | `X` | How much local detail it keeps, passed to MLX-DLSS. |
+| `--model` | `M.dlssmodel` | The weights to use, in place of `RAEA_DLSS_MODEL`. |
+| `--profile` | `P` | MLX-DLSS's profile. |
+| `--skin-structure` | `X` | How much of skin's own structure it keeps, passed to MLX-DLSS. |
+| `--steady` | `A` | Steady the shimmer the network adds: its change to each frame is carried along raea's motion vectors and blended in at this rate, 0 to 1. Lower is steadier; 1 turns it off (0.25 by default). |
+| `-o` | `OUT` | The folder the frames go to. |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/next.md b/docs/manual/reference/cli/next.md
new file mode 100644
index 00000000..1fe4d484
--- /dev/null
+++ b/docs/manual/reference/cli/next.md
@@ -0,0 +1,27 @@
+---
+title: "raea next"
+summary: "The two or three most useful next steps for a project, read from its brief, compositions, renders and checks."
+order: 46
+sources: ["apps/workspace/src/next.rs"]
+---
+
+`raea next` reads a project's files (what its brief still needs, the storyboard its modes want, its compositions,
+the renders in `out/` and their checks) and prints the two or three steps worth doing next. It's a menu for the agent
+or the person to pick from; nothing runs.
+
+```sh
+raea next
+raea next ~/Studio/acme/projects/spring-launch
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea next [DIR] (the two or three useful next steps for the project, from its brief, compositions, renders and checks)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/part.md b/docs/manual/reference/cli/part.md
new file mode 100644
index 00000000..839ceeb5
--- /dev/null
+++ b/docs/manual/reference/cli/part.md
@@ -0,0 +1,32 @@
+---
+title: "raea part"
+summary: "Copy a ready-made part into the project's components/, to use and change as your own."
+order: 27
+sources: ["engine/cli/src/index.ts", "engine/cli/src/registry.gen.ts"]
+---
+
+Parts are ready-made components (captions, lower thirds, end cards and the like). `raea part list` shows them;
+`raea part add` copies one into `components/NAME/`, where it's yours: raea never updates or overwrites it unasked.
+
+```sh
+raea part list
+raea part add captions end-card
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea part list | raea part add NAME ... [--force] (a ready part copied into components/, yours to change)
+```
+
+Headless: it needs nothing running and opens no window. Takes any number of arguments besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--force` | – | Replace a part's files that are already in `components/`. Without it, an existing part is left alone and the command stops. |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/physics.md b/docs/manual/reference/cli/physics.md
new file mode 100644
index 00000000..881d7d62
--- /dev/null
+++ b/docs/manual/reference/cli/physics.md
@@ -0,0 +1,38 @@
+---
+title: "raea physics"
+summary: "Make the bakes <Physics> and <Goo> play: rigid bodies, soft goo, and parts cut out of a .glb."
+order: 103
+sources: ["runtime/react/src/scene/physics.rs", "systems/bake/src"]
+---
+
+A `<Physics>` or `<Goo>` in a composition plays a bake: the simulation run once ahead of time, so every render of it
+is the same. A render makes the bakes it needs on its own; `raea physics` makes one by hand from its request, in the
+composition's asset store. `part` cuts named nodes out of a `.glb` so each can be its own body.
+
+```sh
+raea physics bake request.json -o bake.json
+raea physics goo spec.json
+raea physics part media/kit.glb Wheel_L Wheel_R
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea physics bake REQUEST.json [-o OUT.json] | physics goo SPEC.json | physics part SRC.glb NODE...
+```
+
+Headless: it needs nothing running and opens no window. Its arguments go to a parser of its own, whose forms are listed above.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `-o` | `OUT.json` | Also write the result to this file, in place of printing it. |
+
+<!-- generated:end -->
+
+## See also
+
+- [3D](../../guides/3d.md) shows physics in a scene.
diff --git a/docs/manual/reference/cli/play.md b/docs/manual/reference/cli/play.md
new file mode 100644
index 00000000..de176e12
--- /dev/null
+++ b/docs/manual/reference/cli/play.md
@@ -0,0 +1,61 @@
+---
+title: "raea play"
+summary: "Play a game live in a window, or headless with scripted keys, snapshots and a timing report."
+order: 3
+sources: ["apps/play/src/lib.rs", "apps/play/src/offscreen.rs"]
+---
+
+`raea play` runs a composition live: its Clock follows the wall clock, the keyboard, pointer and gamepads reach it,
+and its sound plays as it goes. It opens a window by default. With `--offscreen` it plays headless, which is how an
+agent plays a game: keys come from a script or a random hand, snapshots land at given seconds, and a JSON report
+says how each frame went.
+
+```sh
+raea play game.tsx # in a window, with your keyboard
+raea play game.tsx --offscreen --input --seconds 10 --json report.json
+raea play game.tsx --offscreen --input-script keys.json --snapshot 2 at-2s.png --snapshot 5 at-5s.png
+raea play game.tsx --offscreen --input --input-log play.json # record what was pressed ...
+raea render game.tsx --input play.json -o same-run.mp4 # ... and render the very same run
+```
+
+A key script is `{"FRAME": [keys]}`, each set held from its frame until the next one, such as
+`{"0": [], "30": ["ArrowRight"], "60": ["ArrowRight", "Space"]}`. Keys can also be `Mouse:Right`, `Wheel:Y 100`,
+`Pad0:South`, `Touch:0:16:16` and `Pointer:X:Y` (with `:down` while pressed). `--input` and
+`--input-script` both drive the keys, so they can't be given together.
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea play EDIT.tsx [--input | --input-script KEYS.json] [--size WxH] [--seconds N|end] (a game, live; also: --input-log FILE --offscreen --snapshot T FILE --json FILE --seek F FILE --scrub N --baked --autoplay --no-vsync --master --3d)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--3d` | – | Draw the composition's 3D scene under its page, as its render draws it. With snapshots, the 3D is waited for before the clock starts. |
+| `--autoplay` | – | Start playing at once instead of waiting for the first key or click. |
+| `--baked` | – | Play a timeline from its bake: React steps through every frame once first, then no JavaScript runs while it plays. |
+| `--input` | – | Press and release keys at random, 50 to 250 ms apart, like a player's hand, and measure input-to-photon latency. Arrow keys by default; `RAEA_INPUT_KEYS` names the sets to cycle through. |
+| `--input-log` | `VALUE` | Write each frame's input as played, in the timeline form `raea render --input` takes, so a render can repeat the play exactly. |
+| `--input-script` | `KEYS.json` | Drive the keys from a script, `{"FRAME": [keys]}`, each set held until the next. |
+| `--json` | `VALUE` | Write the play's report (frame times, gaps, latency, memory) to this file. |
+| `--master` | – | Master a timeline's sound the way its render masters it. |
+| `--no-vsync` | – | Present frames as fast as they're drawn rather than at the display's rate, to measure the work itself. |
+| `--offscreen` | – | Play headless, with no window: what agents and checks use. |
+| `--scrub` | `VALUE` | Jump to N frames spread over the timeline in shuffled order and report what each seek costs. Headless only. |
+| `--seconds` | `N\|end` | How long to play, in seconds, or `end` to play a timeline to its last frame. |
+| `--seek` | `V1 V2` | Jump straight to frame F and save it as a PNG. Repeatable; the report is the seeks alone. Headless only. |
+| `--size` | `WxH` | The stage's size in pixels (1080x1920 by default); a responsive composition lays out at it. |
+| `--snapshot` | `V1 V2` | Save the stage at T seconds as a PNG. Repeatable. Headless only. |
+
+<!-- generated:end -->
+
+## See also
+
+- [Your first game](../../start/first-game.md) writes a game, plays it and renders the same run.
+- [`raea export-game`](export-game.md) turns a game into a program of its own.
diff --git a/docs/manual/reference/cli/project.md b/docs/manual/reference/cli/project.md
new file mode 100644
index 00000000..4b4d0a73
--- /dev/null
+++ b/docs/manual/reference/cli/project.md
@@ -0,0 +1,38 @@
+---
+title: "raea project"
+summary: "Make a project in the workspace, list them, or move one between inline and a repository of its own."
+order: 24
+sources: ["apps/workspace/src/workspace.rs", "apps/workspace/src/storage.rs"]
+---
+
+A project is one piece of work in a workspace: its folder, `brief.ts`, `media/` and `out/`. In the raea app it shows
+as a channel. `split` turns an inline project into a repository of its own (a submodule) with its history, and
+`join` brings it back.
+
+```sh
+raea project new spring-launch
+raea project new big-shoot --storage submodule
+raea project split spring-launch --remote [email protected]:acme/spring-launch.git
+raea project join spring-launch
+raea project --json
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea project new NAME [--storage inline|submodule] | raea project split NAME [--remote URL] | raea project join NAME | raea project [--json] (a project in the workspace: its folder, brief.ts, media/, out/; split and join keep its history)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 2 arguments besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--json` | – | Print the workspace's projects as JSON: name, path and storage. |
+| `--remote` | `URL` | With `split`: the git remote the new repository pushes to. |
+| `--storage` | `inline\|submodule` | With `new`: a folder in the workspace (`inline`) or a repository of its own (`submodule`); the workspace's layout decides by default. |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/render.md b/docs/manual/reference/cli/render.md
new file mode 100644
index 00000000..00d5fd17
--- /dev/null
+++ b/docs/manual/reference/cli/render.md
@@ -0,0 +1,78 @@
+---
+title: "raea render"
+summary: "Render a composition to an MP4, a PNG or a folder of frames, on the GPU and headless."
+order: 2
+sources: ["engine/cli/src/cli.rs", "runtime/export/src/render.rs", "runtime/bundle/src/lib.rs"]
+---
+
+`raea render` bundles a TSX composition, draws it on the GPU without opening a window, and writes a video, one still
+or a folder of frames. It draws the same tree the viewer gets in the raea app, so its stills are the truth about
+layout. It also renders an HTML composition and a bundle made by [`raea bundle`](bundle.md).
+
+```sh
+raea render piece.tsx -o piece.mp4 # the whole video
+raea render piece.tsx --frame 120 -o frame-120.png # one frame
+raea render piece.tsx --at 15,63,144 -o stills/ # some frames, as stills/frame-00015.png and on
+raea render piece.tsx --alpha -o frames/ # every frame as a transparent PNG
+raea render piece.tsx --quality master -o final.mp4 # constant quality for type and thin lines
+raea render scene.tsx --review review/ # a 3D scene from six fixed cameras, in colour and clay
+```
+
+What `-o` names decides what you get: a name ending in `.mp4` is a video, `.png` is one frame, and anything else is
+a folder of `frame-NNNNN.png`. The folder an output goes in must exist.
+
+A composition's size, frame rate and length come from its `<Composition>` (or an `export const config`); `--w`,
+`--h`, `--fps` and `--frames` only apply to a file that states neither. A `words.json` and a `perception.json` next
+to the composition are loaded on their own, as `raea play` loads them; a flag naming another file wins.
+
+A whole video made from the same inputs as an earlier one is copied from the export cache rather than drawn again,
+and the command says so.
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea render EDIT.tsx -o OUT.mp4|OUT.png|DIR [--frame N | --at A,B] [--composition ID] [--w W] [--h H] [--fps FPS] [--frames N] [--words W.json] [--perception P.json] [--input I.json|inputs.rrl] [--manifest render.json] [--stage WxH] [--10bit] [--aov] [--alpha] [--kbps N | --quality draft|high|master|0..1] [--clay] (also: --lite --comps)
+raea render EDIT.tsx --review DIR [--frame N] (fixed cameras hero, front, right, top, iso, low in colour and clay: DIR/colour.png, clay.png, review.json)
+raea render PAGE.html -o OUT.mp4|OUT.png|DIR [--at A,B] [--alpha] (an HTML composition)
+raea render --bundle NAME.comp.js -o OUT.png|DIR [--dir DIR] [--frame N] (a bundle from raea bundle, as render_bundle draws it)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--10bit` | – | Encode the video as 10-bit HEVC (Main 10), whose decoded colours match the render exactly; H.264 8-bit otherwise. |
+| `--alpha` | – | Keep the background transparent. Writes PNGs only (`-o OUT.png` or a folder): H.264 and HEVC hold no alpha, so encode the folder to ProRes 4444 afterwards if you need a video. |
+| `--aov` | – | Write each frame's motion vectors and depth beside its colour, in `DIR/motion` and `DIR/depth`, for [`raea neural`](neural.md). `-o` must name a folder. |
+| `--at` | `A,B` | Render only these frame numbers, comma-separated. |
+| `--bundle` | `NAME.comp.js` | Render a bundle made by `raea bundle` instead of a TSX file, as `render_bundle` on the iPhone draws it. |
+| `--clay` | – | Draw every standard 3D surface in plain grey, to judge shapes, light and contact without colour. |
+| `--composition` | `ID` | Which registered `<Composition>` to render when the file holds several; the first one otherwise. |
+| `--comps` | – | Record which components drew each frame in the frame's marker. Used by bakes and the app's live view, rarely by hand. |
+| `--dir` | `DIR` | With `--bundle`: the folder its relative media paths are read from (the bundle's own folder by default). |
+| `--fps` | `FPS` | Frame rate for a file with no `<Composition>` or `config` (30 by default). |
+| `--frame` | `N` | Render this one frame. |
+| `--frames` | `N` | Length in frames for a file with no `<Composition>` or `config` (60 by default). |
+| `--h` | `H` | Height in pixels for a file with no `<Composition>` or `config` (1920 by default). |
+| `--input` | `I.json\|inputs.rrl` | A game's input over time: a JSON timeline, or the step keys of an `inputs.rrl`, so a recorded play-through renders the same every time. |
+| `--kbps` | `N` | A fixed video bitrate in kbit/s, in place of the default that follows size and frame rate. |
+| `--lite` | – | Draw with raea's live view runtime instead of React, as a live game does. Used by the app when it opens a game. |
+| `--manifest` | `render.json` | Write a manifest of the render to this file: every frame's element boxes as drawn, the 3D's clipping and the sounds heard, which `raea check` reads. |
+| `--perception` | `P.json` | The perception the composition's Clock reads (faces, boxes, one for every frame or by frame), when it isn't the `perception.json` beside it. |
+| `--quality` | `draft\|high\|master\|0..1` | Constant-quality encoding: `draft` for previews, `high` for most deliveries, `master` for type and hard edges, or a number from 0 to 1. |
+| `--review` | `DIR` | Render a 3D scene from six fixed cameras (hero, front, right, top, iso, low), in colour and in clay, to `DIR/colour.png`, `DIR/clay.png` and `DIR/review.json`. |
+| `--stage` | `WxH` | Render a responsive composition, one that lays out from `useVideoConfig()`, at this size. A fixed-size composition ignores it and says so. |
+| `--w` | `W` | Width in pixels for a file with no `<Composition>` or `config` (1080 by default). |
+| `--words` | `W.json` | A transcript for the Clock's words (captions and cuts read them), when it isn't the `words.json` beside the composition. |
+| `-o` | `OUT.mp4\|OUT.png\|DIR` | Where it goes: an `.mp4` video, one `.png`, or a folder of frames. |
+
+<!-- generated:end -->
+
+## See also
+
+- [Rendering and checking](../../concepts/rendering.md) covers stills, quality, transparent frames and dark material in depth.
+- [`raea check`](check.md) measures a render against the floor; [`raea play`](play.md) runs a game live.
diff --git a/docs/manual/reference/cli/run.md b/docs/manual/reference/cli/run.md
new file mode 100644
index 00000000..0fb55a8f
--- /dev/null
+++ b/docs/manual/reference/cli/run.md
@@ -0,0 +1,34 @@
+---
+title: "raea run"
+summary: "Run a TypeScript program on the engine, headless, and print what it prints."
+order: 7
+sources: ["engine/cli/src/cli.rs"]
+---
+
+`raea run` bundles a TypeScript file and runs it on the engine's own V8, with no window and no composition. If the
+file's default export is a function, it's called. What the program prints is the answer; a throw ends the run with
+exit code 1. It's how checks such as a room's `checkLayout` run, and it reaches the engine's native calls (solids,
+ECS worlds) the way a composition does.
+
+```sh
+raea run checks/layout.ts
+raea run bake.ts --timeout 600
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea run SCRIPT.ts (a TypeScript program on the engine, headless: its default export is called, what it prints is the answer; a check like a room's checkLayout; also: --timeout S)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--timeout` | `VALUE` | Stop the program after this many seconds (120 by default). |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/sao.md b/docs/manual/reference/cli/sao.md
new file mode 100644
index 00000000..f688a5b1
--- /dev/null
+++ b/docs/manual/reference/cli/sao.md
@@ -0,0 +1,37 @@
+---
+title: "raea sao"
+summary: "Make a sound effect from a description with Stable Audio Open, on this machine."
+order: 84
+sources: ["apps/tools/src/sound.rs", "io/assets/src/local.rs"]
+---
+
+`raea sao` makes foley and sound effects from words with Stable Audio Open Small (on Core ML), running locally. It goes through the same
+asset store a render does, with the same defaults as `sao("…", {seconds})` in a composition, so a sound made here is
+the one the composition finds already made, and the other way round. The model installs itself the first time (or
+with [`raea setup-audio`](setup-audio.md)).
+
+```sh
+raea sao "a heavy wooden door creaks open" --seconds 3 -o door.wav
+raea sao "rain on a tin roof" --seconds 8 --seed 4
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea sao "PROMPT" [--seconds 2] [--seed 1] [--dir EDIT_DIR] [-o OUT.wav] (foley, local)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--dir` | `EDIT_DIR` | The edit's folder, whose asset store keeps the sound (the current folder by default). |
+| `--seconds` | `2` | How long the sound is. |
+| `--seed` | `1` | The seed; another seed gives another take of the same prompt. |
+| `-o` | `OUT.wav` | Also write the sound to this file. |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/scene.md b/docs/manual/reference/cli/scene.md
new file mode 100644
index 00000000..ce8e0e43
--- /dev/null
+++ b/docs/manual/reference/cli/scene.md
@@ -0,0 +1,43 @@
+---
+title: "raea scene"
+summary: "Find floating, sunk and clipping 3D parts, say what each part rests on, and meter a shot's light."
+order: 44
+sources: ["runtime/export/src/scene.rs"]
+---
+
+`raea scene` steps a composition's frames and measures its 3D scene without rendering pictures. `lint` reports
+parts that float, sink into what they stand on, clip into each other or tilt, and exits 1 on an error. `explain`
+says what every part rests on. `light` meters the light on the shot's subject; given several compositions, it
+compares their first and last frames across each cut.
+
+```sh
+raea scene lint room.tsx
+raea scene explain room.tsx --frame 90 --json
+raea scene light room.tsx --part hero
+raea scene light film.tsx --composition shot1,shot2,shot3 # the light across the cuts
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea scene lint|explain|light EDIT.tsx [--composition ID] [--frame N] [--part NAME] [--json] (what each 3D part rests on: floating, sunk and clipping parts; light: the scene's lighting)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 2 arguments besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--composition` | `ID` | Which composition to measure. `light` takes several, comma-separated, to compare the light across their cuts. |
+| `--frame` | `N` | The frame to measure (0 by default; `light` also takes `last`). |
+| `--json` | – | Print the findings as JSON: each part's support, gap and position. |
+| `--part` | `NAME` | With `light`: the part to meter, in place of the shot's subject. |
+
+<!-- generated:end -->
+
+## See also
+
+- [3D](../../guides/3d.md) covers building and checking a scene.
diff --git a/docs/manual/reference/cli/setup-audio.md b/docs/manual/reference/cli/setup-audio.md
new file mode 100644
index 00000000..b0df87f8
--- /dev/null
+++ b/docs/manual/reference/cli/setup-audio.md
@@ -0,0 +1,33 @@
+---
+title: "raea setup-audio"
+summary: "Install or check the local audio models: Stable Audio Open for foley and TokenSynth for instruments."
+order: 86
+sources: ["apps/tools/src/sound.rs"]
+---
+
+`raea sao` and `raea tokensynth` install their models the first time they're used. `raea setup-audio` does it on
+purpose, ahead of time, and says where each lives and how much disk it takes. Name one model to set up only that one.
+
+```sh
+raea setup-audio
+raea setup-audio --check
+raea setup-audio tokensynth
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea setup-audio [--check] [sao|tokensynth] (install or check the local audio models)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--check` | – | Say whether each model is installed, where it lives and how much disk it takes, without installing anything. |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/setup.md b/docs/manual/reference/cli/setup.md
new file mode 100644
index 00000000..9445cedb
--- /dev/null
+++ b/docs/manual/reference/cli/setup.md
@@ -0,0 +1,33 @@
+---
+title: "raea setup"
+summary: "Find Blender, or download its current LTS, and install its MCP add-on."
+order: 126
+sources: ["apps/tools/src/blender.rs"]
+---
+
+`raea setup blender` finds the Blender on this machine (from `git config raea.blender`, raea's own copy, /Applications or the `PATH`), or downloads the current LTS from blender.org into `~/.raea/tools/blender`. It then installs the add-on that
+lets an agent drive Blender over MCP. [`raea blender run`](blender.md) uses the Blender it found.
+
+```sh
+raea setup blender --check
+raea setup blender
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea setup blender [--check] [--download] (find Blender or download the LTS into ~/.raea/tools/blender, and install its MCP add-on)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--check` | – | Say which Blender would be used, without downloading or installing anything. |
+| `--download` | – | Download the LTS even when a Blender is already on this machine. |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/skill.md b/docs/manual/reference/cli/skill.md
new file mode 100644
index 00000000..fced3d9a
--- /dev/null
+++ b/docs/manual/reference/cli/skill.md
@@ -0,0 +1,41 @@
+---
+title: "raea skill"
+summary: "Print the agent skill this raea ships, matched to its version, or one of its references."
+order: 124
+sources: ["engine/cli/src/skill.rs"]
+---
+
+`raea skill` prints the raea skill, the instructions agents read to work with raea, exactly as this version ships it.
+`--reference` prints one of its generated references instead: the CLI, the feed, the project's files or the SDK.
+To put the skill where an agent reads skills, use [`raea skills install`](skills.md).
+
+The skill raea ships matches the version it ships with. An agent can hold a copy from an older or newer install;
+its front matter names the version it came with, and when that differs from `raea --version` the agent reads
+`raea skill` instead.
+
+```sh
+raea skill
+raea skill --reference sdk
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea skill [NAME] [--reference cli|feed|files|sdk] | raea skills install --agent claude|codex|kimi|gemini [--pin MOVE]... [--no-mcp] [--no-hooks] (the agent skill this raea ships, for its version, which raea --version prints: an agent whose copy names another version reads this; install puts raea's skills where that agent reads skills, adds the blender MCP server unless --no-mcp, makes each --pin MOVE a /MOVE of its own, and for claude adds the quick-check hook unless --no-hooks)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--agent` | `claude\|codex\|kimi\|gemini` | Used by `skills install`; see [`raea skills`](skills.md). |
+| `--no-hooks` | – | Used by `skills install`; see [`raea skills`](skills.md). |
+| `--no-mcp` | – | Used by `skills install`; see [`raea skills`](skills.md). |
+| `--pin` | `MOVE` | Used by `skills install`; see [`raea skills`](skills.md). |
+| `--reference` | `cli\|feed\|files\|sdk` | Print this reference of the skill's instead of the skill itself. |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/skills.md b/docs/manual/reference/cli/skills.md
new file mode 100644
index 00000000..84a30ba7
--- /dev/null
+++ b/docs/manual/reference/cli/skills.md
@@ -0,0 +1,43 @@
+---
+title: "raea skills"
+summary: "Install raea's agent skill where Claude Code, Codex, Kimi or Gemini read skills, with its MCP server and hook."
+order: 125
+sources: ["engine/cli/src/skill.rs"]
+---
+
+`raea skills install` copies the skill this raea ships into the folder an agent reads skills from, stamped with this
+version: `~/.claude/skills` for Claude Code, `~/.agents/skills` for Codex, Kimi Code's skills folder, and
+`~/.gemini/skills` for Gemini. It also adds the Blender MCP server to the agent, and for Claude Code the hook that
+runs the quick check after each saved composition ([`raea hook`](hook.md)).
+
+The skill raea ships matches the version it ships with. An agent can hold a copy from an older or newer install;
+its front matter names the version it came with, and when that differs from `raea --version` the agent reads
+`raea skill` instead.
+
+```sh
+raea skills install --agent claude
+raea skills install --agent codex --no-mcp
+raea skills install --agent claude --pin quieter --pin bolder # /quieter and /bolder as commands of their own
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea skill [NAME] [--reference cli|feed|files|sdk] | raea skills install --agent claude|codex|kimi|gemini [--pin MOVE]... [--no-mcp] [--no-hooks] (the agent skill this raea ships, for its version, which raea --version prints: an agent whose copy names another version reads this; install puts raea's skills where that agent reads skills, adds the blender MCP server unless --no-mcp, makes each --pin MOVE a /MOVE of its own, and for claude adds the quick-check hook unless --no-hooks)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--agent` | `claude\|codex\|kimi\|gemini` | Which agent to install for. |
+| `--no-hooks` | – | Leave Claude Code's settings alone: don't add the quick-check hook. |
+| `--no-mcp` | – | Don't add the Blender MCP server to the agent. |
+| `--pin` | `MOVE` | Install a note's guide as a skill of its own, so `/MOVE` loads just it (`quieter`, `bolder`, `layout`, `adapt` and the rest). Repeatable. |
+| `--reference` | `cli\|feed\|files\|sdk` | Used by `raea skill`; see [`raea skill`](skill.md). |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/solid.md b/docs/manual/reference/cli/solid.md
new file mode 100644
index 00000000..61e1d702
--- /dev/null
+++ b/docs/manual/reference/cli/solid.md
@@ -0,0 +1,45 @@
+---
+title: "raea solid"
+summary: "Measure, view and export a solid: parts built from code with exact volumes, joints and parameters."
+order: 45
+sources: ["apps/solid/src/lib.rs", "apps/solid/src/export.rs"]
+---
+
+A solid is a TypeScript file that builds 3D parts from shapes, with parameters you can change. `raea solid info`
+measures each part: volume, bounding box, how many pieces, genus, and the joints between parts. It can compare the
+result with what you expected, and show how each parameter changes the shape. `view` draws the parts from fixed
+cameras, in colour and clay. `export` writes one `.glb` for a Blender step and reads it back to check it.
+
+```sh
+raea solid info chair.ts --json
+raea solid info chair.ts --set legs=3,height=0.9 # with the change, and what it changed
+raea solid info chair.ts --walk # every parameter at each end of its range
+raea solid view chair.ts -o views/
+raea solid export chair.ts -o chair.glb --part seat --colour '#c08040'
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea solid info FILE.ts [--json] [--set k=v,...] [--expect E.json] [--walk] (volume, box, pieces, genus per part; joints; predictions and mutants)
+raea solid view FILE.ts -o DIR [--set k=v,...] [--json] (the solid's parts in colour and clay from fixed cameras)
+raea solid export FILE.ts -o OUT.glb [--set k=v,...] [--part NAME] [--colour #RRGGBB] (the solid as one .glb for a Blender step, read back and checked)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 2 arguments besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--colour` | `#RRGGBB` | With `export`: the colour the exported mesh carries. |
+| `--expect` | `E.json` | What the parts should measure, checked against what they do. `FILE.expect.json` beside the solid is read by default. |
+| `--json` | – | Print the measurements as JSON. |
+| `--part` | `NAME` | With `export`: only this part. |
+| `--set` | `k=v,...` | Change parameters for this run, as `name=value` pairs; `info` also reports what the change changed. |
+| `--walk` | – | With `info`: set each parameter to each end of its range in turn and report what moves. |
+| `-o` | `DIR` | Where `view` writes its sheets, or where `export` writes the `.glb`. |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/song.md b/docs/manual/reference/cli/song.md
new file mode 100644
index 00000000..aa22f2f3
--- /dev/null
+++ b/docs/manual/reference/cli/song.md
@@ -0,0 +1,43 @@
+---
+title: "raea song"
+summary: "Read a song's energy map: beats, bars, sections, builds, drops, stops, hits and cuts per bar."
+order: 82
+sources: ["apps/tools/src/song.rs"]
+---
+
+`raea song` listens to a song and writes its energy map, the file `song()`, `useSong()` and `<SongPlot>` read: the
+beats, downbeats and bars, each beat's loudness, onsets, brightness and low end, the sections, and the moments that
+matter to an edit (builds, drops, stops, hits, dips and breaks) with how many cuts each bar can carry. Cut to it and
+the edit moves with the music.
+
+```sh
+raea song media/track.m4a # media/track.song.json beside it
+raea song media/track.m4a --plot track.png # and a picture of the map, to check it by eye
+raea song media/track.wav --srt none -o map.json
+```
+
+Sections come from the song's own `[Section]` markers when it has them: an `.srt` named by `--srt`, else one beside
+the file, else the file's timed-text track (an `.m4a`'s lyrics). Without markers they're found from where the music
+changes.
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea song FILE [-o OUT.song.json] [--srt S.srt|none] [--plot OUT.png] [--size 2400x1350] (the song's energy map: beats, sections, builds, drops, stops, hits, cuts per bar; also: --backend NAME)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--backend` | `VALUE` | Which of raea's decoders reads the audio (`apple` on a Mac by default). Rarely needed. |
+| `--plot` | `OUT.png` | Also draw the map with `<SongPlot>` to a PNG, so a person can check it against the song. |
+| `--size` | `2400x1350` | The plot's size in pixels. |
+| `--srt` | `S.srt\|none` | The subtitle file whose `[Section]` markers name the sections, or `none` to ignore markers and find sections from the music. |
+| `-o` | `OUT.song.json` | Where the map goes (the song's name with `.song.json`, beside it, by default). |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/sounds.md b/docs/manual/reference/cli/sounds.md
new file mode 100644
index 00000000..5368364a
--- /dev/null
+++ b/docs/manual/reference/cli/sounds.md
@@ -0,0 +1,36 @@
+---
+title: "raea sounds"
+summary: "Search open sample libraries for instruments and drums, and fetch one for a Sampler."
+order: 83
+sources: ["apps/tools/src/sound/library.rs"]
+---
+
+`raea sounds` searches open, freely licensed sample libraries by the words producers use ("kick", "hihat", "upright
+piano") and lists what matches. `raea sounds get` fetches one instrument's samples into the project, ready for a
+Tone.js `Sampler`. For a pitched instrument it takes one sample per note, at the middle dynamic.
+
+```sh
+raea sounds piano
+raea sounds get vcsl/upright-piano --notes C2,C3,C4,C5 -o media/piano/
+raea sounds get vcsl/bass-drum --all
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea sounds [WORDS] | sounds get PACK/INSTRUMENT [--notes ..|--all] [-o DIR] (open sample libraries for a Sampler)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 2 arguments besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--all` | – | Fetch every sample the instrument has: every note, dynamic and round robin. |
+| `--notes` | `..\|--all` | Fetch only these notes, comma-separated (`C2,C4`). |
+| `-o` | `DIR` | The folder the samples go to. |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/spec.md b/docs/manual/reference/cli/spec.md
new file mode 100644
index 00000000..bfa039a6
--- /dev/null
+++ b/docs/manual/reference/cli/spec.md
@@ -0,0 +1,34 @@
+---
+title: "raea spec"
+summary: "Print a spec file's default export as JSON, checked against its schema: briefs, scripts, taste, plans and controllers."
+order: 26
+sources: ["engine/cli/src/spec.rs"]
+---
+
+raea's specs are TypeScript files whose default export is data: `brief.ts`, `NAME.script.ts`, `taste.ts`,
+`plan.ts` and `controllers/ID.ts`. `raea spec` evaluates one, checks it against its schema and prints it as JSON,
+so an agent can read a brief without running anything else, and a wrong field is caught before it matters.
+
+```sh
+raea spec brief.ts
+raea spec launch.script.ts
+raea spec notes.ts --as taste
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea spec FILE.ts [--as brief|script|taste|plan|controller] (a spec's default export as JSON, checked against its schema: brief.ts, script.ts, taste.ts, plan.ts, controllers/ID.ts)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--as` | `brief\|script\|taste\|plan\|controller` | Which schema to check it against. By default from the file's name (`brief`, `script`, `plan`, a `controllers/` folder), and `taste` otherwise. |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/splat.md b/docs/manual/reference/cli/splat.md
new file mode 100644
index 00000000..01917904
--- /dev/null
+++ b/docs/manual/reference/cli/splat.md
@@ -0,0 +1,47 @@
+---
+title: "raea splat"
+summary: "Train footage of a real place or thing into a 3D Gaussian splat for <Splat>, on this Mac's GPU."
+order: 66
+sources: ["apps/tools/src/splat.rs", "io/assets/src/splat.rs"]
+---
+
+`raea splat train` turns a video, or a folder of photos, of a real place or object into a Gaussian splat that
+`<Splat src>` draws in a 3D scene. It picks frames, solves the cameras with COLMAP and trains with Brush on Metal.
+`raea splat setup` installs those tools. Like a solve, a splat is kept in the asset store by its footage and
+settings, so the same footage trains once.
+
+```sh
+raea splat setup
+raea splat train media/shoe.mp4 -o shoe.ply --matte black
+raea splat train media/room.mp4 -o room.ply --from 3 --seconds 20 --frames 300 --steps 30000
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea splat train VIDEO|IMAGE_DIR -o OUT.ply [--frames 150] [--steps 20000] [--max-res 1600] [--from S] [--seconds N] [--max-splats 2000000] [--matte none|black] [--match sequential|exhaustive] [--credit TEXT] [--license TEXT] [--dir EDIT_DIR]
+raea splat setup (footage trained into a Gaussian splat for <Splat>; setup installs its tools)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 2 arguments besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--credit` | `TEXT` | Who made the footage, written into `OUT.ply.json` beside the splat. |
+| `--dir` | `EDIT_DIR` | The edit's folder, whose asset store keeps the splat (the current folder by default). |
+| `--frames` | `150` | How many pictures to train on, 8 to 2000. |
+| `--from` | `S` | Start this many seconds into a video. |
+| `--license` | `TEXT` | The footage's licence, written into `OUT.ply.json`. |
+| `--match` | `sequential\|exhaustive` | How COLMAP matches pictures: `sequential` (neighbours only, the default for a video over 60 frames) or `exhaustive` (every pair). |
+| `--matte` | `none\|black` | `black` for an object filmed on black, trained alone without its background. |
+| `--max-res` | `1600` | The long side the pictures are scaled to, in pixels (256 to 4096). |
+| `--max-splats` | `2000000` | The most splats the result may have. |
+| `--seconds` | `N` | How many seconds of a video to use (to its end by default). |
+| `--steps` | `20000` | Training steps, 100 to 200000: more is sharper and slower. |
+| `-o` | `OUT.ply` | Where the splat goes, with its sidecar `OUT.ply.json`. |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/tokensynth.md b/docs/manual/reference/cli/tokensynth.md
new file mode 100644
index 00000000..f61cbb36
--- /dev/null
+++ b/docs/manual/reference/cli/tokensynth.md
@@ -0,0 +1,39 @@
+---
+title: "raea tokensynth"
+summary: "Make an instrument's notes from a description of its timbre with TokenSynth, on this machine."
+order: 85
+sources: ["apps/tools/src/sound.rs", "io/assets/src/local.rs"]
+---
+
+`raea tokensynth` plays notes on an instrument described in words, with the TokenSynth model running locally, and
+writes one file per note: a sample set for a Sampler. Like `raea sao`, it shares the asset store and defaults with
+`Tone.tokensynth("…", notes)` in a composition.
+
+```sh
+raea tokensynth "warm analog bass" --notes C1,C2,C3 -o media/bass/
+raea tokensynth "glassy bell pad" --seconds 4 --velocity 80
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea tokensynth "TIMBRE" [--notes C2,C3,C4] [--seconds 2] [--velocity 100] [--seed 1234] [--precision fp16] [--dir EDIT_DIR] [-o OUT_DIR] (an instrument's notes, local)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--dir` | `EDIT_DIR` | The edit's folder, whose asset store keeps the notes (the current folder by default). |
+| `--notes` | `C2,C3,C4` | Which notes to play, comma-separated. |
+| `--precision` | `fp16` | The model's precision: `fp32`, `fp16` (the default), `bf16`, `int8` or `coreml`. |
+| `--seconds` | `2` | How long each note is. |
+| `--seed` | `1234` | The seed; another seed gives another take. |
+| `--velocity` | `100` | How hard each note is played, as MIDI velocity up to 127. |
+| `-o` | `OUT_DIR` | Also write the notes to this folder. |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/traces.md b/docs/manual/reference/cli/traces.md
new file mode 100644
index 00000000..201843aa
--- /dev/null
+++ b/docs/manual/reference/cli/traces.md
@@ -0,0 +1,28 @@
+---
+title: "raea traces"
+summary: "List the sessions raea apps left, newest first, with how each ended and its glitches, or tell one in full."
+order: 49
+sources: ["engine/cli/src/cli.rs", "io/trace/src"]
+---
+
+Every raea app records its session: how it ended, its glitches and errors, its slowest frames and its memory.
+`raea traces` lists the last 40, newest first. `raea traces show` tells one in full, such as why it crashed. Attach
+it to a bug report.
+
+```sh
+raea traces
+raea traces show # the newest
+raea traces show 3 # the fourth in the list
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea traces [show [N|last|DIR]] (the sessions raea left, newest first: how each ended, its glitches; show tells one in full)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 2 arguments besides its flags.
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/track.md b/docs/manual/reference/cli/track.md
new file mode 100644
index 00000000..033acfbe
--- /dev/null
+++ b/docs/manual/reference/cli/track.md
@@ -0,0 +1,41 @@
+---
+title: "raea track"
+summary: "Solve a clip's camera on this machine, so 3D can stand in its world with <Matchmove>."
+order: 65
+sources: ["runtime/react/src/scene/track.rs", "io/assets/src/lib.rs"]
+---
+
+`raea track` solves the camera that filmed a clip: where it was and where it looked on each frame, and where the
+ground is. `<Matchmove src=...>` in a composition uses the solve to put 3D into the shot. The solve is kept in the
+project's asset store with its settings, so the render that asks for the same clip and settings finds it already made,
+and the other way round. The solver installs itself the first time it's used.
+
+```sh
+raea track media/street.mp4 --from 2 --seconds 6
+raea track media/table.mp4 --subject 0.3,0.4,0.4,0.3 --height 1.2 -o table.solve.json
+```
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea track CLIP.mp4 [--subject X,Y,W,H] [--from S] [--seconds N] [--height M] [--fov DEG] [--smooth F] [--dir EDIT_DIR] [-o OUT.json] (the clip's camera solved, for <Matchmove>)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--dir` | `EDIT_DIR` | The edit's folder, whose asset store keeps the solve (the current folder by default). |
+| `--fov` | `DEG` | The camera's vertical field of view, for a shot with too little parallax to solve it (0, the solver's own, by default; 40 when it has none). |
+| `--from` | `S` | Start the solve this many seconds in. |
+| `--height` | `M` | The camera's height over the ground in metres, which sets the scene's scale (1.6 by default). |
+| `--seconds` | `N` | How many seconds to solve (to the clip's end by default). |
+| `--smooth` | `F` | Frames of Gaussian smoothing on the camera's path (1 by default; 0 for none). |
+| `--subject` | `X,Y,W,H` | The subject's box on the first frame, in 0 to 1 of the frame, to solve around. |
+| `-o` | `OUT.json` | Also write the solve to this file. |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/workspace.md b/docs/manual/reference/cli/workspace.md
new file mode 100644
index 00000000..ddf78a56
--- /dev/null
+++ b/docs/manual/reference/cli/workspace.md
@@ -0,0 +1,43 @@
+---
+title: "raea workspace"
+summary: "Make, adopt or show a workspace: the git repository that holds a studio's projects and controllers."
+order: 23
+sources: ["apps/workspace/src/workspace.rs"]
+---
+
+A workspace is a git repository, one per studio or client, under your raea root (`~/Studio` unless
+`git config raea.root` says otherwise). It holds projects, controllers and the house taste in `taste.ts`. Every
+change raea makes in it is a commit.
+
+```sh
+raea workspace init acme # a new workspace, ~/Studio/acme
+raea workspace adopt ~/clients/acme # an existing folder made a workspace in place
+raea workspace --json # the current workspace, its projects and their paths
+```
+
+`adopt` moves and deletes nothing: it makes the folder a git repository if it isn't one, and registers each folder
+holding a `brief.ts` as a project. `raea workspace init` inside a cloned workspace sets it up again on that machine.
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea workspace init [NAME] [--layout LAYOUT] | raea workspace adopt DIR [--name NAME] | raea workspace [--json] (a workspace: a git repo of projects and controllers under raea.root, ~/Studio unless git config says)
+```
+
+Headless: it needs nothing running and opens no window. Takes up to 2 arguments besides its flags.
+
+## Flags
+
+| Flag | Takes | What it does |
+| --- | --- | --- |
+| `--json` | – | Print the workspace as JSON: its name, layout, projects and their paths. |
+| `--layout` | `LAYOUT` | How its projects are stored: `monorepo` (folders in the workspace's own history, the default) or `submodules` (each project a repository of its own). |
+| `--name` | `NAME` | With `adopt`: the workspace's name, in place of the folder's. |
+
+<!-- generated:end -->
+
+## See also
+
+- [Workspaces and projects](../../concepts/workspaces.md) explains what lives where.
diff --git a/docs/manual/reference/sdk/3d.md b/docs/manual/reference/sdk/3d.md
new file mode 100644
index 00000000..bebdfc8c
--- /dev/null
+++ b/docs/manual/reference/sdk/3d.md
@@ -0,0 +1,2744 @@
+---
+title: "raea/3d"
+summary: "raea's scene layer: models, physics, splats, matchmoves, instancing, custom shader passes and 3D text."
+order: 62
+sources: ["sdk/raea/src/3d.ts", "sdk/render/src/3d"]
+---
+
+`raea/3d` holds what a scene uses beyond Bevy's own components: glTF models (`<Model>`, `<Part>`), physics and soft
+bodies (`<Physics>`, `<Body>`, `<Goo>`), Gaussian splats (`<Splat>`), matchmoves, instancing and scattering, grass,
+fire, decals, 3D text, and custom shader passes (`<FramePass>`, `<MeshPass>`, `<Compute>`). It also re-exports the
+primitives and effects most scenes need, so a quick scene can import from one path. Bevy's camera, lights,
+materials and meshes are under [`raea/camera`](camera.md), [`raea/light`](light.md), [`raea/pbr`](pbr.md) and
+[`raea/mesh`](mesh.md), named as Bevy names them.
+
+```tsx
+import { AbsoluteFill, staticFile } from "raea";
+import { Model, Physics } from "raea/3d";
+import { Camera3d } from "raea/camera";
+import { DirectionalLight } from "raea/light";
+import { Transform } from "raea/transform";
+
+function Scene() {
+ return (
+ <AbsoluteFill style={{ background: "#14161c" }}>
+ <Camera3d transform={Transform.fromXyz(0, 1.6, 5).lookingAt([0, 0.5, 0])} />
+ <DirectionalLight transform={Transform.fromXyz(3, 5, 4).lookingAt([0, 0, 0])} illuminance={11200} shadow_maps_enabled />
+ <Model src={staticFile("media/chair.glb")} />
+ </AbsoluteFill>
+ );
+}
+```
+
+See [3D](../../guides/3d.md) for building, lighting and checking a scene.
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { about, AmbientOcclusion, AntiAliasing, Atmosphere } from "raea/3d"
+```
+
+`raea/3d` exports 70 components, 4 hooks, 26 functions, 3 classes, 12 values, 126 types. Source: [sdk/raea/src/3d.tsx](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/3d.tsx).
+
+## Components
+
+### `AmbientOcclusion`
+
+Screen-space ambient occlusion: creases, corners and the ground under things darken where the sky's and the room's
+light can't reach. It darkens ambient and environment light (an <AmbientLight>, an <Environment>), not the direct
+light of a sun or a lamp. Turns multisampling off, so the edges are smoothed by SMAA instead (see <AntiAliasing>).
+Put it inside the Canvas3D, once; the first frame's holds for the piece.
+
+Bevy: `bevy_pbr::ssao::ScreenSpaceAmbientOcclusion`.
+
+Takes [`AmbientOcclusionProps`](#ambientocclusionprops)'s props.
+
+### `AntiAliasing`
+
+How the 3D's edges are smoothed. Put it inside the Canvas3D, once; the first frame's holds for the piece.
+
+Bevy: `bevy_anti_alias::smaa::Smaa`, `bevy_anti_alias::fxaa::Fxaa`.
+
+Takes [`AntiAliasingProps`](#antialiasingprops)'s props.
+
+### `Atmosphere`
+
+A procedural sky: Bevy's physically based atmosphere (Earth's air), drawn behind everything and lit by the
+DirectionalLights, so a sun low on the horizon makes a sunset. Inside the Canvas3D, once.
+
+Bevy: `bevy_light::Atmosphere`.
+
+Takes [`AtmosphereProps`](#atmosphereprops)'s props.
+
+### `BevyComponent`
+
+A Bevy component on the part it's inside (a Mesh, a Model, an ImagePlane, a light or the camera), applied through the
+TypeRegistry: how a compiled-in Bevy plugin is driven (sdk/raea/docs/bevy-plugins.md), and how any of Bevy's own
+reflected components reaches a part in every build. Agents use the generated, typed wrappers (one per component), not this directly.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `type` (required) | `string` | the component's reflected type path, as Bevy's TypeRegistry names it ("avian3d::dynamics::rigid_body::RigidBody") |
+| `value` | `unknown` | its value as Bevy's reflect serde reads it: a struct an object (fields left out take the type's default, when it has one), a newtype its inner value, an enum "Unit" or { Variant:... }, a Vec3 [x, y, z] |
+| `from` | `number` | the frame it's added on (0, the start, by default); a plugin steps after it from that frame |
+
+Used in: [ui/widgets/viewport_node](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/viewport_node.tsx), [3d/3d_shapes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/3d_shapes.tsx), [3d/3d_scene](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/3d_scene.tsx), [shader/automatic_instancing](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader/automatic_instancing.tsx), [shader/storage_buffer](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader/storage_buffer.tsx), [shader/shader_prepass](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader/shader_prepass.tsx), [shader/array_texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader/array_texture.tsx), [shader/gpu_component_array_buffer](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader/gpu_component_array_buffer.tsx), and 6 more.
+
+### `BevyResource`
+
+A Bevy resource (a plugin's settings: gravity), applied through the TypeRegistry. Inside the Canvas3D.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `type` (required) | `string` | – |
+| `value` (required) | `unknown` | – |
+
+Used in: [shader_advanced/deferred_raymarch](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/deferred_raymarch.tsx).
+
+### `Bloom`
+
+Glow around bright parts (emissive materials, strong highlights). Put it inside the Canvas3D.
+
+Bevy: `bevy_post_process::bloom::settings::Bloom`.
+
+Takes [`BloomProps`](#bloomprops)'s props.
+
+Used in: [3d/bloom_3d](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/bloom_3d.tsx), [3d/mesh_ray_cast](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/mesh_ray_cast.tsx).
+
+### `Body`
+
+A rigid body inside <Physics>: drawn where the simulation has it this frame.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `name` (required) | `string` | – |
+| `src` | `string` | a glTF's nodes as the body (drawn as a <Part>, its collider their hull) |
+| `nodes` | `string[]` | – |
+| `shape` | `Shape` | "hull" (default for nodes), "box" (their bounds), "mesh" (exact triangles, fixed bodies only), or a shape |
+| `centre` | `Vec3` | where a given shape's centre stands at rest, world (a nodes' body: the middle of their bounds) |
+| `fixed` | `boolean` | – |
+| `mass` | `number` | kg (else volume x density) |
+| `density` | `number` | kg/m³ (1000) |
+| `friction` | `number` | – |
+| `restitution` | `number` | – |
+| `velocity` | `Vec3` | – |
+| `angularVelocity` | `Vec3` | – |
+| `linearDamping` | `number` | – |
+| `angularDamping` | `number` | – |
+| `release` | `number` | seconds: held where it is until then (a cup sits until it's knocked) |
+| `impulses` | `Impulse[]` | – |
+| `path` | `(t: number) => { position: Vec3; quaternion: Quat }` | a kinematic mover: its rigid motion from rest at t seconds (see `about`); it pushes the others |
+| `material` | `PartMaterial` | drawn as the body's nodes are, or by its children (inside its motion: draw them where it stands at rest) |
+| `glitch` | `Glitch \| ((t: number) => Glitch \| undefined)` | – |
+| `castShadow` | `boolean` | – |
+| `children` | `ReactNode` | – |
+
+### `BufferMesh`
+
+A mesh from its own vertex buffers, as the geometry of a <Mesh> (Bevy's Mesh built from attributes): a terrain from
+a height field, a procedural shape, a ribbon, an imported point list. Drawn as flat triangles, or with indices and
+normals as Bevy's indexed Mesh.
+
+Bevy: `bevy_mesh::mesh::Mesh`.
+
+Takes [`BufferMeshProps`](#buffermeshprops)'s props.
+
+Used in: [shader_advanced/specialized_mesh_pipeline](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/specialized_mesh_pipeline.tsx).
+
+### `Canvas3D`
+
+Only for `layered`: the 3D is drawn in the page's order, at the box of the nearest positioned element around it
+(the whole frame when there's none; B3 H7), at that box's size and aspect:
+
+ <div style={{ position: "absolute", left: 100, top: 50, width: 200, height: 150 }}>
+ <Canvas3D layered><Camera3d transform={...} /><Mesh3d>...</Mesh3d></Canvas3D>
+ </div>
+Without `layered` it is its children, as written straight in the page.
+
+Takes [`Canvas3DProps`](#canvas3dprops)'s props.
+
+Used in: [ui/images/image_node](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node.tsx), [ui/images/ui_texture_slice_flip_and_tile](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_slice_flip_and_tile.tsx), [ui/images/image_node_resizing](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node_resizing.tsx), [ui/images/ui_texture_atlas_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas_slice.tsx), [ui/images/ui_texture_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_slice.tsx), [ui/images/ui_texture_atlas](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas.tsx), [ui/layout/grid](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/grid.tsx), [ui/layout/ghost_nodes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/ghost_nodes.tsx), and 94 more.
+
+### `Capsule`
+
+A capsule (Bevy's Capsule3d, three.js's CapsuleGeometry): [radius, length of the straight part], standing up
+(along y); its whole height is length + 2 x radius. A character's stand-in, a pill, a collider's look.
+
+Also takes the props of [`CapsuleProps`](#capsuleprops) (`args`).
+
+### `Capsule3d`
+
+*From Bevy's `bevy_shape::Capsule3d`:* A 3D capsule primitive centered on the origin A three-dimensional capsule is defined as a surface at a distance (radius) from a line
+
+Also takes the props of [`Capsule3dProps`](#capsule3dprops) (`radius`, `half_length`, `args`).
+
+### `Compute`
+
+A compute over the frame, in the 3D beside the camera; several run in the order written, before the cameras draw.
+
+Bevy: `raea_sys_compute::Computes`.
+
+Takes [`ComputeProps`](#computeprops)'s props.
+
+Used in: [shader/compute_shader_game_of_life](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader/compute_shader_game_of_life.tsx), [shader_advanced/compute_mesh](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/compute_mesh.tsx).
+
+### `Cone`
+
+A cone: [radius, height], its point up (along y).
+
+Bevy: `bevy_shape::Cone`.
+
+Also takes the props of [`ConeProps`](#coneprops) (`args`, `radius`, `height`).
+
+### `Cuboid`
+
+Bevy's Cuboid: `<Cuboid half_size={[1, 0.5, 1]} />` is a Box of args [2, 1, 2].
+
+Bevy: `bevy_shape::Cuboid`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `args` | `[number, number, number]` | – |
+
+Also takes the props of [`CuboidProps`](#cuboidprops) (`half_size`).
+
+### `Cylinder`
+
+[radiusTop, radiusBottom, height], standing up (along y) as three.js has it.
+
+Bevy: `bevy_shape::Cylinder`.
+
+Also takes the props of [`CylinderProps`](#cylinderprops) (`args`, `radius`, `half_height`).
+
+Used in: [manual: turntable](https://github.com/shinyobjectz/raea/blob/main/docs/manual/examples/turntable.tsx).
+
+### `Decal`
+
+A picture pressed onto whatever surface it lies across: a label on a jar, a stain on a counter, tiles on a wall, a
+sticker on a laptop (Bevy's forward decal; the camera gets a depth prepass for it). Placed and keyed like any part,
+so it moves and fades with a render's clock and a game's play alike.
+
+Bevy: `bevy_pbr::mesh_material::MeshMaterial3d<bevy_pbr::extended_material::ExtendedMaterial<bevy_pbr::pbr_material::StandardMaterial, bevy_pbr::decal::forward::ForwardDecalMaterialExt>>`.
+
+Takes [`DecalProps`](#decalprops)'s props.
+
+### `DepthCopy`
+
+Inside a Camera3d: its depth buffer copied each frame, after its prepass and before its main pass, into a depth
+image a Material samples (Bevy's shader_advanced/render_depth_to_texture, whose depth-only camera has Bevy's
+DepthPrepass, RenderTarget::None and Msaa off).
+
+Bevy: `raea_sys_phase::DepthCopy`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `image` (required) | `string` | the depth image, "render:NAME:WxH:depth": the camera's depth is copied into it, and a Material's texture of that name is it (a texture_depth_2d with a sampler_comparison) |
+
+Used in: [shader_advanced/render_depth_to_texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/render_depth_to_texture.tsx).
+
+### `DepthOfField`
+
+A lens's depth of field: what's nearer or farther than the camera's `focus` blurs. Put it inside the Canvas3D;
+pull focus by animating the camera's `focus`. Inside a Camera3d it is Bevy's component on the camera, its
+focal_distance the camera's focus.
+
+Bevy: `bevy_post_process::dof::DepthOfField`.
+
+Takes [`DepthOfFieldProps`](#depthoffieldprops)'s props.
+
+### `Echoes`
+
+Copies of a part trailing it: `count` echoes at offsets `step` apart (metres; or a function of the echo's number),
+in a flat glowing `material`, so a fork "duplicates" along a line.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `count` (required) | `number` | – |
+| `step` (required) | `Vec3 \| ((k: number) => Vec3)` | – |
+| `echo` | `PartMaterial` | – |
+
+Also takes the props of [`PartProps`](#partprops).
+
+### `Entities`
+
+A world's entities drawn by the engine (no React element per entity): every entity with a Mesh component ({shape:
+a Manifold expression or a Solid's expr, color, roughness, metalness}) and a Transform ({x, y, z, rx, ry, rz in
+radians, scale}) is a mesh, placed in world space (a child's Transform is in its parent's). Give it the world at the
+frame: `<Entities world={game.at(useCurrentFrame())} />`. Needs the engine's tables.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `world` (required) | `{ scene(): unknown[] }` | – |
+
+### `Entity`
+
+A bare Bevy entity: a Transform where it's placed (static) and Visibility, and nothing else until its children add
+Bevy's own components through the TypeRegistry. A Handle field takes an asset path ("ball.glb#Mesh0/Primitive0",
+"wood.png"), an inline asset (a StandardMaterial's fields as an object) or, for a Mesh, a Manifold shape
+("shape:box(1, 1, 1)"); an Entity field takes another part's name or row id, or entity bits. So Mesh3d,
+MeshMaterial3d<StandardMaterial>, Sprite, ChildOf and the rest of Bevy's components are reachable without a
+hand-written element.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `name` | `string` | what an Entity field elsewhere names it by (a ChildOf's parent, an observer's target); unique in the scene |
+| `position` | `Vec3` | – |
+| `rotation` | `Vec3` | Euler XYZ in radians |
+| `scale` | `Vec3 \| number` | – |
+| `transform` | `{ translation?: Vec3; rotation?: [number, number, number, number]; scale?: Vec3 }` | Bevy's Transform (Transform.fromXyz(..).withRotation(..)), in place of position, rotation and scale: the entity is then a parent whose children (meshes, lights, models, other entities) move with it, as Bevy's ChildOf children do (the old Group) |
+| `pass` | `string` | with `transform`: the composition pass of every part inside that doesn't name its own (Mesh's `pass`) |
+| `children` | `ReactNode` | its Bevy components (<BevyComponent>, or the generated wrappers in raea/bevy-own); with `transform`, also the parts it carries |
+
+Used in: [ui/widgets/viewport_node](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/viewport_node.tsx), [3d/3d_shapes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/3d_shapes.tsx), [3d/atmospheric_fog](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/atmospheric_fog.tsx), [3d/3d_scene](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/3d_scene.tsx), [3d/parenting](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/parenting.tsx), [stress_tests/many_foxes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/stress_tests/many_foxes.tsx), [camera/projection_zoom](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/camera/projection_zoom.tsx), [animation/animated_transform](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/animation/animated_transform.tsx), and 5 more.
+
+### `Environment`
+
+Light from all around, out of a panorama: soft light from the sky and reflections of it in every glossy or metal
+surface (image-based lighting), and with `background` the panorama as the sky. Put it inside the Canvas3D, once a
+frame; its src, intensity, rotation and background may change from frame to frame (a cut from a hall to a street).
+Bevy's EnvironmentMapLight with maps already filtered is <EnvironmentMapLight>.
+Its panorama is filtered by Bevy's generator and, with `background`, drawn as the sky (engine/render
+environment.rs):
+
+Bevy: `bevy_light::probe::GeneratedEnvironmentMapLight. Bevy's Skybox from its own cubemap is <Skybox>.`.
+
+Takes [`EnvironmentProps`](#environmentprops)'s props.
+
+### `EnvironmentMapLight`
+
+Bevy's EnvironmentMapLight with its own prefiltered maps, as Bevy's examples put one on the camera: light from all around and its reflections, from cubemaps already filtered (an <Environment> filters a panorama
+itself). Put it inside the Canvas3D, once; the first frame's holds.
+
+Bevy: `bevy_light::probe::EnvironmentMapLight`.
+
+Takes [`EnvironmentMapLightProps`](#environmentmaplightprops)'s props.
+
+### `Fire`
+
+A fire: a flame drawn as a volume, its tongues rising, curling and tearing off as it burns, with a flickering light
+on its surroundings. Every pixel of it is a function of the frame (rising 3D noise in a tapering envelope), so a
+render of any frame equals its play. Stand it on its fuel (a pyre, a brazier); put embers and smoke round it
+yourself.
+
+Bevy: `bevy_pbr::mesh_material::MeshMaterial3d<raea_render::engine::fire::FireMaterial>`.
+
+Takes [`FireProps`](#fireprops)'s props.
+
+### `Fisheye`
+
+A fisheye lens on the camera: a pass over the 3D after tone mapping (the page over it stays straight). Every value
+animates per frame; a lens's vignette and colour fringes are <Grade>'s. Put it inside the Canvas3D.
+
+Takes [`FisheyeProps`](#fisheyeprops)'s props.
+
+### `Fog`
+
+Distance fog: far things fade into `color`. Inside the <Camera3d> it is Bevy's DistanceFog on that camera, with all of
+Bevy's fields (an atmospheric falloff, the sun's colour); inside the Canvas3D it fogs the scene's camera by near, far
+or density.
+
+Bevy: `bevy_pbr::fog::DistanceFog`.
+
+Takes [`FogProps`](#fogprops)'s props.
+
+Used in: [3d/fog](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/fog.tsx), [3d/atmospheric_fog](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/atmospheric_fog.tsx).
+
+### `FogVolume`
+
+A box of air that light shows in: dust in a sunbeam, smoke, a haze of blood. Needs a <VolumetricFog> in the
+Canvas3D; lights marked `volumetric` throw shafts through it, and every light's glow fills it softly. A part, so it
+keeps its name across frames: animate its density, colour and placement.
+
+Bevy: `bevy_light::volumetric::FogVolume`.
+
+Takes [`FogVolumeProps`](#fogvolumeprops)'s props.
+
+### `FramePass`
+
+A full-screen pass over the scene camera's frame, beside the camera; several run in the order written. With a
+frame <Look> they run on its cells, before the look's composite.
+
+Bevy: `raea_sys_framepass::FramePasses`.
+
+Takes [`FramePassProps`](#framepassprops)'s props.
+
+Used in: [shader_advanced/custom_post_processing](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/custom_post_processing.tsx), [shader_advanced/fullscreen_material](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/fullscreen_material.tsx).
+
+### `GBufferPass`
+
+Inside a Camera3d with Bevy's DepthPrepass and DeferredPrepass: your shader over the whole view, written into the
+deferred G-buffer after the deferred prepass (depth compared GreaterEqual), so Bevy's deferred lighting lights it as
+any surface, and into the shadow maps of the camera's lights (Bevy's shader_advanced/deferred_raymarch).
+
+Bevy: `raea_sys_phase::GBufferPass`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `shader` (required) | `string` | the shader file, compiled as written: staticFile("shaders/x.wesl"). Its entry points take Bevy's FullscreenVertexOutput; bind group 0 is the view uniform (binding 0) and Globals (binding 1) |
+| `fragment` | `string` | the entry point writing the G-buffer: its deferred vec4<u32> (location 0), its lighting pass id u32 (location 1) and its frag_depth ("fragment") |
+| `shadow` | `string` | the entry point writing a shadow view's frag_depth, so it casts shadows; none when left out |
+
+Used in: [shader_advanced/deferred_raymarch](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/deferred_raymarch.tsx).
+
+### `Gizmo`
+
+Debug lines drawn by Bevy's gizmo renderer (a retained bevy_gizmos Gizmo and its GizmoAsset), placed like a part:
+a path, a bounding box, an axis, a ray. They cast and take no light, and draw over nothing unless depthBias says.
+
+Bevy: `bevy_gizmos::retained::Gizmo`.
+
+Takes [`GizmoProps`](#gizmoprops)'s props.
+
+Used in: [shader_advanced/render_depth_to_texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/render_depth_to_texture.tsx).
+
+### `Goo`
+
+Objects melting into goo: the bake drawn by the frame (nothing before `from`).
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `name` | `string` | – |
+| `seconds` (required) | `number` | how long, seconds, from `from` (a frame of the enclosing Sequence) |
+| `from` | `number` | – |
+| `objects` (required) | `GooObject[]` | – |
+| `colliders` | `{ box: { min: Vec3; max: Vec3 }; friction?: number }[]` | static boxes the goo lies on and runs off (world) |
+| `cups` | `GooCup[]` | hollow cylinders on a pose track (a mug lifted and tipped) that carry the goo and pour it (tools/goo's cups): radius inside, height foot to rim, base (the inside floor's height), wall, friction, and poses [t,...the cup's frame to world, 16 numbers column-major], t in seconds from the goo's start, its axis +y |
+| `surface` | `{ blur?: number; level?: number; flat?: number; maxTris?: number }` | the surface drawn round the particles: blur (grid nodes, 1), iso level (of the rest density, 0.33) and flat (the blur across over the blur up, 1); a wider, flatter blur and a lower level close a thin spill into one sheet. maxTris (120000): past it the grid coarsens, which drops a film one particle thick; a wide one needs more |
+| `solver` | `"mpm" \| "sph"` | "mpm" (the default: goo, melting things) or "sph": thin liquids that pour, splash and spread (coffee dumped on a counter, water from a tap), simulated by SPlisHSPlasH (tools/goo/sph.py); each object a liquid, from a cup, a block, a filled glTF or an emitter |
+| `sph` | `{ radius?: number; viscosity?: number; tension?: number; tensionBoundary?: number; tens…` | the sph solver's settings: particle radius (m, 0.001), viscosity (0.002), surface tension (0: off; at millimetre particles the solver alone holds a spill 4-5 mm deep, as coffee is, and even 30 beads it into a ball) with how much the liquid wets what it lies on (0.5) and its damping (0.05), the largest time step (s, 0.001) |
+| `obstacles` | `{ src: string; nodes?: string[]; transform?: number[]; poses?: number[][] }[]` | sph: glTF meshes the liquid runs over and around (all their meshes, or the named nodes, moved by `transform`), standing, or moved along `poses` like a cup's ([t, 16 numbers column-major], from where the glTF has them) |
+| `fps` | `number` | the bake's own frame rate (the composition's by default): one bake shared by compositions at different rates |
+| `bounds` | `{ min: Vec3; max: Vec3 }` | the box it lives in: goo leaving it is gone |
+| `dx` | `number` | grid cell, metres (0.005): finer is slower and smoother |
+| `seed` | `number` | – |
+| `gravity` | `Vec3` | – |
+| `roughness` | `number` | the surface: glossy, a little light through it |
+| `clearcoat` | `number` | – |
+| `subsurface` | `number` | – |
+| `color` | `string` | – |
+
+### `Grade`
+
+The camera's colour grade (lift, gamma, gain and saturation per range of light, before tone mapping), a lens
+vignette and colour fringes: one grade over every scene, so a film looks of a piece. Put it inside the Canvas3D.
+
+Bevy: `bevy_render::view::ColorGrading`, `bevy_post_process::effect_stack::chromatic_aberration::ChromaticAberration`, `bevy_post_process::effect_stack::vignette::Vignette`.
+
+Takes [`GradeProps`](#gradeprops)'s props.
+
+### `Grass`
+
+A field of grass over `area`, made by the engine from the ground's functions (sampled once at `resolution`).
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `name` | `string` | – |
+| `area` (required) | `PlanBox` | the ground the field covers: a box on the plan (x, z, metres) |
+| `height` (required) | `(x: number, z: number) => number` | the ground's height at (x, z): the clumps stand on it, tilted to its slope |
+| `density` (required) | `number \| ((x: number, z: number) => number)` | clumps per square metre at (x, z) (0: bare) |
+| `patch` | `(x: number, z: number) => number` | which of `tints` the point (x, z) belongs to (0 everywhere without it) |
+| `size` | `(x: number, z: number) => number` | a multiple of the clumps' size at (x, z) (1 without it) |
+| `tints` | `[string, string][]` | each patch's root and tip colours: ["#2c4a1a", "#5f8a2c"] |
+| `highlight` | `string` | the tips' highlight colour ("#f2e7a0") and how much of it each tip takes (0.22) |
+| `highlightMix` | `number` | – |
+| `blades` | `number` | blades in a clump (14), their height in metres (0.3; each 0.55 to 1.3 times it), width range ([0.034, 0.05]) |
+| `bladeHeight` | `number` | – |
+| `width` | `[number, number]` | – |
+| `spread` | `number` | how far from its clump's centre a blade stands (0.06 m), and how far it leans over its height ([0.2, 0.7]) |
+| `lean` | `[number, number]` | – |
+| `scale` | `[number, number]` | each clump's scale, a random pick between these ([0.85, 1.35]), times `size` |
+| `seed` | `number` | – |
+| `resolution` | `number` | grid points a metre the functions are sampled at (2) |
+| `tile` | `number` | a tile's side in metres (4) |
+| `lod` | `GrassLod[]` | the steps of detail, nearest first (the engine's: every clump within 5 m, half of them in 8 blades to 14 m, a fifth in 5 blades beyond) |
+| `shadow` | `boolean` | cast shadows (false) |
+
+### `ImagePlane`
+
+A picture on a flat card in the scene, unlit (a poster, a screen, a sprite).
+
+Bevy: `bevy_image::image::Image`.
+
+Takes [`ImagePlaneProps`](#imageplaneprops)'s props.
+
+### `Instances`
+
+One glTF (or one mesh) drawn at many placements, loaded once and drawn by the GPU as instances: a meadow's grass
+and flowers, a forest, a suburb's houses. `<Instances src={staticFile("daisy.glb")} at={scatter({...})} />`. The
+copies share one surface and can't play a clip.
+
+Bevy: `bevy_pbr::render::mesh::MeshPipeline (automatic batching of entities sharing a mesh and material)`.
+
+Takes [`InstancesProps`](#instancesprops)'s props.
+
+### `LensDistortion`
+
+Barrel or pincushion distortion (Brown-Conrady k1, k2) on the camera, a pass after tone mapping as Fisheye's.
+Put it inside the Canvas3D.
+
+Bevy: `bevy_post_process::LensDistortion`.
+
+Takes [`LensDistortionProps`](#lensdistortionprops)'s props.
+
+### `Look`
+
+The whole frame drawn as a model's look draws its model: every part of the scene in the one grain, its bloom,
+fog and blur inside it. Put it inside the Canvas3D. mode="paint" or "cartoon" draws every standard material as
+paint (engine/render paint.rs):
+
+Bevy: `bevy_pbr::mesh_material::MeshMaterial3d<bevy_pbr::extended_material::ExtendedMaterial<bevy_pbr::pbr_material::StandardMaterial, raea_render::engine::paint::Paint>>`.
+
+Takes [`LookProps`](#lookprops)'s props.
+
+### `Matchmove`
+
+Footage with real 3D standing in it: the clip behind, its camera solved and followed, the subject in front. Fills
+the frame (its camera's view is the frame's); its children are the 3D in the shot's world, lights included.
+
+Takes [`MatchmoveProps`](#matchmoveprops)'s props.
+
+### `MeshPass`
+
+The mesh it's inside drawn again by your shader, in a phase of its own after the camera's main opaque pass: onto
+the colour target, with no depth test unless `depth`, back faces culled (Bevy's shader_advanced/custom_render_phase). It
+reads the mesh's colours at location 1 under VERTEX_COLORS when the mesh has them.
+
+Bevy: `raea_sys_phase::MeshPass`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `shader` (required) | `string` | the shader file, compiled as written: staticFile("shaders/x.wesl"). Its vertex input is the mesh's position at location 0 (a vec4 `compressed_position` under VERTEX_POSITIONS_COMPRESSED), its bind groups Bevy's mesh view (0) and mesh (2) |
+| `vertex` | `string` | its entry points (Bevy's default names) |
+| `fragment` | `string` | – |
+| `depth` | `boolean` | whether it tests and writes the view's depth (GreaterEqual), as a mesh in Bevy's opaque phase does (Bevy's shader_advanced/specialized_mesh_pipeline); without, it draws over everything |
+
+Used in: [shader_advanced/specialized_mesh_pipeline](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/specialized_mesh_pipeline.tsx), [shader_advanced/custom_render_phase](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/custom_render_phase.tsx).
+
+### `MeshSequence`
+
+A baked simulation, one mesh a frame.
+
+Takes [`MeshSequenceProps`](#meshsequenceprops)'s props.
+
+### `MeshShaderPass`
+
+Inside a Camera3d: your task and mesh shaders make primitives on the GPU and your fragment shader draws them into
+the view's colour and depth (compared GreaterEqual) after the main opaque pass (Bevy's
+shader_advanced/mesh_shader_intro). It needs a GPU with mesh shaders, as Apple silicon's Metal has; elsewhere it
+draws nothing and says so.
+
+Bevy: `raea_sys_phase::MeshShaderPass`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `task` | `string` | the task (amplification) shader file, compiled as written; none when left out, and the draw's workgroups are the mesh shader's |
+| `mesh` (required) | `string` | the mesh shader file, compiled as written: it makes the primitives the fragment shader draws |
+| `fragment` (required) | `string` | the fragment shader file, compiled as written. Each file has the one entry point of its stage; bind group 0 is Globals (binding 0) and the view uniform (binding 1) in all three, and a file's `import super::NAME` reads NAME.wesl beside it |
+| `groups` | `[number, number, number]` | the draw's workgroup count, [x, y, z] (draw_mesh_tasks); [1, 1, 1] when left out |
+
+Used in: [shader_advanced/mesh_shader_intro](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/mesh_shader_intro.tsx).
+
+### `Model`
+
+A glTF model. Its clips are the file's (@bevy bevy_animation::AnimationClip), played by `animation`, blended by
+`animations` or composed by `graph`, each built by the engine into its AnimationGraph
+(@bevy bevy_animation::graph::AnimationGraph; engine/render scene3d.rs). `look` draws the model in its own grain
+(engine/render look.rs):
+
+Bevy: `bevy_pbr::mesh_material::MeshMaterial3d<raea_render::engine::look::LookMaterial>`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `src` (required) | `string` | a glTF file in the media folder: staticFile("models/shoe.glb") |
+| `name` | `string` | – |
+| `sampler` | `SamplerSpec` | how its own glTF textures are read: { filter: "nearest" } for hard pixels, whatever the file says; a <MeshStandardMaterial> child's maps take their own `sampler` |
+| `pass` | `string` | the composition pass it draws in ("scene" by default): a frame-wide effect told to skip a pass (<Look skip>, <Outline skip>, <Bloom skip>, <Grade skip>) leaves its pixels as drawn, and <Look passes> gives one its own paint; a piece names at most three passes besides "scene"; keyed per frame |
+| `cloth` | `{ src: string; frame: number }` | a skinned model's own vertices replaced each frame by a baked cloth simulation (docs/cloth.md K2): `src` a.rseq of the model's vertices in its bind pose, in the glTF's order (raea/body tools/cloth.ts --bind), `frame` the one drawn (keyed per frame). The skin poses them, so its materials, alpha, morphs and bones are kept. |
+| `attach` | `{ to: string; bone: string }` | fixed to another model's bone (`to`: that model's name; `bone`: the node's name in its glTF, "Head"): it follows the bone's animated pose, and its position, rotation and scale are in the bone's space (a glTF's armature is often scaled, so a hat may need scale 0.01) |
+| `bones` | `Record<string, string>` | a skinned model's joints placed where other models are, by name: `{ pelvis: "hero-pelvis",... }` puts the joint named pelvis wherever the model named hero-pelvis is each frame (its position and rotation; shrink it to hide it: scale 0.001, not 0, which takes the skin with it), so a ragdoll's bodies move one skin that bends at its joints rather than rigid pieces. The model's own placement stays at the origin. |
+| `position` | `Vec3` | – |
+| `rotation` | `Vec3` | radians |
+| `scale` | `number \| Vec3` | – |
+| `allowOverlap` | `boolean` | it may pass through other parts on purpose (a blade into a body, a ghost through a wall): raea's clipping check leaves it out |
+| `posed` | `boolean` | set at an angle on purpose (a bowl knocked over, a mug on its side): `raea scene lint` doesn't call it tilted |
+| `animation` | `string \| number` | a clip to play: its name in the file, or its index |
+| `screens` | `ModelScreens` | live pictures on its materials, by the glTF material's name: `{ monitor_screen: <Screen resolution={[384, 272]}> <Game /></Screen> }` (or a bare `<Game />` for the defaults). Each mesh with that material shows the screen, the picture fitted to the mesh's texture coordinates and stood upright |
+| `hide` | `string[]` | nodes of the glTF hidden, by name (a robot's painted-on eyes under the screen that replaces them) |
+| `nodes` | `Record<string, { translation?: Vec3; rotation?: [number, number, number, number]; scale…` | glTF nodes' local transforms, by name, set each frame (a joint turned by hand: Bevy's gltf_skinned_mesh turns GltfNode2). Bevy's loader names an unnamed node GltfNode{index}. A part left out stays as the file has it; give the same nodes and parts every frame |
+| `grid` | `{ cell: number; major?: number; color?: string; toon?: boolean }` | graph paper over the model's surfaces, as MeshStandardMaterial's `grid`, but drawn in the model's own texture coordinates (taken as metres), so the lines stay on the surface as it moves; no outlines. `toon`: its light in three flat bands (toon shading) |
+| `animations` | `{ clip: string \| number; time?: number; weight?: number }[]` | several clips blended by weight (Bevy's AnimationGraph): each its name or index, its time in seconds (the Sequence's time by default) and weight (1 by default). A transition is weights moved over frames (interpolate one down as the next comes up); a layer is a second clip at a lower weight. Up to 4; not with `animation` |
+| `graph` | `AnimGraphNode` | an authored animation graph (Bevy's AnimationGraph): a clip node, or a blend (its children's weights normalised) or an additive node (each child times its weight, added on) over children; any node may leave the subtrees of the bones in its `mask` alone (a wave on the arm over a walk: { add: [{ clip: "walk" }, { clip: "wave", mask: ["leg_l", "leg_r"] }] }). Weights and clip times may change every frame. Up to 16 nodes; not with animation or animations |
+| `morphs` | `Record<string, number> \| number[]` | morph target (blend shape) weights, 0 to 1: by target name ({ smile: 0.8 }) or index ([0.8, 0]); up to 64. The names are fixed when the model is made: pass the same set every frame (0 for a target at rest) |
+| `time` | `number` | seconds into the clip (by default the Sequence's time: frame / fps); the clip loops unless loop={false} |
+| `loop` | `boolean` | – |
+| `scene` | `number` | which of the file's scenes (0 by default) |
+| `look` | `"solid" \| "pixel" \| "site"` | how the model itself is drawn (the rest of the scene is unchanged): "solid" (its own surfaces, the default), "pixel" (pixel art: a cell per `pixelSize` frame pixels, outlined in `edgeColor`) or "site" (raea.io's grain: the cells' light ordered-dithered into the site's six greys). It may change from frame to frame. |
+| `flat` | `boolean` | its surfaces without light: shape and colour alone, like a drawing (the site look keeps the light: its grain is made of it) |
+| `shadow` | `boolean` | false: its meshes cast no shadow (true by default) |
+| `receiveShadow` | `boolean` | false: no shadow falls on its meshes, its own included (true by default): a furry coat of many cards that would otherwise speckle itself in the shadow maps |
+| `pixelSize` | `number` | a cell's size in frame pixels for the pixel and site looks (6 by default) |
+| `edgeColor` | `string` | the pixel look's one-cell outline, a hex colour ("#000000" by default), or "none" |
+| `theme` | `"dark" \| "light"` | the site look's greys: "dark" (light ink on black, the default) or "light" |
+| `lift` | `number` | the site look's ink: lift + light * gain, before the dither (0.28 and 0.9 by default; on the light greys light is inverted, 0.35 and 0.75) |
+| `gain` | `number` | – |
+| `children` | `ReactNode` | <MeshToonMaterial> children: toon surfaces over the model's own materials (all of them, or one each by name); <MeshStandardMaterial> children: its materials (all, or one each by `material`) given the colour, texture or finish each gives, the rest kept |
+
+Used in: [3d/lightmaps](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/lightmaps.tsx), [3d/split_screen](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/split_screen.tsx), [3d/atmospheric_fog](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/atmospheric_fog.tsx), [stress_tests/many_foxes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/stress_tests/many_foxes.tsx), [camera/projection_zoom](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/camera/projection_zoom.tsx), [animation/animated_mesh](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/animation/animated_mesh.tsx), [gltf/gltf_skinned_mesh](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/gltf/gltf_skinned_mesh.tsx), [gltf/load_gltf](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/gltf/load_gltf.tsx), and 1 more.
+
+### `MotionBlur`
+
+Motion blur from each part's and the camera's motion over the frame before (Bevy's MotionBlur): with it, each frame
+is drawn after the one before it, so a frame's blur is the same in a render, a seek and play. A frame without it has
+none. Put it inside the Canvas3D.
+
+Bevy: `bevy_post_process::motion_blur::MotionBlur`.
+
+Takes [`MotionBlurProps`](#motionblurprops)'s props.
+
+### `Outline`
+
+Ink lines where the scene's depth steps or its surfaces turn, drawn before bloom and tone mapping; under a <Look>
+a cell wide (Return of the Obra Dinn's line). Put it inside the Canvas3D.
+
+Bevy: `bevy_ui::Outline`.
+
+Takes [`OutlineProps`](#outlineprops)'s props.
+
+### `Part`
+
+A glTF's nodes drawn on their own, where they stood, moved by a rigid motion, glitched by the frame's values.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `name` | `string` | – |
+| `src` (required) | `string` | the glTF (staticFile("x.glb")) and the nodes that make the part |
+| `nodes` (required) | `string[]` | – |
+| `position` | `Vec3` | a rigid motion from where it stands in the file (see `about`): position, and a quaternion [x, y, z, w] |
+| `quaternion` | `Quat` | – |
+| `scale` | `number` | – |
+| `material` | `PartMaterial` | – |
+| `glitch` | `Glitch` | – |
+| `castShadow` | `boolean` | – |
+
+### `PhaseItem`
+
+Your own pipeline drawing your own buffers in each camera's Opaque3d phase.
+
+Bevy: `raea_sys_phase::PhaseItem`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `shader` (required) | `string` | the shader file, compiled as written: staticFile("shaders/x.wesl") |
+| `vertex` | `string` | its entry points (Bevy's default names) |
+| `fragment` | `string` | – |
+| `stride` (required) | `number` | the vertex buffer: each vertex `stride` bytes, its 32-bit words in order (a u32 pad of 0 is a 0) |
+| `attributes` (required) | `PhaseAttribute[]` | – |
+| `words` (required) | `number[]` | – |
+| `indices` (required) | `number[]` | the index buffer (u32), drawn whole |
+| `depth` | `{ write?: boolean; compare?: "Never" \| "Less" \| "Equal" \| "LessEqual" \| "Greater" \| "No…` | its depth state: whether it writes depth, and its compare (Bevy's CompareFunction by name; Bevy's opaque default, Greater, when left out) |
+| `aabb` (required) | `{ center: [number, number, number]; half_extents: [number, number, number] }` | its bounds, so the camera sees it (Bevy's Aabb): a centre and half extents |
+| `position` | `[number, number, number]` | where it is (a bare Entity's place) |
+
+Used in: [shader_advanced/custom_phase_item](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/custom_phase_item.tsx).
+
+### `Physics`
+
+Rigid bodies, simulated once and played back by the frame: the <Body>s among its children (directly, or in
+fragments). Before `from` and after `seconds` they hold their first and last poses.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `seconds` (required) | `number` | how long to simulate, seconds |
+| `gravity` | `Vec3` | – |
+| `substeps` | `number` | steps per frame (8) |
+| `colliders` | `{ min: Vec3; max: Vec3; friction?: number; restitution?: number }[]` | static boxes (world, metres): the floor, the table top |
+| `from` | `number` | the frame (of the enclosing Sequence) the simulation starts on (0); before it everything is at rest |
+| `children` | `ReactNode` | – |
+
+### `Plane3d`
+
+*From Bevy's `bevy_shape::Plane3d`:* A bounded plane in 3D space. It forms a surface starting from the origin with a defined height and width.
+
+Takes [`Plane3dProps`](#plane3dprops)'s props.
+
+### `Plate`
+
+Footage behind the 3D: the clip's frame filling the camera's whole view (its `view` when it has one), on the far
+side of everything, unlit. Give the scene `<ToneMapping mode="none" />` to keep its colours exact. <Matchmove> is
+the usual way in.
+
+Takes [`PlateProps`](#plateprops)'s props.
+
+### `Refinish`
+
+Every <Model> inside re-covered: each of its glTF materials (all, or the one each names by `material`) given the
+colour, texture or finish each gives, the rest of it kept (a run of cabinets painted, the doors and drawers with them;
+`map: null` takes the wood's picture off). A model's own <MeshStandardMaterial> children go first.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `materials` (required) | `MeshStandardMaterialProps[]` | – |
+| `children` | `ReactNode` | – |
+
+### `RichText`
+
+Text in the 3D world: every glyph a real lit, shaded entity (bevy_rich_text3d's mesh over its glyph atlas, a
+StandardMaterial of its own), laid out as one line of shaped text (kerning, spans of other fonts and sizes) and
+then moved, turned, scaled, recoloured, faded and revealed glyph by glyph with the motion code 2D uses: the named
+moves staggered (`enter="rise" each={2}`), a typewriter's `reveal`, or a `glyph` function of the frame.
+
+ <RichText name="title" size={0.6} enter="pop" each={3}>Hello <Span color="#ffd400" weight={900}>world</Span></RichText>
+ <RichText glyph={(g) => ({ position: [0, Math.sin(frame / 6 + g.index) * 0.05, 0] })}>WAVE</RichText>
+
+Takes [`RichTextProps`](#richtextprops)'s props.
+
+### `Scene`
+
+A world drawn at the current frame: its `mesh` rows (shape, x y z, rot_x rot_y rot_z in radians, scale, color,
+rough, metal), `camera` (x y z, look_x look_y look_z, fov), `light` (x y z, intensity) and `ambient` (intensity)
+rows as the 3D elements above. Inside a Canvas3D.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `world` (required) | `World` | the world whose rows are drawn; its systems run up to the current frame |
+
+### `Screen`
+
+A live picture on a surface in the 3D scene: a nested composition or game (its children, or `src`, a video) at its
+own resolution, drawn as a CRT (scanlines, mask, glow, the glass) or flat. Inside a Canvas3D on its own it's a
+free-standing quad; on a model, give it to the Model: `<Model src={...} screens={{ monitor_screen: <Screen
+resolution={[384, 272]}><Game /></Screen> }} />`. A screen doesn't light the room: put a dim light of its colour in
+front of it.
+
+Bevy: `bevy_pbr::mesh_material::MeshMaterial3d<raea_render::engine::screen::CrtMaterial>`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `name` | `string` | what the screen is called; screens on one page need different names ("screen" by default) |
+| `position` | `Vec3` | a free-standing screen's place: a quad of `size` metres ([1.6] wide by default, its height from the resolution) |
+| `rotation` | `Vec3` | radians |
+| `scale` | `number \| Vec3` | – |
+| `size` | `[number] \| [number, number]` | – |
+| `pass` | `string` | the composition pass it draws in (Mesh's `pass`; "scene" by default): `pass="ui"` with <Look skip={["ui"]}> keeps a page crisp under a paint look |
+
+Also takes the props of [`ScreenSource`](#screensource).
+
+### `ShaderInstances`
+
+The mesh it's inside drawn once per instance in one draw, by your shader, in the camera's Transparent3d phase, a
+vertex buffer of your words stepped per instance (Bevy's shader_advanced/custom_shader_instancing). Its instances
+aren't in the mesh's bounds: give the mesh Bevy's NoFrustumCulling (<BevyComponent type="bevy_camera::visibility::NoFrustumCulling" value={{}} />).
+
+Bevy: `raea_sys_phase::ShaderInstances`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `shader` (required) | `string` | the shader file, compiled as written: staticFile("shaders/x.wesl"). Its vertex reads the mesh's position, normal and uv at locations 0 to 2 and the instance's attributes at theirs; its bind groups are Bevy's mesh pipeline's |
+| `stride` (required) | `number` | each instance's bytes (a multiple of 4) |
+| `attributes` (required) | `PhaseAttribute[]` | what the shader reads of an instance: Bevy's VertexFormat, its byte offset and |
+| `words` (required) | `number[]` | every instance's 32-bit words in order, `stride / 4` of them each |
+
+Used in: [shader_advanced/custom_shader_instancing](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/custom_shader_instancing.tsx).
+
+### `ShaderMesh`
+
+A mesh drawn by a material written here in WESL or WGSL: one generic Bevy material
+(rdb's ShaderMaterial, an AsBindGroup of 16 uniform slots and 4 textures) whose fragment shader is this source, so
+a dissolve, a toon ramp, a hologram or a procedural pattern needs no Rust. Uniforms may change from frame to frame
+(they're set again on any frame where they change); the shader isn't compiled again (#28).
+
+Bevy: `bevy_pbr::mesh_material::MeshMaterial3d<raea_sys_material::shader_material::ShaderMaterial>`.
+
+Takes [`ShaderMeshProps`](#shadermeshprops)'s props.
+
+### `Shadows`
+
+Shadow quality for every light in the Canvas3D: map size, the sun's cascades, biases, filtering. Put it inside the
+Canvas3D, once; the first frame's holds for the piece. mapSize sets both shadow maps' size, filter the camera's
+filtering, and the cascade props the sun's cascades (engine/render scene3d.rs):
+
+Bevy: `bevy_light::directional_light::DirectionalLightShadowMap`, `bevy_light::point_light::PointLightShadowMap`, `bevy_light::ShadowFilteringMethod`, `bevy_light::cascade::CascadeShadowConfig`.
+
+Takes [`ShadowsProps`](#shadowsprops)'s props.
+
+Used in: [3d/shadow_caster_receiver](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/shadow_caster_receiver.tsx), [3d/atmospheric_fog](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/atmospheric_fog.tsx), [gltf/load_gltf](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/gltf/load_gltf.tsx), [shader_advanced/deferred_raymarch](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/deferred_raymarch.tsx).
+
+### `Shape2D`
+
+A flat shape in 2D, over the 3D, in one colour: Bevy's Mesh2d with a ColorMaterial (raea-sys-sprite). Put it
+inside the Canvas3D.
+
+Bevy: `bevy_sprite_render::mesh2d::color_material::ColorMaterial`, `bevy_sprite_render::mesh2d::material::MeshMaterial2d<bevy_sprite_render::mesh2d::color_material::ColorMaterial>`, `bevy_mesh::components::Mesh2d`.
+
+Takes [`Shape2DProps`](#shape2dprops)'s props.
+
+### `Skybox`
+
+Bevy's Skybox: a cubemap drawn behind everything, as Bevy's examples put one on the camera. Put it inside the
+Canvas3D, once; its brightness and rotation may change each frame (an <Environment>'s `background` is the sky of
+a panorama raea filters).
+
+Bevy: `bevy_light::probe::Skybox`.
+
+Takes [`SkyboxProps`](#skyboxprops)'s props.
+
+### `Span`
+
+A run of a <RichText>'s text in its own font, weight, size or colour. Only inside a <RichText>.
+
+Takes [`SpanProps`](#spanprops)'s props.
+
+### `Sphere`
+
+*From Bevy's `bevy_shape::Sphere`:* A sphere primitive, representing the set of all points some distance from the origin
+
+Also takes the props of [`SphereProps`](#sphereprops) (`args`, `radius`, `ico`, `uv`).
+
+Used in: [3d/bloom_3d](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/bloom_3d.tsx).
+
+### `Splat`
+
+A gaussian splat: a reconstructed scene or object, drawn back to front for the frame's camera, behind any mesh in
+front of it, through the frame's look. Animate it with reveal, assemble, disperse, explode, wave, twist, morph and
+pulse, all values of the frame.
+
+Bevy: `bevy_pbr::mesh_material::MeshMaterial3d<raea_render::engine::splat::SplatMaterial>`, `bevy_pbr::mesh_material::MeshMaterial3d<raea_render::engine::splat::SplatMask>`.
+
+Takes [`SplatProps`](#splatprops)'s props.
+
+### `Sprite`
+
+A picture in 2D, over the 3D: Bevy's Sprite, drawn as a quad with its sprite material, a sprite sheet's cells cut
+by a texture atlas (raea-sys-sprite). Put it inside the Canvas3D.
+
+Bevy: `bevy_sprite::sprite::Sprite`, `bevy_sprite_render::sprite_mesh::sprite_mesh_material::SpriteMeshMaterial`, `bevy_sprite_render::mesh2d::material::MeshMaterial2d<bevy_sprite_render::sprite_mesh::sprite_mesh_material::SpriteMeshMaterial>`, `bevy_sprite_render::sprite_mesh::sprite_extended_material::SpriteMaterial`, `bevy_image::texture_atlas::TextureAtlasLayout`.
+
+Takes [`SpriteProps`](#spriteprops)'s props.
+
+Used in: [camera/pan_camera_controller](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/camera/pan_camera_controller.tsx), [camera/2d_on_ui](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/camera/2d_on_ui.tsx), [shader/compute_shader_game_of_life](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader/compute_shader_game_of_life.tsx), [shader/sprite_material](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader/sprite_material.tsx), [2d/rotation](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/rotation.tsx), [2d/move_sprite](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/move_sprite.tsx), [2d/sprite_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/sprite_slice.tsx), [2d/rotate_to_cursor](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/rotate_to_cursor.tsx), and 8 more.
+
+### `SurfaceShader`
+
+One shader over every lit standard surface in the scene that has none of its own (meshes, Models' materials,
+Characters), so the whole scene shares one look. Unlit, toon, paint, flat and looked
+surfaces and ShaderMesh keep theirs. In the 3D beside the camera; one per scene.
+
+Bevy: `bevy_pbr::mesh_material::MeshMaterial3d<bevy_pbr::extended_material::ExtendedMaterial<bevy_pbr::pbr_material::StandardMaterial, raea_sys_shader::ShaderExt>>`.
+
+Takes [`SurfaceShaderSpec`](#surfaceshaderspec)'s props.
+
+### `Text3D`
+
+Solid 3D letters (Manifold's text3d), as a Mesh's geometry: `<Mesh><Text3D size={0.6}>SALE</Text3D>...</Mesh>`.
+
+Takes [`Text3DProps`](#text3dprops)'s props.
+
+### `ThreeShaderMaterial`
+
+A three.js shader on the mesh it's in, as it is: a ShaderMaterial's GLSL (or a node material's WGSL) with its
+uniforms, drawn by raea's engine with three's built-ins. `<R3F>` makes these from an R3F scene's materials.
+
+Takes [`ThreeShaderMaterialProps`](#threeshadermaterialprops)'s props.
+
+### `ToneMapping`
+
+The camera's tone mapping and exposure. Put it inside the Canvas3D.
+
+Bevy: `bevy_render::view::Tonemapping`, `bevy_camera::camera::Exposure`.
+
+Takes [`ToneMappingProps`](#tonemappingprops)'s props.
+
+Used in: [3d/rotate_environment_map](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/rotate_environment_map.tsx), [3d/bloom_3d](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/bloom_3d.tsx), [3d/mesh_ray_cast](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/mesh_ray_cast.tsx).
+
+### `Torus`
+
+*From Bevy's `bevy_shape::Torus`:* A torus primitive, often representing a ring or donut shape The set of points some distance from a circle centered at the origin
+
+Also takes the props of [`TorusProps`](#torusprops) (`args`, `major_radius`, `minor_radius`).
+
+### `Volume`
+
+A simulated volume: density and heat in a box, put in by its sources and puffs, lifted by heat, weighed down,
+carried by the wind and its own curls, drawn lit and shadowed by itself. Smoke, a cloud or a contrail is a choice of
+these (examples/volumes).
+Simulated and raymarched by engine/render volume.rs:
+
+Bevy: `bevy_pbr::mesh_material::MeshMaterial3d<raea_render::engine::volume::VolumeMaterial>`.
+
+Takes [`VolumeProps`](#volumeprops)'s props.
+
+### `VolumetricFog`
+
+Volumetric fog on the camera: light in the air, drawn inside every <FogVolume>, with shafts from the lights marked
+`volumetric`. Put it inside the Canvas3D, once; without it fog volumes draw nothing.
+
+Bevy: `bevy_light::volumetric::VolumetricFog`, `bevy_light::volumetric::VolumetricLight`.
+
+Takes [`VolumetricFogProps`](#volumetricfogprops)'s props.
+
+### `ZFight`
+
+The part drawn twice in the same place, the second a hair turned, in another material: the two surfaces fight
+for the depth buffer and flicker in stripes (z-fighting), stronger with `amount` (radians, ~0.002).
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `amount` (required) | `number` | – |
+| `other` | `PartMaterial` | – |
+
+Also takes the props of [`PartProps`](#partprops).
+
+## Hooks
+
+### `useBake`
+
+The bake for these props (made once and kept).
+
+```ts
+function useBake(props: PhysicsProps): Baked
+```
+
+### `useGoo`
+
+The goo's bake for these props (made once and kept), and the frame (of the enclosing Sequence) at which each
+object's own part should go, the goo having taken it over.
+
+```ts
+function useGoo(p: GooProps): GooBake & { gone: (name: string) => boolean; frame: number; }
+```
+
+### `useMatchmove`
+
+The solve and this frame's camera, inside a <Matchmove>.
+
+```ts
+function useMatchmove(): MatchmoveState
+```
+
+### `usePhysics`
+
+Inside <Physics>: the bake and the frame in it.
+
+```ts
+function usePhysics(): { baked: Baked; frame: number; t: number; }
+```
+
+## Functions
+
+### `about`
+
+A rigid motion of a part about a point (`about`, its rest centre): turn by q there, then move by `move`. As a
+<Motion>/<Part> position and quaternion.
+
+```ts
+function about(about: Vec3, q: Quat, move?: Vec3): { position: Vec3; quaternion: Quat; }
+```
+
+### `bodyPose`
+
+A body's rigid motion from rest at the current frame.
+
+```ts
+function bodyPose(baked: Baked, name: string, k: number): { position: Vec3; quaternion: Quat; }
+```
+
+### `checkMatchmove`
+
+Checks a Matchmove's props; throws a TypeError or RangeError naming the prop.
+
+```ts
+function checkMatchmove(p: MatchmoveProps): void
+```
+
+### `checkPass`
+
+A part's composition pass, checked: a name, letters first (up to 32 of letters, digits, _ and -).
+
+```ts
+function checkPass(owner: string, pass: unknown): void
+```
+
+### `clipEvents`
+
+The clip events that fire between two frames (Bevy's AnimationClip events, as data): an event `time` seconds into
+the clip fires on the frame whose clip time first reaches it, that is when it lies in (prev, now], once per loop
+when the clip loops (`duration` its length). Give the previous frame's clip time and this frame's, as a <Model>'s
+`time` runs; on the first frame pass prev -1 so an event at 0 fires.
+
+```ts
+function clipEvents<E extends { time: number; }>(events: E[], prev: number, now: number, duration: number, loop?: boolean): E[]
+```
+
+### `dofOf`
+
+Bevy's DepthOfField fields as the old ones; their defaults are Bevy's (f/1, where the old one is f/2.8)
+
+```ts
+function dofOf(owner: string, props: DepthOfFieldProps): DepthOfFieldProps
+```
+
+### `eulerOf`
+
+A part's Euler angles of a quaternion: a composition's `rotation` [x, y, z] is composed as three.js composes it,
+Quat::from_euler(EulerRot::XYZ, x, y, z) (runtime/scene `local`; the YXZ rot_x/rot_y/rot_z of
+raea-render's rows are read back from the world matrix), so this is that order's inverse.
+
+```ts
+function eulerOf(q: [number, number, number, number]): Vec3
+```
+
+### `gooSpec`
+
+The spec tools/goo bakes for these props at the composition's `fps`: what `physics goo SPEC.json` takes, and the bake's
+key, so a script can bake (or check) a goo without rendering.
+
+```ts
+function gooSpec(p: GooProps, fps: number): Record<string, unknown>
+```
+
+### `hash01`
+
+0..1 from integers, the same on every run
+
+```ts
+function hash01(...xs: number[]): number
+```
+
+### `lastBeat`
+
+The last of `times` at or before t: its index (-1 before the first) and how long ago it was, seconds.
+
+```ts
+function lastBeat(t: number, times: readonly number[]): { index: number; since: number; time: number; }
+```
+
+### `matchmoveIndex`
+
+The solve's frame at a time in the clip: the latest at or before it, clamped to the solve.
+
+```ts
+function matchmoveIndex(solve: MatchmoveSolve, time: number): number
+```
+
+### `matchmoveView`
+
+The footage's view in a frame of another shape: the whole view's size (the footage scaled to cover the frame, times
+zoom) and the frame's window in it, in frame pixels.
+
+```ts
+function matchmoveView(footage: { width: number; height: number; }, frame: { width: number; height: number; }, crop?: number | [number, number], zoom?: number): { width: number; height: number; x: number; y: number; }
+```
+
+### `part`
+
+glTF nodes cut out as their own file, standing where they stood (made once, kept in the asset store).
+
+```ts
+function part(src: string, nodes: string[], material?: PartMaterial): PartInfo
+```
+
+### `physicsRequest`
+
+The simulation's request: every body's props as Rapier takes them, events in frames.
+
+```ts
+function physicsRequest(props: PhysicsProps, fps: number): Record<string, unknown>
+```
+
+### `pick`
+
+The nearest part under the pointer, or null. `size` is the frame's (useVideoConfig's width and height), whose
+pixels the pointer is in.
+
+```ts
+function pick(pointer: { x: number; y: number; }, camera: PickCamera, parts: readonly Pickable[], size: { width: number; height: number; }): Hit | null
+```
+
+### `place`
+
+```ts
+function place(o: { objects: Record<string, V3 | PlaceObject>; rules: PlaceRule[]; room?: { min: [number, number]; max: [number, number]; } | undefined; }): Layout
+```
+
+### `pointerRay`
+
+The pointer's ray: from the camera through the pointer (x, y in the frame's pixels, y down), as the engine draws it
+(Bevy's looking_at, with +Z for up when the camera looks straight up or down, as rdb does).
+
+```ts
+function pointerRay(pointer: { x: number; y: number; }, camera: PickCamera, size: { width: number; height: number; }): { origin: Vec3; direction: Vec3; }
+```
+
+### `quatAxis`
+
+The quaternion [x, y, z, w] turning `angle` radians about `axis`, as Bevy's Quat::from_axis_angle.
+
+```ts
+function quatAxis(axis: Vec3, angle: number): Quat
+```
+
+### `quatMul`
+
+The product a × b of two quaternions [x, y, z, w], `b` applied first, as Bevy's Quat * Quat.
+
+```ts
+function quatMul(a: Quat, b: Quat): Quat
+```
+
+### `samplerSpec`
+
+A sampler checked (a TypeError or RangeError naming the owner and the part).
+
+```ts
+function samplerSpec(owner: string, s: SamplerSpec): SamplerSpec
+```
+
+### `scatter`
+
+Points scattered over an area for an <Instances>: seeded (the same layout every frame and every run), at least
+`spacing` apart, clear of `avoid` and `clearOf`, on the ground `y` gives, kept by `density`. A spatial hash keeps
+thousands quick. Call it once at module level, not per frame.
+
+```ts
+function scatter(o: ScatterOptions): Instance[]
+```
+
+### `snapPose`
+
+Positions snapped to a grid (`step` metres): a physics engine's position quantised.
+
+```ts
+function snapPose(p: Vec3, step: number): Vec3
+```
+
+### `surfaceShader`
+
+A surface shader checked and given as the row's spec (its source, uniforms, textures).
+
+```ts
+function surfaceShader(owner: string, sh: SurfaceShaderSpec, hook?: RegExp, hooks?: string): Record<string, unknown>
+```
+
+### `surfaceTurn`
+
+The turn that takes +y to `normal`, with the picture's top (a decal's -z) toward world up on a wall, toward -z on a
+floor, turned `spin` about the normal: a quaternion [x, y, z, w].
+
+```ts
+function surfaceTurn(normal: Vec3, spin?: number): [number, number, number, number]
+```
+
+### `teleport`
+
+A position that jumps to a new seeded spot on each beat in `times` (within `radius`, metres, on the axes `axes`
+scales) and holds it, back home `hold` seconds after the beat (Infinity: until the next).
+
+```ts
+function teleport(t: number, times: readonly number[], o: { radius: number; seed?: number; hold?: number; axes?: Vec3; }): Vec3
+```
+
+### `toHex`
+
+A colour as the 3D renderer takes it (#rrggbb): hex, rgb()/rgba() or a common name; CSS variables throw.
+
+```ts
+function toHex(owner: string, k: string, v: unknown): string
+```
+
+## Classes
+
+### `CrossSection`
+
+A 2D shape (Manifold's CrossSection), held by value: its contours (counter-clockwise solid, clockwise holes),
+area and bounds. Offset, combine and move it, then extrude or revolve it into a Solid.
+
+| Member | What it does |
+| --- | --- |
+| `new CrossSection(a: SectionAnswer)` | – |
+| `CrossSection.from(a: SectionAnswer): CrossSection` | From an engine answer (a slice, a projection, an operation). |
+| `CrossSection.of(polygons: Polygons): CrossSection` | Contours, overlaps merged and self-crossings resolved (Manifold's positive fill rule). |
+| `.polygons: Polygons` | – |
+| `.area: number` | – |
+| `.contours: number` | – |
+| `.bounds: { min: [number, number]; max: [number, number]; }` | – |
+| `.union(...others: CrossSection[]): CrossSection` | This and the others together. |
+| `.minus(...others: CrossSection[]): CrossSection` | This with the others cut away. |
+| `.intersect(...others: CrossSection[]): CrossSection` | Only where this and every other overlap. |
+| `.hull(...others: CrossSection[]): CrossSection` | The convex hull of this and the others. |
+| `.offset(delta: number, o?: { join?: JoinType \| undefined; miterLimit?: number \| undefined; segments?: number \| undefined; }): CrossSection` | Grown outward by `delta` (shrunk when negative), corners joined round (default), square, miter or bevel. |
+| `.minkowski(other: CrossSection): CrossSection` | Swept by another shape (the 2D Minkowski sum). |
+| `.simplify(epsilon?: number): CrossSection` | Fewer points: those within `epsilon` of a straight line dropped. |
+| `.move(x: number, y: number): CrossSection` | Moved by (x, y). |
+| `.rotate(degrees: number): CrossSection` | Turned by `degrees` about the origin. |
+| `.scale(x: number, y?: number): CrossSection` | Scaled uniformly, or per axis. |
+| `.mirror(nx: number, ny: number): CrossSection` | Mirrored across the line through the origin with this normal. |
+| `.warp(fn: (x: number, y: number) => [number, number]): CrossSection` | Every point moved by `fn`, then re-unioned (crossings resolved). |
+| `.decompose(): CrossSection[]` | Its separate pieces (each outline with its holes). |
+| `.isEmpty(): boolean` | Whether nothing is left. |
+| `.extrude(height: number, o?: { divisions?: number \| undefined; twist?: number \| undefined; scaleTop?: [number, number] \| undefined; }): Solid` | Extruded along z into a Solid (see manifold.extrude). |
+| `.revolve(o?: { degrees?: number \| undefined; segments?: number \| undefined; }): Solid` | Revolved about the z axis into a Solid (see manifold.revolve). |
+
+### `Field`
+
+A signed distance field (negative inside), as the text raea-core-sdf reads. Y is up; sizes are metres.
+
+| Member | What it does |
+| --- | --- |
+| `new Field(text: string)` | – |
+| `.text: string` | – |
+| `.move(x: number, y: number, z: number): Field` | – |
+| `.rotate(x: number, y: number, z: number): Field` | Degrees about x, then y, then z (as a Solid's rotate). |
+| `.scale(s: number): Field` | – |
+| `.mirrorX(): Field` | Both sides: the field and its mirror across x = 0 (a body's left and right from one). |
+| `.round(r: number): Field` | Grown outward by r, every edge rounded by it. |
+| `.shell(t: number): Field` | Hollow: a skin 2t thick on the surface. |
+| `.displace(amp: number, freq: number, octaves?: number, seed?: number): Field` | Roughened by fractal noise: `amp` metres, `freq` cycles a metre (bark, rock, a lumpy creature). |
+| `.solid(step?: number \| undefined): Solid` | The field meshed (marching tetrahedra, `step` metres a cell: by default a 96th of its size) as a closed solid. |
+
+### `Solid`
+
+A handle to a native solid. Free it when done with many (or let the run end).
+
+| Member | What it does |
+| --- | --- |
+| `new Solid(id: number, expr: string)` | – |
+| `.id: number` | – |
+| `.expr: string` | the expression that rebuilds this solid (what a mesh row draws) |
+| `.union(...others: Solid[]): Solid` | This and the others together. |
+| `.minus(...others: Solid[]): Solid` | This with the others cut away. |
+| `.intersect(...others: Solid[]): Solid` | Only where this and every other overlap. |
+| `.hull(...others: Solid[]): Solid` | The convex hull of this and the others. |
+| `.move(x: number, y: number, z: number): Solid` | Moved by (x, y, z). |
+| `.rotate(x: number, y: number, z: number): Solid` | Turned by x, y and z degrees. |
+| `.scale(s: number, y?: number \| undefined, z?: number \| undefined): Solid` | Scaled uniformly, or per axis. |
+| `.volume(): number` | Its volume. |
+| `.bounds(): Bounds` | Its bounding box. |
+| `.triangles(): number` | How many triangles its mesh has. |
+| `.isEmpty(): boolean` | Whether nothing is left (a boolean that removed everything). |
+| `.slice(z: number): Section` | Its cross-section at height z (in a space-time mask, z is the frame). |
+| `.mirror(nx: number, ny: number, nz: number): Solid` | Mirrored across the plane through the origin with this normal. |
+| `.transform(m: number[]): Solid` | Transformed by a 3x4 matrix given column by column (x axis, y axis, z axis, translation). |
+| `.trim(nx: number, ny: number, nz: number, offset?: number): Solid` | What's on the normal's side of the plane n. p = offset. |
+| `.splitByPlane(nx: number, ny: number, nz: number, offset?: number): [Solid, Solid]` | Cut in two by the plane n. p = offset: [the normal's side, the other side]. |
+| `.split(cutter: Solid): [Solid, Solid]` | Cut in two by another solid: [inside it, outside it]. |
+| `.refine(n: number): Solid` | Each triangle cut into n x n. |
+| `.smooth(o?: { angle?: number \| undefined; smoothness?: number \| undefined; refine?: number \| undefined; }): Solid` | Edges sharper than `angle` degrees kept, the rest rounded (smoothness 0..1 for the sharp ones too), then refined. |
+| `.minkowski(other: Solid): Solid` | This swept by another solid (the Minkowski sum): rounded by a sphere, thickened by a box. |
+| `.minkowskiDiff(other: Solid): Solid` | This eroded by another solid (the Minkowski difference). |
+| `.mesh(): { verts: Float32Array<ArrayBufferLike>; tris: Uint32Array<ArrayBufferLike>; }` | Its triangles: positions (x y z) and indices by threes. |
+| `.warp(fn: (x: number, y: number, z: number) => [number, number, number]): Solid` | Every vertex moved by `fn` (the topology kept): a bend, a twist, a wave. |
+| `.simplify(tolerance: number): Solid` | The mesh coarsened: vertices closer than `tolerance` merged where the shape allows. |
+| `.refineToLength(length: number): Solid` | Refined until no edge is longer than `length`. |
+| `.refineToTolerance(tolerance: number): Solid` | Refined until its smoothed surface is within `tolerance` of the true curve. |
+| `.crossSection(z: number): CrossSection` | Its cross-section at height z as a CrossSection (to offset, combine or extrude again). |
+| `.project(): CrossSection` | Its silhouette seen from above (+z), on the x-y plane. |
+| `.decompose(): Solid[]` | Its disconnected pieces, each a Solid. |
+| `.minGap(other: Solid, searchLength: number): number` | The smallest gap between this and another, looking no further than `searchLength` (which it answers when nothing is closer). |
+| `.rayCast(from: Vec3, to: Vec3): { distance: number; position: Vec3; normal: Vec3; }[]` | Where the segment from `from` to `to` crosses the surface, nearest first (distance 0..1 along it). |
+| `.area(): number` | Its surface area. |
+| `.genus(): number` | Its genus (how many holes go through it: a torus has 1). |
+| `.export(path: string, format?: "obj" \| "glb" \| undefined): number` | Written as OBJ or glTF binary (by the extension, or `format`); the file's size. |
+| `.free(): void` | Let the engine drop it. |
+
+## Values
+
+### `ATTRIBUTE_COLOR`
+
+Bevy's Mesh::ATTRIBUTE_COLOR: a vertex's linear RGBA colour (id 5, Float32x4)
+
+### `ATTRIBUTE_NORMAL`
+
+Bevy's Mesh::ATTRIBUTE_NORMAL: a vertex's normal (id 1, Float32x3)
+
+### `ATTRIBUTE_POSITION`
+
+Bevy's Mesh::ATTRIBUTE_* (ids 0 to 5), as a Material's vertex buffer names them.
+
+### `ATTRIBUTE_TANGENT`
+
+Bevy's Mesh::ATTRIBUTE_TANGENT: a vertex's tangent, its w the bitangent's sign (id 4, Float32x4)
+
+### `ATTRIBUTE_UV_0`
+
+Bevy's Mesh::ATTRIBUTE_UV_0: a vertex's first texture coordinates (id 2, Float32x2)
+
+### `ATTRIBUTE_UV_1`
+
+Bevy's Mesh::ATTRIBUTE_UV_1: a vertex's second texture coordinates, as a lightmap's (id 3, Float32x2)
+
+### `crossSection`
+
+2D shapes as CrossSections, made natively.
+
+### `grow`
+
+Generated growth as Solids, built natively: `tree`, `loft`, `terrain`, `boulder`, `rosette` and the rest. Draw one
+with `<Mesh shape={solid}>`; cut, join, measure and place it like any other Solid.
+
+### `manifold`
+
+### `MeshVertexAttribute`
+
+A vertex attribute: its name, its unique id (a high random one for your own, as Bevy asks, so it sorts after the
+built-in ones) and its format. MeshVertexAttribute.new("BlendColor", 988540917, "Float32x4") is Bevy's
+MeshVertexAttribute::new; Mesh's own are ATTRIBUTE_POSITION and the rest.
+
+Bevy: `bevy_mesh::MeshVertexAttribute`.
+
+### `outline`
+
+2D outlines for extrude and revolve.
+
+### `sdf`
+
+## Types
+
+### `AlphaMode2d`
+
+bevy_sprite_render's AlphaMode2d
+
+```ts
+type AlphaMode2d = "Opaque" | "Blend" | { Mask: number }
+```
+
+### `AmbientOcclusionProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `quality` | `"low" \| "medium" \| "high" \| "ultra"` | how many samples a pixel takes: "low" (4), "medium" (8, the default), "high" (18), "ultra" (54) |
+| `thickness` | `number` | how thick, in metres, a surface is taken to be behind what the camera sees (0.25 by default): larger darkens more behind thin things |
+
+### `Animate3d`
+
+A 3D node's declared animation: tracks by property, or a move.
+
+```ts
+type Animate3d = Record<string, TrackSpec | TrackSpec[] | Keys> | Move
+```
+
+### `AnimGraphNode`
+
+A node of a <Model graph>.
+
+```ts
+type AnimGraphNode = | { clip: string | number; time?: number; weight?: number; mask?: string[] } | { blend: AnimGraphNode[]; weight?: number; mask?: string[] } | { add: AnimGraphNode[]; weight?: number; mask?: string[] }
+```
+
+### `AntiAliasingProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `mode` (required) | `"msaa" \| "smaa" \| "fxaa" \| "none"` | "msaa" (4x multisampling, the default), "smaa" (morphological, high preset: the default with AmbientOcclusion, which can't multisample), "fxaa" (cheapest, softest) or "none". Each draws a frame from that frame alone, so a render equals its play (temporal anti-aliasing isn't offered: it needs the frames before) |
+
+### `AtmosphereProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `light` | `boolean` | it lights the scene too, as a sky does (ambient and reflections from the sky it draws) |
+| `groundAlbedo` | `number` | the ground's brightness the air's scattering sees, 0..1 (0.3 by default) |
+
+### `Baked`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `fps` (required) | `number` | – |
+| `frames` (required) | `number` | – |
+| `file` (required) | `string` | – |
+| `bodies` (required) | `Record<string, { p: number[]; q: number[]; centre: Vec3 }>` | – |
+
+### `BevyComponentProps`
+
+The props of [`BevyComponent`](#bevycomponent), tabled there.
+
+### `BevyParts`
+
+What a light or camera holds: Bevy's own reflected components on it (<BevyComponent>, or a generated wrapper such
+as bevy_light's ShadowFilteringMethod or bevy_pbr's ScreenSpaceReflections), applied through Bevy's TypeRegistry.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `children` | `ReactNode` | – |
+| `layers` | `number[]` | a camera: the render layers it draws ([0] by default); a light: the layers it lights (Bevy's RenderLayers) |
+
+### `BloomProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `intensity` | `number` | 1 is a natural glow, 2 strong; 0 none |
+| `threshold` | `number` | only what's brighter than this glows (0 = everything a little; 1 = only emissive parts and highlights) |
+| `skip` | `string[]` | composition passes (a part's `pass`) left out of it: they neither glow nor take the glow |
+| `passes` | `Record<string, number>` | each named pass's share of it, 0 (as skip) to 1 (all of it, as "scene" has) |
+
+### `BodyProps`
+
+The props of [`Body`](#body), tabled there.
+
+### `Bounds`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `min` (required) | `Vec3` | – |
+| `max` (required) | `Vec3` | – |
+
+### `BufferMeshProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `positions` (required) | `number[]` | x, y, z of each vertex |
+| `indices` | `number[]` | three vertex indices a triangle (counter-clockwise seen from its front); without them each three positions are one. With normals too it is Bevy's indexed Mesh, its index buffer kept, as a compute that writes a mesh expects |
+| `normals` | `number[]` | x, y, z of each vertex's normal (without them each face is flat, facing its front) |
+| `uvs` | `number[]` | u, v of each vertex (without them a picture map is projected onto the mesh's bounds) |
+| `colors` | `number[] \| string[]` | each vertex's colour: r, g, b, a (linear, 0 to 1) per vertex, or one "#rrggbb" per vertex; the material's colour is multiplied by it (Bevy's ATTRIBUTE_COLOR), so leave the material white to see them as given |
+| `attributes` | `Record<string, { size: number; values: number[] }>` | a mesh's own attributes beyond those, for a three.js shader that reads them (<ThreeShaderMaterial>): each one's size (1 to 4 numbers a vertex) and values, per vertex |
+
+### `Canvas3DProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `layered` | `boolean` | the 3D takes its place in the page's tree order instead of lying under the whole page: page elements before the Canvas3D (and the backgrounds of the elements holding it) are under the 3D, showing wherever it has nothing, and hidden by its parts; positioned elements after it are over it. The 3D's background is transparent. Put the Canvas3D straight in a full-frame AbsoluteFill. |
+| `clearColor` | `string` | only with `layered`: the 3D clears to this CSS colour instead of transparent, so its translucent parts blend over it in linear light, as Bevy's do over its ClearColor (a Bevy 2D scene's rgb(43, 44, 47)), not over the page in sRGB. The 3D then lies under the whole page, as Bevy's camera output lies under all its UI (a GlobalZIndex(-1) too). |
+| `children` | `ReactNode` | – |
+
+### `Capsule3dProps`
+
+Bevy's Capsule3d: radius and half_length, the straight part's half (0.5 each by Bevy's default), standing up.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `radius` | `number` | – |
+| `half_length` | `number` | – |
+| `args` | `[number, number]` | – |
+
+### `CapsuleProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `args` | `[number, number]` | – |
+
+### `ComputeProps`
+
+A compute shader (raea-sys-compute). Its source has one `@compute` entry point and reads `time()` (seconds),
+`u_NAME()` for each uniform, each buffer as `NAME: array<f32>` (read and written) and each image as
+`NAME: texture_storage_2d<rgba8unorm, write>`.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `file` | `string` | a shader file compiled as written, staticFile("shaders/x.wesl"), in place of wesl: its `@group(0)` storage textures and uniforms its own, as a Bevy example's render-graph node binds them |
+| `entry` | `string \| null` | a file's entry point this frame (null or left out: nothing dispatched), as a node picks its pipeline |
+| `bind` | `Record<string, string>` | a file's storage textures this frame, each an image's key ({ input: "a", output: "b" }), as a node picks its bind group (a ping-pong swaps them frame by frame) |
+| `wesl` | `string` | the source in WESL (a superset of WGSL) |
+| `wgsl` | `string` | the same in plain WGSL |
+| `workgroups` (required) | `number[]` | how many workgroups a frame dispatches: [x], [x, y] or [x, y, z] |
+| `uniforms` | `Record<string, number \| number[] \| string \| Record<string, number \| number[] \| string \|…` | up to 16, as a surface shader's; a file's struct field may be { start: NAME } or { end: NAME }: the range of the mesh buffer NAME binds in its slab, in its array's elements (compute_mesh's `range.start * 8`) |
+| `buffers` | `Record<string, { size: number } \| number[] \| StorageValue \| MeshSlab>` | up to 4, the compute's own, kept from frame to frame: { size } (that many f32s, zeroed) or its first contents. A file's: each `var<storage>` it declares, its first contents in its type's layout or a mesh's slab |
+| `images` | `Record<string, string \| { src: string; sampler?: SamplerSpec }>` | up to 4 "render:NAME" (or "render:NAME:WxH") images it writes, which any shader's texture reads by that name (a file's may be { src, sampler }: the sampler it is drawn with) |
+| `defs` | `ShaderDefs` | shader defs, as a surface shader's |
+
+### `ConeProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `args` | `[number, number]` | – |
+| `radius` | `number` | – |
+| `height` | `number` | – |
+
+### `CrtSettings`
+
+How the tube draws the picture. Every value is optional; `crt={false}` on the Screen draws it flat and sharp.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `curvature` | `number` | barrel distortion, 0 (none) to about 0.3: a flat quad's stand-in for curved glass (a model's curved glass curves the picture already; 0 by default) |
+| `scanlines` | `number` | how dark the gaps between scanlines are, 0 to 1 (0.55); they fade where they'd be finer than the frame's pixels |
+| `mask` | `number` | how strongly the phosphor mask shows, 0 to 1 (0.35) |
+| `maskKind` | `"aperture" \| "shadow" \| "none"` | "aperture" (a Trinitron's vertical stripes, the default), "shadow" (offset triads) or "none" |
+| `maskSize` | `number` | mask triads per source pixel (1), or per line when `lines` is set |
+| `lines` | `number` | the tube's own scanlines, top to bottom (0, the default: one per row of the picture). Set it when the picture is sharper than the tube: a 1440x1044 desktop on a 1702 monitor shows its scanlines and mask at `lines: 270`, where its own 1044 rows are finer than the frame's pixels and fade out |
+| `glow` | `number` | the phosphor's halo around bright parts, 0 to 1 (0.35) |
+| `convergence` | `number` | how far apart the beam's red and blue land, in source pixels, growing toward the edges (0.35) |
+| `vignette` | `number` | the tube's edges and corners darkened, 0 to 1 (0.35) |
+| `flicker` | `number` | brightness flicker and a faint rolling hum bar, seeded by the frame, 0 to 1 (0.04) |
+| `brightness` | `number` | how strongly the picture glows (2.5 for a CRT, 1.4 flat): above 1 it blooms under a <Bloom> |
+| `glass` | `string` | the dark tube's own colour, hex (a grey-green) |
+| `reflect` | `number` | the glass's sheen toward grazing angles, 0 to 1 (0.5) |
+| `smudge` | `number` | fingerprints, a wiped arc and dust specks on the glass, 0 (clean, the default) to 1: seen mostly in the sheen and as a faint lift of the dark glass, barely over the picture; the pattern is fixed per screen (seeded by its name), so it holds still from frame to frame. 0.3 is a lived-in set seen on a second look |
+| `overscan` | `number` | the picture grown past the glass's edge, 0 to 0.3 (0) |
+
+### `CuboidProps`
+
+Bevy's Cuboid: half its size along each axis ([0.5, 0.5, 0.5], a 1 m cube, as Bevy's default).
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `half_size` | `[number, number, number]` | – |
+
+### `CylinderProps`
+
+`args`, or Bevy's Cylinder fields: radius and half_height (0.5 each by Bevy's default).
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `args` | `[number, number, number]` | – |
+| `radius` | `number` | – |
+| `half_height` | `number` | – |
+
+### `DecalProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `src` (required) | `string` | the picture pressed onto the surface: staticFile("label.png"); its clear parts show the surface through |
+| `name` | `string` | – |
+| `normalMap` | `string` | – |
+| `size` | `number \| [number, number]` | width by height in metres (a number: a square) |
+| `position` | `Vec3` | – |
+| `normal` | `Vec3` | which way the surface faces at the decal (out of it; [0, 1, 0], a floor or counter, by default): turns the decal so the picture lies on it, upright on a wall, its top toward -z on a floor. Instead of rotation |
+| `spin` | `number` | a turn about the normal (radians) |
+| `rotation` | `Vec3` | radians, the decal's +y out of the surface (rather than normal) |
+| `color` | `string` | a tint times the picture (keyed: a stain darkening) |
+| `opacity` | `number` | 0 to 1 (keyed: a label fading in) |
+| `roughness` | `number` | – |
+| `metalness` | `number` | – |
+| `unlit` | `boolean` | – |
+| `fade` | `number` | how far off its plane (metres) it still lies on a surface, fading to nothing there (0.05 by default). Anything nearer the plane than this takes it, a cabinet's side or a fridge's as well as the wall: keep it small |
+
+### `DepthCopyProps`
+
+The props of [`DepthCopy`](#depthcopy), tabled there.
+
+### `DepthOfFieldProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `aperture` | `number` | the lens's f-number: lower blurs more (1.4 dreamy, 2.8 cinematic, 8 nearly sharp); 2.8 by default |
+| `mode` | `"bokeh" \| "gaussian"` | "bokeh" (round, as a real lens; the default) or "gaussian" (soft, cheaper) |
+| `maxBlur` | `number` | the largest blur, in pixels of the frame (64 by default) |
+| `focal_distance` | `number` | Bevy's fields, as Bevy's DepthOfField component on a Camera3d (inside it), Bevy's defaults: the distance in focus (10; the camera's `focus`), the f-number (1), the largest blur in pixels (64), "Bokeh" or "Gaussian" |
+| `aperture_f_stops` | `number` | – |
+| `max_circle_of_confusion_diameter` | `number` | – |
+
+### `EntityProps`
+
+The props of [`Entity`](#entity), tabled there.
+
+### `EnvironmentMapLightProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `diffuse_map` (required) | `string` | the prefiltered diffuse (irradiance) cubemap, a.ktx2 file: staticFile("environment_maps/pisa_diffuse_rgb9e5_zstd.ktx2") |
+| `specular_map` (required) | `string` | the prefiltered specular (radiance) cubemap with its mips, a.ktx2 file |
+| `intensity` | `number` | cd/m² (Bevy's default 1) |
+| `rotation` | `[number, number, number, number]` | its turn, glam's Quat [x, y, z, w] (Bevy's identity): Quat.from_rotation_y(0.2 * t) turns it each frame |
+
+### `EnvironmentProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `src` (required) | `string` | an equirectangular panorama in the media folder: a Radiance.hdr (Poly Haven's), an OpenEXR.exr, or an 8-bit.png/.jpg. Change it between frames to cut from one place to another |
+| `intensity` | `number` | how strongly it lights the scene (1 by default: a sky about as bright as an AmbientLight of 2.5 overall); animate it, or set 0 to switch it off for a shot |
+| `rotation` | `number` | a turn about the vertical axis, in radians, for both the light and the sky: puts the sun where the shot wants it |
+| `background` | `boolean` | draw the panorama as the sky behind everything (off by default: light only) |
+| `backgroundIntensity` | `number` | the sky's brightness, when it should differ from the light's (`intensity` by default) |
+
+### `FireProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` | `string` | parts are matched by name across frames: name a fire that comes and goes |
+| `position` | `Vec3` | the flame's foot: where it stands on its fuel |
+| `scale` | `number \| Vec3` | its size in metres: one number for its height (it's half as wide), or [width, height, depth] (1 by default) |
+| `intensity` | `number` | how bright its core is, as a material's emissiveIntensity (6 by default): 3 a guttering fire, 10-20 a roaring one in the dark. Values over 1 bloom under a <Bloom> |
+| `color` | `string` | the flame's body (orange, "#ff7a1f", by default); its edges go deep red and its core yellow-white |
+| `seed` | `number` | which flame: fires with different seeds don't flicker together (0 by default) |
+| `speed` | `number` | how fast its tongues rise, 1 by default (a big fire's rise more slowly than a small one's on their own) |
+| `time` | `number` | seconds on its clock (by default the Sequence's time: frame / fps) |
+| `steps` | `number` | samples along each ray through it (48 by default): fewer is cheaper and blurrier |
+| `opacity` | `number` | how much of what's behind it its body hides (1 by default): raise it (3-6) in daylight, where a bright wall behind would wash out a flame that only adds light |
+| `light` | `number` | the light it casts on what's around it: a flickering PointLight's intensity (1 by default; 0 for none) |
+
+### `FisheyeProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `strength` | `number` | 0..1 (1 by default): 0 is the camera's own picture, pixel for pixel; ramp it in and out on beats |
+| `mode` | `"equidistant" \| "stereographic"` | "equidistant" (the default) or "stereographic" (gentler at the edges) |
+| `fov` | `number` | the vertical field of view, in degrees, the camera widens to at strength 1 (its own by default): 100-150 for a real fisheye; the picture is still remapped corner to corner, so nothing goes black |
+| `zoom` | `number` | above 1 crops in, below 1 shows past the picture's edge (see `edges`) |
+| `edges` | `"clamp" \| "black"` | what shows where the lens looks past the picture: its edge pixels ("clamp", the default) or "black" |
+| `animate` | `Animate3d` | declared animation of its numbers (strength, fov, k1, k2, zoom) |
+
+### `FogColor`
+
+a fog colour: "#rrggbb" (or #rrggbbaa), or Bevy's Srgba or LinearRgba (raea/color)
+
+```ts
+type FogColor = string | { red: number; green: number; blue: number; alpha: number }
+```
+
+### `FogFalloff`
+
+bevy_pbr's FogFalloff as it reflects; FogFalloff's constructors (raea/pbr) make one from a visibility distance
+
+Bevy: `bevy_pbr::FogFalloff`.
+
+```ts
+type FogFalloff = | { Linear: { start: number; end: number } } | { Exponential: { density: number } } | { ExponentialSquared: { density: number } } | { Atmospheric: { extinction: [number, number, number]; inscattering: [number, number, number] } }
+```
+
+### `FogProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `color` | `FogColor` | what far things fade into: match the background |
+| `near` | `number` | linear fog from `near` to `far` (in the Canvas3D 5 and 20 by default; on the camera Bevy's 0 and 100) |
+| `far` | `number` | – |
+| `density` | `number` | or exponential fog of this density (0.05-0.3), instead of near and far |
+| `falloff` | `FogFalloff` | on the camera: Bevy's FogFalloff, in place of near, far and density (Bevy's default Linear 0 to 100) |
+| `directional_light_color` | `FogColor` | on the camera: the sun's colour in the fog looking towards it, its alpha its strength (Bevy's default none) |
+| `directional_light_exponent` | `number` | on the camera: how tight the sun's glow is (Bevy's default 8) |
+
+### `FogVolumeProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` | `string` | parts are matched by name across frames: name a volume that comes and goes |
+| `position` | `Vec3` | the box's centre |
+| `rotation` | `Vec3` | radians |
+| `scale` | `number \| Vec3` | the box's size in metres: one number for a cube, or [x, y, z] (1 by default) |
+| `density` | `number` | how thick the air is (0.1 by default: dusty; 0.02 a faint haze; 0.5 smoke). Animate it to let dust settle, smoke roll in or a volume vanish (0) |
+| `color` | `string` | the fog's own colour, what light scattering out of it takes on (white by default; a dark red for blood in the air) |
+| `absorption` | `number` | how much light it swallows (0.3 by default): higher reads as soot or smoke |
+| `scattering` | `number` | how much light it throws back toward the eye (0.3 by default): higher reads as bright dust or mist |
+| `anisotropy` | `number` | how far forward it scatters, -1 to 1 (0.5 by default): near 1 the shafts glow when you look toward the light |
+| `falloff` | `number` | how fast it thins going up, per metre from the box's floor (0 by default: even throughout): 0.5 is a ground fog that's a third as thick two metres up. A box wide and tall with a falloff is height fog. Only <VolumetricFog mode="froxel"> draws it; the march draws the box evenly |
+| `density_texture` | `string` | Bevy's density_texture: a 3D.ktx2 image in the media folder whose values scale the density through the box (a cloud, a bunny of smoke); the box draws evenly without one. Only the march draws it |
+
+### `FramePassProps`
+
+A shader over the whole frame. Its source defines
+ fn shade(in: FullscreenVertexOutput) -> vec4<f32>
+(or its own
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `file` | `string` | a shader file compiled as written, staticFile("shaders/x.wesl"), in place of wesl: its `@group(0)` bindings its own, as custom_post_processing's pipeline binds them: each texture_2d<f32> the frame (the one `frame` names) or an image of `textures`, each sampler Bevy's default (nearest) or `samplers`' one, each var<uniform> its value in `uniforms` (which may change frame by frame) |
+| `frame` | `string` | a file's texture that reads the frame as drawn so far |
+| `entry` | `string` | a file's fragment entry point ("fragment" by default) |
+| `samplers` | `Record<string, SamplerSpec>` | a file's samplers by name |
+| `wesl` | `string` | the source in WESL (a superset of WGSL) |
+| `wgsl` | `string` | the same in plain WGSL |
+| `uniforms` | `Record<string, number \| number[] \| string \| StorageValue>` | up to 16, as a surface shader's (a file's: each var<uniform>, a struct's { field: value }) |
+| `textures` | `Record<string, string \| Record<string, unknown>>` | up to 4, as a surface shader's, each read with its own sampler |
+| `defs` | `ShaderDefs` | shader defs, as a surface shader's |
+| `at` | `"before-tonemap" \| "after-tonemap"` | "after-tonemap" (display colours; the default) or "before-tonemap" (the HDR frame, after bloom) |
+| `prepass` | `boolean \| { depth?: boolean; normal?: boolean }` | the camera's depth and normal prepasses, for depth(uv) and normal(uv) (turns its multisampling off) |
+
+### `GBufferPassProps`
+
+The props of [`GBufferPass`](#gbufferpass), tabled there.
+
+### `GizmoColor`
+
+a gizmo point's colour: "#rrggbb", linear [r, g, b, a], or Bevy's LinearRgba / Srgba (bevy3d's colours)
+
+```ts
+type GizmoColor = string | [number, number, number, number] | { red: number; green: number; blue: number; alpha?: number }
+```
+
+### `GizmoProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `lines` | `[Vec3, Vec3][]` | segments, each [from, to] |
+| `strip` | `(Vec3 \| null)[]` | one line through these points (null breaks it) |
+| `color` | `GizmoColor \| GizmoColor[]` | one colour for every point, or one per point of `lines` (two per segment) then `strip`: "#rrggbb", Bevy's LinearRgba (above 1 for HDR, as bevy_gizmos takes it) or Srgba, or linear [r, g, b, a] |
+| `width` | `number` | line width in pixels (Bevy's default 2) |
+| `depthBias` | `number` | -1 always in front of geometry, 0 depth-tested as it is (Bevy's GizmoLineConfig and depth_bias) |
+| `position` | `Vec3` | – |
+| `rotation` | `Vec3` | – |
+| `scale` | `Vec3 \| number` | – |
+| `name` | `string` | – |
+
+### `Glitch`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `explode` | `number` | triangles thrown out from the centre and turned (0 whole, 1 about the part's size away) |
+| `scramble` | `number` | 0..1: that share of the vertices pulled to other vertices of the part (spikes across it) |
+| `jitter` | `number` | metres of per-triangle noise |
+| `snap` | `number` | metres: the vertices snapped to a grid that size |
+| `smear` | `Vec3` | metres, world: the trailing side dragged back along it (motion smear) |
+| `seed` | `number` | which randomness (change it on a beat for a new pattern) |
+
+### `GlyphInfo`
+
+What a glyph is, for a <RichText>'s `glyph` function.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `index` (required) | `number` | its place among the drawn glyphs (spaces aren't glyphs), from 0 |
+| `count` (required) | `number` | how many glyphs the block has |
+| `char` (required) | `string` | – |
+| `word` (required) | `number` | its word's place among the words, from 0, and how many there are |
+| `words` (required) | `number` | – |
+| `inWord` (required) | `number` | its place in its word, and the word's glyph count |
+| `wordLength` (required) | `number` | – |
+| `line` (required) | `number` | its line (by the newlines in the text), from 0 |
+| `span` (required) | `number` | its run: the <Span> it's in (0 for text outside any, counted in order) |
+
+### `GlyphStyle`
+
+A glyph's motion this frame, about its own centre, in the block's space: added to (position, rotation),
+multiplied into (scale, opacity) or replacing (color, visible) what the block's moves give it.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `position` | `Vec3` | metres, from its place in the block |
+| `rotation` | `Vec3` | radians, XYZ |
+| `scale` | `number \| Vec3` | – |
+| `color` | `string` | – |
+| `opacity` | `number` | – |
+| `visible` | `boolean` | – |
+
+### `GooBake`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `file` (required) | `string` | – |
+| `stats` (required) | `{ objects?: { name: string; hideFrame: number }[]; [k: string]: unknown }` | – |
+
+### `GooObject`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` (required) | `string` | – |
+| `src` | `string` | a glTF's nodes (world space as they stand in it), moved by `transform` (column-major 4x4) if given; or, with no src, `cup` and `level`: a liquid filling one of the goo's cups to `level` metres above its foot |
+| `nodes` | `string[]` | – |
+| `cup` | `number` | – |
+| `level` | `number` | – |
+| `transform` | `number[]` | – |
+| `liquid` | `"water" \| "coffee" \| "tea" \| "milk" \| "juice" \| "oil" \| "syrup" \| "honey"` | sph: what it is ("water" by default: coffee, tea, milk, juice, oil, syrup, honey set its colour, density and viscosity), and where it comes from if not a cup or a glTF (filled): a box of it, or an emitter pouring a round stream from `at` along `dir` (down) at `speed` m/s, `radius` m (6 mm) across, from `start` to `end` seconds |
+| `block` | `{ min: Vec3; max: Vec3 }` | – |
+| `emitter` | `{ at: Vec3; dir?: Vec3; radius?: number; speed?: number; start?: number; end?: number }` | – |
+| `start` (required) | `number` | seconds from the goo's start when it begins to soften, and how long until it runs (mpm) |
+| `melt` | `number` | – |
+| `stiffness` | `number` | of the solid (3e4) and the fluid it becomes (4) |
+| `viscosity` | `number` | – |
+| `density` | `number` | – |
+| `cohesion` | `number` | the share of its pressure it keeps under tension (0.6): goo holds together in strands, a liquid (0.02) barely |
+| `residual` | `number` | the share of its shear stiffness a fluid keeps (0.12) and the strain it must pass to flow (0.005): 0 and 0 for a liquid |
+| `yield` | `number` | – |
+| `fill` | `"solid" \| "shell"` | "solid" fills its volume; "shell" a skin `thickness` thick (plates, petals) |
+| `thickness` | `number` | – |
+| `color` | `string` | its goo's colour (else its texture's) |
+
+### `GooProps`
+
+The props of [`Goo`](#goo), tabled there.
+
+### `GradeProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `temperature` | `number` | warmer (+) or cooler (-): a shift of the CIE x chromaticity, about -0.3 to 0.3 |
+| `tint` | `number` | magenta (+) or green (-) |
+| `saturation` | `number` | the whole frame's saturation after tone mapping (1 keeps it) |
+| `shadows` | `GradeSection` | – |
+| `midtones` | `GradeSection` | – |
+| `highlights` | `GradeSection` | – |
+| `vignette` | `number \| { intensity?: number; radius?: number; smoothness?: number; color?: string }` | the corners darkened: 0 none, 1 black; or {intensity, radius (0.75), smoothness (5), color} |
+| `aberration` | `number` | a lens's colour fringes at edges, as a fraction of the frame (0.005 subtle, 0.02 strong) |
+| `skip` | `string[]` | composition passes (a part's `pass`) the grade leaves as drawn: no fringes or vignette on them, and on an untonemapped camera (a paint Look's) no colour grading either |
+| `passes` | `Record<string, number>` | each named pass's share of the grade, 0 (as skip) to 1 |
+
+### `GradeSection`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `saturation` | `number` | 1 keeps the colour; 0 grey; above 1 richer |
+| `contrast` | `number` | 1 keeps it; above 1 harder |
+| `gamma` | `number` | 1 keeps it; above 1 darker mids |
+| `gain` | `number` | a multiplier: 1 keeps it |
+| `lift` | `number` | added: 0 keeps it, positive lifts the blacks |
+
+### `GrassLod`
+
+One step of detail: tiles nearer than `to` metres draw `keep` of their clumps (0 to 1), each with its first
+`blades` blades in `segments` segments, `widen` times as wide.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `to` (required) | `number` | – |
+| `keep` (required) | `number` | – |
+| `blades` (required) | `number` | – |
+| `segments` (required) | `number` | – |
+| `widen` (required) | `number` | – |
+
+### `GrassProps`
+
+The props of [`Grass`](#grass), tabled there.
+
+### `Hit`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` (required) | `string` | – |
+| `distance` (required) | `number` | metres from the camera (from its near plane's point, for an orthographic one) along the ray |
+| `point` (required) | `Vec3` | where the ray first meets it, in world space |
+
+### `ImagePlaneProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `src` (required) | `string` | a picture in the media folder: staticFile("poster.png") |
+| `name` | `string` | – |
+| `width` | `number` | width in scene units (1 by default); height follows the picture unless given |
+| `height` | `number` | – |
+| `position` | `Vec3` | – |
+| `rotation` | `Vec3` | radians |
+| `scale` | `number \| Vec3` | – |
+| `quaternion` | `[number, number, number, number]` | a turn as a quaternion [x, y, z, w], instead of `rotation` (a card turned to face a point) |
+| `shadow` | `boolean` | false: the card casts no shadow (a cursor or a UI floating in the scene); true by default |
+| `cutout` | `boolean` | the picture cut out at half alpha instead of blended: its clear parts are no surface at all (no fog on them, no sorting) and its shadow is the picture's shape, not the card's. For hard-edged pictures: a baked cloud, a sprite |
+| `grid` | `[number, number]` | a sprite sheet: the picture is `[columns, rows]` frames of equal size, read left to right, top to bottom, and the card shows one cell (its height follows one cell's shape). A texture atlas of a regular grid |
+| `frame` | `number` | with `grid`: which cell shows (0 is the top left; whole numbers, wrapping); animate it to play the sheet, as Bevy's TextureAtlas index does: frame={Math.floor(f / 3)} |
+
+### `Impulse`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `t` (required) | `number` | seconds from the simulation's start |
+| `impulse` | `Vec3` | N·s, world |
+| `at` | `Vec3` | where it's applied (world, metres): off the centre it spins the body too |
+| `torque` | `Vec3` | – |
+
+### `Instance`
+
+One copy's placement in an <Instances>, in the Instances' own space (its position, rotation and scale move every
+copy together). Rotation in radians, XYZ order, as everywhere.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `position` (required) | `Vec3` | – |
+| `rotation` | `Vec3` | – |
+| `scale` | `number \| Vec3` | – |
+
+### `InstancesProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `src` | `string` | a glTF file drawn at every placement: staticFile("models/house.glb"). Without it, a geometry child (or `shape`) and a material child draw a mesh at every placement |
+| `at` (required) | `Instance[]` | where each copy stands. Fixed for the shot: the first frame's list is drawn on every frame (move, turn, scale, hide or recolour the whole set by the Instances' own props) |
+| `name` | `string` | – |
+| `position` | `Vec3` | – |
+| `rotation` | `Vec3` | radians |
+| `scale` | `number \| Vec3` | – |
+| `scene` | `number` | of a glTF: which of its scenes (0 by default) |
+| `shape` | `string \| Solid` | a Manifold solid or its expression for the mesh form; wins over the geometry child |
+| `shadow` | `boolean` | false: the copies cast no shadow (true by default). Grass and flowers by the thousand usually want false |
+| `receiveShadow` | `boolean` | false: no shadow falls on the copies |
+| `pass` | `string` | – |
+| `children` | `ReactNode` | the mesh form: a geometry and a material (MeshStandardMaterial, MeshPhysicalMaterial or MeshBasicMaterial). The glTF form: MeshStandardMaterial children re-covering its materials, as on a Model |
+
+### `Layout`
+
+```ts
+type Layout = Record<string, Placed> & { readonly found: PlaceFinding[]; readonly errors: number }
+```
+
+### `LensCommon`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `edges` | `"clamp" \| "black"` | what shows where the lens looks past the picture: its edge pixels ("clamp", the default) or "black" |
+| `animate` | `Animate3d` | declared animation of its numbers (strength, fov, k1, k2, zoom) |
+
+### `LensDistortionProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `k1` | `number` | Brown-Conrady: r' = r (1 + k1 r^2 + k2 r^4), r a share of the half-diagonal. Above 0 barrel, below 0 pincushion |
+| `k2` | `number` | – |
+| `zoom` | `number` | by default just enough for a barrel's corners to stay inside the picture (1 for pincushion) |
+| `edges` | `"clamp" \| "black"` | what shows where the lens looks past the picture: its edge pixels ("clamp", the default) or "black" |
+| `animate` | `Animate3d` | declared animation of its numbers (strength, fov, k1, k2, zoom) |
+
+### `LoftOutline`
+
+```ts
+type LoftOutline = string | [number, number][]
+```
+
+### `LookPass`
+
+One composition pass's own paint (<Look passes>): the frame's rag, grain and palette, and its surfaces' bands, torn
+shadow edge, strokes, saturation and wash; what it leaves out is the Look's.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `rag` | `number` | – |
+| `grain` | `number` | – |
+| `palette` | `boolean` | false: its pixels aren't snapped to the palette |
+| `bands` | `number` | – |
+| `edge` | `number` | – |
+| `stroke` | `number` | – |
+| `saturate` | `number` | – |
+| `wash` | `number` | – |
+
+### `LookProps`
+
+### `MatchmoveCamera`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `t` (required) | `number` | – |
+| `position` (required) | `Vec3` | – |
+| `quaternion` (required) | `[number, number, number, number]` | camera to world, [x, y, z, w]; the camera looks down its -Z with +Y up |
+| `solved` (required) | `boolean` | false: COLMAP didn't register this frame and its pose was interpolated |
+
+### `MatchmoveProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `src` (required) | `string` | the footage: staticFile("clip.mp4") |
+| `from` | `number` | where in the clip the shot starts, and how long it runs (seconds; 0 = to the end) |
+| `seconds` | `number` | – |
+| `subject` | `[number, number, number, number]` | the subject to keep in front of the 3D and out of the solve: a box around it on the first frame, [x, y, w, h] in 0..1 of the frame (EdgeTAM tracks it from there) |
+| `height` | `number` | the camera's height over the ground in metres (1.6 by default: handheld) |
+| `fov` | `number` | the vertical field of view in degrees, for a shot without parallax (a tripod, a pan); a solve with structure finds its own |
+| `smooth` | `number` | frames of smoothing on the solved path (1 by default; 0 for none) |
+| `solve` | `MatchmoveSolve` | a solve to draw from instead of solving (`raea track CLIP -o solve.json`, imported) |
+| `crop` | `number \| [number, number]` | when the frame's shape isn't the footage's (9:16 from 16:9), where the frame sits across it: 0 its left edge, 1 its right, 0.5 the middle (the default); [x, y] for both axes. It may change from frame to frame |
+| `zoom` | `number` | 1 or more: a tighter window on the footage (a punch-in), still locked |
+| `cutout` | `boolean` | draw the subject's cut-out over the 3D (true by default when there's a subject) |
+| `toneMapping` | `"none" \| "tony" \| "aces" \| "agx" \| "neutral" \| "reinhard"` | the scene's tone mapping: "none" by default, which leaves the footage's colours as they are |
+| `children` | `ReactNode` | the 3D that stands in the shot, in the solved world |
+
+### `MatchmoveSolve`
+
+What `raea track` writes and <Matchmove> draws from.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `mode` (required) | `"sfm" \| "rotation" \| "static"` | – |
+| `width` (required) | `number` | the footage's size in pixels, and its frame rate |
+| `height` (required) | `number` | – |
+| `fps` (required) | `number` | – |
+| `from` (required) | `number` | – |
+| `seconds` (required) | `number` | – |
+| `frames` (required) | `number` | – |
+| `fov` (required) | `number` | vertical field of view, degrees; focal length in pixels; the lens's radial distortion |
+| `focal` (required) | `number` | – |
+| `k1` (required) | `number` | – |
+| `registered` (required) | `number` | – |
+| `error` (required) | `number \| null` | mean reprojection error in pixels (null without structure) |
+| `camera_height` (required) | `number` | – |
+| `cameras` (required) | `MatchmoveCamera[]` | – |
+| `points` (required) | `Vec3[]` | the sparse points, in the solved world |
+| `ground` (required) | `{ y: number; normal: Vec3 }` | – |
+| `cut` (required) | `string \| null` | the subject's cut-outs, a path with %04d for the frame (1-based), or null |
+| `notes` (required) | `string[]` | – |
+
+### `MatchmoveState`
+
+Each frame's state under a <Matchmove>, for the 3D inside it.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `solve` (required) | `MatchmoveSolve` | – |
+| `index` (required) | `number` | the solve's frame shown now (0-based), and the clip's time |
+| `time` (required) | `number` | – |
+| `camera` (required) | `MatchmoveCamera` | – |
+| `project` (required) | `(p: Vec3) => [number, number, number]` | where a point of the solved world lands in the composition, in pixels ([x, y], and its distance in front of the camera; behind it when that's 0 or less) |
+
+### `MeshAttribute`
+
+One attribute's values on a mesh: one a vertex, each a number or a list of the format's size.
+
+```ts
+type MeshAttribute = [MeshVertexAttribute, (number | number[])[]]
+```
+
+### `MeshPassProps`
+
+The props of [`MeshPass`](#meshpass), tabled there.
+
+### `MeshSequenceProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` | `string` | – |
+| `src` (required) | `string` | a.rseq (tools/goo writes them; raea_render::meshseq) |
+| `frame` (required) | `number` | which of its frames (clamped) |
+| `position` | `Vec3` | – |
+| `rotation` | `Vec3` | – |
+| `scale` | `number` | – |
+| `color` | `string` | multiplies the vertex colours |
+| `roughness` | `number` | – |
+| `metalness` | `number` | – |
+| `clearcoat` | `number` | – |
+| `clearcoatRoughness` | `number` | – |
+| `reflectance` | `number` | 0..1 specular strength at normal incidence (0.5: 4%, a dielectric's) |
+| `subsurface` | `number` | 0..1 light let through (diffuse transmission): a jelly's glow |
+| `thickness` | `number` | – |
+| `transmission` | `number` | 0..1 light let straight through and bent (a clear liquid: water, tea, juice), with its index of refraction (1.33 water) and, for a tinted one, the colour it takes after `attenuationDistance` metres through it. Screen space: it refracts what's on screen behind it, and one clear layer doesn't show another through it |
+| `ior` | `number` | – |
+| `attenuationColor` | `string` | – |
+| `attenuationDistance` | `number` | – |
+| `opacity` | `number` | – |
+| `map` | `string` | a picture over its texture coordinates |
+| `doubleSided` | `boolean` | – |
+
+### `MeshShaderPassProps`
+
+The props of [`MeshShaderPass`](#meshshaderpass), tabled there.
+
+### `MeshSlab`
+
+A mesh's vertex or index buffer in Bevy's MeshAllocator, bound as a file's storage buffer (array<f32 | u32 | i32>)
+for its compute to write (shader_advanced/compute_mesh): the mesh the part named `mesh` holds, a <BufferMesh> with
+indices and normals (position, normal and uv interleaved, 8 floats a vertex).
+
+Bevy: `bevy_render::mesh::allocator::MeshBufferSlice`.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `mesh` (required) | `string` | – |
+| `slab` (required) | `"vertices" \| "indices"` | – |
+
+### `ModelProps`
+
+The props of [`Model`](#model), tabled there.
+
+### `ModelScreens`
+
+A Model's `screens` prop: each material's screen, as a <Screen> element (its props and children) or a bare
+composition element (a <Screen> of the defaults around it).
+
+```ts
+type ModelScreens = Record<string, ReactElement>
+```
+
+### `MotionBlurProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `shutterAngle` | `number` | the fraction of a frame the shutter is open (0.5 by default, a 180-degree shutter); above 1 smears further |
+| `samples` | `number` | samples each way per pixel (4 by default) |
+| `animate` | `Animate3d` | – |
+
+### `OutlineProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `color` | `string` | the line's colour, a hex colour (black by default) |
+| `depth` | `number` | a silhouette: how far behind the nearer surface (a fraction of its distance) a neighbour must be (0.04) |
+| `normal` | `number` | a crease: how far the surface must turn between neighbours, 1 - cos of the angle (0.3, about 45 degrees; 0 for none) |
+| `width` | `number` | the line's width in pixels (1 by default; a cartoon's line is about 6) |
+| `far` | `number` | how far from the camera lines reach, in metres: they fade out over its last third, so a far field meeting the sky draws no line along the horizon (no limit by default) |
+| `skip` | `string[]` | composition passes (a part's `pass`) drawn with no line: none on their pixels and no crease against them (a scene object's silhouette in front of one still draws, on the object) |
+
+### `PartInfo`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `file` (required) | `string` | – |
+| `centre` (required) | `Vec3` | – |
+| `lo` (required) | `Vec3` | – |
+| `hi` (required) | `Vec3` | – |
+| `tris` (required) | `number` | – |
+
+### `PartMaterial`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `missing` | `boolean` | the magenta-and-black checker of a texture that didn't load |
+| `color` | `string` | – |
+| `emissive` | `string` | – |
+| `opacity` | `number` | – |
+| `roughness` | `number` | – |
+| `unlit` | `boolean` | – |
+
+### `PartProps`
+
+The props of [`Part`](#part), tabled there.
+
+### `PhaseAttribute`
+
+A vertex attribute: Bevy's VertexFormat by name, its byte offset in a vertex and its shader
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `format` (required) | `"Float32" \| "Float32x2" \| "Float32x3" \| "Float32x4" \| "Uint32" \| "Uint32x2" \| "Uint32x3…` | – |
+| `offset` (required) | `number` | – |
+| `location` (required) | `number` | – |
+
+### `PhaseItemProps`
+
+The props of [`PhaseItem`](#phaseitem), tabled there.
+
+### `PhysicsProps`
+
+The props of [`Physics`](#physics), tabled there.
+
+### `Pickable`
+
+Something the pointer can hit: an axis-aligned box or a sphere, in world space.
+
+```ts
+type Pickable = { name: string; box: { min: Vec3; max: Vec3 } } | { name: string; sphere: { center: Vec3; radius: number } }
+```
+
+### `PickCamera`
+
+The camera as a scene sets it: a PerspectiveCamera's props (fov in degrees, vertical) or an OrthographicCamera's.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `position` | `Vec3` | – |
+| `lookAt` | `Vec3` | – |
+| `fov` | `number` | vertical field of view in degrees (50 by default); ignored when `height` is set |
+| `height` | `number` | an orthographic camera's view height in metres |
+| `up` | `Vec3` | – |
+
+### `Place2dProps`
+
+Where a 2D part is: composition px from the frame's top left, y down (as the page's), its centre there; and its
+pointer and drag handlers, called as a 3D part's are (2D parts are picked first, the top one by z).
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` | `string` | – |
+| `x` | `number` | – |
+| `y` | `number` | – |
+| `rotation` | `number` | radians, clockwise (as CSS rotate) |
+| `quat` | `Quat` | Bevy's rotation as it is, a quaternion [x, y, z, w] in Bevy's axes (y up, z toward the viewer), in place of `rotation`: a turn out of the frame's plane too, as a Sprite's Transform takes it (camera/2d_on_ui) |
+| `scale` | `number \| [number, number]` | 1 by default; [x, y] to stretch |
+| `z` | `number` | draw order among the 2D parts: higher draws over lower (0 by default) |
+| `opacity` | `number` | 0 to 1 (1 by default) |
+| `onClick` | `(e: Event3d) => void` | – |
+| `onPointerDown` | `(e: Event3d) => void` | – |
+| `onPointerUp` | `(e: Event3d) => void` | – |
+| `onPointerOver` | `(e: Event3d) => void` | – |
+| `onPointerOut` | `(e: Event3d) => void` | – |
+| `onPointerEnter` | `(e: Event3d) => void` | – |
+| `onPointerLeave` | `(e: Event3d) => void` | – |
+| `onPointerMove` | `(e: Event3d) => void` | – |
+| `onWheel` | `(e: Event3d) => void` | – |
+| `onDragStart` | `(e: Event3d) => void` | – |
+| `onDrag` | `(e: Event3d) => void` | – |
+| `onDragEnd` | `(e: Event3d) => void` | – |
+| `onDragEnter` | `(e: Event3d) => void` | – |
+| `onDragOver` | `(e: Event3d) => void` | – |
+| `onDragLeave` | `(e: Event3d) => void` | – |
+| `onDrop` | `(e: Event3d) => void` | – |
+
+### `Placed`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `base` (required) | `V3` | – |
+| `center` (required) | `V3` | – |
+| `yaw` (required) | `number` | – |
+| `size` (required) | `V3` | – |
+
+### `PlaceFinding`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `part` (required) | `string` | – |
+| `check` (required) | `string` | – |
+| `level` (required) | `string` | – |
+| `says` (required) | `string` | – |
+
+### `PlaceObject`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `size` (required) | `V3` | – |
+| `at` | `V3` | a start (or, with fixed, the place) for its bottom centre |
+| `yaw` | `number` | degrees |
+| `fixed` | `boolean` | – |
+
+### `PlaceRule`
+
+```ts
+type PlaceRule = | { on: string; of: string } | { against: string; wall: Side } | { beside: string; of: string; side: Side; gap?: number } | { near: string; of: string; dist?: number } | { apart: string; of: string; min?: number } | { facing: string; of: string } | { align: string; of: string; axis: "x" | "z" } |…
+```
+
+### `PlanBox`
+
+A box on the plan (x, z, metres): the room SDK's Footprint, or any { min, max }.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `min` (required) | `[number, number]` | – |
+| `max` (required) | `[number, number]` | – |
+
+### `Plane3dProps`
+
+Bevy's Plane3d: a flat rectangle facing `normal` (Bevy's default +Y, a floor), `half_size` its half extent along
+its two axes ([0.5, 0.5]), laid out as Bevy's PlaneMeshBuilder does: facing +Z it is a Plane of args
+[2 x half_size]. The normal is along an axis; a tilted plane is a rotated Mesh3d.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `normal` | `Vec3` | – |
+| `half_size` | `[number, number]` | – |
+
+### `PlateProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `src` (required) | `string` | a video in the media folder: staticFile("clip.mp4") |
+| `name` | `string` | – |
+| `time` | `number` | the clip's time on this frame, in seconds (by default the Sequence's: frame / fps) |
+| `k1` | `number` | the lens's radial distortion (SIMPLE_RADIAL's k1, from a solve): the plate is drawn undistorted, so the footage's straight lines are straight where the 3D's are |
+
+### `Polygons`
+
+A 2D outline: contours of [x, y] points (counter-clockwise for solid, clockwise for a hole).
+
+```ts
+type Polygons = [number, number][][]
+```
+
+### `RichTextProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` | `string` | what it's called across frames, and its glyphs' names over world.* (`${name}:${index}`) |
+| `pass` | `string` | the composition pass it draws in ("scene" by default): a frame-wide effect told to skip a pass (<Look skip>, <Outline skip>, <Bloom skip>, <Grade skip>) leaves its pixels as drawn, and <Look passes> gives one its own paint; a piece names at most three passes besides "scene"; keyed per frame |
+| `position` | `Vec3` | – |
+| `rotation` | `Vec3` | – |
+| `scale` | `number \| Vec3` | – |
+| `size` | `number` | the em in metres (0.5 by default) |
+| `font` | `string` | – |
+| `weight` | `number` | – |
+| `italic` | `boolean` | – |
+| `color` | `string` | each glyph's colour unless its <Span> gives one |
+| `align` | `"left" \| "center" \| "right"` | where the origin is: the left edge, the middle (default) or the right edge of the lines; the block's middle vertically |
+| `lineHeight` | `number` | times the em (1.2 by default) |
+| `maxWidth` | `number` | wrapped at this width in metres (no wrapping by default) |
+| `roughness` | `number` | – |
+| `metalness` | `number` | – |
+| `emissive` | `string` | – |
+| `emissiveIntensity` | `number` | – |
+| `unlit` | `boolean` | – |
+| `castShadow` | `boolean` | letter-shaped shadows (true by default) |
+| `receiveShadow` | `boolean` | – |
+| `layers` | `number[]` | – |
+| `enter` | `MoveLike` | each glyph's (or word's) entrance: a move's name, a move or several (rise, pop, slam, slide, fade... the 2D ones, their px read at 100 an em, their degrees as degrees), `each` frames apart from `at` |
+| `each` | `number` | frames between one glyph's (or word's) entrance and the next (2 by default) |
+| `by` | `"letter" \| "word"` | the entrance and exit staggered by letter (default) or by word |
+| `at` | `number` | – |
+| `exit` | `MoveLike` | – |
+| `exitAt` | `number` | – |
+| `exitEach` | `number` | frames between exits (0: together) |
+| `reveal` | `number` | how many glyphs are shown, a typewriter's count: the next one fades in over its fraction |
+| `glyph` | `(g: GlyphInfo) => GlyphStyle` | each glyph's own motion this frame, from anything the frame gives (useCurrentFrame, spring, interpolate) |
+| `children` | `ReactNode` | – |
+
+### `SamplerSpec`
+
+How a texture is read (Bevy's ImageSamplerDescriptor; raea-sys-sampler). Each part is optional, over
+the texture's own default. A texture file loaded with two samplers is drawn with the last (the load says so).
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `filter` | `"nearest" \| "linear"` | "nearest": hard pixels; "linear": smoothed (a material map's default) |
+| `mipmap` | `"nearest" \| "linear" \| "none"` | between mip levels; "none" reads the full-size texture only |
+| `wrap` | `SamplerWrap \| [SamplerWrap, SamplerWrap]` | past the edge: one mode, or [u, v] |
+| `anisotropy` | `number` | 1 to 16 (a map's default is 16); needs every filter linear, so nearest turns it off |
+
+### `SamplerWrap`
+
+```ts
+type SamplerWrap = "repeat" | "clamp" | "mirror"
+```
+
+### `ScatterOptions`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `area` (required) | `PlanBox` | where the points fall: a box on the plan (x, z) |
+| `count` (required) | `number` | how many (fewer when the area fills up: spacing and avoid leave no room) |
+| `spacing` | `number` | the least distance between two points, metres (0: none) |
+| `avoid` | `PlanBox[]` | boxes on the plan to keep clear of, grown by `margin` |
+| `margin` | `number` | how far to stay off each avoided box (spacing / 2 by default) |
+| `clearOf` | `Instance[]` | points kept off already-placed ones too: a second scatter (flowers) clear of the first (stones) by `spacing` |
+| `seed` | `number` | 1 by default; the same seed gives the same points, every frame, render and play |
+| `yaw` | `boolean \| number \| [number, number]` | each point's turn about y (radians): true (the default) any, false none, a number that one, [lo, hi] between |
+| `tilt` | `number` | a lean off upright, radians: each point tipped by up to this much in a random direction (0 by default) |
+| `scale` | `number \| [number, number]` | a scale, or [lo, hi] between (uniform) |
+| `y` | `number \| ((x: number, z: number) => number)` | the ground's height: a number (0), or the terrain's height at (x, z) |
+| `density` | `(x: number, z: number) => number` | how likely a point is kept at (x, z), 0 to 1: a density map (a path worn bare, a patch thicker by the chair) |
+
+### `SceneProps`
+
+The props of [`Scene`](#scene), tabled there.
+
+### `ScreenProps`
+
+The props of [`Screen`](#screen), tabled there.
+
+### `ScreenSource`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `resolution` | `[number, number]` | the picture's size in pixels, [width, height] ([320, 200]); the nested composition lays out at it |
+| `crt` | `boolean \| CrtSettings` | draw it as a CRT (true, the default; or its settings) or flat (false: an LCD) |
+| `power` | `number` | the tube's power, 0 (off) to 1 (on, the default): animate it to switch the set on, a line opening to the picture |
+| `from` | `number` | the frame of this Sequence the nested composition's frame 0 falls on (0) |
+| `background` | `string` | behind the picture ("#000000"). A see-through one ("#ffffff00", "transparent", rgba(..., 0.5)) makes the screen see-through where its page paints nothing, so what's behind it in the scene shows (a flat screen: a layer of a page pulled apart in 3D); an opaque one keeps the screen opaque, which writes depth for DepthOfField |
+| `brightness` | `number` | a flat screen's (`crt={false}`) light: 1, the default, draws its page at the page's own colours, unlit (scene lights don't touch it); above 1 it glows, and blooms under a <Bloom>. A tone curve on the camera bends it like the rest of the frame: give the scene <ToneMapping mode="none" /> to keep the page's colours exact. A CRT's is `crt.brightness` |
+| `src` | `string` | a video to show instead of children: staticFile("clip.mp4"), filling the picture |
+| `app` | `string` | an app to show instead of children: a module's path from the composition's folder ("chat.tsx"), its default export a React component given {width, height}. It runs on real react-dom in a document of its own, so npm's React libraries work on it (assistant-ui, Radix; installed with `raea add`). In play the pointer reaches it through the 3D, where it lands on the picture, and a press on it gives it the keys (the game doesn't get them) until a press elsewhere or Escape; in a render it runs on the frame's clock, so the render repeats |
+| `children` | `ReactNode` | the nested composition or game |
+
+### `Section`
+
+A cross-section of a solid at a height: its area, how many contours, and the contours themselves.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `area` (required) | `number` | – |
+| `contours` (required) | `number` | – |
+| `polygons` (required) | `[number, number][][]` | – |
+
+### `ShaderInstancesProps`
+
+The props of [`ShaderInstances`](#shaderinstances), tabled there.
+
+### `ShaderMeshProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `shape` (required) | `string \| ({ primitive: string } & Record<string, unknown>)` | its geometry: a Manifold shape ("box(1, 1, 1)") or one of Bevy's primitives ({ primitive: "Sphere", radius: 1 }) |
+| `wesl` | `string` | WESL (Bevy 0.20's standard; give this or `wgsl`): a `fn shade(in: VertexOutput) -> vec4<f32>` (in.uv, in.world_position, in.world_normal), or a module with its own |
+| `wgsl` | `string` | the same in plain WGSL (compiled as WESL, its superset: Bevy 0.20 has no naga_oil, so no `#import`) |
+| `uniforms` | `Record<string, number \| number[] \| string>` | up to 16: a number (f32), [x, y], [x, y, z], [x, y, z, w] or "#rrggbb" (a linear vec4) |
+| `textures` | `Record<string, string \| Record<string, unknown>>` | up to 4: an asset path, a picture made in code ({ width, height, pixels }) or "render:NAME"; and one array, { layers: [picture,...] } or { src, layers: N }, read as texture_2d_array<f32> tex_NAME by layer |
+| `defs` | `ShaderDefs` | shader defs: each NAME a WESL condition for `@if(NAME)`, and a whole number also `constants::NAME` |
+| `alpha` | `"opaque" \| "blend" \| "add" \| "premultiplied"` | – |
+| `doubleSided` | `boolean` | – |
+| `name` | `string` | – |
+| `position` | `Vec3` | – |
+| `rotation` | `Vec3` | – |
+| `scale` | `Vec3 \| number` | – |
+
+### `ShadowsProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `mapSize` | `1024 \| 2048 \| 4096 \| 8192` | each shadow map's size in texels (4096 by default; 8192 is sharper still, at four times the memory and about 2-3 ms a frame at 1080p) |
+| `distance` | `number` | how far from the camera the sun's shadows reach, in metres (150 by default): the shorter, the sharper they are |
+| `firstCascade` | `number` | where the sun's first, sharpest cascade ends, in metres (8 by default): the distance of the nearest subject |
+| `cascades` | `number` | how many cascades split the distance (4 by default, 1-4) |
+| `overlap` | `number` | how much neighbouring cascades overlap, 0-1 (0.3 by default) so the seam between them doesn't show |
+| `bias` | `number` | depth bias: raise it if surfaces facing the light show stripes of their own shadow (acne); too high and shadows detach from what casts them (0.02 by default for the sun, as Bevy's) |
+| `normalBias` | `number` | normal bias, in texels: the same trade-off along the surface's normal (1.8 by default for the sun) |
+| `filter` | `"gaussian" \| "hardware"` | "gaussian" (the default: soft, smooth edges) or "hardware" (2x2, crisper and cheaper) |
+
+### `Shape`
+
+```ts
+type Shape = "hull" | "box" | "mesh" | { box: Vec3 } | { sphere: number } | { capsule: [number, number] }
+```
+
+### `Shape2DProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `shape` | `"rect" \| "circle" \| "ellipse" \| "triangle" \| "polygon"` | a rect by default; a polygon has `sides` (5 by default) |
+| `size` | `[number, number]` | [width, height] in px ([100, 100] by default); a circle's and a polygon's diameter is the width |
+| `sides` | `number` | – |
+| `color` | `string` | a CSS colour (white by default); with a texture, it tints it |
+| `srgb` | `[number, number, number]` | the colour as a Bevy Srgba's [r, g, b], unrounded, over `color` (a Mesh2d's ColorMaterial gives it) |
+| `texture` | `string \| { path: string; sampler: SamplerSpec }` | a picture on it, mapped by the mesh's UVs (Bevy's ColorMaterial texture), or one with its own sampler (Bevy's load_with_settings: { path, sampler: { wrap: "repeat" } }) |
+| `uv_transform` | `{ scale: [number, number]; angle: number; translation: [number, number] }` | the texture's UVs scaled, turned and moved (ColorMaterial's uv_transform, glam's Affine2 as raea/transform's) |
+| `alpha_mode` | `AlphaMode2d` | Bevy's AlphaMode2d: "Blend" (Bevy's default), "Opaque", or { Mask: cutoff } |
+| `vertex_colors` | `[number, number, number, number][]` | one linear [r, g, b, a] per vertex of the shape's mesh (Bevy's Mesh::ATTRIBUTE_COLOR): the material's colour and texture are multiplied by them. A rect has 4 (top right, top left, bottom left, bottom right), a triangle 3. |
+| `shader` | `Record<string, unknown>` | its own Material2d in place of the ColorMaterial: the spec a <Material> in a Mesh2d makes; the shape's colour, texture and alpha_mode are then the material's to draw |
+| `primitive` | `Record<string, unknown>` | one of Bevy's 2D primitives in place of `shape`, its reflected fields over Bevy's default: { primitive: "Capsule2d", radius: 25, half_length: 25 }; a 2D shape given `inner` (the same shape's fields) is Bevy's Ring, or given `ring: thickness` its to_ring (raea-sys-mesh primitive_mesh). A Mesh2d's primitive child makes it. |
+| `name` | `string` | – |
+| `x` | `number` | – |
+| `y` | `number` | – |
+| `rotation` | `number` | radians, clockwise (as CSS rotate) |
+| `quat` | `Quat` | Bevy's rotation as it is, a quaternion [x, y, z, w] in Bevy's axes (y up, z toward the viewer), in place of `rotation`: a turn out of the frame's plane too, as a Sprite's Transform takes it (camera/2d_on_ui) |
+| `scale` | `number \| [number, number]` | 1 by default; [x, y] to stretch |
+| `z` | `number` | draw order among the 2D parts: higher draws over lower (0 by default) |
+| `opacity` | `number` | 0 to 1 (1 by default) |
+| `onClick` | `(e: Event3d) => void` | – |
+| `onPointerDown` | `(e: Event3d) => void` | – |
+| `onPointerUp` | `(e: Event3d) => void` | – |
+| `onPointerOver` | `(e: Event3d) => void` | – |
+| `onPointerOut` | `(e: Event3d) => void` | – |
+| `onPointerEnter` | `(e: Event3d) => void` | – |
+| `onPointerLeave` | `(e: Event3d) => void` | – |
+| `onPointerMove` | `(e: Event3d) => void` | – |
+| `onWheel` | `(e: Event3d) => void` | – |
+| `onDragStart` | `(e: Event3d) => void` | – |
+| `onDrag` | `(e: Event3d) => void` | – |
+| `onDragEnd` | `(e: Event3d) => void` | – |
+| `onDragEnter` | `(e: Event3d) => void` | – |
+| `onDragOver` | `(e: Event3d) => void` | – |
+| `onDragLeave` | `(e: Event3d) => void` | – |
+| `onDrop` | `(e: Event3d) => void` | – |
+
+### `SkyboxProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `image` (required) | `string` | the sky's cubemap, a.ktx2 file (Bevy's examples use the specular map: environment_maps/pisa_specular_rgb9e5_zstd.ktx2) |
+| `brightness` | `number` | cd/m² (Bevy's default 0, a black sky: Bevy's examples give it 1000 to 5000) |
+| `rotation` | `[number, number, number, number]` | its turn, glam's Quat [x, y, z, w] (Bevy's identity) |
+
+### `SpanProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `children` | `ReactNode` | – |
+| `font` | `string` | a family (raea's bundled faces: Inter, Montserrat, Oswald, Playfair Display...; or one on this machine) |
+| `weight` | `number` | – |
+| `italic` | `boolean` | – |
+| `size` | `number` | times the block's size |
+| `color` | `string` | – |
+
+### `SphereProps`
+
+`args`, or Bevy's Sphere field: radius (0.5 by Bevy's default). Its mesh is Bevy's Sphere::mesh(): an icosphere of 5
+subdivisions, or `ico` of them (Bevy's `.ico(n)`, 0 to 80), or a UV sphere of `uv` = [sectors, stacks] (`.uv(s, t)`).
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `args` | `[number]` | – |
+| `radius` | `number` | – |
+| `ico` | `number` | – |
+| `uv` | `[number, number]` | – |
+
+### `SplatMorph`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `to` (required) | `string` | the splat file it becomes |
+| `amount` (required) | `number` | 0 this splat, 1 the other (each splat flies to the one matched to it) |
+| `crop` | `number` | only the other's splats this many metres from its centre (a trained scene's subject without its surroundings) |
+
+### `SplatProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` | `string` | parts are matched by name across frames: name a splat that comes and goes |
+| `src` (required) | `string` | the splat file (staticFile("x.ply")): a 3DGS.ply (spherical harmonics up to degree 3), a.splat or a.spz. A `x.ply.json` beside it (raea splat train writes one) places it: +Y up, centred, metres |
+| `position` | `Vec3` | – |
+| `rotation` | `Vec3` | radians, Euler XYZ |
+| `scale` | `number \| Vec3` | – |
+| `splatScale` | `number` | every gaussian's size times this (1 by default): below 1 the scene breaks into points |
+| `opacity` | `number` | – |
+| `brightness` | `number` | grade: colour times brightness, saturation and contrast about mid grey, times tint |
+| `saturation` | `number` | – |
+| `contrast` | `number` | – |
+| `tint` | `string` | – |
+| `reveal` | `number` | reveal 0..1: each splat scales in as a front passes it, from `revealFrom` (a point; the centre by default) outward, or along `revealAxis` (a plane sweeping through) when that's given |
+| `revealFrom` | `Vec3` | – |
+| `revealAxis` | `Vec3` | – |
+| `revealSoft` | `number` | how wide the front is, as a share of the sweep (0.15) |
+| `revealGlow` | `number` | the front's glow (0 none, 1 bright), in `glowColor` |
+| `glowColor` | `string` | the colour of reveal and pulse glows (warm white) |
+| `disperse` | `number` | disperse 0..1: blown off on a curl-noise wind, the upwind side first, shrinking to specks |
+| `assemble` | `number` | assemble 0..1: from a cloud of dust round the scene into its shape (1 whole) |
+| `wind` | `Vec3` | the wind's direction ([1, 0.15, 0]) |
+| `curl` | `number` | how much the wind curls (1) |
+| `spread` | `number` | the dust cloud's radius in metres (the splat's own size, before scale; 1.6 times its size by default) |
+| `explode` | `number` | explode 0..1: thrown out from the centre, falling and fading |
+| `wave` | `SplatWave` | – |
+| `twist` | `number` | radians a metre about the vertical through the centre |
+| `morph` | `SplatMorph` | – |
+| `pulse` | `number` | a value the composition passes (a beat's envelope 0..1): bigger by pulseScale, brighter by pulseGlow |
+| `pulseScale` | `number` | – |
+| `pulseGlow` | `number` | – |
+| `crop` | `number` | nothing past this many metres from the centre (trims a trained scene's floaters) |
+| `bands` | `number` | the light in this many flat bands (0 none); a paint or cartoon <Look> sets it |
+| `paint` | `number` | 0..1: the splats themselves painted (flat bands, grown into strokes with hard edges), for a painted shot in a timeline whose frame <Look> isn't paint |
+| `seed` | `number` | which randomness: the scatter, the jitter (0) |
+
+### `SplatWave`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `amplitude` (required) | `number` | how high the ripple lifts the splats, metres |
+| `wavelength` | `number` | from crest to crest, metres (1 by default) |
+| `phase` | `number` | where the ripple is in its cycle, radians: animate it (frame * 0.2) to run it outward |
+
+### `SpriteProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `src` (required) | `string` | a picture in the media folder: staticFile("hero.png"), or a "render:NAME" image a camera or a <Compute> draws (a frame may switch it to another by name) |
+| `width` | `number` | size in px (the picture's, or one cell's, by default); one given, the other follows the picture's shape |
+| `height` | `number` | – |
+| `grid` | `[number, number]` | a sprite sheet: the picture is `[columns, rows]` cells of equal size, read left to right, top to bottom |
+| `atlasPick` | `number` | one picture of a built atlas (TextureAtlasBuilder's sources.handle gives it with its src): its index in the atlas's list |
+| `frame` | `number` | with `grid`: which cell shows (0 is the top left); animate it to play the sheet: frame={Math.floor(f / 3)} |
+| `flipX` | `boolean` | – |
+| `flipY` | `boolean` | – |
+| `color` | `string` | a tint multiplied over the picture (white by default) |
+| `tileX` | `boolean` | Bevy's SpriteImageMode::Tiled: the picture repeats across the sprite's width (tileX) or height (tileY) instead of stretching to it, a tile every `tileStretch` x the picture's size (1 by default): a floor, a fence, a wall. Animate width and height to show more or fewer tiles |
+| `tileY` | `boolean` | – |
+| `tileStretch` | `number` | – |
+| `image_mode` | `SpriteImageMode` | Bevy's SpriteImageMode, as its reflected value: "Auto" (stretched to the size), { Scale: "FillCenter" } (and FillStart, FillEnd, FitCenter, FitStart, FitEnd: the picture kept to its shape, cropped or fitted), { Sliced: TextureSlicer } (nine-slice: border a number of px or { min_inset: [x, y], max_inset: [x, y] }; center_scale_mode and sides_scale_mode "Stretch" or { Tile: { stretch_value } }; max_corner_scale) or { Tiled: { tile_x, tile_y, stretch_value } }. Not with tileX or tileY |
+| `sampler` | `SamplerSpec` | the picture's sampler (Bevy's load_with_settings: { filter, mipmap, wrap, anisotropy }), Bevy's default (linear) otherwise; { filter: "nearest" } is pixel art as Bevy's ImagePlugin::default_nearest() draws it |
+| `children` | `ReactNode` | your own <Material> as its child: Bevy's SpriteMaterial, extending the sprite's own material (the shader reads the sprite's picture, tint and alpha with bevy_sprite_render::sprite_mesh::functions), its uniforms per frame |
+| `name` | `string` | – |
+| `x` | `number` | – |
+| `y` | `number` | – |
+| `rotation` | `number` | radians, clockwise (as CSS rotate) |
+| `quat` | `Quat` | Bevy's rotation as it is, a quaternion [x, y, z, w] in Bevy's axes (y up, z toward the viewer), in place of `rotation`: a turn out of the frame's plane too, as a Sprite's Transform takes it (camera/2d_on_ui) |
+| `scale` | `number \| [number, number]` | 1 by default; [x, y] to stretch |
+| `z` | `number` | draw order among the 2D parts: higher draws over lower (0 by default) |
+| `opacity` | `number` | 0 to 1 (1 by default) |
+| `onClick` | `(e: Event3d) => void` | – |
+| `onPointerDown` | `(e: Event3d) => void` | – |
+| `onPointerUp` | `(e: Event3d) => void` | – |
+| `onPointerOver` | `(e: Event3d) => void` | – |
+| `onPointerOut` | `(e: Event3d) => void` | – |
+| `onPointerEnter` | `(e: Event3d) => void` | – |
+| `onPointerLeave` | `(e: Event3d) => void` | – |
+| `onPointerMove` | `(e: Event3d) => void` | – |
+| `onWheel` | `(e: Event3d) => void` | – |
+| `onDragStart` | `(e: Event3d) => void` | – |
+| `onDrag` | `(e: Event3d) => void` | – |
+| `onDragEnd` | `(e: Event3d) => void` | – |
+| `onDragEnter` | `(e: Event3d) => void` | – |
+| `onDragOver` | `(e: Event3d) => void` | – |
+| `onDragLeave` | `(e: Event3d) => void` | – |
+| `onDrop` | `(e: Event3d) => void` | – |
+
+### `SurfaceDrawProps`
+
+How a surface's alpha and faces draw (Bevy's StandardMaterial alpha_mode, alpha cutoff, double_sided and cull_mode),
+from the first frame.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `alphaMode` | `"opaque" \| "blend" \| "mask" \| "add" \| "multiply" \| "premultiplied" \| "coverage"` | "opaque" (the default), "blend" (what `transparent` gives), "mask" (cut out where the alpha is under `alphaCutoff`: leaves, chain-link, a sprite's edge; no sorting), "add" (glows add up: sparks, light beams), "multiply" (darkens what's behind: stained glass, a shadow decal), "premultiplied", "coverage" (soft cut-out edges from the alpha over MSAA's samples: hair cards, foliage; needs <AntiAliasing mode="msaa">, without it draws solid) |
+| `alphaCutoff` | `number` | with alphaMode="mask": the alpha under which it's cut away, 0..1 (0.5) |
+| `side` | `"front" \| "back" \| "double"` | which faces draw: "front" (the default), "back" (the inside only: a sky dome, a room seen from outside), "double" (both, lit on both: a leaf, a flag, a sheet of paper) |
+
+### `SurfaceShaderSpec`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `wesl` | `string` | the source in WESL (Bevy 0.20's shader language, a superset of WGSL) |
+| `wgsl` | `string` | the same in plain WGSL |
+| `fragment` | `string` | the source as an asset path (staticFile("shaders/x.wesl")), as Bevy's MaterialExtension::fragment_shader names one: read as written but for its own bindings' numbers (any, in the order declared: one uniform struct, which gets its uniforms packed in its layout, up to 4 texture_2d and their one sampler; one under |
+| `uniforms` | `Record<string, number \| number[] \| string>` | up to 16: a number (f32), [x, y], [x, y, z], [x, y, z, w] or "#rrggbb" (a linear vec4) |
+| `textures` | `Record<string, ShaderTexture \| ShaderTexture[]>` | up to 4: an asset path, a picture made in code ({ width, height, pixels }) or "render:NAME"; with a sampler, { src, sampler } (or a picture with its `sampler`). One more may be an array, read as texture_2d_array<f32> by layer: { layers: [picture,...] } (one size and format) or { src, layers: N } (N layers stacked top to bottom). A <Material>'s may also bind one binding_array<texture_2d<f32>>, a list of 1 to 16 pictures (Bevy's texture_binding_array; a GPU without texture binding arrays refuses it) |
+| `defs` | `ShaderDefs` | shader defs: each NAME a WESL condition for `@if(NAME)` (a number is true), and a whole number also `constants::NAME`; each set of defs compiles its own pipeline |
+| `own` | `OwnMaterialFields` | a <Material>'s own: what its Material methods give, and its storage buffers; set by <Material> only |
+| `buffers` | `Record<string, StorageValue>` | – |
+
+### `Text3DProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `children` | `string` | the words, extruded |
+| `text` | `string` | – |
+| `size` | `number` | letter height in scene units (default 0.5) |
+| `depth` | `number` | extrusion depth (default 0.2) |
+| `font` | `string` | – |
+| `weight` | `number` | – |
+
+### `ThreeShaderMaterialProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `glsl` | `{ vertex: string; fragment: string; raw?: boolean; vertexColors?: boolean }` | a ShaderMaterial's GLSL, its `#include`s expanded and its `defines` as #define lines in front; `raw` for a RawShaderMaterial (which declares three's built-ins itself), `vertexColors` as the material's |
+| `wgsl` | `{ vertex: string; fragment: string; uniforms?: { name: string; type: string; array?: nu…` | a node material's WGSL, as three's TSL builder writes it for raea (sdk/r3f's input/tsl.ts): the contract's `three_vertex` and `three_fragment`, its uniforms' types, the mesh attributes it reads beyond the standard four |
+| `uniforms` | `Record<string, ThreeUniform>` | each uniform's value this frame |
+| `textures` | `Record<string, string \| { src: string; colorSpace?: "srgb" \| "linear"; sampler?: Record…` | each sampler's picture: a file, a data URL, "render:NAME" (at most four); `colorSpace: "linear"` for one three samples raw (NoColorSpace: a distance field, a data map), "srgb" (the default) for a colour picture |
+| `output` | `"display" \| "linear"` | "display": its colour is what three's canvas shows (a ShaderMaterial's); "linear": scene light, tone-mapped as the rest of the frame is (a node material's) |
+| `transparent` | `boolean` | – |
+| `blending` | `"normal" \| "additive" \| "add" \| "multiply" \| "none"` | – |
+| `side` | `"front" \| "back" \| "double"` | – |
+| `depthWrite` | `boolean` | – |
+| `depthTest` | `boolean` | – |
+| `alphaTest` | `number` | – |
+| `time` | `[number, number, number]` | three's clock this frame: [seconds, delta, frame] |
+| `color` | `string` | the colour it's drawn in where its shader can't run (named in the render's warnings) |
+
+### `ThreeUniform`
+
+A uniform's value: a number, a boolean, or its numbers in order (a vector's, a matrix's column by column as three's
+`elements`, an array's elements one after another)
+
+```ts
+type ThreeUniform = number | boolean | number[]
+```
+
+### `ToneMappingProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `mode` | `"tony" \| "aces" \| "agx" \| "neutral" \| "reinhard" \| "none"` | how bright light maps to the screen: "tony" (Bevy's default), "aces" (filmic, contrasty), "agx", "neutral", "reinhard", "none" |
+| `exposure` | `number` | stops brighter (+) or darker (-) than the default exposure |
+
+### `ToonBand`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `at` (required) | `number` | where the band starts, as r: the share of the light reaching a point that it faces (0 faces none of it, 1 faces every light); the first band starts at 0 whatever this says |
+| `color` | `string` | the band's colour; left out, it's mixed (in Oklab) between the shadow colour and `color` by its place |
+
+### `ToonHighlight`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `intensity` | `number` | 0..1 (1 by default) |
+| `color` | `string` | "#ffffff" by default |
+| `size` | `number` | 0..1: the highlight's angular radius, up to half a radian (0.2 by default) |
+
+### `ToonOutline`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `width` | `number` | pixels at the composition's size, the same near and far (2 by default) |
+| `color` | `string` | ink colour; by default the surface colour's hue, very dark |
+
+### `ToonRim`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `intensity` | `number` | 0..1, how much the rim colour covers the band (1 by default) |
+| `color` | `string` | "#ffffff" by default |
+| `width` | `number` | 0..1 of the Fresnel range from the silhouette inwards (0.3 by default) |
+
+### `TorusProps`
+
+`args`, or Bevy's Torus fields: major_radius (0.75) and minor_radius (0.25), the tube's.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `args` | `[number, number]` | – |
+| `major_radius` | `number` | – |
+| `minor_radius` | `number` | – |
+
+### `TreeOptions`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `height` | `number` | metres (6) |
+| `trunk` | `number` | the clear trunk below the crown, a share of the height (0.35) |
+| `width` | `number` | the crown's width over its height (0.9) |
+| `crown` | `"dome" \| "sphere" \| "cone" \| "column" \| "umbrella" \| "vase"` | – |
+| `points` | `number` | attraction points: more is a denser, twiggier crown (1200) |
+| `step` | `number` | a growth step, a share of the height (0.03) |
+| `base` | `number` | the trunk's radius at the ground (a fortieth of the height) |
+| `tip` | `number` | the outer twigs' radius (0.006) |
+| `tropism` | `number` | branches turn up (+) or droop (-) as they grow (0.15) |
+| `leaves` | `number` | leaves per outer twig node (3; 0 is bare) |
+| `leaf` | `number` | a leaf's length (0.09) |
+| `sides` | `number` | – |
+| `seed` | `number` | – |
+
+### `Vec3`
+
+```ts
+type Vec3 = [number, number, number]
+```
+
+### `VertexFormat`
+
+A vertex attribute's format, as Bevy's VertexFormat names it.
+
+```ts
+type VertexFormat = "Float32" | "Float32x2" | "Float32x3" | "Float32x4" | "Uint32" | "Uint32x2" | "Uint32x3" | "Uint32x4" | "Sint32" | "Sint32x4"
+```
+
+### `VolumeCommon`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` | `string` | parts are matched by name across frames |
+| `time` | `number` | seconds on the simulation's clock (the Sequence's time, frame / fps, by default) |
+| `resolution` | `number` | cells along the box's longest side (64 by default; 32 is a quarter the cost a step, 96 finer) |
+| `seed` | `number` | the same seed simulates the same volume (0) |
+| `colors` | `[string, string, string]` | its tones under a paint look: [lit, mid, dark] |
+| `threshold` | `number` | the density its painted surface sits at (0.12): lower is fatter, higher thinner |
+| `erode` | `number` | how much noise tears the painted surface's edge (0.08), and the tears' size in metres (0.6) |
+| `erodeSize` | `number` | – |
+| `absorb` | `number` | how much light a unit of it stops (its shadow on itself; 1.2) |
+| `wind` | `Vec3` | the wind, m/s ([0, 0, 0]); how fast the volume takes it up, a second (1.2 smoke, 0.6 otherwise); the height it's full from, metres, weaker below (0: full everywhere) |
+| `windPull` | `number` | – |
+| `windHeight` | `number` | – |
+| `drag` | `number` | velocity the still air takes away a second (0.4) |
+| `vorticity` | `number` | curl kept curling (6); a drifting turbulent force, m/s² (0), and its size in metres (2) |
+| `turbulence` | `number` | – |
+| `turbulenceSize` | `number` | – |
+| `steps` | `number` | samples along each ray (96) |
+| `shadow` | `boolean \| number` | its shadow, cast in the scene's light as a mesh's is (on by default): soft moving shadows on the ground, meshes and models under it, and, with a `volumetric` sun and a <FogVolume> under <VolumetricFog>, the sun's shafts breaking through the gaps between clouds. The shadow is where the volume has stopped half the sun; a number scales the density it sees: 1 as drawn, more reaches into its thinner parts (a fatter shadow; up to 4, a thin contrail's made to show), less keeps to the dense cores. false or 0 casts none. Under a paint look the shadow is the painted shape. Soften its edge with the sun's `softShadow` (2-4 for clouds) |
+
+### `VolumeProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `position` | `Vec3` | the box's foot (the centre of its floor), metres ([0, 0, 0]) |
+| `size` (required) | `Vec3` | the box it lives in, [width, height, depth] in metres: what leaves it is cut |
+| `sources` | `VolumeSource[]` | where density and heat come in over time, and the puffs of density it starts with ([x, y, z, radius] in metres from the foot) |
+| `puffs` | `[number, number, number, number][]` | – |
+| `buoyancy` | `number` | heat's lift (4) and the density's weight (0.4), m/s² a unit; the heat lost a second (0.8) and the density lost a second (0.02), fractions |
+| `weight` | `number` | – |
+| `cooling` | `number` | – |
+| `dissipation` | `number` | – |
+| `fire` | `[string, string, string] \| false` | fire where it's hot: three colours [red, orange, yellow] (paint's by default), or false for none; and the heat (a fraction of the hottest source's) each colour starts at ([0.35, 0.6, 0.85]) |
+| `fireAt` | `[number, number, number]` | – |
+| `name` | `string` | parts are matched by name across frames |
+| `time` | `number` | seconds on the simulation's clock (the Sequence's time, frame / fps, by default) |
+| `resolution` | `number` | cells along the box's longest side (64 by default; 32 is a quarter the cost a step, 96 finer) |
+| `seed` | `number` | the same seed simulates the same volume (0) |
+| `colors` | `[string, string, string]` | its tones under a paint look: [lit, mid, dark] |
+| `threshold` | `number` | the density its painted surface sits at (0.12): lower is fatter, higher thinner |
+| `erode` | `number` | how much noise tears the painted surface's edge (0.08), and the tears' size in metres (0.6) |
+| `erodeSize` | `number` | – |
+| `absorb` | `number` | how much light a unit of it stops (its shadow on itself; 1.2) |
+| `wind` | `Vec3` | the wind, m/s ([0, 0, 0]); how fast the volume takes it up, a second (1.2 smoke, 0.6 otherwise); the height it's full from, metres, weaker below (0: full everywhere) |
+| `windPull` | `number` | – |
+| `windHeight` | `number` | – |
+| `drag` | `number` | velocity the still air takes away a second (0.4) |
+| `vorticity` | `number` | curl kept curling (6); a drifting turbulent force, m/s² (0), and its size in metres (2) |
+| `turbulence` | `number` | – |
+| `turbulenceSize` | `number` | – |
+| `steps` | `number` | samples along each ray (96) |
+| `shadow` | `boolean \| number` | its shadow, cast in the scene's light as a mesh's is (on by default): soft moving shadows on the ground, meshes and models under it, and, with a `volumetric` sun and a <FogVolume> under <VolumetricFog>, the sun's shafts breaking through the gaps between clouds. The shadow is where the volume has stopped half the sun; a number scales the density it sees: 1 as drawn, more reaches into its thinner parts (a fatter shadow; up to 4, a thin contrail's made to show), less keeps to the dense cores. false or 0 casts none. Under a paint look the shadow is the painted shape. Soften its edge with the sun's `softShadow` (2-4 for clouds) |
+
+### `VolumeSource`
+
+where density and heat come in: a burner, or an engine moving `at` -> `to` (a contrail)
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `at` (required) | `Vec3` | where (metres from the box's foot), and where it has moved to by `until` if it moves |
+| `to` | `Vec3` | – |
+| `from` | `number` | when it puts out, seconds ([0, Infinity]) |
+| `until` | `number` | – |
+| `radius` | `number` | its radius (0.5 m); the density and heat it puts out a second at its centre (4 and 4); the velocity it pushes out with, m/s ([0, 0, 0]) |
+| `rate` | `number` | – |
+| `heat` | `number` | – |
+| `speed` | `Vec3` | – |
+
+### `VolumetricFogProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `steps` | `number` | mode="march": samples along each ray through a fog volume (64 by default): too few stair-step a shaft's edges, so 128 for a render with hard-edged shafts, or 32 with `dither`; about 0.1 ms a step at 1920x1080 on an M5 Pro |
+| `dither` | `boolean` | mode="march": start each pixel's march a fraction of a step in, by a fixed noise seeded from the pixel and the frame number (false by default): the shafts' steps become fine grain instead of bands, so fewer steps look smooth. The noise is a function of the frame, so a render still equals its play |
+| `resolution` | `number` | mode="march": the fraction of the frame's resolution the fog is marched at (1 by default): 0.5 marches a quarter of the pixels and puts the result over the frame guided by depth, so an edge in front of a shaft keeps no fog from what's behind it. 0.5, 1/3 or 0.25; each frame on its own, so a render still equals its play |
+| `ambient` | `number` | light the fog has everywhere, lit or not (0 by default). Bevy lights a volume's whole box with it whatever its density, so the box's edges show: keep it 0, or small with the camera inside the volume |
+| `ambientColor` | `string` | that light's colour (white by default) |
+| `mode` | `"march" \| "froxel"` | how the fog is drawn: "froxel" (the default: every volume written into one grid of cells along the view, lit once a cell and integrated front to back once, with the `hero` lights' shafts integrated exactly along epipolar lines: no steps, no dither, its cost the grid's whatever the resolution or the number of volumes, overlapping volumes mixed as one medium, see-through surfaces fogged at their own depth) or "march" (Bevy's ray march through each volume, as before). `steps`, `dither` and `resolution` are the march's; `slices`, `tile`, `samples` and `hero` the grid's |
+| `slices` | `number` | the grid's cells along the view, spaced evenly in log depth from the camera to the farthest volume (64 by default; 32 to 256) |
+| `tile` | `number` | the grid's cells across the frame, in pixels a side (16 by default; 4, 8 or 16) |
+| `samples` | `number` | points lit in each cell, spread along its depth (1 by default; 1 to 8): more keeps thin shadows in the grid's soft light (a hero light's shafts don't need them) |
+| `hero` | `boolean` | the grid's shafts: true (the default) integrates the first two volumetric spot lights and the first two volumetric directional lights exactly, over their shadow maps texel by texel, so a blind's bars or a doorway's edge are as crisp as the shadow map: integrated at samples along lines from the light across the frame (Chen et al.'s epipolar sampling), more of them where the depth or the light changes, and each pixel read from the samples either side of it at its depth; false lights them in the grid's cells with the rest |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/animation.md b/docs/manual/reference/sdk/animation.md
new file mode 100644
index 00000000..48416ebb
--- /dev/null
+++ b/docs/manual/reference/sdk/animation.md
@@ -0,0 +1,487 @@
+---
+title: "raea/animation"
+summary: "Declared animation: named moves, staggers, sequences and timelines, and a model's own clips."
+order: 23
+sources: ["sdk/raea/src/animation.ts"]
+---
+
+`raea/animation` describes motion as data instead of per-frame code. A move (`fade`, `rise`, `pop`, `slide`, `slam`,
+`wipe` and the rest) says how something enters or leaves; `sequence`, `parallel` and `stagger` combine moves; and
+`<Animate>` plays a declared animation on what it wraps. Because the motion is data, the engine can play it without
+running React every frame, and a lint can read it. `useAnimation3d` plays a glTF model's own clips.
+
+```tsx
+import { Animate, Stagger, pop } from "raea/animation";
+
+// each line rises in 4 frames after the one before, and fades out at frame 80
+function Lines({ lines }: { lines: string[] }) {
+ return (
+ <Stagger each={4} enter="rise" exit="fade" exitAt={80}>
+ {lines.map((l) => <p key={l}>{l}</p>)}
+ </Stagger>
+ );
+}
+
+// one element, with a move built in code
+const Badge = () => <Animate enter={pop({ frames: 10 })}>NEW</Animate>;
+```
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { Animate, clipEvents, curve, curveFn } from "raea/animation"
+```
+
+`raea/animation` exports 2 components, 1 hook, 27 functions, 2 values, 18 types. Bevy's counterpart: `bevy_animation`. Source: [sdk/raea/src/animation.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/animation.ts).
+
+## Components
+
+### `Animate`
+
+<Animate>, memoised by its props' content (React skips a render whose props fingerprint matches the last). The
+fingerprint is on it as `Animate.fingerprint` for a runtime's own bailout. Its declaration is the engine's
+Animation (@bevy raea_core_animate::spec::Animation), typed from the registry (animate.gen.ts), sent as data-raea-anim and
+read back as that type by sdk/react animate.rs.
+
+Also takes the props of [`AnimateOwnProps`](#animateownprops).
+
+### `Stagger`
+
+Each child in its own <Animate>, entrances `each` frames apart (or by grid distance). The same content as last
+render gives the same element back.
+
+Also takes the props of [`StaggerProps`](#staggerprops) (`each`, `grid`, `exitEach`); [`AnimateOwnProps`](#animateownprops).
+
+## Hooks
+
+### `useAnimation3d`
+
+For a 3D node (<Mesh animate>, materials): the declaration's text, or under plain bun the props it sets now.
+
+```ts
+function useAnimation3d(spec: Record<string, TrackSpec<string | number> | TrackSpec<string | number>[] | Keys> | Move | undefined): { attr?: string; values?: Record<string, string | number> | undefined; }
+```
+
+## Functions
+
+### `clipEvents`
+
+The clip events that fire between two frames (Bevy's AnimationClip events, as data): an event `time` seconds into
+the clip fires on the frame whose clip time first reaches it, that is when it lies in (prev, now], once per loop
+when the clip loops (`duration` its length). Give the previous frame's clip time and this frame's, as a <Model>'s
+`time` runs; on the first frame pass prev -1 so an event at 0 fires.
+
+```ts
+function clipEvents<E extends { time: number; }>(events: E[], prev: number, now: number, duration: number, loop?: boolean): E[]
+```
+
+### `curveFn`
+
+A curve name as a function (the engine's easing::Easing::parse, the same names).
+
+```ts
+function curveFn(name: string, fps?: number): (t: number) => number
+```
+
+### `delay`
+
+The same move later by `frames`.
+
+```ts
+function delay(m: MoveLike, frames: number): Move
+```
+
+### `fade`
+
+opacity 0 to 1 over `frames` (6).
+
+```ts
+function fade(o?: { frames?: number; ease?: Curve; }): Move
+```
+
+### `fill`
+
+a bar filling: width 0 to `to` (100%) over `frames` (24), out-cubic.
+
+```ts
+function fill(o?: { to?: number; frames?: number; unit?: "px" | "%"; ease?: Curve; }): Move
+```
+
+### `fingerprint`
+
+FNV-1a over a value's numbers and strings. Functions (components, handlers) count by identity, React elements by
+type, key and props; an inline `animate={{ y: track(...) }}` or `style={{...}}` is a new object every render, and this
+tells it's the same content. Assumes props aren't mutated in place (React's own assumption).
+
+```ts
+function fingerprint(v: unknown, h: number, depth?: number): number
+```
+
+### `gridDelay`
+
+A grid item's distance from an origin, in steps (raea-animate's StaggerPattern::Grid, the same rule).
+
+```ts
+function gridDelay(cols: number, rows: number, from: GridFrom, index: number): number
+```
+
+### `move`
+
+A move from its tracks, by property: `move({ opacity: track({ 0: 0, 6: 1 }), y: track({ 0: 30, 6: 0 }) })`. Its
+length is its last key. The named moves (rise, pop and the rest) are built with it.
+
+```ts
+function move(tracks: Record<string, TrackSpec<string | number> | TrackSpec<string | number>[] | Keys<string | number>>): Move
+```
+
+### `parallel`
+
+Every step at once.
+
+```ts
+function parallel(...steps: Step[]): Group
+```
+
+### `pop`
+
+scale `from` (0.6), `peak` (1.08) at `frames`/2, 1 at `frames` (8); in over 3 frames.
+
+```ts
+function pop(o?: { from?: number; peak?: number; frames?: number; ease?: Curve; }): Move
+```
+
+### `propsFingerprint`
+
+A props object's fingerprint: what <Animate> and <Stagger> compare to know a render would give the same element,
+and what a runtime's bailout can key on (`Animate.fingerprint`).
+
+```ts
+function propsFingerprint(props: object): number
+```
+
+### `pushIn`
+
+a slow push-in on footage: scale 1 to 1 + `amount` (0.04) across `frames` (90), linear.
+
+```ts
+function pushIn(o?: { amount?: number; frames?: number; }): Move
+```
+
+### `reverse`
+
+A move played backwards: it leaves the way it came (each curve reversed, so an out-curve becomes the matching
+in-curve). An exit is its entrance reversed.
+
+```ts
+function reverse(m: MoveLike): Move
+```
+
+### `rise`
+
+y offset `distance` to 0 over `frames` (30 px over 6), fading in over `fade` (5).
+
+```ts
+function rise(o?: { distance?: number; frames?: number; fade?: number; ease?: Curve; }): Move
+```
+
+### `sampleAnimation`
+
+What an Animation sets at composition frame `frame`: page style keys, a counter's text, or 3D props
+(raea-animate's Sampled, here for plain bun).
+
+```ts
+function sampleAnimation(a: Animation, frame: number): { style: Record<string, string | number>; text?: string; values: Record<string, string | number>; }
+```
+
+### `sampleMove`
+
+What a move sets at local frame `frame` when it starts at `start`: the same rules the engine samples <Animate>
+with (x, y, opacity, scale, rotate, colours...), for parts that are animated one by one in TypeScript (a 3D text's
+glyphs: <RichText enter>). An empty object before it starts is its first key's values (an entrance holds them).
+
+```ts
+function sampleMove(m: MoveLike, start: number, frame: number, fps?: number): Record<string, string | number>
+```
+
+### `sequence`
+
+Each step when the one before it ends (`gap` frames apart: sequenceGap).
+
+```ts
+function sequence(...steps: Step[]): Group
+```
+
+### `sequenceGap`
+
+Each step when the one before it ends, `gap` frames later (a negative gap overlaps them).
+
+```ts
+function sequenceGap(gap: number, ...steps: Step[]): Group
+```
+
+### `slam`
+
+a hit: scale `from` (1.3), `dip` (0.96) at `frames`/2, 1 at `frames` (8); in over 2 frames.
+
+```ts
+function slam(o?: { from?: number; dip?: number; frames?: number; ease?: Curve; }): Move
+```
+
+### `slide`
+
+arrives from a side: `distance` px (30) over `frames` (7), fading in over 5. `from` is where it comes from.
+
+```ts
+function slide(o?: { from?: Dir; distance?: number; frames?: number; ease?: Curve; }): Move
+```
+
+### `stagger`
+
+The parts `each` frames apart, each with `m`. With `grid`, delays spread by grid distance from an origin.
+
+```ts
+function stagger(parts: string[], each: number, m: MoveLike, grid?: { cols: number; rows?: number; from?: GridFrom; } | undefined): Group
+```
+
+### `strike`
+
+a strike-through line drawn: width 0 to 100% over `frames` (8).
+
+```ts
+function strike(o?: { frames?: number; ease?: Curve; }): Move
+```
+
+### `tick`
+
+a number counting from `from` (0) to `to` over `frames` (24), written as the element's text: `digits` decimals,
+`separator` between its thousands ("," or true writes 12,345; none by default), `prefix` and `suffix` around it
+("$", " pts"). Hidden until it starts, then in over `fade` frames (2; 0 shows it at `from` the whole time).
+
+```ts
+function tick(o: { to: number; from?: number; frames?: number; digits?: number; ease?: Curve; prefix?: string; suffix?: string; separator?: string | boolean; fade?: number; }): Move
+```
+
+### `timeline`
+
+Steps placed in time (a sequence of them). Each part's start is decided here, once.
+
+```ts
+function timeline(...steps: Step[]): Plan
+```
+
+### `toMove`
+
+A name, a move or several moves together, as one move.
+
+```ts
+function toMove(m: MoveLike): Move
+```
+
+### `track`
+
+A track: `track({ 0: 30, 6: 0 })` is a 30 px rise over 6 frames, out-cubic by default.
+
+```ts
+function track<V = string | number>(keys: Keys<V>, ease?: Curve | Curve[], opts?: Omit<TrackSpec<string | number>, "ease" | "keys">): TrackSpec<V>
+```
+
+### `wipe`
+
+a reveal wiping across from `from` (left) over `frames` (8), in-out-cubic, by clipping.
+
+```ts
+function wipe(o?: { from?: Dir; frames?: number; ease?: Curve; }): Move
+```
+
+## Values
+
+### `curve`
+
+Curve helpers: `curve.bezier(0.05, 0.7, 0.1, 1)`, `curve.spring({ damping: 15, stiffness: 120 })`.
+
+### `moves`
+
+The named moves by name, as `enter="rise"` finds them.
+
+## Types
+
+### `AnimateOwnProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `enter` | `MoveLike` | the entrance: a move's name, a move, or several together |
+| `exit` | `MoveLike` | the exit, played at `exitAt` (an entrance reversed: `exit="rise"` sinks back out) |
+| `animate` | `Record<string, TrackSpec \| TrackSpec[] \| Keys> \| Move` | free tracks by property, in local frames: `{ backgroundColor: track({ 0: "#fff", 20: "#000" }) }` |
+| `at` | `number` | local frame the entrance starts (0) |
+| `exitAt` | `number` | local frame the exit starts |
+| `timeline` | `Plan` | a timeline's plan and this element's part in it: the part's move, at its start (plus `at`) |
+| `part` | `string` | – |
+| `mount` | `"during" \| "always"` | "always" (default): in the tree, and its layout, the whole time (invisible before an entrance that fades in); "during": only from the entrance's start until the exit ends (it takes its space when it arrives) |
+| `as` | `string` | the element: "div" by default |
+| `style` | `CSSProperties` | – |
+| `className` | `string` | – |
+| `children` | `ReactNode` | – |
+
+### `AnimateProps`
+
+```ts
+type AnimateProps = AnimateOwnProps & { [attr: string]: unknown }
+```
+
+### `Animation`
+
+raea_core_animate::spec::Animation
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `origin` (required) | `number` | – |
+| `freeze` (required) | `number \| null` | – |
+| `fps` (required) | `number` | – |
+| `tracks` (required) | `(AnimTrack)[]` | – |
+| `show_from` (required) | `number \| null` | – |
+| `show_until` (required) | `number \| null` | – |
+
+### `AnimGraphNode`
+
+A node of a <Model graph>.
+
+```ts
+type AnimGraphNode = | { clip: string | number; time?: number; weight?: number; mask?: string[] } | { blend: AnimGraphNode[]; weight?: number; mask?: string[] } | { add: AnimGraphNode[]; weight?: number; mask?: string[] }
+```
+
+### `AnimKey`
+
+raea_core_animate::spec::AnimKey
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `at` (required) | `number` | – |
+| `value` (required) | `number` | – |
+| `color` (required) | `string` | – |
+| `ease` (required) | `string` | – |
+
+### `AnimTrack`
+
+raea_core_animate::spec::AnimTrack
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `prop` (required) | `string` | – |
+| `keys` (required) | `(AnimKey)[]` | – |
+| `unit` (required) | `string` | – |
+| `repeat` (required) | `string` | – |
+| `digits` (required) | `number` | – |
+| `prefix` (required) | `string` | – |
+| `suffix` (required) | `string` | – |
+| `separator` (required) | `string` | – |
+
+### `Curve`
+
+```ts
+type Curve = CurveName | (string & {})
+```
+
+### `CurveName`
+
+Curve names. Any of these, or `bezier(x1,y1,x2,y2)`, `steps(n)`, `spring(mass,damping,stiffness)`,
+`reverse(<curve>)`.
+
+```ts
+type CurveName = | "linear" | "ease" | `${"in" | "out" | "in-out"}-${"quad" | "cubic" | "quart" | "quint" | "sine" | "expo" | "circ" | "back" | "elastic" | "bounce"}`
+```
+
+### `GridFrom`
+
+```ts
+type GridFrom = "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center" | "top" | "bottom" | "left" | "right"
+```
+
+### `Group`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `kind` (required) | `"sequence" \| "parallel"` | – |
+| `steps` (required) | `Step[]` | – |
+| `gap` (required) | `number` | frames between steps of a sequence (negative overlaps) |
+
+### `Keys`
+
+Keyframes by local frame: numbers, or colour text for colour properties (a material's `animate` takes other
+values for its own fields, LinearRgba for an emissive).
+
+```ts
+type Keys = Record<number, V>
+```
+
+### `Move`
+
+Tracks by property, in frames from the move's own start.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `tracks` (required) | `Record<string, TrackSpec \| TrackSpec[]>` | – |
+| `frames` (required) | `number` | how long it runs (its last key) |
+
+### `MoveLike`
+
+```ts
+type MoveLike = MoveName | Move | MoveLike[]
+```
+
+### `MoveName`
+
+```ts
+type MoveName = "rise" | "pop" | "slam" | "slide" | "wipe" | "fill" | "strike" | "pushIn" | "fade"
+```
+
+### `Plan`
+
+A timeline's plan: each part's start frame and move, and the whole length.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `parts` (required) | `Record<string, { at: number; move: Move }>` | – |
+| `frames` (required) | `number` | – |
+
+### `StaggerProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `each` (required) | `number` | frames between one child's entrance and the next |
+| `grid` | `{ cols: number; rows?: number; from?: GridFrom }` | spread by grid distance instead of order |
+| `exitEach` | `number` | the exit staggered too, `exitEach` frames apart (0: all together) |
+| `style` | `CSSProperties` | – |
+| `animate` | `Record<string, TrackSpec \| TrackSpec[] \| Keys> \| Move` | free tracks by property, in local frames: `{ backgroundColor: track({ 0: "#fff", 20: "#000" }) }` |
+| `as` | `string` | the element: "div" by default |
+| `exit` | `MoveLike` | the exit, played at `exitAt` (an entrance reversed: `exit="rise"` sinks back out) |
+| `children` | `ReactNode` | – |
+| `enter` | `MoveLike` | the entrance: a move's name, a move, or several together |
+| `at` | `number` | local frame the entrance starts (0) |
+| `exitAt` | `number` | local frame the exit starts |
+| `mount` | `"during" \| "always"` | "always" (default): in the tree, and its layout, the whole time (invisible before an entrance that fades in); "during": only from the entrance's start until the exit ends (it takes its space when it arrives) |
+| `className` | `string` | – |
+
+### `Step`
+
+A timeline step: [part, move], a group from sequence/parallel/stagger, or a pause in frames.
+
+```ts
+type Step = [part: string, move: MoveLike] | { part: string; move: MoveLike; offset?: number } | Group | number
+```
+
+### `TrackSpec`
+
+One property's keyframes: values by frame, the curve between each pair (one for all, or one per segment).
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `keys` (required) | `[number, V][]` | – |
+| `ease` (required) | `Curve \| Curve[]` | – |
+| `unit` | `"px" \| "%"` | – |
+| `repeat` | `"hold" \| "loop" \| "pingpong" \| `${"loop" \| "pingpong"}:${number}`` | – |
+| `digits` | `number` | – |
+| `prefix` | `string` | a `text` counter's text before and after the number, and between its thousands ("," writes 12,345) |
+| `suffix` | `string` | – |
+| `separator` | `string` | – |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/app.md b/docs/manual/reference/sdk/app.md
new file mode 100644
index 00000000..826d167e
--- /dev/null
+++ b/docs/manual/reference/sdk/app.md
@@ -0,0 +1,307 @@
+---
+title: "raea/app"
+summary: "The App, its plugins and schedules, and the registry a video's compositions are kept in."
+order: 3
+sources: ["sdk/raea/src/app.ts"]
+---
+
+`raea/app` is Bevy's App in TypeScript. A video registers its compositions here (`registerRoot`, `<Composition>`).
+A game or tool written as an App adds plugins with `definePlugin` and systems in Bevy's schedules (`Startup`,
+`Update`, `FixedUpdate` and the rest, exported by name), and `BevyApp` opens a headless App you can step frame by
+frame from a script or a test.
+
+```ts
+import { BevyApp, Startup, Update, definePlugin } from "raea/app";
+
+let n = 0;
+const Counter = definePlugin({
+ name: "counter",
+ build(app) {
+ app.addSystems(Startup, () => { n = 0; });
+ app.addSystems(Update, () => { n += 1; });
+ },
+});
+
+const app = BevyApp.open({ plugins: [] }).addPlugins(Counter);
+app.step(10);
+```
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { App, BevyApp, clearRegistry, Composition } from "raea/app"
+```
+
+`raea/app` exports 1 component, 4 functions, 3 classes, 17 values, 8 types. Bevy's counterpart: `bevy_app`. Source: [sdk/raea/src/app.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/app.ts).
+
+## Components
+
+### `Composition`
+
+Declares a composition inside the root. It draws nothing itself; a renderer finds it through registerRoot.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `id` (required) | `string` | – |
+| `component` (required) | `ComponentType<P>` | – |
+| `width` (required) | `number` | – |
+| `height` (required) | `number` | – |
+| `fps` (required) | `number` | – |
+| `durationInFrames` (required) | `number` | – |
+| `defaultProps` | `P` | – |
+| `edit` | `Edit` | a hand edit laid over the composition (docs/craft-system.md, L): written back by the app's timeline |
+
+## Functions
+
+### `clearRegistry`
+
+Forgets the registered root and its compositions (for tests; exported from the test entry only).
+
+```ts
+function clearRegistry(): void
+```
+
+### `definePlugin`
+
+A TypeScript plugin: `definePlugin({ name: "hud", build(app) { app.addSystems(Update,...) } })`.
+
+```ts
+function definePlugin(p: Plugin): Plugin
+```
+
+### `getCompositions`
+
+The compositions the registered root declares, in order.
+
+```ts
+function getCompositions(): RegisteredComposition[]
+```
+
+### `registerRoot`
+
+Names the root component the renderer starts from, and records its compositions. Call it once.
+
+```ts
+function registerRoot(given: ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentType): void
+```
+
+## Classes
+
+### `App`
+
+A headless Bevy App driven from TypeScript through Bevy's remote protocol: open it with its plugins, then spawn,
+insert, query and step it, and add TypeScript systems to its schedules.
+
+| Member | What it does |
+| --- | --- |
+| `new App(id: number, methods: string[])` | – |
+| `App.open(o: OpenOptions): BevyApp` | A headless App with these plugins; Startup has run, no frame has stepped. TypeScript plugins are built in order once the App is open, then finished and cleaned up; their Startup systems run before the first frame. |
+| `App.stepTogether(apps: BevyApp[], frames?: number): number[]` | Apps stepped together, a frame at a time: a network's peers. Returns each one's frame. |
+| `.methods: string[]` | the methods this App answers (BRP's, raea's and its plugins') |
+| `.id: number` | – |
+| `.isPluginAdded(name: string): boolean` | Whether a plugin of this name is in the App (Bevy's is_plugin_added), Rust or TypeScript. |
+| `.addPlugins(...refs: PluginRef[]): BevyApp` | Adds TypeScript plugins and groups (Bevy's add_plugins): each built in order, then each finished, then each cleaned up. A Rust plugin is compiled in and must be named when the App opens; naming a new one here throws. |
+| `.addSystems(schedule: string, systems: ((app: BevyApp, frame: number) => void) \| ((app: BevyApp, frame: number) => void)[], o?: SystemOptions): BevyApp` | Systems in a schedule (Bevy's add_systems), each as `system` adds one; one of the startup schedules (PreStartup, Startup, PostStartup) runs them once, before the App's next frame. Returns the App, to chain. |
+| `.insertResource<T>(r: Resource<T>, value: T): BevyApp` | Bevy's insert_resource: the resource's value set (setResource). |
+| `.addObserver<T>(e: string \| Event<T>, o?: { entity?: number \| undefined; then?: Then[] \| undefined; }): Observing<T>` | Bevy's add_observer: an observer of an event inside the App (observer). |
+| `.step(frames?: number): number` | `frames` frames on. Returns the frame it's on. With TypeScript systems (`system`), each frame is run schedule by schedule and they run in theirs. |
+| `.system(schedule: string, run: (app: BevyApp, frame: number) => void, o?: SystemOptions): () => void` | A system written in TypeScript: `run` is called every frame right after Bevy's own systems of `schedule` (one of the frame's: "First", "PreUpdate", "StateTransition", "RunFixedMainLoop", the fixed step's "FixedFirst", "FixedPreUpdate", "FixedUpdate", "FixedPostUpdate", "FixedLast" (one fixed step a frame: the clock's step is the timestep), "Update", "SpawnScene", "PostUpdate", "Last"), on that frame's World, before the next schedule's; it queries, changes and observes through the App's methods (query, get, insert, call("world.mutate_components"), observe...). Returns a function that removes it. `o` places it as Bevy's add_systems(...).run_if().before().after().in_set() would: `when` is its run condition (asked every frame before it runs; see `conditions`), `before`/`after` name other systems or sets of the same schedule it runs before or after (a cycle is refused), `set` puts it in a set that `configureSet` gives a condition and an order. Without an order, systems run in the order they were added. |
+| `.configureSet(name: string, o: { when?: Condition \| undefined; before?: string \| string[] \| undefined; after?: string \| string[] \| undefined; }): void` | A set of TypeScript systems (Bevy's SystemSet with configure_sets): `when` is asked once per schedule run, before its first member, and a false skips them all; `before`/`after` order the whole set against systems or sets. |
+| `.oneShot<R = void>(fn: (app: BevyApp, frame: number) => R): OneShot<R>` | A one-shot system (Bevy's register_system + run_system): `run()` runs it now, on the World as it is; `queue()` runs it once the current TypeScript system returns (as Commands::run_system applies at the next sync point), or at the end of the frame if called outside a step. `remove()` unregisters it. |
+| `.frameSchedules(): string[]` | The schedules a frame runs, in order (Bevy's MainScheduleOrder). |
+| `.call<A = unknown>(method: string, params?: unknown): A` | Any method of the App's table, run now: its answer, or a throw with the method's message. |
+| `.spawn(...components: With[]): number` | A new entity with these components. |
+| `.insert(entity: number, ...components: With[]): void` | – |
+| `.get<T>(entity: number, c: Component<T>): T \| undefined` | One component of an entity, or undefined when it hasn't got one. |
+| `.query(o: { data?: Component<unknown>[] \| undefined; has?: Component<unknown>[] \| undefined; without?: Component<unknown>[] \| undefined; }): { entity: number…` | Entities with every component in `has` (and none in `without`), with the `data` components' values. |
+| `.resource<T>(r: Resource<T>): T` | – |
+| `.setResource<T>(r: Resource<T>, value: T): void` | – |
+| `.trigger<T>(e: Event<T>, value: T): void` | Triggers an event: its observers run now. |
+| `.write<T>(m: Message<T>, value: T): void` | Writes a message, for its readers' next run. |
+| `.observe<T>(e: Event<T>, entity?: number \| undefined): () => T[]` | Starts observing an event (BRP's world.observe+watch). Each call of the returned function gives the events triggered since the last call, in order. `entity` limits it to events aimed at that entity. |
+| `.hook(on: "Add" \| "Insert" \| "Discard" \| "Remove" \| "Despawn", component: string \| Component<unknown>, then?: Then[]): Observing<unknown>` | A component hook as an observer inside the App: when `component` is added, inserted, discarded, removed or its entity despawned, `then`'s calls (BRP methods, "$entity" in their params standing for the entity) run right there, in the same flush, before anything else sees the World. `seen()` gives the entities it fired for since the last call; `stop()` removes it. |
+| `.observer<T>(e: string \| Event<T>, o?: { entity?: number \| undefined; then?: Then[] \| undefined; }): Observing<T>` | An observer inside the App for a reflected event: on each trigger (or each aimed at `entity`), `then`'s calls run in the same flush, "$event" standing for the event's value and "$entity" for its target. |
+| `.state<T>(s: State<T>): T \| null` | A state's value (null before it exists). |
+| `.setState<T>(s: State<T>, value: T): void` | A state's next value: it changes at the next frame's StateTransition. |
+| `.schema(crates?: string[] \| undefined): Record<string, unknown>` | The App's registered types as JSON schema (BRP's registry.schema), filtered by crate. |
+| `.close(): void` | – |
+
+### `BevyApp`
+
+A headless Bevy App driven from TypeScript through Bevy's remote protocol: open it with its plugins, then spawn,
+insert, query and step it, and add TypeScript systems to its schedules.
+
+| Member | What it does |
+| --- | --- |
+| `new BevyApp(id: number, methods: string[])` | – |
+| `BevyApp.open(o: OpenOptions): BevyApp` | A headless App with these plugins; Startup has run, no frame has stepped. TypeScript plugins are built in order once the App is open, then finished and cleaned up; their Startup systems run before the first frame. |
+| `BevyApp.stepTogether(apps: BevyApp[], frames?: number): number[]` | Apps stepped together, a frame at a time: a network's peers. Returns each one's frame. |
+| `.methods: string[]` | the methods this App answers (BRP's, raea's and its plugins') |
+| `.id: number` | – |
+| `.isPluginAdded(name: string): boolean` | Whether a plugin of this name is in the App (Bevy's is_plugin_added), Rust or TypeScript. |
+| `.addPlugins(...refs: PluginRef[]): BevyApp` | Adds TypeScript plugins and groups (Bevy's add_plugins): each built in order, then each finished, then each cleaned up. A Rust plugin is compiled in and must be named when the App opens; naming a new one here throws. |
+| `.addSystems(schedule: string, systems: ((app: BevyApp, frame: number) => void) \| ((app: BevyApp, frame: number) => void)[], o?: SystemOptions): BevyApp` | Systems in a schedule (Bevy's add_systems), each as `system` adds one; one of the startup schedules (PreStartup, Startup, PostStartup) runs them once, before the App's next frame. Returns the App, to chain. |
+| `.insertResource<T>(r: Resource<T>, value: T): BevyApp` | Bevy's insert_resource: the resource's value set (setResource). |
+| `.addObserver<T>(e: string \| Event<T>, o?: { entity?: number \| undefined; then?: Then[] \| undefined; }): Observing<T>` | Bevy's add_observer: an observer of an event inside the App (observer). |
+| `.step(frames?: number): number` | `frames` frames on. Returns the frame it's on. With TypeScript systems (`system`), each frame is run schedule by schedule and they run in theirs. |
+| `.system(schedule: string, run: (app: BevyApp, frame: number) => void, o?: SystemOptions): () => void` | A system written in TypeScript: `run` is called every frame right after Bevy's own systems of `schedule` (one of the frame's: "First", "PreUpdate", "StateTransition", "RunFixedMainLoop", the fixed step's "FixedFirst", "FixedPreUpdate", "FixedUpdate", "FixedPostUpdate", "FixedLast" (one fixed step a frame: the clock's step is the timestep), "Update", "SpawnScene", "PostUpdate", "Last"), on that frame's World, before the next schedule's; it queries, changes and observes through the App's methods (query, get, insert, call("world.mutate_components"), observe...). Returns a function that removes it. `o` places it as Bevy's add_systems(...).run_if().before().after().in_set() would: `when` is its run condition (asked every frame before it runs; see `conditions`), `before`/`after` name other systems or sets of the same schedule it runs before or after (a cycle is refused), `set` puts it in a set that `configureSet` gives a condition and an order. Without an order, systems run in the order they were added. |
+| `.configureSet(name: string, o: { when?: Condition \| undefined; before?: string \| string[] \| undefined; after?: string \| string[] \| undefined; }): void` | A set of TypeScript systems (Bevy's SystemSet with configure_sets): `when` is asked once per schedule run, before its first member, and a false skips them all; `before`/`after` order the whole set against systems or sets. |
+| `.oneShot<R = void>(fn: (app: BevyApp, frame: number) => R): OneShot<R>` | A one-shot system (Bevy's register_system + run_system): `run()` runs it now, on the World as it is; `queue()` runs it once the current TypeScript system returns (as Commands::run_system applies at the next sync point), or at the end of the frame if called outside a step. `remove()` unregisters it. |
+| `.frameSchedules(): string[]` | The schedules a frame runs, in order (Bevy's MainScheduleOrder). |
+| `.call<A = unknown>(method: string, params?: unknown): A` | Any method of the App's table, run now: its answer, or a throw with the method's message. |
+| `.spawn(...components: With[]): number` | A new entity with these components. |
+| `.insert(entity: number, ...components: With[]): void` | – |
+| `.get<T>(entity: number, c: Component<T>): T \| undefined` | One component of an entity, or undefined when it hasn't got one. |
+| `.query(o: { data?: Component<unknown>[] \| undefined; has?: Component<unknown>[] \| undefined; without?: Component<unknown>[] \| undefined; }): { entity: number…` | Entities with every component in `has` (and none in `without`), with the `data` components' values. |
+| `.resource<T>(r: Resource<T>): T` | – |
+| `.setResource<T>(r: Resource<T>, value: T): void` | – |
+| `.trigger<T>(e: Event<T>, value: T): void` | Triggers an event: its observers run now. |
+| `.write<T>(m: Message<T>, value: T): void` | Writes a message, for its readers' next run. |
+| `.observe<T>(e: Event<T>, entity?: number \| undefined): () => T[]` | Starts observing an event (BRP's world.observe+watch). Each call of the returned function gives the events triggered since the last call, in order. `entity` limits it to events aimed at that entity. |
+| `.hook(on: "Add" \| "Insert" \| "Discard" \| "Remove" \| "Despawn", component: string \| Component<unknown>, then?: Then[]): Observing<unknown>` | A component hook as an observer inside the App: when `component` is added, inserted, discarded, removed or its entity despawned, `then`'s calls (BRP methods, "$entity" in their params standing for the entity) run right there, in the same flush, before anything else sees the World. `seen()` gives the entities it fired for since the last call; `stop()` removes it. |
+| `.observer<T>(e: string \| Event<T>, o?: { entity?: number \| undefined; then?: Then[] \| undefined; }): Observing<T>` | An observer inside the App for a reflected event: on each trigger (or each aimed at `entity`), `then`'s calls run in the same flush, "$event" standing for the event's value and "$entity" for its target. |
+| `.state<T>(s: State<T>): T \| null` | A state's value (null before it exists). |
+| `.setState<T>(s: State<T>, value: T): void` | A state's next value: it changes at the next frame's StateTransition. |
+| `.schema(crates?: string[] \| undefined): Record<string, unknown>` | The App's registered types as JSON schema (BRP's registry.schema), filtered by crate. |
+| `.close(): void` | – |
+
+### `PluginGroup`
+
+Plugins added together, as Bevy's PluginGroup: `group.set(p)` replaces the member of p's name, `disable(name)`
+leaves one out, and the App adds the rest in order.
+
+| Member | What it does |
+| --- | --- |
+| `new PluginGroup(name: string, plugins: (string \| Plugin \| { readonly plugin: string; })[])` | – |
+| `.name: string` | – |
+| `.set(p: Plugin): PluginGroup` | – |
+| `.disable(name: string): PluginGroup` | – |
+| `.enable(name: string): PluginGroup` | – |
+| `.build(): (string \| Plugin)[]` | – |
+
+## Values
+
+### `conditions`
+
+Bevy's common run conditions (bevy_ecs::schedule::common_conditions, bevy_state's in_state, bevy_time's on_timer),
+as Conditions for `system(..., { when })` and `configureSet`. Each call makes a fresh condition with its own memory
+(runOnce, resourceChanged, onTimer).
+
+### `First`
+
+The frame's schedules, in the order Bevy runs them (with StateTransition and the fixed step's inside).
+
+### `FixedFirst`
+
+The fixed step's schedules, run once a frame at the clock's step.
+
+### `FixedLast`
+
+### `FixedPostUpdate`
+
+### `FixedPreUpdate`
+
+### `FixedUpdate`
+
+### `Last`
+
+### `PostStartup`
+
+### `PostUpdate`
+
+### `PreStartup`
+
+Bevy's schedules by their labels, for `app.addSystems(Update,...)` as in Rust.
+
+### `PreUpdate`
+
+### `RunFixedMainLoop`
+
+### `SpawnScene`
+
+### `Startup`
+
+### `StateTransition`
+
+### `Update`
+
+The frame's main schedules: Update for game logic, then SpawnScene, PostUpdate and Last.
+
+## Types
+
+### `CompositionProps`
+
+The props of [`Composition`](#composition), tabled there.
+
+### `Condition`
+
+A run condition: asked on the frame's World before a system or set runs; false skips it this frame.
+
+```ts
+type Condition = (app: BevyApp, frame: number) => boolean
+```
+
+### `Edit`
+
+A hand edit: `segments` are the composition's own frame ranges, [from, to), played one after another, so a trim,
+a split, a cut word or a moved span is a change to this list; the length becomes their sum.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `segments` | `readonly (readonly [number, number])[]` | – |
+
+### `OpenOptions`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `plugins` (required) | `PluginRef[]` | the App's plugins, in order: Rust ones by the name this build registered them under (a declaration's name, or its halves: lightyear_server), compiled in and added before Startup; TypeScript ones (definePlugin) built after |
+| `fps` | `number` | frames a second: one step is 1/fps of Time (default 60) |
+| `serve` | `number` | serve BRP over HTTP on this port (a dev tool, a BRP client, curl) |
+
+### `Plugin`
+
+A plugin written in TypeScript, as bevy_app's Plugin trait: `build` adds its systems, resources, observers and
+states to the App; once every plugin is built, each one's `finish` runs, then each one's `cleanup`, as App::run
+does. Unique by `name` unless `isUnique` is false (Bevy panics on a unique plugin added twice; this throws).
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` (required) | `string` | – |
+| `build` (required) | `(app: BevyApp) => void` | – |
+| `finish` | `((app: BevyApp) => void) \| undefined` | – |
+| `cleanup` | `((app: BevyApp) => void) \| undefined` | – |
+| `isUnique` | `boolean` | – |
+
+### `PluginRef`
+
+A plugin of any author: a Rust plugin in raea's plugin build by its declared name (package.json raea.plugins:
+"avian", or a half: "lightyear_server") or by its generated handles (`avian` from avian.gen.tsx, which carries
+`plugin: "avian"`), a TypeScript Plugin, or a group of them.
+
+```ts
+type PluginRef = string | { readonly plugin: string } | Plugin | PluginGroup
+```
+
+### `RegisteredComposition`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `id` (required) | `string` | – |
+| `component` (required) | `ComponentType<any>` | – |
+| `width` (required) | `number` | – |
+| `height` (required) | `number` | – |
+| `fps` (required) | `number` | – |
+| `durationInFrames` (required) | `number` | – |
+| `defaultProps` (required) | `Record<string, unknown>` | – |
+
+### `SystemOptions`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` | `string` | its name, for other systems' before/after |
+| `set` | `string` | the set it's in (configureSet) |
+| `when` | `Condition` | its run condition |
+| `before` | `string \| string[]` | systems or sets (by name) it runs before |
+| `after` | `string \| string[]` | systems or sets (by name) it runs after |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/asset.md b/docs/manual/reference/sdk/asset.md
new file mode 100644
index 00000000..cd26455b
--- /dev/null
+++ b/docs/manual/reference/sdk/asset.md
@@ -0,0 +1,187 @@
+---
+title: "raea/asset"
+summary: "Files the project holds and assets made for it: staticFile, generated sound and music, and glTF bytes."
+order: 46
+sources: ["sdk/raea/src/asset.ts"]
+---
+
+`staticFile` names a file in the project, so the renderer finds it wherever the composition runs. The generated
+assets (`sao` for a sound effect, `tokensynthNote` for an instrument's note, `lyria` for music, `fish` for speech)
+are made the first time a render needs them and kept in the project's asset store, so later renders reuse them.
+
+```tsx
+import { Audio } from "raea";
+import { sao } from "raea/asset";
+
+function Door() {
+ return <Audio src={sao("a heavy wooden door creaks open", { seconds: 3 }).src} />;
+}
+```
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { fish, glbBytes, isGeneratedAsset, linearRgba } from "raea/asset"
+```
+
+`raea/asset` exports 9 functions, 1 value, 8 types. Bevy's counterpart: `bevy_asset`. Source: [sdk/raea/src/asset.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/asset.ts).
+
+## Functions
+
+### `fish`
+
+Retired on 2026-11-05: Fish narration is no longer part of raea. Narrate with `<Speech text start>` from
+raea/speech (Pocket TTS, on this computer), or make a line with a `raea gen` step on `fish:<model>` and your own
+FISH_API_KEY. Kept as a name only, so an older edit says what to use instead of failing to bundle.
+
+```ts
+function fish(text: string, _options?: Record<string, unknown>): never
+```
+
+### `glbBytes`
+
+The scene as glTF binary bytes.
+
+```ts
+function glbBytes(scene: GlbScene): Uint8Array<ArrayBufferLike>
+```
+
+### `isGeneratedAsset`
+
+Whether a value is a generated asset (what sao, tokensynthNote and lyria return), not a file path.
+
+```ts
+function isGeneratedAsset(v: unknown): v is GeneratedAsset
+```
+
+### `linearRgba`
+
+sRGB hex to linear rgba
+
+```ts
+function linearRgba(c: string | Rgba, alpha?: number): Rgba
+```
+
+### `lyria`
+
+Music an older edit generated (30 seconds by default). Retired: a take already made plays, a new one is refused.
+
+```ts
+function lyria(prompt: string, options?: { seconds?: number; }): GeneratedAsset
+```
+
+### `sao`
+
+A sound effect to generate (2 seconds by default).
+
+```ts
+function sao(prompt: string, options?: { seconds?: number; }): GeneratedAsset
+```
+
+### `staticFile`
+
+The URL of a file in the space's media folder, each path segment URL-encoded.
+
+```ts
+function staticFile(path: string): string
+```
+
+### `tokensynthNote`
+
+One note of an instrument described in words, rendered by TokenSynth (local, CPU): a Sampler's root note.
+
+```ts
+function tokensynthNote(timbre: string, midi: number, options?: { seconds?: number; velocity?: number; seed?: number; precision?: "fp32" | "fp16" | "bf16" | "int8" | "coreml"; }): GeneratedAsset
+```
+
+### `writeGlb`
+
+The scene written as a.glb named by its content (once per process), its path: a `<Model src>`. Under plain bun
+(no engine) nothing is written and the would-be path is still returned, so a composition can be checked.
+
+```ts
+function writeGlb(scene: GlbScene): string
+```
+
+## Values
+
+### `MEDIA_ROOT`
+
+Where the space's media folder is served from.
+
+## Types
+
+### `AssetKind`
+
+```ts
+type AssetKind = "lyria" | "sao" | "tokensynth"
+```
+
+### `GeneratedAsset`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `kind` (required) | `AssetKind` | – |
+| `prompt` (required) | `string` | – |
+| `seconds` (required) | `number` | – |
+| `id` (required) | `string` | a stable hash of kind, prompt and seconds |
+| `src` (required) | `string` | "asset:<kind>/<id>" |
+| `options` | `Record<string, unknown>` | the generator's own settings (a TokenSynth note's midi, velocity, seed and device) |
+
+### `GlbClip`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` (required) | `string` | – |
+| `times` (required) | `ArrayLike<number>` | sample times (any unit the Model's `time` uses) |
+| `rotations` (required) | `ArrayLike<number>[]` | per joint, a quaternion x y z w per sample: the joint's rotation in its parent's frame |
+| `translations` | `Record<number, ArrayLike<number>>` | per root joint (by joint index), a translation offset x y z per sample, added to its rest translation |
+
+### `GlbJoint`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` (required) | `string` | – |
+| `parent` (required) | `number` | index of the parent joint, -1 for a root |
+| `head` (required) | `[number, number, number]` | the joint's head in world space at rest (its node's rest translation is head - parent's head) |
+
+### `GlbMaterial`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `color` | `string \| Rgba` | hex (#rrggbb) or linear rgba 0..1 |
+| `unlit` | `boolean` | drawn without light (KHR_materials_unlit) |
+| `blend` | `boolean` | alpha-blended (the colour's alpha, times the vertex colours' alpha) |
+| `doubleSided` | `boolean` | – |
+| `roughness` | `number` | – |
+| `metalness` | `number` | – |
+| `emissive` | `string` | – |
+
+### `GlbPrimitive`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `positions` (required) | `ArrayLike<number>` | x y z per vertex |
+| `normals` | `ArrayLike<number>` | – |
+| `colors` | `ArrayLike<number>` | r g b a per vertex, linear 0..1 (multiplies the material's colour) |
+| `indices` | `ArrayLike<number>` | by threes for triangles, by twos for lines; none: every vertex in order |
+| `mode` | `"triangles" \| "lines"` | – |
+| `joints` | `ArrayLike<number>` | four joint indices per vertex (a skinned mesh) |
+| `weights` | `ArrayLike<number>` | four weights per vertex, summing to 1 |
+| `material` | `GlbMaterial` | – |
+
+### `GlbScene`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `primitives` (required) | `GlbPrimitive[]` | – |
+| `joints` | `GlbJoint[]` | a skin: all primitives are skinned by these joints when it's given |
+| `clips` | `GlbClip[]` | – |
+
+### `Rgba`
+
+```ts
+type Rgba = [number, number, number, number]
+```
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/audio.md b/docs/manual/reference/sdk/audio.md
new file mode 100644
index 00000000..1d2000c1
--- /dev/null
+++ b/docs/manual/reference/sdk/audio.md
@@ -0,0 +1,423 @@
+---
+title: "raea/audio"
+summary: "Sound: Audio, the master Mix, speech, sound in 3D space, and a song's energy map."
+order: 43
+sources: ["sdk/raea/src/audio.ts"]
+---
+
+`<Audio>` plays sound in step with the frame. `<Mix>` masters everything under it to a loudness and a true-peak
+ceiling (-14 LUFS and -1 dBTP suit the major platforms). `song()` and `useSong()` read the energy map
+[`raea song`](../cli/song.md) writes, so cuts can land on beats and drops. `<Speech>` speaks a line, and
+`<Sound3D>` places a sound in a 3D scene.
+
+```tsx
+import { staticFile } from "raea";
+import { Audio, Mix } from "raea/audio";
+
+function Soundtrack() {
+ return (
+ <Mix lufs={-14} ceiling={-1}>
+ <Audio src={staticFile("media/voice.wav")} bus="voice" />
+ <Audio src={staticFile("media/bed.m4a")} bus="music" gainDb={-12} fadeOut={1.5} />
+ </Mix>
+ );
+}
+```
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { Audio, Mix, music, prepareSpeech } from "raea/audio"
+```
+
+`raea/audio` exports 6 components, 1 hook, 7 functions, 1 value, 25 types. Bevy's counterpart: `bevy_audio; raea plays it with seedling on its own mixer`. Source: [sdk/raea/src/audio.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/audio.ts).
+
+## Components
+
+### `Audio`
+
+Sound in step with the frame; no picture. A muted or ended Audio is silent.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `src` (required) | `string \| GeneratedAsset` | a file URL, or a generated asset from lyria() or sao() |
+
+Also takes the props of [`MediaProps`](video.md#mediaprops).
+
+### `Mix`
+
+The master: every sound in the composition brought to `lufs` integrated loudness (-14) under a true-peak limiter at
+`ceiling` dBTP (-1.5), as the platforms play back. Put one in the composition, around the soundtrack or anywhere.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `lufs` | `number` | integrated loudness the mix is brought to (EBU R128, LUFS) |
+| `ceiling` | `number` | the limiter's true-peak ceiling (dBTP) |
+| `children` | `ReactNode` | what it masters, when it's written around the soundtrack (<Mix><Voice /><Bed /></Mix>): rendered as they are |
+
+### `Seedling`
+
+A game's sample, played by bevy_seedling on raea's mixer from the frame it first shows until it leaves the page,
+with its effects in its chain. A render and a live play hear the same. Give a repeated one-shot a new `id` each
+time: `{hit && <Seedling src={staticFile("hit.wav")} id={`hit-${hits}`} />}`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `src` (required) | `string \| GeneratedAsset` | the sample: a media file (staticFile), or a generated sound (sao(...), tokensynth(...)) from the asset store |
+| `id` | `string` | the player's identity while it plays: a new id starts a new player (default: the src) |
+| `volume` | `number` | linear gain, from the first frame (default 1) |
+| `speed` | `number` | playback speed (default 1); may change frame to frame |
+| `loop` | `boolean` | – |
+| `fx` | `SeedlingFx[]` | a serial chain of effects on this player |
+| `at` | `[number, number, number]` | where it sounds from in the 3D scene (metres, the Canvas3D's frame): heard from the scene's camera, panned, fading and dulling with distance, pitched by its speed toward or away (doppler); may move frame to frame. Unset: a sound with no place |
+| `muffle` | `number` | a lowpass (Hz) for what stands between it and the camera: a wall, a window |
+
+### `SongPlot`
+
+The map drawn for a human to check: section bands named, the energy curve with builds, stops, dips and drops on
+it, hits, the feature lanes, and the pacing (cuts per bar). `raea song FILE --plot OUT.png` renders it.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `map` (required) | `SongMap` | – |
+| `width` | `number` | – |
+| `height` | `number` | – |
+| `title` | `string` | – |
+
+### `Sound3D`
+
+A sound in the 3D scene: a <Seedling> at a place (`at`), heard from the scene's camera as it moves, in a render and
+in a game alike. A moving emitter (a car, a fly, a pan sliding) takes its place frame by frame.
+
+ <Sound3D src={staticFile("kettle.wav")} at={onRun(right, 2.7, 0.35, 1.1)} loop volume={0.6} />
+
+Also takes the props of [`SeedlingProps`](#seedlingprops).
+
+### `Speech`
+
+A line said on the frames it's rendered: heard from `start` (made ahead while `start` is null), stopped at the next
+word after `cut`. Keep it rendered until the line ends (speechAt's `ended`): taken off the page it stops at once
+(faded over 10 ms).
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `start` (required) | `number \| null` | the frame it's heard from; null: not yet (made ahead, not heard) |
+| `cut` | `number \| null` | the frame it's interrupted at: it stops at the next word's start; null: said to its end |
+| `volume` | `number` | gain (1) |
+
+Also takes the props of [`Line`](#line) (`text`, `voice`, `seed`, `temperature`).
+
+## Hooks
+
+### `useSong`
+
+Where the song is at the current frame (frame 0 of the enclosing Sequence is `offset` seconds into the song), with
+the map bound to the composition's fps as `song`.
+
+```ts
+function useSong(map: SongMap, options?: UseSongOptions): SongMoment & { song: Song; }
+```
+
+## Functions
+
+### `prepareSpeech`
+
+Starts making a line now (or finds it made): call it as soon as the text is known.
+
+```ts
+function prepareSpeech(line: Line): void
+```
+
+### `song`
+
+A song map bound to a frame rate (and where frame 0 sits in the song): frames from song times, and the reverse.
+
+```ts
+function song(map: SongMap, options: SongOptions): Song
+```
+
+### `songAt`
+
+Where the song is at `t` seconds: a pure function of the map.
+
+```ts
+function songAt(map: SongMap, t: number): SongMoment
+```
+
+### `speechAt`
+
+Where `line` (heard from `start`, cut at `cut`) is at `frame`: which word, whether it has ended, and where it ends.
+Pure: a function of the line and the frame, so a game may fold it into its state. Waits for the engine if the line
+hasn't been made that far yet (a render always waits; live play rarely has to).
+
+```ts
+function speechAt(line: Line & { start: number; cut?: number | null; }, frame: number, fps: number): SpeechState
+```
+
+### `speechDuration`
+
+A line's length in seconds (waits until all of it is made; pure).
+
+```ts
+function speechDuration(line: Line): number
+```
+
+### `speechMade`
+
+How much of a line has been made so far. Display-only: it depends on the machine and the moment.
+
+```ts
+function speechMade(line: Line): { seconds: number; done: boolean; }
+```
+
+### `speechStart`
+
+The frame a line asked for at `frame` should start: SPEECH_LEAD later.
+
+```ts
+function speechStart(frame: number, fps: number, lead?: number): number
+```
+
+## Values
+
+### `SPEECH_LEAD`
+
+How long after a request a line should start, so live play never waits for it (seconds).
+
+## Types
+
+### `AudioProps`
+
+The props of [`Audio`](#audio), tabled there.
+
+### `CutOptions`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `by` | `"section" \| "bar"` | "section" (default) takes each section's rate, steady across it; "bar" each bar's own |
+| `scale` | `number` | multiplies every rate (2: twice as many cuts), kept on the ladder 0.25..4 |
+| `drops` | `boolean` | cut on every drop (default true) |
+| `stops` | `boolean` | cut on a stop's hits (default true) |
+| `builds` | `boolean` | double the rate through a build's second half (default true) |
+| `minGap` | `number` | cuts closer than this many frames are merged, the earlier kept (default a quarter second) |
+| `from` | `number` | first frame (inclusive), default 0 |
+| `to` | `number` | last frame (exclusive), default the song's end |
+
+### `FrameRange`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `from` | `number` | first frame (inclusive), default 0 |
+| `to` | `number` | last frame (exclusive), default the song's end |
+
+### `Line`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `text` (required) | `string` | – |
+| `voice` | `string` | a Pocket voice ("alba", "marius",...), a clip in ~/.raea-feed/voices by name ("watts"), or a WAV ("/media/narrator.wav" or staticFile("narrator.wav")); the default is "watts" when that clip's there, else alba |
+| `seed` | `number` | which take: another seed says it another way (0) |
+| `temperature` | `number` | Pocket's sampling temperature: lower is calmer and more even, higher livelier (0.7) |
+
+### `MixProps`
+
+The props of [`Mix`](#mix), tabled there.
+
+### `music`
+
+### `SeedlingFx`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `kind` (required) | `string` | one of raea/tone's effect classes by name: Filter, Reverb, Freeverb, FeedbackDelay, Compressor, EQ3,... |
+| `options` | `Record<string, unknown>` | its options, by Tone's names |
+
+### `SeedlingProps`
+
+The props of [`Seedling`](#seedling), tabled there.
+
+### `Song`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `map` (required) | `SongMap` | – |
+| `fps` (required) | `number` | – |
+| `offset` (required) | `number` | – |
+| `frame` (required) | `(seconds: number) => number` | the frame a song time falls on |
+| `seconds` (required) | `(frame: number) => number` | the song's seconds at a frame |
+| `at` (required) | `(frame: number) => SongMoment` | where the song is at a frame |
+| `onBeat` (required) | `(every?: number \| undefined, range?: FrameRange \| undefined) => number[]` | frames of every `every`-th beat (1: each beat), counted from the song's first |
+| `onDownbeat` (required) | `(every?: number \| undefined, range?: FrameRange \| undefined) => number[]` | frames of every `every`-th downbeat |
+| `eventsOf` (required) | `(kind: SongEventKind, range?: FrameRange \| undefined) => { frame: number; event: SongEv…` | frames of every event of a kind (a build's or stop's start), with the event |
+| `cutsAt` (required) | `(options?: CutOptions \| undefined) => number[]` | frames to cut on, paced to the energy: each section's (or bar's) rate, on its beats, plus drops, a stop's hits, and a build's second half at double rate |
+
+### `SongBar`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `time` (required) | `number` | – |
+| `beat` (required) | `number` | – |
+| `beats` (required) | `number` | – |
+| `energy` (required) | `number` | – |
+| `cuts` (required) | `number` | – |
+
+### `SongEvent`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `kind` (required) | `SongEventKind` | – |
+| `time` (required) | `number` | seconds from the song's start: a beat (drop, a downbeat) or the grid's nearest beat or half beat (hit) |
+| `end` | `number` | spans (build, stop, dip, break) end here |
+| `beat` (required) | `number` | – |
+| `bar` (required) | `number` | – |
+| `beats` | `number` | – |
+| `strength` (required) | `number` | 0..1 |
+| `into` | `number \| null` | a build or stop: the drop it leads into, seconds |
+| `hits` | `SongHit[]` | a stop: its sparse hits |
+| `rise` | `number` | a drop: the energy of the bar after minus the bar before (negative when the band cuts after one big hit) |
+| `holds` | `boolean` | a drop: the bar after stays up (false: one hit, then the band cuts out) |
+| `afterStop` | `boolean` | – |
+| `afterBuild` | `boolean` | – |
+| `gapBefore` | `boolean` | a drop: a breath of near-silence just before it |
+| `at` | `number` | a hit: the onset's own time; how far over the groove it stands |
+| `over` | `number` | – |
+
+### `SongEventKind`
+
+```ts
+type SongEventKind = "build" | "drop" | "stop" | "hit" | "dip" | "break"
+```
+
+### `SongFeatures`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `loudness` (required) | `number[]` | – |
+| `onsets` (required) | `number[]` | – |
+| `brightness` (required) | `number[]` | – |
+| `low` (required) | `number[]` | – |
+| `high` (required) | `number[]` | – |
+| `energy` (required) | `number[]` | – |
+
+### `SongHit`
+
+A hit inside a stop: `time` on the beat grid (a beat or half beat), `at` where the onset is.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `time` (required) | `number` | – |
+| `at` (required) | `number` | – |
+| `strength` (required) | `number` | – |
+
+### `SongLevel`
+
+```ts
+type SongLevel = "intro" | "low" | "mid" | "high" | "outro"
+```
+
+### `SongMap`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `version` (required) | `number` | – |
+| `duration` (required) | `number` | – |
+| `tempo` (required) | `number \| null` | – |
+| `beatsPerBar` (required) | `number` | – |
+| `beats` (required) | `number[]` | – |
+| `downbeats` (required) | `number[]` | – |
+| `features` (required) | `SongFeatures` | one value a beat, 0..1 over the song |
+| `bars` (required) | `SongBar[]` | – |
+| `sections` (required) | `SongSection[]` | – |
+| `events` (required) | `SongEvent[]` | – |
+| `sectionsFrom` | `"markers" \| "novelty"` | – |
+| `boundaries` | `{ time: number; beat: number; bar: number; strength: number }[]` | – |
+| `source` | `string \| null` | – |
+
+### `SongMoment`
+
+Where a moment of the song is. Seconds are the song's; infinities when there's no such event.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `time` (required) | `number` | – |
+| `beat` (required) | `number` | the beat at or before `time` (-1 before the first) |
+| `bar` (required) | `number` | the bar at or before `time` (-1 before the first beat) |
+| `beatInBar` (required) | `number` | 0-based position in the bar |
+| `phase` (required) | `number` | 0..1 through the beat, and through the bar |
+| `barPhase` (required) | `number` | – |
+| `energy` (required) | `number` | the features at `time`, interpolated between beats |
+| `loudness` (required) | `number` | – |
+| `onsets` (required) | `number` | – |
+| `brightness` (required) | `number` | – |
+| `low` (required) | `number` | – |
+| `section` (required) | `SongSection \| null` | – |
+| `sectionIndex` (required) | `number` | – |
+| `sectionProgress` (required) | `number` | 0..1 through the section |
+| `cutsPerBar` (required) | `number` | the bar's suggested cut rate (cuts per bar) |
+| `drop` (required) | `SongEvent \| null` | the last drop at or before `time`, the next after it |
+| `nextDrop` (required) | `SongEvent \| null` | – |
+| `sinceDrop` (required) | `number` | – |
+| `untilDrop` (required) | `number` | – |
+| `build` (required) | `SongEvent \| null` | the build `time` is in, and 0..1 through it |
+| `inBuild` (required) | `boolean` | – |
+| `buildProgress` (required) | `number` | – |
+| `stop` (required) | `SongEvent \| null` | the stop `time` is in |
+| `inStop` (required) | `boolean` | – |
+| `dip` (required) | `SongEvent \| null` | the dip or break `time` is in |
+| `next` (required) | `SongEvent \| null` | the next event of any kind after `time` |
+
+### `SongOptions`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `fps` (required) | `number` | the composition's frame rate |
+| `offset` | `number` | seconds into the song at frame 0 (where an <Audio> of it starts: its startFrom over fps) |
+
+### `SongPlotProps`
+
+The props of [`SongPlot`](#songplot), tabled there.
+
+### `SongSection`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` (required) | `string` | – |
+| `level` (required) | `SongLevel` | – |
+| `time` (required) | `number` | – |
+| `end` (required) | `number` | – |
+| `beat` (required) | `number` | – |
+| `bar` (required) | `number` | – |
+| `energy` (required) | `number` | – |
+| `cuts` (required) | `number` | suggested cuts per bar: 0.25, 0.5, 1, 2 or 4 |
+
+### `SpeechProps`
+
+The props of [`Speech`](#speech), tabled there.
+
+### `SpeechState`
+
+Where a line is at a frame.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `started` (required) | `boolean` | the frame is at or past its start |
+| `word` (required) | `number` | the word being spoken (an index into `words`), -1 before the first |
+| `ended` (required) | `boolean` | it has finished (said to its end, or stopped at its cut) |
+| `endFrame` (required) | `number \| null` | the frame it ends on, once that's known (always known for a cut line, and for any line once it's all made) |
+| `words` (required) | `string[]` | the line's words as Pocket says them (so far: a long line's later sentences are added as they're reached) |
+
+### `Tone`
+
+### `UseSongOptions`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `offset` | `number` | seconds into the song at frame 0 of the enclosing Sequence |
+
+### `VolumeProp`
+
+```ts
+type VolumeProp = number | ((mediaFrame: number) => number)
+```
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/brief.md b/docs/manual/reference/sdk/brief.md
new file mode 100644
index 00000000..ac98e40f
--- /dev/null
+++ b/docs/manual/reference/sdk/brief.md
@@ -0,0 +1,256 @@
+---
+title: "raea/brief"
+summary: "The specs an agent writes as data: brief, script, taste, plan and controller, checked against raea's schemas."
+order: 4
+sources: ["sdk/raea/src/brief.ts", "core/brief/src"]
+---
+
+A spec is a TypeScript module whose default export is data: what a project is for (`brief`), a storyboard
+(`script`), the person's or the house's taste (`taste`), a frozen plan for a build (`plan`) and a workspace's settings
+(`controller`). It renders nothing and imports nothing that renders. The types are generated from the Rust schemas
+raea reads them with, so what TypeScript accepts is what raea accepts; [`raea spec`](../cli/spec.md) prints one as
+checked JSON.
+
+```ts
+// brief.ts
+import { brief } from "raea/brief";
+
+export default brief({
+ title: "Spring launch",
+ for: "Acme Running",
+ audience: "runners who already own our shoes, on their phones",
+ believe: "the new sole makes an easy run feel easier",
+ mode: ["pitch"],
+ deliver: [{ name: "launch-9x16", specs: ["30 s", "9:16", "with sound"] }],
+});
+```
+
+See [Workspaces and projects](../../concepts/workspaces.md) for where each spec lives.
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { brief, controller, plan, script } from "raea/brief"
+```
+
+`raea/brief` exports 5 functions, 28 types. Source: [sdk/raea/src/brief.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/brief.ts).
+
+## Functions
+
+### `brief`
+
+A project's brief (brief.ts): what to make, for whom, the one thing to believe, its deliverables and staged tasks.
+
+```ts
+function brief(b: Brief): Brief
+```
+
+### `controller`
+
+A workspace's controller (controllers/<id>.ts): settings in groups of typed fields that every agent works to.
+A standing decision ("every ad is 9:16"), not one piece of work: that's a feed item, and a note on it. The raea app
+shows a new controller in the project's feed, and an agent brings one to the person with `controller_post`.
+
+```ts
+function controller(c: ControllerInput): ControllerInput
+```
+
+### `plan`
+
+An object's plan (plan.ts): its parts by name, levels, counts, materials.
+
+```ts
+function plan(p: Plan): Plan
+```
+
+### `script`
+
+A storyboard or a screenplay (script.ts): scenes, beats, lines, camera and cut.
+
+```ts
+function script(s: Script): Script
+```
+
+### `taste`
+
+Taste (taste.ts): standing rules, some with a check `raea check --taste` holds every export to.
+
+```ts
+function taste(t: Taste): Taste
+```
+
+## Types
+
+### `Agent`
+
+```ts
+type Agent = { name: string, role?: string, }
+```
+
+### `Beat`
+
+```ts
+type Beat = { /** * what's seen (a screenplay's action) */ onScreen: string, /** * the move ("push in on the knife", "orbit left, keeps moving through the cut") */ camera?: string, /** * how this beat is cut into ("match on motion", "hard cut") */ cut?: string, lines?: Array<Line>, /** * sound and music cues…
+```
+
+### `Brief`
+
+```ts
+type Brief = { title: string, logline?: string, /** * who the work is for (a person or a client) */ for?: string, /** * YYYY-MM-DD */ due?: string, /** * who watches or plays it, and where */ audience?: string, /** * the one thing they should think afterwards */ believe?: string, /** * pitch, explain, story, …
+```
+
+### `Check`
+
+```ts
+type Check = { "form": "text-hold", "value": number } | { "form": "text-above", "value": number } | { "form": "text-below", "value": number } | { "form": "text-margin", "value": number } | { "form": "loudness", "value": number } | { "form": "still-max", "value": number }
+```
+
+### `Concept`
+
+```ts
+type Concept = { /** * what it is ("flight feather", "toy rocking horse") */ what: string, style: string, /** * its largest extent, in metres */ size: number, /** * how close it's seen, in metres: sets how much detail up close must hold */ seenFrom: number, material?: string, use?: string, }
+```
+
+### `Controller`
+
+```ts
+type Controller = { id: string, title: string, help?: string, groups: Array<Group>, }
+```
+
+### `ControllerInput`
+
+A controller as written: ids are filled in from titles and labels when left out.
+
+```ts
+type ControllerInput = Omit<Controller, "id" | "groups"> & { id?: string; groups: (Omit<Group, "id" | "fields"> & { id?: string; fields: FieldInput[] })[]; }
+```
+
+### `Count`
+
+```ts
+type Count = number | { min: number, max: number, }
+```
+
+### `Deliverable`
+
+```ts
+type Deliverable = { name: string, /** * "90 s", "16:9", "with sound" */ specs?: Array<string>, /** * the feed item it lands as */ item?: string, /** * its own brief module, when it differs from the project in mode, look or audience */ brief?: string, /** * its script module (storyboard or screenplay) */ script?: s…
+```
+
+### `Field`
+
+```ts
+type Field = { id: string, label: string, help?: string, } & ({ "type": "toggle", value: boolean, } | { "type": "choice", options: Array<string>, value: string, } | { "type": "number", value: number, unit?: string, min?: number, max?: number, step?: number, } | { "type": "text", value: string, placeholder?: s…
+```
+
+### `FieldInput`
+
+A field as written: its id is filled in from its label when left out.
+
+```ts
+type FieldInput = Field extends infer F ? (F extends Field ? Omit<F, "id"> & { id?: string } : never) : never
+```
+
+### `Group`
+
+```ts
+type Group = { id: string, title: string, help?: string, fields: Array<Field>, }
+```
+
+### `Kind`
+
+```ts
+type Kind = { "type": "toggle", value: boolean, } | { "type": "choice", options: Array<string>, value: string, } | { "type": "number", value: number, unit?: string, min?: number, max?: number, step?: number, } | { "type": "text", value: string, placeholder?: string, multiline?: boolean, } | { "type": "list",…
+```
+
+### `Level`
+
+```ts
+type Level = "primary" | "secondary" | "tertiary"
+```
+
+### `Line`
+
+```ts
+type Line = { /** * a character, or "narrator" */ who: string, says: string, /** * a screenplay's parenthetical ("quietly") */ how?: string, }
+```
+
+### `Mark`
+
+```ts
+type Mark = "todo" | "done" | "dropped"
+```
+
+### `Part`
+
+```ts
+type Part = { /** * the label it carries into the world ("seat", "leaf", "gem") */ role: string, level: Level, /** * the part it sits on or in; none for the root */ parent?: string, count?: Count, /** * its own, else its parent's, else the concept's */ material?: string, style?: string, /** * what a near cro…
+```
+
+### `Plan`
+
+```ts
+type Plan = { concept: Concept, /** * by name; the build's parts are typed from these keys, so a planned part the build skips is a tsc error */ parts: { [key in string]: Part }, }
+```
+
+### `Reference`
+
+```ts
+type Reference = { target: string, note?: string, }
+```
+
+### `Rule`
+
+```ts
+type Rule = { text: string, check?: Check, }
+```
+
+### `Scene`
+
+```ts
+type Scene = { /** * where and when ("INT. SENATE - NIGHT", or "The brief page") */ heading?: string, beats: Array<Beat>, /** * what the scene must land */ payoff?: string, }
+```
+
+### `Script`
+
+```ts
+type Script = { title: string, logline?: string, scenes: Array<Scene>, }
+```
+
+### `Section`
+
+```ts
+type Section = { heading: string, text: string, }
+```
+
+### `Stage`
+
+```ts
+type Stage = { name: string, tasks: Array<Task>, }
+```
+
+### `Step`
+
+```ts
+type Step = { name: string, by?: string, back?: string, }
+```
+
+### `Task`
+
+```ts
+type Task = { text: string, /** * a task linked to an item takes the item's state (the work is the truth); this is for unlinked ones */ mark?: Mark, agents?: Array<string>, item?: string, tags?: Array<string>, due?: string, /** * the craft verb it was written as ("quieter"): agents read it, the page shows th…
+```
+
+### `Taste`
+
+```ts
+type Taste = { title: string, /** * when this file is read ("Read for pitch, explain and story") */ note?: string, for?: string, /** * the kinds of work with their own taste file (motion, games, sound, ui) */ kinds?: Array<string>, sections: Array<TasteSection>, }
+```
+
+### `TasteSection`
+
+```ts
+type TasteSection = { /** * "Always", "Never", "Camera" */ heading: string, rules: Array<Rule>, }
+```
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/camera.md b/docs/manual/reference/sdk/camera.md
new file mode 100644
index 00000000..70c227eb
--- /dev/null
+++ b/docs/manual/reference/sdk/camera.md
@@ -0,0 +1,233 @@
+---
+title: "raea/camera"
+summary: "Cameras and the views they make: Camera3d, the Canvas3D a 2D scene draws in, HDR and matchmoved cameras."
+order: 63
+sources: ["sdk/raea/src/camera.ts"]
+---
+
+`<Camera3d>` is Bevy's 3D camera: a transform, a projection and what it renders to. `<Canvas3D>` is the stage a
+Bevy-style 2D scene draws in, with Bevy's coordinates (the origin at the centre, +Y up, a unit a pixel).
+`<Matchmove>` drives a camera from the solve [`raea track`](../cli/track.md) makes, so 3D stands in filmed footage.
+
+```tsx
+import { Camera3d } from "raea/camera";
+import { Transform } from "raea/transform";
+
+const Shot = () => <Camera3d transform={Transform.fromXyz(-2, 2.5, 5).lookingAt([0, 0, 0])} projection={{ Perspective: { fov: Math.PI / 4 } }} />;
+```
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { Camera3d, Canvas3D, checkMatchmove, Hdr } from "raea/camera"
+```
+
+`raea/camera` exports 5 components, 1 hook, 3 functions, 9 types. Bevy's counterpart: `bevy_camera`. Source: [sdk/raea/src/camera.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/camera.ts).
+
+## Components
+
+### `Camera3d`
+
+Bevy's Camera3d with its Transform and Projection: it looks along its -Z, +Y up, as Bevy's cameras do.
+
+Bevy: `bevy_camera::components::Camera3d`, `bevy_camera::camera::Camera`, `bevy_camera::projection::Projection`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `transform` | `TransformValue` | – |
+| `projection` | `Projection` | – |
+| `layers` | `number[]` | Bevy's RenderLayers on the camera: it draws only the parts on these layers (a Mesh3d's `layers`; [0] by default) |
+| `order` | `number` | Bevy's Camera order: a camera with a higher one draws after (over) those with lower; 0 by default |
+| `clear_color` | `ClearColorConfig` | Bevy's ClearColorConfig: "Default" (the clear colour), "None" (drawn over what the cameras before it drew, as a second pass), or { Custom: colour } |
+| `viewport` | `CameraViewport` | Bevy's Viewport: the camera draws into this region of the window only, `physical_position` from its top left and `physical_size` big (whole px, at a scale factor of 1) |
+| `children` | `ReactNode` | – |
+
+Used in: [ui/render_ui_to_texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/render_ui_to_texture.tsx), [ui/widgets/viewport_node](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/viewport_node.tsx), [3d/fog_volumes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/fog_volumes.tsx), [3d/fog](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/fog.tsx), [3d/vertex_colors](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/vertex_colors.tsx), [3d/rotate_environment_map](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/rotate_environment_map.tsx), [3d/transparency_3d](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/transparency_3d.tsx), [3d/spherical_area_lights](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/spherical_area_lights.tsx), and 61 more.
+
+### `Canvas3D`
+
+Only for `layered`: the 3D is drawn in the page's order, at the box of the nearest positioned element around it
+(the whole frame when there's none; B3 H7), at that box's size and aspect:
+
+ <div style={{ position: "absolute", left: 100, top: 50, width: 200, height: 150 }}>
+ <Canvas3D layered><Camera3d transform={...} /><Mesh3d>...</Mesh3d></Canvas3D>
+ </div>
+Without `layered` it is its children, as written straight in the page.
+
+Takes [`Canvas3DProps`](3d.md#canvas3dprops)'s props.
+
+### `Hdr`
+
+Bevy's Hdr: put it inside the <Camera3d> to render it to a float target, tone-mapped after, as Bevy's Hdr camera
+is (a Skybox's or an emissive's light above 1 then rolls off in the tone mapping instead of clipping).
+
+Bevy: `bevy_camera::components::Hdr`.
+
+Used in: [3d/rotate_environment_map](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/rotate_environment_map.tsx).
+
+### `Matchmove`
+
+Footage with real 3D standing in it: the clip behind, its camera solved and followed, the subject in front. Fills
+the frame (its camera's view is the frame's); its children are the 3D in the shot's world, lights included.
+
+Takes [`MatchmoveProps`](3d.md#matchmoveprops)'s props.
+
+### `TextureView`
+
+A Bevy texture in an element: `texture` is the id a system lists an Image under in the App's PageTextures (a
+camera's target, a video's frame), drawn at the element's box GPU to GPU. The other props are the <img>'s, its style
+placing and sizing it.
+
+ <TextureView texture={7} style={{ position: "absolute", left: 100, top: 50, width: 200, height: 150 }} />
+
+Bevy: `bevy_render::TextureView`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `texture` (required) | `number` | – |
+
+Also takes the props of `ImgHTMLAttributes` (`height`, `alt`, `crossOrigin`, `decoding`, `fetchPriority`, `loading`, `referrerPolicy`, `sizes`, `srcSet`, `useMap`, `width`); `HTMLAttributes` (`slot`, `style`, `title`, `hidden`, `color`, `content`, `part`, `className`, `id`, `defaultChecked`, `defaultValue`, `suppressContentEditableWarning`, `suppressHydrationWarning`, `accessKey`, `autoCapitalize`, `autoFocus`, `contentEditable`, `contextMenu`, `dir`, `draggable`, `enterKeyHint`, `lang`, `nonce`, `spellCheck`, `tabIndex`, `translate`, `radioGroup`, `role`, `about`, `datatype`, `inlist`, `prefix`, `property`, `rel`, `resource`, `rev`, `typeof`, `vocab`, `autoCorrect`, `autoSave`, `itemProp`, `itemScope`, `itemType`, `itemID`, `itemRef`, `results`, `security`, `unselectable`, `popover`, `popoverTargetAction`, `popoverTarget`, `inert`, `inputMode`, `is`, `exportparts`); `DOMAttributes` (`children`, `dangerouslySetInnerHTML`, `onCopy`, `onCopyCapture`, `onCut`, `onCutCapture`, `onPaste`, `onPasteCapture`, `onCompositionEnd`, `onCompositionEndCapture`, `onCompositionStart`, `onCompositionStartCapture`, `onCompositionUpdate`, `onCompositionUpdateCapture`, `onFocus`, `onFocusCapture`, `onBlur`, `onBlurCapture`, `onChange`, `onChangeCapture`, `onBeforeInput`, `onBeforeInputCapture`, `onInput`, `onInputCapture`, `onReset`, `onResetCapture`, `onSubmit`, `onSubmitCapture`, `onInvalid`, `onInvalidCapture`, `onLoad`, `onLoadCapture`, `onError`, `onErrorCapture`, `onKeyDown`, `onKeyDownCapture`, `onKeyPress`, `onKeyPressCapture`, `onKeyUp`, `onKeyUpCapture`, `onAbort`, `onAbortCapture`, `onCanPlay`, `onCanPlayCapture`, `onCanPlayThrough`, `onCanPlayThroughCapture`, `onDurationChange`, `onDurationChangeCapture`, `onEmptied`, `onEmptiedCapture`, `onEncrypted`, `onEncryptedCapture`, `onEnded`, `onEndedCapture`, `onLoadedData`, `onLoadedDataCapture`, `onLoadedMetadata`, `onLoadedMetadataCapture`, `onLoadStart`, `onLoadStartCapture`, `onPause`, `onPauseCapture`, `onPlay`, `onPlayCapture`, `onPlaying`, `onPlayingCapture`, `onProgress`, `onProgressCapture`, `onRateChange`, `onRateChangeCapture`, `onSeeked`, `onSeekedCapture`, `onSeeking`, `onSeekingCapture`, `onStalled`, `onStalledCapture`, `onSuspend`, `onSuspendCapture`, `onTimeUpdate`, `onTimeUpdateCapture`, `onVolumeChange`, `onVolumeChangeCapture`, `onWaiting`, `onWaitingCapture`, `onAuxClick`, `onAuxClickCapture`, `onClick`, `onClickCapture`, `onContextMenu`, `onContextMenuCapture`, `onDoubleClick`, `onDoubleClickCapture`, `onDrag`, `onDragCapture`, `onDragEnd`, `onDragEndCapture`, `onDragEnter`, `onDragEnterCapture`, `onDragExit`, `onDragExitCapture`, `onDragLeave`, `onDragLeaveCapture`, `onDragOver`, `onDragOverCapture`, `onDragStart`, `onDragStartCapture`, `onDrop`, `onDropCapture`, `onMouseDown`, `onMouseDownCapture`, `onMouseEnter`, `onMouseLeave`, `onMouseMove`, `onMouseMoveCapture`, `onMouseOut`, `onMouseOutCapture`, `onMouseOver`, `onMouseOverCapture`, `onMouseUp`, `onMouseUpCapture`, `onSelect`, `onSelectCapture`, `onTouchCancel`, `onTouchCancelCapture`, `onTouchEnd`, `onTouchEndCapture`, `onTouchMove`, `onTouchMoveCapture`, `onTouchStart`, `onTouchStartCapture`, `onPointerDown`, `onPointerDownCapture`, `onPointerMove`, `onPointerMoveCapture`, `onPointerUp`, `onPointerUpCapture`, `onPointerCancel`, `onPointerCancelCapture`, `onPointerEnter`, `onPointerLeave`, `onPointerOver`, `onPointerOverCapture`, `onPointerOut`, `onPointerOutCapture`, `onGotPointerCapture`, `onGotPointerCaptureCapture`, `onLostPointerCapture`, `onLostPointerCaptureCapture`, `onScroll`, `onScrollCapture`, `onScrollEnd`, `onScrollEndCapture`, `onWheel`, `onWheelCapture`, `onAnimationStart`, `onAnimationStartCapture`, `onAnimationEnd`, `onAnimationEndCapture`, `onAnimationIteration`, `onAnimationIterationCapture`, `onToggle`, `onBeforeToggle`, `onTransitionCancel`, `onTransitionCancelCapture`, `onTransitionEnd`, `onTransitionEndCapture`, `onTransitionRun`, `onTransitionRunCapture`, `onTransitionStart`, `onTransitionStartCapture`); `AriaAttributes` (`aria-activedescendant`, `aria-atomic`, `aria-autocomplete`, `aria-braillelabel`, `aria-brailleroledescription`, `aria-busy`, `aria-checked`, `aria-colcount`, `aria-colindex`, `aria-colindextext`, `aria-colspan`, `aria-controls`, `aria-current`, `aria-describedby`, `aria-description`, `aria-details`, `aria-disabled`, `aria-dropeffect`, `aria-errormessage`, `aria-expanded`, `aria-flowto`, `aria-grabbed`, `aria-haspopup`, `aria-hidden`, `aria-invalid`, `aria-keyshortcuts`, `aria-label`, `aria-labelledby`, `aria-level`, `aria-live`, `aria-modal`, `aria-multiline`, `aria-multiselectable`, `aria-orientation`, `aria-owns`, `aria-placeholder`, `aria-posinset`, `aria-pressed`, `aria-readonly`, `aria-relevant`, `aria-required`, `aria-roledescription`, `aria-rowcount`, `aria-rowindex`, `aria-rowindextext`, `aria-rowspan`, `aria-selected`, `aria-setsize`, `aria-sort`, `aria-valuemax`, `aria-valuemin`, `aria-valuenow`, `aria-valuetext`).
+
+## Hooks
+
+### `useMatchmove`
+
+The solve and this frame's camera, inside a <Matchmove>.
+
+```ts
+function useMatchmove(): MatchmoveState
+```
+
+## Functions
+
+### `checkMatchmove`
+
+Checks a Matchmove's props; throws a TypeError or RangeError naming the prop.
+
+```ts
+function checkMatchmove(p: MatchmoveProps): void
+```
+
+### `matchmoveIndex`
+
+The solve's frame at a time in the clip: the latest at or before it, clamped to the solve.
+
+```ts
+function matchmoveIndex(solve: MatchmoveSolve, time: number): number
+```
+
+### `matchmoveView`
+
+The footage's view in a frame of another shape: the whole view's size (the footage scaled to cover the frame, times
+zoom) and the frame's window in it, in frame pixels.
+
+```ts
+function matchmoveView(footage: { width: number; height: number; }, frame: { width: number; height: number; }, crop?: number | [number, number], zoom?: number): { width: number; height: number; x: number; y: number; }
+```
+
+## Types
+
+### `Camera3dProps`
+
+The props of [`Camera3d`](#camera3d), tabled there.
+
+### `CameraViewport`
+
+Bevy's Viewport on a Camera, its depth range Bevy's default 0..1.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `physical_position` (required) | `[number, number]` | – |
+| `physical_size` (required) | `[number, number]` | – |
+
+### `Canvas3DProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `layered` | `boolean` | the 3D takes its place in the page's tree order instead of lying under the whole page: page elements before the Canvas3D (and the backgrounds of the elements holding it) are under the 3D, showing wherever it has nothing, and hidden by its parts; positioned elements after it are over it. The 3D's background is transparent. Put the Canvas3D straight in a full-frame AbsoluteFill. |
+| `clearColor` | `string` | only with `layered`: the 3D clears to this CSS colour instead of transparent, so its translucent parts blend over it in linear light, as Bevy's do over its ClearColor (a Bevy 2D scene's rgb(43, 44, 47)), not over the page in sRGB. The 3D then lies under the whole page, as Bevy's camera output lies under all its UI (a GlobalZIndex(-1) too). |
+| `children` | `ReactNode` | – |
+
+### `ClearColorConfig`
+
+Bevy's ClearColorConfig.
+
+Bevy: `bevy_camera::clear_color::ClearColorConfig`.
+
+```ts
+type ClearColorConfig = "Default" | "None" | { Custom: Srgba | LinearRgba }
+```
+
+### `MatchmoveCamera`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `t` (required) | `number` | – |
+| `position` (required) | `Vec3` | – |
+| `quaternion` (required) | `[number, number, number, number]` | camera to world, [x, y, z, w]; the camera looks down its -Z with +Y up |
+| `solved` (required) | `boolean` | false: COLMAP didn't register this frame and its pose was interpolated |
+
+### `MatchmoveProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `src` (required) | `string` | the footage: staticFile("clip.mp4") |
+| `from` | `number` | where in the clip the shot starts, and how long it runs (seconds; 0 = to the end) |
+| `seconds` | `number` | – |
+| `subject` | `[number, number, number, number]` | the subject to keep in front of the 3D and out of the solve: a box around it on the first frame, [x, y, w, h] in 0..1 of the frame (EdgeTAM tracks it from there) |
+| `height` | `number` | the camera's height over the ground in metres (1.6 by default: handheld) |
+| `fov` | `number` | the vertical field of view in degrees, for a shot without parallax (a tripod, a pan); a solve with structure finds its own |
+| `smooth` | `number` | frames of smoothing on the solved path (1 by default; 0 for none) |
+| `solve` | `MatchmoveSolve` | a solve to draw from instead of solving (`raea track CLIP -o solve.json`, imported) |
+| `crop` | `number \| [number, number]` | when the frame's shape isn't the footage's (9:16 from 16:9), where the frame sits across it: 0 its left edge, 1 its right, 0.5 the middle (the default); [x, y] for both axes. It may change from frame to frame |
+| `zoom` | `number` | 1 or more: a tighter window on the footage (a punch-in), still locked |
+| `cutout` | `boolean` | draw the subject's cut-out over the 3D (true by default when there's a subject) |
+| `toneMapping` | `"none" \| "tony" \| "aces" \| "agx" \| "neutral" \| "reinhard"` | the scene's tone mapping: "none" by default, which leaves the footage's colours as they are |
+| `children` | `ReactNode` | the 3D that stands in the shot, in the solved world |
+
+### `MatchmoveSolve`
+
+What `raea track` writes and <Matchmove> draws from.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `mode` (required) | `"sfm" \| "rotation" \| "static"` | – |
+| `width` (required) | `number` | the footage's size in pixels, and its frame rate |
+| `height` (required) | `number` | – |
+| `fps` (required) | `number` | – |
+| `from` (required) | `number` | – |
+| `seconds` (required) | `number` | – |
+| `frames` (required) | `number` | – |
+| `fov` (required) | `number` | vertical field of view, degrees; focal length in pixels; the lens's radial distortion |
+| `focal` (required) | `number` | – |
+| `k1` (required) | `number` | – |
+| `registered` (required) | `number` | – |
+| `error` (required) | `number \| null` | mean reprojection error in pixels (null without structure) |
+| `camera_height` (required) | `number` | – |
+| `cameras` (required) | `MatchmoveCamera[]` | – |
+| `points` (required) | `Vec3[]` | the sparse points, in the solved world |
+| `ground` (required) | `{ y: number; normal: Vec3 }` | – |
+| `cut` (required) | `string \| null` | the subject's cut-outs, a path with %04d for the frame (1-based), or null |
+| `notes` (required) | `string[]` | – |
+
+### `MatchmoveState`
+
+Each frame's state under a <Matchmove>, for the 3D inside it.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `solve` (required) | `MatchmoveSolve` | – |
+| `index` (required) | `number` | the solve's frame shown now (0-based), and the clip's time |
+| `time` (required) | `number` | – |
+| `camera` (required) | `MatchmoveCamera` | – |
+| `project` (required) | `(p: Vec3) => [number, number, number]` | where a point of the solved world lands in the composition, in pixels ([x, y], and its distance in front of the camera; behind it when that's 0 or less) |
+
+### `Projection`
+
+Bevy's Projection enum, as it reflects: fov in radians (Bevy's default PI/4).
+
+```ts
+type Projection = | { Perspective: { fov?: number; near?: number; far?: number } } | { Orthographic: { near?: number; far?: number; scaling_mode?: { FixedVertical: { viewport_height: number } } } }
+```
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/color.md b/docs/manual/reference/sdk/color.md
new file mode 100644
index 00000000..5e08072c
--- /dev/null
+++ b/docs/manual/reference/sdk/color.md
@@ -0,0 +1,200 @@
+---
+title: "raea/color"
+summary: "Bevy's colour types: Srgba, LinearRgba, Hsla, Oklab, Oklch and the rest, with their conversions."
+order: 47
+sources: ["sdk/raea/src/color.ts"]
+---
+
+These are Bevy's colour types with Bevy's maths, so a colour mixed, lightened or converted here comes out as it
+would in Bevy. Anywhere a prop takes a colour, it also takes a CSS colour string.
+
+```ts
+import { LinearRgba, Srgba, kelvin } from "raea/color";
+
+const brand = Srgba.hex("#e8b04a");
+const hover = brand.lighter(0.1);
+const glow = new LinearRgba(4, 2.5, 1, 1); // brighter than white, for bloom
+const warm = kelvin(3200);
+```
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { Hsla, kelvin, LinearRgba, Okhsla } from "raea/color"
+```
+
+`raea/color` exports 2 functions, 7 classes. Bevy's counterpart: `bevy_color`. Source: [sdk/raea/src/color.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/color.ts).
+
+## Functions
+
+### `kelvin`
+
+A colour temperature as a light's colour (Tanner Helland's fit to the Planckian locus), sRGB hex.
+
+```ts
+function kelvin(k: number): string
+```
+
+### `toHex`
+
+A colour as the 3D renderer takes it (#rrggbb): hex, rgb()/rgba() or a common name; CSS variables throw.
+
+```ts
+function toHex(owner: string, k: string, v: unknown): string
+```
+
+## Classes
+
+### `Hsla`
+
+Bevy's Hsla: hue (degrees), saturation and lightness, each 0..1; converted through Hsva and Hwba, as Bevy's is.
+
+Bevy: `bevy_color::Hsla`.
+
+| Member | What it does |
+| --- | --- |
+| `new Hsla(hue: number, saturation: number, lightness: number, alpha?: number)` | – |
+| `Hsla.from(c: Rgb): Hsla` | – |
+| `.hue: number` | – |
+| `.saturation: number` | – |
+| `.lightness: number` | – |
+| `.alpha: number` | – |
+| `.to_srgba(): Srgba` | – |
+| `.to_linear(): LinearRgba` | – |
+| `.mix(o: Hsla, t: number): Hsla` | – |
+
+Used in: [ui/scroll_and_overflow/drag_to_scroll](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/drag_to_scroll.tsx), [ui/ui_material](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/ui_material.tsx), [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx), [animation/color_animation](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/animation/color_animation.tsx), [2d/2d_shapes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/2d_shapes.tsx), [shader_advanced/custom_shader_instancing](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/custom_shader_instancing.tsx).
+
+### `LinearRgba`
+
+Bevy's LinearRgba: linear light, which a StandardMaterial's emissive is; a channel past 1 is brighter than white.
+
+Bevy: `bevy_color::LinearRgba`.
+
+| Member | What it does |
+| --- | --- |
+| `new LinearRgba(red: number, green: number, blue: number, alpha?: number)` | – |
+| `LinearRgba.rgb(red: number, green: number, blue: number): LinearRgba` | – |
+| `LinearRgba.from(c: Srgba): LinearRgba` | Bevy's LinearRgba::from(Srgba) |
+| `.red: number` | – |
+| `.green: number` | – |
+| `.blue: number` | – |
+| `.alpha: number` | – |
+| `.to_srgba(): Srgba` | Bevy's Srgba::from(LinearRgba): gamma-encoded (a channel at or below 0 kept as it is) |
+| `.luminance(): number` | Bevy's Luminance::luminance: Rec. 709's weights over the linear channels |
+| `.darker(amount: number): LinearRgba` | Bevy's Luminance::darker: mixed toward black until its luminance is `amount` lower (at least 0) |
+| `.lighter(amount: number): LinearRgba` | Bevy's Luminance::lighter: mixed toward white until its luminance is `amount` higher (at most 1) |
+| `.mix(o: LinearRgba, t: number): LinearRgba` | Bevy's Mix: each channel lerped, in f32 |
+| `.mul(k: number): LinearRgba` | Bevy's `* k`: each colour channel scaled (alpha kept) |
+
+Used in: [3d/spotlight](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/spotlight.tsx), [3d/bloom_3d](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/bloom_3d.tsx), [3d/mesh_ray_cast](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/mesh_ray_cast.tsx), [animation/color_animation](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/animation/color_animation.tsx), [2d/mesh2d_vertex_color_texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/mesh2d_vertex_color_texture.tsx), [shader_advanced/custom_shader_instancing](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/custom_shader_instancing.tsx).
+
+### `Okhsla`
+
+Bevy's Okhsla: Oklab's hue (degrees), a saturation relative to the sRGB gamut, and a lightness with a toe, each
+0..1.
+
+Bevy: `bevy_color::Okhsla`.
+
+| Member | What it does |
+| --- | --- |
+| `new Okhsla(hue: number, saturation: number, lightness: number, alpha?: number)` | – |
+| `Okhsla.from_oklaba(lab: Oklaba): Okhsla` | From Oklab (bevy_color oklab_to_okhsl). |
+| `Okhsla.from(c: Srgba \| LinearRgba \| Hsla): Okhsla` | From any sRGB colour, through Oklab. |
+| `.hue: number` | – |
+| `.saturation: number` | – |
+| `.lightness: number` | – |
+| `.alpha: number` | – |
+| `.to_oklaba(): Oklaba` | To Oklab (bevy_color okhsl_to_oklab). |
+| `.to_linear(): LinearRgba` | – |
+| `.to_srgba(): Srgba` | – |
+| `.with_alpha(alpha: number): Okhsla` | – |
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `Oklaba`
+
+Bevy's Oklaba: perceptual lightness and two opponent axes.
+
+Bevy: `bevy_color::Oklaba`.
+
+| Member | What it does |
+| --- | --- |
+| `new Oklaba(lightness: number, a: number, b: number, alpha?: number)` | – |
+| `Oklaba.from(c: Oklcha \| Rgb): Oklaba` | – |
+| `.lightness: number` | – |
+| `.a: number` | – |
+| `.b: number` | – |
+| `.alpha: number` | – |
+| `.to_linear(): LinearRgba` | – |
+| `.to_srgba(): Srgba` | – |
+| `.mix(o: Oklaba, t: number): Oklaba` | – |
+
+Used in: [animation/color_animation](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/animation/color_animation.tsx).
+
+### `Oklcha`
+
+Bevy's Oklcha: Oklab's lightness, chroma and hue (degrees).
+
+Bevy: `bevy_color::Oklcha`.
+
+| Member | What it does |
+| --- | --- |
+| `new Oklcha(lightness: number, chroma: number, hue: number, alpha?: number)` | – |
+| `Oklcha.from(c: Rgb \| Oklaba): Oklcha` | – |
+| `.lightness: number` | – |
+| `.chroma: number` | – |
+| `.hue: number` | – |
+| `.alpha: number` | – |
+| `.to_linear(): LinearRgba` | – |
+| `.to_srgba(): Srgba` | – |
+| `.mix(o: Oklcha, t: number): Oklcha` | – |
+| `.lighter(amount: number): Oklcha` | Bevy's Luminance::lighter: the lightness raised by `amount`, at most 1 |
+| `.darker(amount: number): Oklcha` | Bevy's Luminance::darker: the lightness lowered by `amount`, at least 0 |
+| `.with_alpha(alpha: number): Oklcha` | Bevy's Alpha::with_alpha |
+
+Used in: [animation/color_animation](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/animation/color_animation.tsx).
+
+### `Srgba`
+
+Bevy's Srgba: gamma-encoded colour, each channel 0..1.
+
+Bevy: `bevy_color::Srgba`.
+
+| Member | What it does |
+| --- | --- |
+| `new Srgba(red: number, green: number, blue: number, alpha?: number)` | – |
+| `Srgba.hex(hex: string): Srgba` | Bevy's Srgba::hex: rgb, rgba, rrggbb or rrggbbaa (the # optional), and also rgb() or a common name |
+| `.red: number` | – |
+| `.green: number` | – |
+| `.blue: number` | – |
+| `.alpha: number` | – |
+| `.darker(amount: number): Srgba` | Bevy's Luminance::darker on an Srgba: its linear colour's, encoded again |
+| `.lighter(amount: number): Srgba` | Bevy's Luminance::lighter on an Srgba: its linear colour's, encoded again |
+| `.with_alpha(alpha: number): Srgba` | – |
+| `.to_hex(): string` | Bevy's Srgba::to_hex: #RRGGBB (and AA when not opaque), each channel clamped and rounded |
+| `.mix(o: Srgba, t: number): Srgba` | Bevy's Mix: each channel lerped, in f32 |
+
+Used in: [ui/images/image_node](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node.tsx), [ui/images/image_node_resizing](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node_resizing.tsx), [ui/images/ui_texture_atlas_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas_slice.tsx), [ui/images/ui_texture_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_slice.tsx), [ui/images/ui_texture_atlas](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas.tsx), [ui/layout/grid](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/grid.tsx), [ui/layout/ghost_nodes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/ghost_nodes.tsx), [ui/layout/flex_layout](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/flex_layout.tsx), and 62 more.
+
+### `Xyza`
+
+Bevy's Xyza: CIE 1931 XYZ (D65, as linear sRGB's).
+
+Bevy: `bevy_color::Xyza`.
+
+| Member | What it does |
+| --- | --- |
+| `new Xyza(x: number, y: number, z: number, alpha?: number)` | – |
+| `Xyza.from(c: Rgb): Xyza` | – |
+| `.x: number` | – |
+| `.y: number` | – |
+| `.z: number` | – |
+| `.alpha: number` | – |
+| `.to_linear(): LinearRgba` | – |
+| `.to_srgba(): Srgba` | – |
+| `.mix(o: Xyza, t: number): Xyza` | – |
+
+Used in: [animation/color_animation](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/animation/color_animation.tsx).
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/dev_tools.md b/docs/manual/reference/sdk/dev_tools.md
new file mode 100644
index 00000000..36d0509c
--- /dev/null
+++ b/docs/manual/reference/sdk/dev_tools.md
@@ -0,0 +1,67 @@
+---
+title: "raea/dev_tools"
+summary: "Checks and lints you can run from code: a motion performance's lint report."
+order: 102
+sources: ["sdk/raea/src/dev_tools.ts"]
+---
+
+`motionLint` checks a performance recorded with `trace: true` against its motion library and reports what breaks the
+rules, such as moves that overlap or land off the beat; `lintReport` formats the result. Run them from a test or
+from [`raea run`](../cli/run.md).
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { lintReport, motionLint } from "raea/dev_tools"
+```
+
+`raea/dev_tools` exports 2 functions, 3 types. Bevy's counterpart: `bevy_dev_tools, bevy_diagnostic`. Source: [sdk/raea/src/dev_tools.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/dev_tools.ts).
+
+## Functions
+
+### `lintReport`
+
+A lint as lines: a count by stage and kind, then each finding.
+
+```ts
+function lintReport(l: Lint, o?: { max?: number; }): string
+```
+
+### `motionLint`
+
+Lint a performance made with `trace: true` (see the head of the file).
+
+```ts
+function motionLint(lib: MotionLibrary, perf: Performance, o?: { margin?: number; }): Lint
+```
+
+## Types
+
+### `Finding`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `frame` (required) | `number` | first and peak frames |
+| `peak` (required) | `number` | – |
+| `frames` (required) | `number` | – |
+| `joint` (required) | `string` | – |
+| `kind` (required) | `"speed" \| "jerk" \| "buckle"` | – |
+| `value` (required) | `number` | the peak's value (degrees a frame, a frame², or degrees past the clip's knee) and what the library allows |
+| `limit` (required) | `number` | – |
+| `stage` (required) | `Stage` | the first stage that shows it |
+| `causes` (required) | `string[]` | what happened within three frames of it |
+
+### `Lint`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `findings` (required) | `Finding[]` | – |
+| `frames` (required) | `number` | – |
+
+### `Stage`
+
+```ts
+type Stage = "clip" | "blend" | "plant" | "elbows" | "gaze"
+```
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/feathers.md b/docs/manual/reference/sdk/feathers.md
new file mode 100644
index 00000000..71b33d51
--- /dev/null
+++ b/docs/manual/reference/sdk/feathers.md
@@ -0,0 +1,997 @@
+---
+title: "raea/feathers"
+summary: "Bevy's feathers widgets: buttons, sliders, checkboxes, menus, inputs and colour pickers, in its dark theme."
+order: 84
+sources: ["sdk/raea/src/feathers.ts"]
+---
+
+Feathers is Bevy's widget set for tools and editors. Each widget here is one of Bevy's, drawn the way Bevy draws it:
+buttons, tool buttons, checkboxes, radios, toggle switches, sliders, number and text inputs, selects, menus, list
+views, scrollbars and colour pickers, in Bevy's dark theme and fonts. `UiTheme` and the theme components restyle
+them.
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { AngleDegrees, caption, channel_range, context_color } from "raea/feathers"
+```
+
+`raea/feathers` exports 33 components, 2 hooks, 24 functions, 11 values, 27 types. Bevy's counterpart: `bevy_feathers, docs/control.feature FC0a`. Source: [sdk/raea/src/feathers.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/feathers.ts).
+
+## Components
+
+### `FeathersButton`
+
+A feathers button: a ROW_HEIGHT node, 8 px each side, its corners 4 px, on the theme's button colour; its own Node
+fields (flex_grow, a min_width) patch the button's, as a bsn! patch does.
+
+Bevy: `bevy_feathers::controls::FeathersButton`.
+
+Takes [`FeathersButtonProps`](#feathersbuttonprops)'s props.
+
+Used in: [ui/styling/box_shadow](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/box_shadow.tsx), [ui/widgets/feathers_counter](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_counter.tsx), [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx), [3d/split_screen](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/split_screen.tsx).
+
+### `FeathersCheckbox`
+
+A checkbox: an 18 px box (2 px border, 4 px corners) holding a check mark when checked, beside its caption.
+
+Bevy: `bevy_feathers::controls::FeathersCheckbox`.
+
+Takes [`FeathersToggleProps`](#featherstoggleprops)'s props.
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `FeathersColorInput`
+
+A colour input: a button showing its colour, opening a colour picker when clicked.
+
+Bevy: `bevy_feathers::controls::FeathersColorInput`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `value` | `FeathersColor` | ColorInputValue: the colour it holds |
+| `opaque_color_percentage` | `number` | how much of the swatch's right side shows the colour opaque, in percent |
+
+Also takes the props of [`NodeProps`](ui.md#nodeprops); `PickProps` (`popover`, `onClick`, `onPointerDown`, `onPointerUp`, `onPointerOver`, `onPointerOut`, `onPointerEnter`, `onPointerLeave`, `onPointerMove`).
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `FeathersColorPlane`
+
+A colour plane: at least 100 px high, 4 px padding, 5 px corners on COLOR_PLANE_BG, the plane filling its inside and
+a 10 px ringed thumb at the value.
+
+Bevy: `bevy_feathers::controls::FeathersColorPlane`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `plane` | `ColorPlane` | the two channels it spans, x then y (the FeathersColorPlane variant): RedGreen, RedBlue, GreenBlue, HueSaturation, HueLightness, OkhslHueSaturation or OkhslHueLightness |
+| `value` | `[number, number, number]` | ColorPlaneValue: x and y the channels across and up (0 to 1, a hue in turns), z the fixed one |
+
+Also takes the props of [`NodeProps`](ui.md#nodeprops); `PickProps` (`popover`, `onClick`, `onPointerDown`, `onPointerUp`, `onPointerOver`, `onPointerOut`, `onPointerEnter`, `onPointerLeave`, `onPointerMove`).
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `FeathersColorSlider`
+
+A colour slider: a 16 px track of the channel's gradient over the alpha pattern, a 14 px ringed thumb at the value.
+
+Bevy: `bevy_feathers::controls::FeathersColorSlider`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `value` | `number` | SliderValue: the channel's value, in its range |
+| `channel` | `ColorChannel` | – |
+| `base_color` | `FeathersColor` | SliderBaseColor: the colour the track shows the channel of (white by default) |
+
+Also takes the props of [`NodeProps`](ui.md#nodeprops); `PickProps` (`popover`, `onClick`, `onPointerDown`, `onPointerUp`, `onPointerOver`, `onPointerOut`, `onPointerEnter`, `onPointerLeave`, `onPointerMove`).
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `FeathersColorSwatch`
+
+A colour swatch: ROW_HEIGHT high, at least as wide, its colour over the alpha pattern, the right
+`opaque_color_percentage` of it the colour made opaque.
+
+Bevy: `bevy_feathers::controls::FeathersColorSwatch`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `color` | `FeathersColor` | ColorSwatchValue: the colour shown over the checkerboard |
+| `opaque_color_percentage` | `number` | how much of its right side shows the colour opaque, in percent |
+| `corners` | `RoundedCorners` | – |
+| `border_radius` | `number` | the corners' radius in px (5 by default), on the corners `corners` names |
+
+Also takes the props of [`NodeProps`](ui.md#nodeprops); `PickProps` (`popover`, `onClick`, `onPointerDown`, `onPointerMove`, `onPointerUp`, `onPointerEnter`, `onPointerLeave`, `onPointerOver`, `onPointerOut`).
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `FeathersDisclosureToggle`
+
+A disclosure toggle: a 12 px box holding a right chevron in BUTTON_TEXT, turned a quarter (pointing down) when
+checked.
+
+Bevy: `bevy_feathers::controls::FeathersDisclosureToggle`.
+
+Also takes the props of [`NodeProps`](ui.md#nodeprops); [`FeathersToggleProps`](#featherstoggleprops) (`disabled`, `checked`); `PickProps` (`popover`, `onClick`, `onPointerDown`, `onPointerMove`, `onPointerUp`, `onPointerEnter`, `onPointerLeave`, `onPointerOver`, `onPointerOut`).
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `FeathersLazyMenu`
+
+A menu whose popup is made when it opens (`popup`, here unused at rest): its button alone.
+
+Bevy: `bevy_feathers::controls::FeathersLazyMenu`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `popup` | `() => ReactNode` | Bevy: Callback which constructs the popup |
+
+Also takes the props of [`NodeProps`](ui.md#nodeprops); `PickProps` (`popover`, `onClick`, `onPointerDown`, `onPointerUp`, `onPointerOver`, `onPointerOut`, `onPointerEnter`, `onPointerLeave`, `onPointerMove`).
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `FeathersListRow`
+
+A list row: at least ROW_HEIGHT, 8 px each side and 2 px above and below, on LISTROW_BG_SELECTED when selected, its
+caption in Fira Sans 14 px.
+
+Bevy: `bevy_feathers::controls::FeathersListRow`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `selected` | `boolean` | Selected |
+| `disabled` | `boolean` | InteractionDisabled |
+| `children` | `ReactNode` | its caption |
+
+Also takes the props of [`NodeProps`](ui.md#nodeprops); `PickProps` (`popover`, `onClick`, `onPointerDown`, `onPointerUp`, `onPointerOver`, `onPointerOut`, `onPointerEnter`, `onPointerLeave`, `onPointerMove`).
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `FeathersListView`
+
+A list box: its rows in a scroll area, a scrollbar track beside them.
+
+Bevy: `bevy_feathers::controls::FeathersListView`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `children` | `ReactNode` | its FeathersListRows |
+
+Also takes the props of [`NodeProps`](ui.md#nodeprops); `PickProps` (`popover`, `onClick`, `onPointerDown`, `onPointerUp`, `onPointerOver`, `onPointerOut`, `onPointerEnter`, `onPointerLeave`, `onPointerMove`).
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `FeathersMenu`
+
+A menu: a ROW_HEIGHT node holding its button and popup.
+
+Bevy: `bevy_feathers::controls::FeathersMenu`.
+
+Takes [`NodeProps`](ui.md#nodeprops)'s props.
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `FeathersMenuButton`
+
+A menu's button: a Normal FeathersButton, its caption, then a spacer and a down chevron.
+
+Bevy: `bevy_feathers::controls::FeathersMenuButton`.
+
+Takes [`FeathersMenuButtonProps`](#feathersmenubuttonprops)'s props.
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `FeathersMenuDivider`
+
+A 1 px rule between menu items.
+
+Bevy: `bevy_feathers::controls::FeathersMenuDivider`.
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `FeathersMenuItem`
+
+A menu item: a ROW_HEIGHT row, 8 px each side, its caption in MENUITEM_TEXT.
+
+Bevy: `bevy_feathers::controls::FeathersMenuItem`.
+
+Takes [`NodeProps`](ui.md#nodeprops)'s props.
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `FeathersMenuPopup`
+
+A menu's popup: a bordered column of items on the Floating level, hidden until the menu opens.
+
+Bevy: `bevy_feathers::controls::FeathersMenuPopup`.
+
+Takes [`NodeProps`](ui.md#nodeprops)'s props.
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `FeathersMenuToolButton`
+
+A menu's tool button: a FeathersToolButton, its caption, 2 px, then a down chevron.
+
+Bevy: `bevy_feathers::controls::FeathersMenuToolButton`.
+
+Takes [`FeathersMenuButtonProps`](#feathersmenubuttonprops)'s props.
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `FeathersNumberInput`
+
+A feathers number input: its value centred over a slider bar, in its units. Its own Node fields (flex_grow, a
+max_width) patch the input's, as a bsn! patch does.
+
+Bevy: `bevy_feathers::controls::FeathersNumberInput`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `value` (required) | `NumberInputValue` | NumberInputValue: the value shown |
+| `soft_limit` | `NumberInputRange` | SoftLimit: the slider bar's range (no bar without one) |
+| `hard_limit` | `NumberInputRange` | HardLimit: the value is held within it |
+| `precision` | `number` | NumberInputPrecision: decimal places a drag rounds to |
+| `step` | `number` | NumberInputStep: a drag's step |
+| `wrap` | `NumberInputWrap` | NumberInputWrap (NoWrap by default) |
+| `units` | `UnitsFormat` | NumberInputUnits: LengthMeters, TimeSeconds, AngleDegrees (Dimensionless by default) |
+| `disabled` | `boolean` | InteractionDisabled |
+| `sigil_color` | `ThemeToken` | the sigil's colour, the left border shown with a label (TEXT_INPUT_LABEL_BG by default) |
+| `label_text` | `string` | the caption at its left, usually "X", "Y" or "Z" |
+
+Also takes the props of [`NodeProps`](ui.md#nodeprops); `PickProps` (`popover`, `onClick`, `onPointerDown`, `onPointerUp`, `onPointerOver`, `onPointerOut`, `onPointerEnter`, `onPointerLeave`, `onPointerMove`).
+
+Used in: [ui/styling/box_shadow](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/box_shadow.tsx), [ui/widgets/feathers_number_input](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_number_input.tsx), [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `FeathersRadio`
+
+A radio button: an 18 px ring (2 px border) holding a 12 px dot when checked, beside its caption.
+
+Bevy: `bevy_feathers::controls::FeathersRadio`.
+
+Takes [`FeathersToggleProps`](#featherstoggleprops)'s props.
+
+Used in: [ui/styling/box_shadow](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/box_shadow.tsx), [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `FeathersScrollbar`
+
+A thin scrollbar: a track on SCROLLBAR_BG with 3 px corners, its thumb on SCROLLBAR_THUMB, at least 8 px long.
+
+Bevy: `bevy_feathers::controls::FeathersScrollbar`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `target` (required) | `string` | the Name of the Node it scrolls |
+| `orientation` | `ControlOrientation` | – |
+| `hidden` | `boolean` | hidden: the auto_hide decision, made by the list view (Bevy makes it after layout) |
+
+Also takes the props of [`NodeProps`](ui.md#nodeprops); `PickProps` (`popover`, `onClick`, `onPointerDown`, `onPointerUp`, `onPointerOver`, `onPointerOut`, `onPointerEnter`, `onPointerLeave`, `onPointerMove`).
+
+### `FeathersSelect`
+
+A dropdown: a button showing the selected option, its list in a hidden popup.
+
+Bevy: `bevy_feathers::controls::FeathersSelect`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `options` (required) | `ReactNode` | its options: FeathersListRows, one of them selected (list_rows_from_strings) |
+| `corners` | `RoundedCorners` | – |
+| `max_visible` | `number` | the popup's most rows (8 by default) |
+
+Also takes the props of [`NodeProps`](ui.md#nodeprops); `PickProps` (`popover`, `onClick`, `onPointerDown`, `onPointerUp`, `onPointerOver`, `onPointerOut`, `onPointerEnter`, `onPointerLeave`, `onPointerMove`).
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `FeathersSlider`
+
+A slider: a bar filled to its value, the value written on it.
+
+Bevy: `bevy_feathers::controls::FeathersSlider`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `value` | `number` | SliderValue (min by default) |
+| `min` | `number` | SliderRange's ends (0 to 1 by default) |
+| `max` | `number` | – |
+| `precision` | `number` | SliderPrecision: decimal places shown (0 by default) |
+| `step` | `number` | SliderStep: a drag's or key's step |
+| `disabled` | `boolean` | InteractionDisabled |
+
+Also takes the props of [`NodeProps`](ui.md#nodeprops); `PickProps` (`popover`, `onClick`, `onPointerDown`, `onPointerUp`, `onPointerOver`, `onPointerOut`, `onPointerEnter`, `onPointerLeave`, `onPointerMove`).
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `FeathersTextInput`
+
+A one-line text input in feathers' compact font, its colour the field's.
+
+Bevy: `bevy_feathers::controls::FeathersTextInput`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `visible_width` | `number` | visible_width: its width in "0"s; it grows to fill the field when left out |
+| `max_characters` | `number` | max_characters: how many characters typing may leave in it |
+
+Also takes the props of [`NodeProps`](ui.md#nodeprops); [`TextStyleProps`](ui.md#textstyleprops); [`EditableTextProps`](ui.md#editabletextprops); `PickProps` (`popover`, `onClick`, `onPointerDown`, `onPointerMove`, `onPointerUp`, `onPointerEnter`, `onPointerLeave`, `onPointerOver`, `onPointerOut`).
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `FeathersTextInputContainer`
+
+A text field's frame: ROW_HEIGHT high, 3 px each side, 4 px corners, growing to fill its row.
+
+Bevy: `bevy_feathers::controls::FeathersTextInputContainer`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `children` | `ReactNode` | its FeathersTextInput, and anything beside it |
+
+Also takes the props of [`NodeProps`](ui.md#nodeprops); `PickProps` (`popover`, `onClick`, `onPointerDown`, `onPointerUp`, `onPointerOver`, `onPointerOut`, `onPointerEnter`, `onPointerLeave`, `onPointerMove`).
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `FeathersToggleSwitch`
+
+A toggle switch: a 32 x 18 track (2 px border, 5 px corners) and a slide filling its left half, or its right half
+when checked.
+
+Bevy: `bevy_feathers::controls::FeathersToggleSwitch`.
+
+Also takes the props of [`NodeProps`](ui.md#nodeprops); [`FeathersToggleProps`](#featherstoggleprops) (`disabled`, `checked`); `PickProps` (`popover`, `onClick`, `onPointerDown`, `onPointerMove`, `onPointerUp`, `onPointerEnter`, `onPointerLeave`, `onPointerOver`, `onPointerOut`).
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `FeathersToolButton`
+
+A FeathersButton for a toolbar: 4 px each side and at least ROW_HEIGHT wide.
+
+Bevy: `bevy_feathers::controls::FeathersToolButton`.
+
+Takes [`FeathersButtonProps`](#feathersbuttonprops)'s props.
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `StandardUnitKind`
+
+a flat table of units with scale factors, as a UnitsFormat.
+
+Bevy: `bevy_feathers::controls::StandardUnitKind`.
+
+Also takes the props of `String` (`toString`, `charAt`, `charCodeAt`, `concat`, `indexOf`, `lastIndexOf`, `localeCompare`, `match`, `replace`, `search`, `slice`, `split`, `substring`, `toLowerCase`, `toLocaleLowerCase`, `toUpperCase`, `toLocaleUpperCase`, `trim`, `length`, `substr`, `valueOf`, `codePointAt`, `includes`, `endsWith`, `normalize`, `repeat`, `startsWith`, `anchor`, `big`, `blink`, `bold`, `fixed`, `fontcolor`, `fontsize`, `italics`, `link`, `small`, `strike`, `sub`, `sup`, `padStart`, `padEnd`, `trimEnd`, `trimStart`, `trimLeft`, `trimRight`, `matchAll`, `replaceAll`, `at`, `isWellFormed`, `toWellFormed`, `__@iterator@151`).
+
+### `ThemeBackgroundColor`
+
+The element inside on the theme's colour for `token`.
+
+Bevy: `bevy_feathers::theme::ThemeBackgroundColor`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `token` (required) | `ThemeToken` | – |
+| `children` (required) | `ReactElement` | – |
+
+Used in: [ui/widgets/feathers_counter](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_counter.tsx), [ui/widgets/feathers_number_input](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_number_input.tsx), [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `ThemeBorderColor`
+
+The element inside bordered in the theme's colour for `token`.
+
+Bevy: `bevy_feathers::theme::ThemeBorderColor`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `token` (required) | `ThemeToken` | – |
+| `children` (required) | `ReactElement` | – |
+
+### `ThemeContext`
+
+the surface level the widgets inside sit on, which picks the theme's overrides for it.
+
+Bevy: `bevy_feathers::theme::ThemeContext`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `level` (required) | `SurfaceLevel` | – |
+| `children` | `ReactNode` | – |
+
+### `ThemedText`
+
+A Text with ThemedText: it takes the font and colour the feathers widget around it propagates.
+
+Bevy: `bevy_feathers::theme::ThemedText`.
+
+Takes [`TextProps`](ui.md#textprops)'s props.
+
+Used in: [ui/widgets/feathers_counter](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_counter.tsx).
+
+### `ThemeTextColor`
+
+The Text inside in the theme's colour for `token`.
+
+Bevy: `bevy_feathers::theme::ThemeTextColor`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `token` (required) | `ThemeToken` | – |
+| `children` (required) | `ReactElement` | – |
+
+### `UiTheme`
+
+Bevy's UiTheme resource: the theme every feathers widget inside looks its colours up in (create_dark_theme()).
+
+Bevy: `bevy_feathers::theme::UiTheme`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `theme` (required) | `ThemeProps` | – |
+| `children` | `ReactNode` | – |
+
+Used in: [ui/styling/box_shadow](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/box_shadow.tsx), [ui/widgets/virtual_keyboard](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/virtual_keyboard.tsx), [ui/widgets/feathers_counter](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_counter.tsx), [ui/widgets/feathers_number_input](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_number_input.tsx), [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx), [3d/split_screen](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/split_screen.tsx), [2d/2d_shapes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/2d_shapes.tsx).
+
+### `VirtualKeyboard`
+
+A grid of FeathersButtons, one row of keys a row (4 px apart both ways), each key's caption a plain Text (Bevy's
+default font, 20 px white: feathers' font reaches only a ThemedText), each key growing to share its row.
+VirtualKeyPressed fires on a key under input.
+
+Bevy: `bevy_feathers::controls::VirtualKeyboard`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `keys` (required) | `string[][]` | – |
+
+Used in: [ui/widgets/virtual_keyboard](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/virtual_keyboard.tsx).
+
+## Hooks
+
+### `useInheritedColor`
+
+the text colour the feathers widget around the caller propagates (a ThemedIcon's tint), or none
+
+```ts
+function useInheritedColor(): Color | undefined
+```
+
+### `useThemeColor`
+
+a token's colour in the UiTheme and surface level around the caller
+
+```ts
+function useThemeColor(token: ThemeToken): Srgba
+```
+
+## Functions
+
+### `caption`
+
+a ThemedText of `text`.
+
+Bevy: `bevy_feathers::display::caption`.
+
+```ts
+function caption(text: string): ReactElement<unknown, string | JSXElementConstructor<any>>
+```
+
+Used in: [ui/styling/box_shadow](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/box_shadow.tsx), [ui/widgets/feathers_counter](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_counter.tsx), [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx), [3d/split_screen](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/split_screen.tsx).
+
+### `channel_range`
+
+ColorChannel::range: 0 to 360 for a hue, 0 to 1 for the rest.
+
+```ts
+function channel_range(channel: ColorChannel): { start: number; end: number; }
+```
+
+### `context_color`
+
+ThemeProps::context_color: a token's colour on a surface level, the level's override first, FUCHSIA when the theme
+has none
+
+```ts
+function context_color(theme: ThemeProps, token: ThemeToken, level?: SurfaceLevel): Srgba
+```
+
+### `create_dark_theme`
+
+bevy_feathers' dark theme.
+
+Bevy: `bevy_feathers::dark_theme::create_dark_theme`.
+
+```ts
+function create_dark_theme(): ThemeProps
+```
+
+Used in: [ui/styling/box_shadow](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/box_shadow.tsx), [ui/widgets/virtual_keyboard](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/virtual_keyboard.tsx), [ui/widgets/feathers_counter](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_counter.tsx), [ui/widgets/feathers_number_input](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_number_input.tsx), [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx), [3d/split_screen](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/split_screen.tsx).
+
+### `flex_spacer`
+
+A Node that grows to fill the row's free space.
+
+Bevy: `bevy_feathers::containers::flex_spacer`.
+
+```ts
+function flex_spacer(): ReactElement<unknown, string | JSXElementConstructor<any>>
+```
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `gradient_ends`
+
+ColorChannel::gradient_ends: the slider track's colours at its start, middle and end, the channel at 0, half and
+full with the base colour's other channels.
+
+```ts
+function gradient_ends(channel: ColorChannel, base: FeathersColor): [FeathersColor, FeathersColor, FeathersColor]
+```
+
+### `group`
+
+A group: a bordered column (1 px, 4 px corners) of a group_header over a group_body, on the Highest level.
+
+Bevy: `bevy_feathers::containers::group`.
+
+```ts
+function group(children?: ReactNode, node?: NodeProps): ReactElement<unknown, string | JSXElementConstructor<any>>
+```
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `group_body`
+
+A group's body: a column, 4 px apart, 6 px padding.
+
+Bevy: `bevy_feathers::containers::group_body`.
+
+```ts
+function group_body(children?: ReactNode, node?: NodeProps): ReactElement<unknown, string | JSXElementConstructor<any>>
+```
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `group_header`
+
+A group's header: a row, 10 px each side, at least HEADER_HEIGHT.
+
+Bevy: `bevy_feathers::containers::group_header`.
+
+```ts
+function group_header(children?: ReactNode, node?: NodeProps): ReactElement<unknown, string | JSXElementConstructor<any>>
+```
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `icon`
+
+One of feathers' icons, 14 px high, tinted by the text colour the widget around it propagates (white outside one),
+as a ThemedIcon.
+
+Bevy: `bevy_feathers::display::icon`.
+
+```ts
+function icon(i: FeathersIcon): ReactElement<unknown, string | JSXElementConstructor<any>>
+```
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `icon_untinted`
+
+One of feathers' icons, 14 px high, untinted.
+
+Bevy: `bevy_feathers::display::icon_untinted`.
+
+```ts
+function icon_untinted(i: FeathersIcon): ReactElement<unknown, string | JSXElementConstructor<any>>
+```
+
+### `label`
+
+`text` in Fira Sans 14 px, TEXT_MAIN.
+
+Bevy: `bevy_feathers::display::label`.
+
+```ts
+function label(text: string): ReactElement<unknown, string | JSXElementConstructor<any>>
+```
+
+Used in: [ui/styling/box_shadow](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/box_shadow.tsx), [ui/widgets/feathers_number_input](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_number_input.tsx), [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `label_dim`
+
+`text` in Fira Sans 14 px, TEXT_DIM.
+
+Bevy: `bevy_feathers::display::label_dim`.
+
+```ts
+function label_dim(text: string): ReactElement<unknown, string | JSXElementConstructor<any>>
+```
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `label_small`
+
+`text` in Fira Sans 11 px, TEXT_MAIN.
+
+Bevy: `bevy_feathers::display::label_small`.
+
+```ts
+function label_small(text: string): ReactElement<unknown, string | JSXElementConstructor<any>>
+```
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `list_rows_from_strings`
+
+FeathersListRows, one per label, captioned, the one at `selected` Selected.
+
+Bevy: `bevy_feathers::controls::list_rows_from_strings`.
+
+```ts
+function list_rows_from_strings(labels: string[], selected?: number): ReactElement<unknown, string | JSXElementConstructor<any>>[]
+```
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `pane`
+
+A pane: a column of a pane_header over a pane_body.
+
+Bevy: `bevy_feathers::containers::pane`.
+
+```ts
+function pane(children?: ReactNode, node?: NodeProps): ReactElement<unknown, string | JSXElementConstructor<any>>
+```
+
+Used in: [ui/styling/box_shadow](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/box_shadow.tsx), [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `pane_body`
+
+A pane's body: a column, 4 px apart, 6 px padding, its bottom corners 4 px, on the Higher level.
+
+Bevy: `bevy_feathers::containers::pane_body`.
+
+```ts
+function pane_body(children?: ReactNode, node?: NodeProps): ReactElement<unknown, string | JSXElementConstructor<any>>
+```
+
+Used in: [ui/styling/box_shadow](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/box_shadow.tsx), [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `pane_header`
+
+A pane's header: a row of tools, 6 px padding and gaps, at least HEADER_HEIGHT, its top corners 4 px, a 1 px
+border on three sides, on the Base level.
+
+Bevy: `bevy_feathers::containers::pane_header`.
+
+```ts
+function pane_header(children?: ReactNode, node?: NodeProps): ReactElement<unknown, string | JSXElementConstructor<any>>
+```
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `pane_header_divider`
+
+A 1 px rule between a pane header's tools, reaching through the header's padding.
+
+Bevy: `bevy_feathers::containers::pane_header_divider`.
+
+```ts
+function pane_header_divider(): ReactElement<unknown, string | JSXElementConstructor<any>>
+```
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `slider_label`
+
+update_slider_pos's label: Rust's {} on the f32, or {:.precision$} when that has no more decimals than precision
+
+```ts
+function slider_label(value: number, precision: number): string
+```
+
+### `subpane`
+
+A sub-pane: a column of a subpane_header over a subpane_body.
+
+Bevy: `bevy_feathers::containers::subpane`.
+
+```ts
+function subpane(children?: ReactNode, node?: NodeProps): ReactElement<unknown, string | JSXElementConstructor<any>>
+```
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `subpane_body`
+
+A sub-pane's body: a column, 4 px apart, 6 px padding, a 1 px border on three sides, its bottom corners 4 px, on the
+Higher level.
+
+Bevy: `bevy_feathers::containers::subpane_body`.
+
+```ts
+function subpane_body(children?: ReactNode, node?: NodeProps): ReactElement<unknown, string | JSXElementConstructor<any>>
+```
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `subpane_header`
+
+A sub-pane's header: a row, 10 px each side, at least HEADER_HEIGHT, its top corners 4 px, a 1 px border on three
+sides, on the Highest level.
+
+Bevy: `bevy_feathers::containers::subpane_header`.
+
+```ts
+function subpane_header(children?: ReactNode, node?: NodeProps): ReactElement<unknown, string | JSXElementConstructor<any>>
+```
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `to_border_radius`
+
+RoundedCorners::to_border_radius: `radius` px on the corners named, 0 on the rest
+
+```ts
+function to_border_radius(corners: RoundedCorners, radius: number): BorderRadius
+```
+
+## Values
+
+### `AngleDegrees`
+
+angles, canonical in radians, shown in degrees (°, or "d" while editing).
+
+Bevy: `bevy_feathers::controls::AngleDegrees`.
+
+Used in: [ui/widgets/feathers_number_input](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_number_input.tsx).
+
+### `Dimensionless`
+
+no units: the number alone.
+
+Bevy: `bevy_feathers::controls::Dimensionless`.
+
+### `fonts`
+
+bevy_feathers' fonts, by family (the face by the TextFont's weight and style).
+
+Bevy: `bevy_feathers::constants::fonts`.
+
+### `icons`
+
+bevy_feathers' icons.
+
+Bevy: `bevy_feathers::constants::icons`.
+
+Used in: [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `LengthMeters`
+
+lengths, canonical and shown in metres.
+
+Bevy: `bevy_feathers::controls::LengthMeters`.
+
+Used in: [ui/widgets/feathers_number_input](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_number_input.tsx).
+
+### `NumberInputRange`
+
+an inclusive range of one number type.
+NumberInputRange's variants, start..=end.
+
+Bevy: `bevy_feathers::controls::NumberInputRange`, `bevy_feathers::controls::NumberInputRange`.
+
+Used in: [ui/styling/box_shadow](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/box_shadow.tsx), [ui/widgets/feathers_number_input](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_number_input.tsx), [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `NumberInputValue`
+
+a number input's value, in one of four types.
+NumberInputValue's variants: an F32 is rounded to f32.
+
+Bevy: `bevy_feathers::controls::NumberInputValue`, `bevy_feathers::controls::NumberInputValue`.
+
+Used in: [ui/styling/box_shadow](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/box_shadow.tsx), [ui/widgets/feathers_number_input](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_number_input.tsx), [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+### `palette`
+
+bevy_feathers' palette.
+
+Bevy: `bevy_feathers::palette`.
+
+### `size`
+
+bevy_feathers' sizes.
+
+Bevy: `bevy_feathers::constants::size`.
+
+### `TimeSeconds`
+
+times, canonical and shown in seconds.
+
+Bevy: `bevy_feathers::controls::TimeSeconds`.
+
+Used in: [ui/widgets/feathers_number_input](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_number_input.tsx).
+
+### `tokens`
+
+bevy_feathers' design tokens (ThemeToken ids).
+
+Bevy: `bevy_feathers::tokens`.
+
+Used in: [ui/widgets/feathers_counter](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_counter.tsx), [ui/widgets/feathers_number_input](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_number_input.tsx), [ui/widgets/feathers_gallery](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/feathers_gallery.tsx).
+
+## Types
+
+### `ButtonVariant`
+
+a button's look.
+
+Bevy: `bevy_feathers::controls::ButtonVariant`.
+
+```ts
+type ButtonVariant = "Normal" | "Primary" | "Plain"
+```
+
+### `ColorChannel`
+
+Which channel of a colour a FeathersColorSlider sets.
+
+Bevy: `bevy_feathers::controls::ColorChannel`.
+
+```ts
+type ColorChannel = "Red" | "Green" | "Blue" | "HslHue" | "HslSaturation" | "HslLightness" | "Alpha" | "OkhslHue" | "OkhslSaturation" | "OkhslLightness"
+```
+
+### `FeathersButtonProps`
+
+### `FeathersColor`
+
+a colour a colour control takes
+
+```ts
+type FeathersColor = Srgba | LinearRgba | Hsla | Okhsla
+```
+
+### `FeathersColorInputProps`
+
+The props of [`FeathersColorInput`](#featherscolorinput), tabled there.
+
+### `FeathersColorPlaneProps`
+
+The props of [`FeathersColorPlane`](#featherscolorplane), tabled there.
+
+### `FeathersColorSliderProps`
+
+The props of [`FeathersColorSlider`](#featherscolorslider), tabled there.
+
+### `FeathersColorSwatchProps`
+
+The props of [`FeathersColorSwatch`](#featherscolorswatch), tabled there.
+
+### `FeathersIcon`
+
+a feathers icon: its picture and size in px
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `image` (required) | `string` | – |
+| `width` (required) | `number` | – |
+| `height` (required) | `number` | – |
+
+### `FeathersListRowProps`
+
+The props of [`FeathersListRow`](#featherslistrow), tabled there.
+
+### `FeathersListViewProps`
+
+The props of [`FeathersListView`](#featherslistview), tabled there.
+
+### `FeathersMenuButtonProps`
+
+### `FeathersNumberInputProps`
+
+The props of [`FeathersNumberInput`](#feathersnumberinput), tabled there.
+
+### `FeathersScrollbarProps`
+
+The props of [`FeathersScrollbar`](#feathersscrollbar), tabled there.
+
+### `FeathersSelectProps`
+
+The props of [`FeathersSelect`](#feathersselect), tabled there.
+
+### `FeathersSliderProps`
+
+The props of [`FeathersSlider`](#feathersslider), tabled there.
+
+### `FeathersTextInputContainerProps`
+
+The props of [`FeathersTextInputContainer`](#featherstextinputcontainer), tabled there.
+
+### `FeathersTextInputProps`
+
+The props of [`FeathersTextInput`](#featherstextinput), tabled there.
+
+### `FeathersToggleProps`
+
+### `NumberInputWrap`
+
+whether a drag or step past a HardLimit wraps round.
+
+Bevy: `bevy_feathers::controls::NumberInputWrap`.
+
+```ts
+type NumberInputWrap = "NoWrap" | "Wrap"
+```
+
+### `NumberKind`
+
+the number type of a NumberInputValue or NumberInputRange
+
+```ts
+type NumberKind = "F32" | "F64" | "I32" | "I64"
+```
+
+### `RoundedCorners`
+
+which corners are rounded.
+
+Bevy: `bevy_feathers::rounded_corners::RoundedCorners`.
+
+```ts
+type RoundedCorners = "None" | "All" | "TopLeft" | "TopRight" | "BottomRight" | "BottomLeft" | "Top" | "Right" | "Bottom" | "Left"
+```
+
+### `StandardUnitItem`
+
+one unit of a StandardUnitKind: its suffixes (the first canonical) and its size in the base unit.
+
+Bevy: `bevy_feathers::controls::StandardUnitItem`.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `suffixes` (required) | `string[]` | Bevy: e.g. ["km"], or ["cm"], first entry is canonical |
+| `scale` (required) | `number` | Bevy: multiply a value in this unit to get the base unit (meters, radians, kg...) |
+
+### `SurfaceLevel`
+
+the theme's surface levels, each a set of overrides of its semantic colours.
+
+Bevy: `bevy_feathers::theme::SurfaceLevel`.
+
+```ts
+type SurfaceLevel = "Base" | "Higher" | "Highest" | "Floating"
+```
+
+### `ThemeProps`
+
+a theme: its semantic colours, a surface level's overrides of them, and each token's semantic colour.
+
+Bevy: `bevy_feathers::theme::ThemeProps`.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `semantic_base` (required) | `Record<string, Oklcha>` | Bevy: Map of semantic tokens to colors. |
+| `semantic_overrides` (required) | `Partial<Record<SurfaceLevel, Record<string, Oklcha>>>` | Bevy: Map of semantic tokens + context to colors. |
+| `token_assignments` (required) | `Partial<Record<ThemeToken, string>>` | Bevy: Map of design tokens to semantic tokens. |
+
+### `ThemeToken`
+
+a design token: one of `tokens`' ids
+
+```ts
+type ThemeToken = (typeof tokens)[keyof typeof tokens]
+```
+
+### `UnitsFormat`
+
+formats a number input's value for display (or for editing).
+
+Bevy: `bevy_feathers::controls::UnitsFormat`.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `id` (required) | `string` | – |
+| `format` (required) | `(value: NumberInputValue, editing: boolean) => string` | – |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/gizmos.md b/docs/manual/reference/sdk/gizmos.md
new file mode 100644
index 00000000..748abac7
--- /dev/null
+++ b/docs/manual/reference/sdk/gizmos.md
@@ -0,0 +1,76 @@
+---
+title: "raea/gizmos"
+summary: "Lines drawn for looking: Bevy's gizmos and debug overlays."
+order: 70
+sources: ["sdk/raea/src/gizmos.ts"]
+---
+
+`<Gizmo>` draws debug lines with Bevy's gizmo renderer: a path, a box, an axis, a ray. They take and cast no light.
+`<Overlay>` and `overlays` draw the debug overlays raea's checks use, such as safe areas and element boxes, over a
+frame you're looking at.
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { Gizmo, Overlay, overlays } from "raea/gizmos"
+```
+
+`raea/gizmos` exports 2 components, 1 function, 2 types. Bevy's counterpart: `bevy_gizmos`. Source: [sdk/raea/src/gizmos.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/gizmos.ts).
+
+## Components
+
+### `Gizmo`
+
+Debug lines drawn by Bevy's gizmo renderer (a retained bevy_gizmos Gizmo and its GizmoAsset), placed like a part:
+a path, a bounding box, an axis, a ray. They cast and take no light, and draw over nothing unless depthBias says.
+
+Bevy: `bevy_gizmos::retained::Gizmo`.
+
+Takes [`GizmoProps`](3d.md#gizmoprops)'s props.
+
+Used in: [3d/mesh_ray_cast](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/mesh_ray_cast.tsx), [3d/rect_light](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/rect_light.tsx), [transforms/align](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/transforms/align.tsx).
+
+### `Overlay`
+
+Its children only in a render asked for the overlay `name`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `name` (required) | `string` | – |
+| `children` | `ReactNode` | – |
+
+## Functions
+
+### `overlays`
+
+The overlays this render was asked for ([] in a clean render and in live play).
+
+```ts
+function overlays(): string[]
+```
+
+## Types
+
+### `GizmoColor`
+
+a gizmo point's colour: "#rrggbb", linear [r, g, b, a], or Bevy's LinearRgba / Srgba (bevy3d's colours)
+
+```ts
+type GizmoColor = string | [number, number, number, number] | { red: number; green: number; blue: number; alpha?: number }
+```
+
+### `GizmoProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `lines` | `[Vec3, Vec3][]` | segments, each [from, to] |
+| `strip` | `(Vec3 \| null)[]` | one line through these points (null breaks it) |
+| `color` | `GizmoColor \| GizmoColor[]` | one colour for every point, or one per point of `lines` (two per segment) then `strip`: "#rrggbb", Bevy's LinearRgba (above 1 for HDR, as bevy_gizmos takes it) or Srgba, or linear [r, g, b, a] |
+| `width` | `number` | line width in pixels (Bevy's default 2) |
+| `depthBias` | `number` | -1 always in front of geometry, 0 depth-tested as it is (Bevy's GizmoLineConfig and depth_bias) |
+| `position` | `Vec3` | – |
+| `rotation` | `Vec3` | – |
+| `scale` | `Vec3 \| number` | – |
+| `name` | `string` | – |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/image.md b/docs/manual/reference/sdk/image.md
new file mode 100644
index 00000000..5f798405
--- /dev/null
+++ b/docs/manual/reference/sdk/image.md
@@ -0,0 +1,120 @@
+---
+title: "raea/image"
+summary: "Pictures on the page and in the world, and texture atlases packed from them."
+order: 45
+sources: ["sdk/raea/src/image.ts"]
+---
+
+`<Img>` shows a picture on the page. `<ImagePlane>` and `<Plate>` put one into a 3D scene, as a card or as a
+backdrop. `TextureAtlasBuilder` packs several pictures into one atlas with Bevy's own packer, for a `<Sprite>` to
+show one cell of.
+
+```tsx
+import { staticFile } from "raea";
+import { Img } from "raea/image";
+
+function Logo() {
+ return <Img src={staticFile("media/brand/logo.png")} style={{ width: 240 }} />;
+}
+```
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { ImagePlane, Img, Plate, TextureAtlasBuilder } from "raea/image"
+```
+
+`raea/image` exports 3 components, 1 class, 5 types. Bevy's counterpart: `bevy_image`. Source: [sdk/raea/src/image.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/image.ts).
+
+## Components
+
+### `ImagePlane`
+
+A picture on a flat card in the scene, unlit (a poster, a screen, a sprite).
+
+Bevy: `bevy_image::image::Image`.
+
+Takes [`ImagePlaneProps`](3d.md#imageplaneprops)'s props.
+
+### `Img`
+
+An image; the renderer holds the frame until it has loaded and fails the render (naming src) if it can't.
+
+Also takes the props of `ImgHTMLAttributes` (`alt`, `crossOrigin`, `decoding`, `fetchPriority`, `height`, `loading`, `referrerPolicy`, `sizes`, `src`, `srcSet`, `useMap`, `width`); `HTMLAttributes` (`defaultChecked`, `defaultValue`, `suppressContentEditableWarning`, `suppressHydrationWarning`, `accessKey`, `autoCapitalize`, `autoFocus`, `className`, `contentEditable`, `contextMenu`, `dir`, `draggable`, `enterKeyHint`, `hidden`, `id`, `lang`, `nonce`, `slot`, `spellCheck`, `style`, `tabIndex`, `title`, `translate`, `radioGroup`, `role`, `about`, `content`, `datatype`, `inlist`, `prefix`, `property`, `rel`, `resource`, `rev`, `typeof`, `vocab`, `autoCorrect`, `autoSave`, `color`, `itemProp`, `itemScope`, `itemType`, `itemID`, `itemRef`, `results`, `security`, `unselectable`, `popover`, `popoverTargetAction`, `popoverTarget`, `inert`, `inputMode`, `is`, `exportparts`, `part`); `AriaAttributes` (`aria-activedescendant`, `aria-atomic`, `aria-autocomplete`, `aria-braillelabel`, `aria-brailleroledescription`, `aria-busy`, `aria-checked`, `aria-colcount`, `aria-colindex`, `aria-colindextext`, `aria-colspan`, `aria-controls`, `aria-current`, `aria-describedby`, `aria-description`, `aria-details`, `aria-disabled`, `aria-dropeffect`, `aria-errormessage`, `aria-expanded`, `aria-flowto`, `aria-grabbed`, `aria-haspopup`, `aria-hidden`, `aria-invalid`, `aria-keyshortcuts`, `aria-label`, `aria-labelledby`, `aria-level`, `aria-live`, `aria-modal`, `aria-multiline`, `aria-multiselectable`, `aria-orientation`, `aria-owns`, `aria-placeholder`, `aria-posinset`, `aria-pressed`, `aria-readonly`, `aria-relevant`, `aria-required`, `aria-roledescription`, `aria-rowcount`, `aria-rowindex`, `aria-rowindextext`, `aria-rowspan`, `aria-selected`, `aria-setsize`, `aria-sort`, `aria-valuemax`, `aria-valuemin`, `aria-valuenow`, `aria-valuetext`); `DOMAttributes` (`children`, `dangerouslySetInnerHTML`, `onCopy`, `onCopyCapture`, `onCut`, `onCutCapture`, `onPaste`, `onPasteCapture`, `onCompositionEnd`, `onCompositionEndCapture`, `onCompositionStart`, `onCompositionStartCapture`, `onCompositionUpdate`, `onCompositionUpdateCapture`, `onFocus`, `onFocusCapture`, `onBlur`, `onBlurCapture`, `onChange`, `onChangeCapture`, `onBeforeInput`, `onBeforeInputCapture`, `onInput`, `onInputCapture`, `onReset`, `onResetCapture`, `onSubmit`, `onSubmitCapture`, `onInvalid`, `onInvalidCapture`, `onLoad`, `onLoadCapture`, `onError`, `onErrorCapture`, `onKeyDown`, `onKeyDownCapture`, `onKeyPress`, `onKeyPressCapture`, `onKeyUp`, `onKeyUpCapture`, `onAbort`, `onAbortCapture`, `onCanPlay`, `onCanPlayCapture`, `onCanPlayThrough`, `onCanPlayThroughCapture`, `onDurationChange`, `onDurationChangeCapture`, `onEmptied`, `onEmptiedCapture`, `onEncrypted`, `onEncryptedCapture`, `onEnded`, `onEndedCapture`, `onLoadedData`, `onLoadedDataCapture`, `onLoadedMetadata`, `onLoadedMetadataCapture`, `onLoadStart`, `onLoadStartCapture`, `onPause`, `onPauseCapture`, `onPlay`, `onPlayCapture`, `onPlaying`, `onPlayingCapture`, `onProgress`, `onProgressCapture`, `onRateChange`, `onRateChangeCapture`, `onSeeked`, `onSeekedCapture`, `onSeeking`, `onSeekingCapture`, `onStalled`, `onStalledCapture`, `onSuspend`, `onSuspendCapture`, `onTimeUpdate`, `onTimeUpdateCapture`, `onVolumeChange`, `onVolumeChangeCapture`, `onWaiting`, `onWaitingCapture`, `onAuxClick`, `onAuxClickCapture`, `onClick`, `onClickCapture`, `onContextMenu`, `onContextMenuCapture`, `onDoubleClick`, `onDoubleClickCapture`, `onDrag`, `onDragCapture`, `onDragEnd`, `onDragEndCapture`, `onDragEnter`, `onDragEnterCapture`, `onDragExit`, `onDragExitCapture`, `onDragLeave`, `onDragLeaveCapture`, `onDragOver`, `onDragOverCapture`, `onDragStart`, `onDragStartCapture`, `onDrop`, `onDropCapture`, `onMouseDown`, `onMouseDownCapture`, `onMouseEnter`, `onMouseLeave`, `onMouseMove`, `onMouseMoveCapture`, `onMouseOut`, `onMouseOutCapture`, `onMouseOver`, `onMouseOverCapture`, `onMouseUp`, `onMouseUpCapture`, `onSelect`, `onSelectCapture`, `onTouchCancel`, `onTouchCancelCapture`, `onTouchEnd`, `onTouchEndCapture`, `onTouchMove`, `onTouchMoveCapture`, `onTouchStart`, `onTouchStartCapture`, `onPointerDown`, `onPointerDownCapture`, `onPointerMove`, `onPointerMoveCapture`, `onPointerUp`, `onPointerUpCapture`, `onPointerCancel`, `onPointerCancelCapture`, `onPointerEnter`, `onPointerLeave`, `onPointerOver`, `onPointerOverCapture`, `onPointerOut`, `onPointerOutCapture`, `onGotPointerCapture`, `onGotPointerCaptureCapture`, `onLostPointerCapture`, `onLostPointerCaptureCapture`, `onScroll`, `onScrollCapture`, `onScrollEnd`, `onScrollEndCapture`, `onWheel`, `onWheelCapture`, `onAnimationStart`, `onAnimationStartCapture`, `onAnimationEnd`, `onAnimationEndCapture`, `onAnimationIteration`, `onAnimationIterationCapture`, `onToggle`, `onBeforeToggle`, `onTransitionCancel`, `onTransitionCancelCapture`, `onTransitionEnd`, `onTransitionEndCapture`, `onTransitionRun`, `onTransitionRunCapture`, `onTransitionStart`, `onTransitionStartCapture`).
+
+### `Plate`
+
+Footage behind the 3D: the clip's frame filling the camera's whole view (its `view` when it has one), on the far
+side of everything, unlit. Give the scene `<ToneMapping mode="none" />` to keep its colours exact. <Matchmove> is
+the usual way in.
+
+Takes [`PlateProps`](3d.md#plateprops)'s props.
+
+## Classes
+
+### `TextureAtlasBuilder`
+
+Pictures packed into one atlas, as Bevy's TextureAtlasBuilder: `padding([x, y])` px around each, `addTexture` in
+order, then `build({ sampler })` (the atlas's own sampler, Bevy's default otherwise).
+
+Bevy: `bevy_image::texture_atlas_builder::TextureAtlasBuilder`, `bevy_image::texture_atlas::TextureAtlasSources`.
+
+| Member | What it does |
+| --- | --- |
+| `.padding(p: [number, number]): TextureAtlasBuilder` | – |
+| `.addTexture(src: string): TextureAtlasBuilder` | – |
+| `.build({ sampler }?: { sampler?: SamplerSpec \| undefined; }): BuiltAtlas` | – |
+
+## Types
+
+### `AtlasSprite`
+
+What a <Sprite> takes to show a built atlas: the whole of it, or one of its pictures (`atlasPick`).
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `src` (required) | `string` | – |
+| `sampler` | `SamplerSpec` | – |
+| `atlasPick` | `number` | – |
+
+### `BuiltAtlas`
+
+A built atlas: `image` the whole atlas as a sprite's picture, `sources.handle(texture)` one picture of it
+(TextureAtlasSources::handle).
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `image` (required) | `AtlasSprite` | – |
+| `sources` (required) | `{ handle(texture: string): AtlasSprite }` | – |
+
+### `ImagePlaneProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `src` (required) | `string` | a picture in the media folder: staticFile("poster.png") |
+| `name` | `string` | – |
+| `width` | `number` | width in scene units (1 by default); height follows the picture unless given |
+| `height` | `number` | – |
+| `position` | `Vec3` | – |
+| `rotation` | `Vec3` | radians |
+| `scale` | `number \| Vec3` | – |
+| `quaternion` | `[number, number, number, number]` | a turn as a quaternion [x, y, z, w], instead of `rotation` (a card turned to face a point) |
+| `shadow` | `boolean` | false: the card casts no shadow (a cursor or a UI floating in the scene); true by default |
+| `cutout` | `boolean` | the picture cut out at half alpha instead of blended: its clear parts are no surface at all (no fog on them, no sorting) and its shadow is the picture's shape, not the card's. For hard-edged pictures: a baked cloud, a sprite |
+| `grid` | `[number, number]` | a sprite sheet: the picture is `[columns, rows]` frames of equal size, read left to right, top to bottom, and the card shows one cell (its height follows one cell's shape). A texture atlas of a regular grid |
+| `frame` | `number` | with `grid`: which cell shows (0 is the top left; whole numbers, wrapping); animate it to play the sheet, as Bevy's TextureAtlas index does: frame={Math.floor(f / 3)} |
+
+### `ImgProps`
+
+The props of [`Img`](#img), tabled there.
+
+### `PlateProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `src` (required) | `string` | a video in the media folder: staticFile("clip.mp4") |
+| `name` | `string` | – |
+| `time` | `number` | the clip's time on this frame, in seconds (by default the Sequence's: frame / fps) |
+| `k1` | `number` | the lens's radial distortion (SIMPLE_RADIAL's k1, from a solve): the plate is drawn undistorted, so the footage's straight lines are straight where the 3D's are |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/index.md b/docs/manual/reference/sdk/index.md
new file mode 100644
index 00000000..caaab01f
--- /dev/null
+++ b/docs/manual/reference/sdk/index.md
@@ -0,0 +1,98 @@
+---
+title: "SDK"
+summary: "Every raea import path: what it is for, and each component, hook, function, class and type it exports."
+order: 1
+sources: ["sdk/raea/src", "tools/manual-ref/sdk.ts"]
+---
+
+A composition, a game, an app or a spec is TypeScript that imports from `raea` and its sub-paths. Each page here
+covers one import path: every export with its doc comment, its signature, a component's props with their types, a
+class's members, the Bevy type it stands for when there is one, and the files that use it. Those files are Bevy's
+own examples ported to raea, each checked against Bevy pixel for pixel, and the manual's examples, each rendered in
+CI, so you can copy from them.
+
+The pages are generated from the SDK by the TypeScript compiler, so they say what the code says. Where the SDK
+mirrors a Bevy type and has no comment of its own, the page shows Bevy's doc for it, marked as Bevy's.
+
+## Which path to import from
+
+- `raea` holds what nearly every composition needs: `Composition`, `registerRoot`, `Sequence`, `AbsoluteFill`,
+ `useCurrentFrame`, `interpolate`, `spring`, `Video`, `Audio` and the word and song helpers.
+- The sub-paths follow Bevy's crates: `raea/camera`, `raea/light`, `raea/pbr`, `raea/mesh`, `raea/transform`,
+ `raea/post_process`, `raea/sprite`, `raea/ui` and the rest, so a Bevy example's imports map onto them.
+- `raea/3d` holds raea's scene layer: models, physics, splats, matchmoves and custom shader passes.
+- `raea/brief` holds the specs: `brief`, `script`, `taste`, `plan` and `controller`.
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+## Start here
+
+The composition, the app and the specs an agent writes.
+
+| Import | What it's for | Exports |
+| --- | --- | --- |
+| [`raea`](raea.md) | The main entry: compositions, sequences, time, interpolation, springs, footage, sound and words. | 18 components, 8 hooks, 52 functions, 8 values, 91 types |
+| [`raea/app`](app.md) | The App, its plugins and schedules, and the registry a video's compositions are kept in. | 1 component, 4 functions, 3 classes, 17 values, 8 types |
+| [`raea/brief`](brief.md) | The specs an agent writes as data: brief, script, taste, plan and controller, checked against raea's schemas. | 5 functions, 28 types |
+
+## Time and motion
+
+Frames, animation, springs, states and input.
+
+| Import | What it's for | Exports |
+| --- | --- | --- |
+| [`raea/time`](time.md) | The frame being drawn and the composition's time: useCurrentFrame, useVideoConfig and the Clock. | 1 component, 3 hooks, 7 types |
+| [`raea/animation`](animation.md) | Declared animation: named moves, staggers, sequences and timelines, and a model's own clips. | 2 components, 1 hook, 27 functions, 2 values, 18 types |
+| [`raea/math`](math.md) | Numbers through time: interpolation, easing, springs, curves and the vector types Bevy uses. | 7 functions, 3 values, 7 types |
+| [`raea/state`](state.md) | State machines stepped by frame, for game logic and workflows, typed so a wrong transition doesn't compile. | 2 hooks, 6 functions, 1 value, 20 types |
+| [`raea/input`](input.md) | The frame's input: keys, pointer, wheel and gamepads, the same live and in a scripted render. | 1 hook, 2 functions, 2 types |
+
+## Video, sound and text
+
+Footage, pictures, sound, words and colour.
+
+| Import | What it's for | Exports |
+| --- | --- | --- |
+| [`raea/video`](video.md) | Footage and time-shifted sequences: Video, Sequence, Series, Loop and Freeze. | 5 components, 7 types |
+| [`raea/audio`](audio.md) | Sound: Audio, the master Mix, speech, sound in 3D space, and a song's energy map. | 6 components, 1 hook, 7 functions, 1 value, 25 types |
+| [`raea/text`](text.md) | Text in the 3D world, fonts, and time anchored to the words said. | 3 components, 1 hook, 3 functions, 6 types |
+| [`raea/image`](image.md) | Pictures on the page and in the world, and texture atlases packed from them. | 3 components, 1 class, 5 types |
+| [`raea/asset`](asset.md) | Files the project holds and assets made for it: staticFile, generated sound and music, and glTF bytes. | 9 functions, 1 value, 8 types |
+| [`raea/color`](color.md) | Bevy's colour types: Srgba, LinearRgba, Hsla, Oklab, Oklch and the rest, with their conversions. | 2 functions, 7 classes |
+
+## 3D
+
+Bevy's 3D: cameras, lights, materials, meshes and the frame after it's drawn.
+
+| Import | What it's for | Exports |
+| --- | --- | --- |
+| [`raea/3d`](3d.md) | raea's scene layer: models, physics, splats, matchmoves, instancing, custom shader passes and 3D text. | 70 components, 4 hooks, 26 functions, 3 classes, 12 values, 126 types |
+| [`raea/camera`](camera.md) | Cameras and the views they make: Camera3d, the Canvas3D a 2D scene draws in, HDR and matchmoved cameras. | 5 components, 1 hook, 3 functions, 9 types |
+| [`raea/light`](light.md) | Bevy's lights in Bevy's units, environments, skies and daylight. | 15 components, 9 functions, 2 values, 13 types |
+| [`raea/pbr`](pbr.md) | Materials and volumes: StandardMaterial, extended and toon materials, custom shaders, decals, fog and fire. | 22 components, 1 function, 1 value, 35 types |
+| [`raea/mesh`](mesh.md) | Shapes and solids: Mesh3d and Mesh2d, Bevy's primitives, buffer meshes, instancing and exact solids. | 14 components, 1 function, 2 classes, 10 values, 24 types |
+| [`raea/transform`](transform.md) | Where things are: Bevy's Transform and Quat, and nesting. | 2 functions, 2 values, 4 types |
+| [`raea/post_process`](post_process.md) | What's done to the frame after it's drawn: tone mapping, bloom, depth of field, motion blur, grading and outlines. | 12 components, 14 types |
+| [`raea/picking`](picking.md) | What the pointer is over: the nearest part under it, and the ray it casts. | 2 functions, 3 types |
+| [`raea/gizmos`](gizmos.md) | Lines drawn for looking: Bevy's gizmos and debug overlays. | 2 components, 1 function, 2 types |
+
+## 2D and UI
+
+Sprites and flat shapes, bevy_ui and Bevy's widgets.
+
+| Import | What it's for | Exports |
+| --- | --- | --- |
+| [`raea/sprite`](sprite.md) | 2D pictures and flat shapes, drawn by Bevy's 2D renderer inside a Canvas3D. | 17 components, 1 class, 20 types |
+| [`raea/ui`](ui.md) | bevy_ui: Node and its layout fields, Text, images, scrolling, gradients and units. | 20 components, 1 hook, 12 functions, 30 values, 37 types |
+| [`raea/feathers`](feathers.md) | Bevy's feathers widgets: buttons, sliders, checkboxes, menus, inputs and colour pickers, in its dark theme. | 33 components, 2 hooks, 24 functions, 11 values, 27 types |
+
+## Tools
+
+Checks, lints and a headless App you can drive.
+
+| Import | What it's for | Exports |
+| --- | --- | --- |
+| [`raea/dev_tools`](dev_tools.md) | Checks and lints you can run from code: a motion performance's lint report. | 2 functions, 3 types |
+| [`raea/remote`](remote.md) | A headless Bevy App you open, step and query from TypeScript, through Bevy's remote protocol. | 1 class, 1 type |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/input.md b/docs/manual/reference/sdk/input.md
new file mode 100644
index 00000000..fecf3adf
--- /dev/null
+++ b/docs/manual/reference/sdk/input.md
@@ -0,0 +1,88 @@
+---
+title: "raea/input"
+summary: "The frame's input: keys, pointer, wheel and gamepads, the same live and in a scripted render."
+order: 26
+sources: ["sdk/raea/src/input.ts"]
+---
+
+`useInput()` returns this frame's input: the keys held, the pointer, the wheel and Bevy's gamepads. Live, it comes
+from the window; in a render, from the input timeline `raea render --input` reads, so a recorded play renders
+exactly. `keyEdges` tells which keys went down or up this frame.
+
+```tsx
+import { useInput } from "raea/input";
+
+function Ship() {
+ const { keys } = useInput();
+ const dx = (keys.includes("ArrowRight") ? 1 : 0) - (keys.includes("ArrowLeft") ? 1 : 0);
+ return <div style={{ transform: `translateX(${dx * 40}px)` }}>▲</div>;
+}
+```
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { keyEdges, useInput, wireKeys } from "raea/input"
+```
+
+`raea/input` exports 1 hook, 2 functions, 2 types. Bevy's counterpart: `bevy_input, bevy_input_focus`. Source: [sdk/raea/src/input.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/input.ts).
+
+## Hooks
+
+### `useInput`
+
+This frame's input ({keys: []} when there was none). Its `gamepads` are Bevy's (bevy_gilrs's Gamepad entities, read
+by engine/render's gamepad_keys):
+
+Bevy: `bevy_input::gamepad::Gamepad`.
+
+```ts
+function useInput(): FrameInput
+```
+
+## Functions
+
+### `keyEdges`
+
+The input edges between two frames' keys, as events for a machine's `on`: "keydown:K" for each key pressed this
+frame, "keyup:K" for each released (keep last frame's keys in the game state to have `prev`).
+
+```ts
+function keyEdges(prev: readonly string[] | undefined, now: readonly string[] | undefined): string[]
+```
+
+### `wireKeys`
+
+A live host's input beyond keys and the pointer, which reaches the page as marked keys, made fields:
+"Mouse:Right" a button held; "Wheel:Y DY" (and "Wheel:X DX") the wheel's turn this frame; "Pad0:South" a
+gamepad's button, "Pad0:LeftStickX=0.42" its axis; "Touch:ID:X:Y" a finger. A scripted entry (render --input) can
+give the fields themselves.
+
+```ts
+function wireKeys(input: FrameInput): FrameInput
+```
+
+## Types
+
+### `FrameInput`
+
+One frame's input for a game.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `keys` (required) | `string[]` | the keys held (KeyboardEvent.key names: "ArrowLeft", "a", " ") |
+| `pointer` | `{ x: number; y: number; down: boolean }` | the primary pointer in composition px, and whether it's pressed |
+| `buttons` | `string[]` | the mouse buttons held besides the primary one: "Right", "Middle", "Back", "Forward" (Bevy's MouseButton names) |
+| `wheel` | `{ x: number; y: number }` | the wheel turned this frame, in CSS px, down and right positive (the DOM's deltaX and deltaY) |
+| `gamepads` | `{ buttons: string[]; axes: Record<string, number> }[]` | each connected gamepad: the buttons held and the sticks' and triggers' axes, by Bevy's GamepadButton and GamepadAxis names ("South", "DPadUp", "RightTrigger2"; "LeftStickX" -1..1, "LeftZ") |
+| `touches` | `{ id: number; x: number; y: number }[]` | the fingers down, in composition px |
+
+### `InputTimeline`
+
+Recorded input by composition frame; frames without an entry had no input.
+
+```ts
+type InputTimeline = Record<number, Partial<FrameInput> | undefined>
+```
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/light.md b/docs/manual/reference/sdk/light.md
new file mode 100644
index 00000000..d0d58743
--- /dev/null
+++ b/docs/manual/reference/sdk/light.md
@@ -0,0 +1,432 @@
+---
+title: "raea/light"
+summary: "Bevy's lights in Bevy's units, environments, skies and daylight."
+order: 64
+sources: ["sdk/raea/src/light.ts"]
+---
+
+These are Bevy's lights in Bevy's physical units: a `DirectionalLight` in lux, a `PointLight` and `SpotLight` in
+lumens, a `RectLight` for soft area light, and ambient light. `<Daylight>` and `daylight()` place the sun for a time
+and place; `<Environment>`, `<EnvironmentMapLight>` and `<Skybox>` light a scene from an image; `<Atmosphere>` draws
+Bevy's sky. `roomExposure` gives the camera exposure that suits an indoor scene's lights.
+
+```tsx
+import { AmbientLight, DirectionalLight, PointLight } from "raea/light";
+import { Transform } from "raea/transform";
+
+function Lights() {
+ return (
+ <>
+ <AmbientLight brightness={160} />
+ <DirectionalLight transform={Transform.fromXyz(3, 5, 4).lookingAt([0, 0, 0])} illuminance={11200} shadow_maps_enabled />
+ <PointLight transform={Transform.fromXyz(-1, 2, 1)} intensity={800000} color="#ffd9a0" />
+ </>
+ );
+}
+```
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { AmbientLight, Atmosphere, bounce, clearSun } from "raea/light"
+```
+
+`raea/light` exports 15 components, 9 functions, 2 values, 13 types. Bevy's counterpart: `bevy_light`. Source: [sdk/raea/src/light.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/light.ts).
+
+## Components
+
+### `AmbientLight`
+
+Bevy's AmbientLight (on the camera in 0.20; GlobalAmbientLight is the same light as a resource): light from
+everywhere, in cd/m².
+
+Bevy: `bevy_light::ambient_light::AmbientLight`.
+
+Takes [`AmbientLightProps`](#ambientlightprops)'s props.
+
+Used in: [defaults/parts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/defaults/parts.tsx), [shader_advanced/deferred_raymarch](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/deferred_raymarch.tsx), [manual: turntable](https://github.com/shinyobjectz/raea/blob/main/docs/manual/examples/turntable.tsx).
+
+### `Atmosphere`
+
+A procedural sky: Bevy's physically based atmosphere (Earth's air), drawn behind everything and lit by the
+DirectionalLights, so a sun low on the horizon makes a sunset. Inside the Canvas3D, once.
+
+Bevy: `bevy_light::Atmosphere`.
+
+Takes [`AtmosphereProps`](3d.md#atmosphereprops)'s props.
+
+### `Daylight`
+
+The day's sun and sky: the sun as a shadowed directional light at its lux and colour, the panorama as the sky seen
+through the windows at its true brightness (it lights nothing: an Environment is not shadowed, and would light the
+room as if it had no walls), the room's bounce (`indoor`, its daylight factor, 2% by default) as an even fill; the
+windows' own light comes from <WindowLight>.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `day` (required) | `Day` | – |
+| `indoor` | `number` | – |
+| `softShadow` | `boolean \| number` | – |
+
+### `DirectionalLight`
+
+Bevy's DirectionalLight: parallel light shining along its transform's -Z, in lux.
+
+Bevy: `bevy_light::directional_light::DirectionalLight`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `illuminance` | `number` | lux on a surface facing it (Bevy's default 10,000, light_consts::lux::AMBIENT_DAYLIGHT; full sun is about 100,000) |
+| `shadow_maps_enabled` | `boolean` | Bevy: Whether this light casts shadows. |
+| `soft_shadow_size` | `number \| null` | soft shadows (PCSS): the sun's size as its shadows see it, in metres |
+| `children` | `ReactNode` | – |
+
+Also takes the props of `LightCommon` (`color`, `name`, `visibility`, `transform`, `shadow_depth_bias`, `shadow_normal_bias`, `volumetric`).
+
+Used in: [ui/render_ui_to_texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/render_ui_to_texture.tsx), [3d/fog_volumes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/fog_volumes.tsx), [3d/shadow_caster_receiver](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/shadow_caster_receiver.tsx), [3d/split_screen](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/split_screen.tsx), [3d/pbr](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/pbr.tsx), [3d/mesh_ray_cast](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/mesh_ray_cast.tsx), [3d/atmospheric_fog](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/atmospheric_fog.tsx), [3d/3d_viewport_to_world](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/3d_viewport_to_world.tsx), and 16 more.
+
+### `Environment`
+
+Light from all around, out of a panorama: soft light from the sky and reflections of it in every glossy or metal
+surface (image-based lighting), and with `background` the panorama as the sky. Put it inside the Canvas3D, once a
+frame; its src, intensity, rotation and background may change from frame to frame (a cut from a hall to a street).
+Bevy's EnvironmentMapLight with maps already filtered is <EnvironmentMapLight>.
+Its panorama is filtered by Bevy's generator and, with `background`, drawn as the sky (engine/render
+environment.rs):
+
+Bevy: `bevy_light::probe::GeneratedEnvironmentMapLight. Bevy's Skybox from its own cubemap is <Skybox>.`.
+
+Takes [`EnvironmentProps`](3d.md#environmentprops)'s props.
+
+### `EnvironmentMapLight`
+
+Bevy's EnvironmentMapLight with its own prefiltered maps, as Bevy's examples put one on the camera: light from all around and its reflections, from cubemaps already filtered (an <Environment> filters a panorama
+itself). Put it inside the Canvas3D, once; the first frame's holds.
+
+Bevy: `bevy_light::probe::EnvironmentMapLight`.
+
+Takes [`EnvironmentMapLightProps`](3d.md#environmentmaplightprops)'s props.
+
+Used in: [3d/rotate_environment_map](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/rotate_environment_map.tsx), [3d/animated_material](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/animated_material.tsx), [3d/pbr](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/pbr.tsx), [gltf/load_gltf](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/gltf/load_gltf.tsx).
+
+### `GlobalAmbientLight`
+
+The same light as a resource, as Bevy 0.20 names it. (A function, not a const alias: an alias would keep 3D code in
+a 2D bundle through the prelude.)
+
+Bevy: `bevy_light::GlobalAmbientLight`.
+
+Takes [`AmbientLightProps`](#ambientlightprops)'s props.
+
+Used in: [3d/fog_volumes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/fog_volumes.tsx), [3d/fog](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/fog.tsx), [3d/spherical_area_lights](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/spherical_area_lights.tsx), [3d/lightmaps](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/lightmaps.tsx), [3d/spotlight](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/spotlight.tsx), [animation/animated_mesh](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/animation/animated_mesh.tsx), [animation/animated_transform](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/animation/animated_transform.tsx), [gltf/gltf_skinned_mesh](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/gltf/gltf_skinned_mesh.tsx).
+
+### `Pathtracer`
+
+Bevy's reference path tracer for the <Camera3d> it's inside: slow and exact, accumulating over frames while the
+view holds still. For stills to check a look against, not for motion. Same GPU needs as <SolariLighting>.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `reset` | `boolean` | start the accumulation again |
+
+### `PointLight`
+
+Bevy's PointLight: a bulb at its transform's translation, in lumens.
+
+Bevy: `bevy_light::point_light::PointLight`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `intensity` | `number` | lumens (Bevy's default 1,000,000; a 60 W bulb is about 800) |
+| `range` | `number` | metres it reaches (20) |
+| `radius` | `number` | the bulb's radius in metres (0): the size of its highlight on shiny surfaces (a spherical area light), and soft shadows' size when soft_shadows_enabled |
+| `shadow_maps_enabled` | `boolean` | Bevy: Whether this light casts shadows. |
+| `soft_shadows_enabled` | `boolean` | Bevy: Whether soft shadows are enabled. |
+| `paint` | `boolean` | raea's paint look draws this light (3d.tsx's PointLight `paint`) |
+
+Also takes the props of `LightCommon` (`name`, `transform`, `visibility`, `color`, `shadow_depth_bias`, `shadow_normal_bias`, `volumetric`, `children`).
+
+Used in: [3d/fog](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/fog.tsx), [3d/vertex_colors](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/vertex_colors.tsx), [3d/rotate_environment_map](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/rotate_environment_map.tsx), [3d/transparency_3d](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/transparency_3d.tsx), [3d/spherical_area_lights](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/spherical_area_lights.tsx), [3d/3d_shapes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/3d_shapes.tsx), [3d/shadow_caster_receiver](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/shadow_caster_receiver.tsx), [3d/two_passes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/two_passes.tsx), and 18 more.
+
+### `RectLight`
+
+Bevy's RectLight: a rectangle of light facing its transform's -Z, in lumens (no shadows in Bevy 0.20).
+
+Bevy: `bevy_light::rect_light::RectLight`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `intensity` | `number` | lumens (1,000,000) |
+| `range` | `number` | Bevy: Cut-off for the light's area-of-effect. Fragments outside this range will not be affected by this light at all, so it's important to tune this together with `intensity` to prevent hard lighting cut-offs. |
+| `width` | `number` | its face's size in metres (1 x 1) |
+| `height` | `number` | Bevy: Height of the light rectangle (along local Y). |
+
+Also takes the props of `LightCommon` (`color`, `visibility`, `transform`, `shadow_depth_bias`, `shadow_normal_bias`).
+
+Used in: [3d/rect_light](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/rect_light.tsx).
+
+### `Shadows`
+
+Shadow quality for every light in the Canvas3D: map size, the sun's cascades, biases, filtering. Put it inside the
+Canvas3D, once; the first frame's holds for the piece. mapSize sets both shadow maps' size, filter the camera's
+filtering, and the cascade props the sun's cascades (engine/render scene3d.rs):
+
+Bevy: `bevy_light::directional_light::DirectionalLightShadowMap`, `bevy_light::point_light::PointLightShadowMap`, `bevy_light::ShadowFilteringMethod`, `bevy_light::cascade::CascadeShadowConfig`.
+
+Takes [`ShadowsProps`](3d.md#shadowsprops)'s props.
+
+Used in: [3d/split_screen](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/split_screen.tsx), [stress_tests/many_foxes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/stress_tests/many_foxes.tsx), [animation/animated_mesh](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/animation/animated_mesh.tsx).
+
+### `Skybox`
+
+Bevy's Skybox: a cubemap drawn behind everything, as Bevy's examples put one on the camera. Put it inside the
+Canvas3D, once; its brightness and rotation may change each frame (an <Environment>'s `background` is the sky of
+a panorama raea filters).
+
+Bevy: `bevy_light::probe::Skybox`.
+
+Takes [`SkyboxProps`](3d.md#skyboxprops)'s props.
+
+Used in: [3d/rotate_environment_map](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/rotate_environment_map.tsx).
+
+### `SolariLighting`
+
+Ray-traced direct and indirect light for the <Camera3d> it's inside (Bevy's SolariLighting): shadows, bounce
+light and reflections traced against the scene, in place of shadow maps. Needs a GPU with ray queries (Apple
+silicon on Metal, RTX on Vulkan); elsewhere the scene draws raster-lit and raea says so. On the Mac MetalFX's
+temporal denoiser cleans it up (RT4; RAEA_SOLARI_DENOISE=0 shows the raw noise). A <Character> (skinned, morphed) stays raster-lit: Bevy 0.20's
+Solari can't trace it.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `restir` | `boolean` | ReSTIR: reuse light samples between pixels and frames (finer shadows, steadier in hard light; slower). Off by default, as Bevy has it |
+| `bounces` | `number` | how many times light bounces (Bevy's default when left out) |
+| `reset` | `boolean` | start the lighting's history again (a cut) |
+
+### `SpotLight`
+
+Bevy's SpotLight: a cone along its transform's -Z, in lumens.
+
+Bevy: `bevy_light::spot_light::SpotLight`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `outer_angle` | `number` | the cone's half-angle in radians (Bevy's default PI/4), up to PI/2 |
+| `inner_angle` | `number` | where the light starts to fall off, in radians from the axis (0) |
+
+Also takes the props of [`PointLightProps`](#pointlightprops) (`intensity`, `range`, `radius`, `shadow_maps_enabled`, `soft_shadows_enabled`, `paint`); `LightCommon` (`name`, `transform`, `visibility`, `color`, `shadow_depth_bias`, `shadow_normal_bias`, `volumetric`, `children`).
+
+Used in: [3d/spotlight](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/spotlight.tsx), [defaults/parts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/defaults/parts.tsx).
+
+### `WindowLight`
+
+A window's light as a lamp (windowLight), wide and soft, shadowed.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `day` (required) | `Day` | – |
+| `room` (required) | `Room` | – |
+| `opening` (required) | `Opening` | – |
+| `transmit` | `number` | – |
+| `ground` | `number` | – |
+| `name` | `string` | – |
+
+## Functions
+
+### `bounce`
+
+The room's bounce: the light every surface gets from the room's other surfaces once the windows' light has struck
+them, as luminance (a daylight factor `indoor` of the day's light on the ground, over π) and colour (the sun's and the
+sky's, mixed in mired by their shares of it). Not the sky's colour: a room's fill is its sunlit floor and walls.
+
+```ts
+function bounce(day: Day, indoor?: number): { nits: number; kelvin: number; }
+```
+
+### `clearSun`
+
+A clear sky's direct sun at `elevation` degrees, lux on a surface facing it: the solar constant's light (1361 W/m²
+at 93 lm/W) through the air mass (Kasten and Young) by Meinel's attenuation.
+
+```ts
+function clearSun(elevation: number): number
+```
+
+### `daylight`
+
+The day from a sky panorama and, to put the sun where it was, a place and time (else the panorama's own sun). An
+overcast panorama (no sun) is lit as an overcast sky of `overcastLux` on the ground (10 000 by default).
+
+```ts
+function daylight(o: { sky: string; lat?: number; lon?: number; time?: string; north?: number; overcastLux?: number; }): Day
+```
+
+### `kelvin`
+
+A colour temperature as a light's colour (Tanner Helland's fit to the Planckian locus), sRGB hex.
+
+```ts
+function kelvin(k: number): string
+```
+
+### `readSky`
+
+A sky panorama read by the engine: its sun (if it has one) and its light's split (scene.sky).
+
+```ts
+function readSky(src: string, rotation?: number): SkyRead
+```
+
+### `roomExposure`
+
+The exposure a camera sets for the room, as <ToneMapping exposure>: an incident meter's EV100 (log2 E·100/250, as
+`raea scene light` reads it) on the room's light, its bounce (`indoor`, as Daylight's) plus `extra` lux, and
+the engine's exposure for it (EV100 = 9.7 - exposure). The windows burn out, as a room's do in a real camera.
+
+```ts
+function roomExposure(day: Day, indoor?: number, extra?: number): number
+```
+
+### `sunDirection`
+
+The world direction toward a sun at `azimuth` and `elevation` (degrees), north along -z turned by `north` (radians
+about +y: where the set's north is), east along +x.
+
+```ts
+function sunDirection(azimuth: number, elevation: number, north?: number): Vec3
+```
+
+### `sunPosition`
+
+Where the sun stands at a place and moment (NOAA's low-precision solar position, good to a few tenths of a degree):
+azimuth from north, clockwise, and elevation over the horizon, in degrees. `time` is ISO 8601 with its offset.
+
+```ts
+function sunPosition(lat: number, lon: number, time: string): { azimuth: number; elevation: number; }
+```
+
+### `windowLight`
+
+What a window lets in besides the sun: its sky above and the ground below (`ground` its reflectance), seen through
+glass of `transmit`, as a lamp in the opening that faces into the room with a window's candela on its axis (a
+Lambertian pane: luminance times area). A bay's three faces count as its mouth.
+
+```ts
+function windowLight(day: Day, room: Room, o: Opening, { transmit, ground }?: { transmit?: number; ground?: number; }): { position: Vec3; target: Vec3; lumens: number; color: string; candela: number; }
+```
+
+## Values
+
+### `light_consts`
+
+Bevy's named light values (bevy_light light_consts), for a light's own units: `illuminance={light_consts.lux.DIRECT_SUNLIGHT}`,
+`intensity={light_consts.lumens.VERY_LARGE_CINEMA_LIGHT}`.
+
+Used in: [3d/shadow_caster_receiver](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/shadow_caster_receiver.tsx).
+
+### `UNITS`
+
+The engine's one relative unit left (core/scene props.rs ENV): an Environment of 1 is its panorama times 1000 cd/m².
+Lights are given in Bevy's own units.
+
+## Types
+
+### `AmbientLightProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` | `string` | – |
+| `color` | `string` | – |
+| `brightness` | `number` | cd/m² (Bevy's default 80) |
+
+### `AtmosphereProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `light` | `boolean` | it lights the scene too, as a sky does (ambient and reflections from the sky it draws) |
+| `groundAlbedo` | `number` | the ground's brightness the air's scattering sees, 0..1 (0.3 by default) |
+
+### `Day`
+
+The day outside, in physical units, for one set.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `sky` (required) | `string` | – |
+| `rotation` (required) | `number` | the panorama's turn that puts its sun where the day's is (radians, as <Environment rotation>) |
+| `sunDir` (required) | `Vec3` | toward the sun, world |
+| `sunLux` (required) | `number` | the sun's lux on a surface facing it, its colour temperature |
+| `sunK` (required) | `number` | – |
+| `sunGround` (required) | `number` | the sun's and the sky's lux on level ground outside |
+| `skyGround` (required) | `number` | – |
+| `skyNits` (required) | `number` | the sky's mean luminance (cd/m²) and colour temperature |
+| `skyK` (required) | `number` | – |
+| `scale` (required) | `number` | cd/m² per unit of the panorama |
+| `elevation` (required) | `number` | the sun's elevation (degrees) the light was made for, and the panorama's own (a different height shows in its shadows' length outside, never in the room's light) |
+| `skyElevation` (required) | `number \| null` | – |
+
+### `DirectionalLightProps`
+
+The props of [`DirectionalLight`](#directionallight), tabled there.
+
+### `EnvironmentMapLightProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `diffuse_map` (required) | `string` | the prefiltered diffuse (irradiance) cubemap, a.ktx2 file: staticFile("environment_maps/pisa_diffuse_rgb9e5_zstd.ktx2") |
+| `specular_map` (required) | `string` | the prefiltered specular (radiance) cubemap with its mips, a.ktx2 file |
+| `intensity` | `number` | cd/m² (Bevy's default 1) |
+| `rotation` | `[number, number, number, number]` | its turn, glam's Quat [x, y, z, w] (Bevy's identity): Quat.from_rotation_y(0.2 * t) turns it each frame |
+
+### `EnvironmentProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `src` (required) | `string` | an equirectangular panorama in the media folder: a Radiance.hdr (Poly Haven's), an OpenEXR.exr, or an 8-bit.png/.jpg. Change it between frames to cut from one place to another |
+| `intensity` | `number` | how strongly it lights the scene (1 by default: a sky about as bright as an AmbientLight of 2.5 overall); animate it, or set 0 to switch it off for a shot |
+| `rotation` | `number` | a turn about the vertical axis, in radians, for both the light and the sky: puts the sun where the shot wants it |
+| `background` | `boolean` | draw the panorama as the sky behind everything (off by default: light only) |
+| `backgroundIntensity` | `number` | the sky's brightness, when it should differ from the light's (`intensity` by default) |
+
+### `PathtracerProps`
+
+The props of [`Pathtracer`](#pathtracer), tabled there.
+
+### `PointLightProps`
+
+The props of [`PointLight`](#pointlight), tabled there.
+
+### `RectLightProps`
+
+The props of [`RectLight`](#rectlight), tabled there.
+
+### `ShadowsProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `mapSize` | `1024 \| 2048 \| 4096 \| 8192` | each shadow map's size in texels (4096 by default; 8192 is sharper still, at four times the memory and about 2-3 ms a frame at 1080p) |
+| `distance` | `number` | how far from the camera the sun's shadows reach, in metres (150 by default): the shorter, the sharper they are |
+| `firstCascade` | `number` | where the sun's first, sharpest cascade ends, in metres (8 by default): the distance of the nearest subject |
+| `cascades` | `number` | how many cascades split the distance (4 by default, 1-4) |
+| `overlap` | `number` | how much neighbouring cascades overlap, 0-1 (0.3 by default) so the seam between them doesn't show |
+| `bias` | `number` | depth bias: raise it if surfaces facing the light show stripes of their own shadow (acne); too high and shadows detach from what casts them (0.02 by default for the sun, as Bevy's) |
+| `normalBias` | `number` | normal bias, in texels: the same trade-off along the surface's normal (1.8 by default for the sun) |
+| `filter` | `"gaussian" \| "hardware"` | "gaussian" (the default: soft, smooth edges) or "hardware" (2x2, crisper and cheaper) |
+
+### `SkyboxProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `image` (required) | `string` | the sky's cubemap, a.ktx2 file (Bevy's examples use the specular map: environment_maps/pisa_specular_rgb9e5_zstd.ktx2) |
+| `brightness` | `number` | cd/m² (Bevy's default 0, a black sky: Bevy's examples give it 1000 to 5000) |
+| `rotation` | `[number, number, number, number]` | its turn, glam's Quat [x, y, z, w] (Bevy's identity) |
+
+### `SolariLightingProps`
+
+The props of [`SolariLighting`](#solarilighting), tabled there.
+
+### `SpotLightProps`
+
+The props of [`SpotLight`](#spotlight), tabled there.
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/math.md b/docs/manual/reference/sdk/math.md
new file mode 100644
index 00000000..8639eae2
--- /dev/null
+++ b/docs/manual/reference/sdk/math.md
@@ -0,0 +1,169 @@
+---
+title: "raea/math"
+summary: "Numbers through time: interpolation, easing, springs, curves and the vector types Bevy uses."
+order: 24
+sources: ["sdk/raea/src/math.ts"]
+---
+
+`interpolate` maps a frame onto a range of values, with an easing and with clamping at either end. `spring` gives a
+physically damped value for a frame, and `measureSpring` says how long one takes to settle. `Easing` holds the
+standard curves; `curveFn` turns a declared curve into a function. The quaternion and affine helpers match Bevy's
+math types.
+
+```ts
+import { Easing, interpolate, spring } from "raea/math";
+
+const x = interpolate(30, [0, 45], [-200, 0], { easing: Easing.out(Easing.cubic), extrapolateRight: "clamp" });
+const scale = spring({ frame: 30, fps: 30, config: { damping: 12 } });
+```
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { Affine2, curve, curveFn, Easing } from "raea/math"
+```
+
+`raea/math` exports 7 functions, 3 values, 7 types. Bevy's counterpart: `bevy_math, bevy_curve`. Source: [sdk/raea/src/math.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/math.ts).
+
+## Functions
+
+### `curveFn`
+
+A curve name as a function (the engine's easing::Easing::parse, the same names).
+
+```ts
+function curveFn(name: string, fps?: number): (t: number) => number
+```
+
+### `hash01`
+
+0..1 from integers, the same on every run
+
+```ts
+function hash01(...xs: number[]): number
+```
+
+### `interpolate`
+
+`x` mapped from the `input` range onto the `output` range, piece by piece: `input` rises, and the two have the same
+length. `options.easing` shapes each piece; `extrapolateLeft` and `extrapolateRight` say what happens outside the
+range (`extend`, the default, carries on; `clamp` holds the end value; `identity` returns `x`; `wrap` repeats).
+
+```ts
+function interpolate(x: number, input: readonly number[], output: readonly number[], options?: InterpolateOptions): number
+```
+
+### `measureSpring`
+
+How many frames a spring with these settings takes to settle (before any stretching).
+
+```ts
+function measureSpring(opts: { fps: number; config?: SpringConfig; durationRestThreshold?: number; }): number
+```
+
+### `quatAxis`
+
+The quaternion [x, y, z, w] turning `angle` radians about `axis`, as Bevy's Quat::from_axis_angle.
+
+```ts
+function quatAxis(axis: Vec3, angle: number): Quat
+```
+
+### `quatMul`
+
+The product a × b of two quaternions [x, y, z, w], `b` applied first, as Bevy's Quat * Quat.
+
+```ts
+function quatMul(a: Quat, b: Quat): Quat
+```
+
+### `spring`
+
+A damped spring's value at `frame`: from `from` (0) to `to` (1), started `delay` frames late, by its `config`
+(mass 1, damping 10, stiffness 100). It overshoots and settles unless `overshootClamping` is set; `durationInFrames`
+stretches it to end at that frame. `measureSpring` says how long one takes to settle.
+
+```ts
+function spring(opts: SpringOptions): number
+```
+
+## Values
+
+### `Affine2`
+
+glam's Affine2 as its parts: scaled, then turned `angle` radians, then moved by `translation` (from_scale_angle_translation).
+glam's Affine2 constructors, by their Rust names in camelCase.
+
+Used in: [2d/mesh2d_repeated_texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/mesh2d_repeated_texture.tsx).
+
+### `curve`
+
+Curve helpers: `curve.bezier(0.05, 0.7, 0.1, 1)`, `curve.spring({ damping: 15, stiffness: 120 })`.
+
+### `Easing`
+
+The easing curves, each a function of progress 0..1: `linear`, `quad`, `cubic`, `poly(n)`, `sin`, `circle`, `exp`,
+`back`, `elastic`, `bounce` and `bezier(x1, y1, x2, y2)`, eased in as they are; `Easing.out(f)` and `Easing.inOut(f)`
+turn one round. Pass one as `interpolate`'s `easing`.
+
+## Types
+
+### `Curve`
+
+```ts
+type Curve = CurveName | (string & {})
+```
+
+### `CurveName`
+
+Curve names. Any of these, or `bezier(x1,y1,x2,y2)`, `steps(n)`, `spring(mass,damping,stiffness)`,
+`reverse(<curve>)`.
+
+```ts
+type CurveName = | "linear" | "ease" | `${"in" | "out" | "in-out"}-${"quad" | "cubic" | "quart" | "quint" | "sine" | "expo" | "circ" | "back" | "elastic" | "bounce"}`
+```
+
+### `EasingFn`
+
+```ts
+type EasingFn = (p: number) => number
+```
+
+### `ExtrapolateMode`
+
+```ts
+type ExtrapolateMode = "extend" | "clamp" | "identity" | "wrap"
+```
+
+### `InterpolateOptions`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `easing` | `EasingFn \| EasingFn[]` | – |
+| `extrapolateLeft` | `ExtrapolateMode` | – |
+| `extrapolateRight` | `ExtrapolateMode` | – |
+
+### `SpringConfig`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `mass` | `number` | – |
+| `damping` | `number` | – |
+| `stiffness` | `number` | – |
+| `overshootClamping` | `boolean` | – |
+
+### `SpringOptions`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `frame` (required) | `number` | – |
+| `fps` (required) | `number` | – |
+| `from` | `number` | – |
+| `to` | `number` | – |
+| `config` | `SpringConfig` | – |
+| `durationInFrames` | `number` | – |
+| `durationRestThreshold` | `number` | – |
+| `delay` | `number` | – |
+| `reverse` | `boolean` | – |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/mesh.md b/docs/manual/reference/sdk/mesh.md
new file mode 100644
index 00000000..359e613e
--- /dev/null
+++ b/docs/manual/reference/sdk/mesh.md
@@ -0,0 +1,567 @@
+---
+title: "raea/mesh"
+summary: "Shapes and solids: Mesh3d and Mesh2d, Bevy's primitives, buffer meshes, instancing and exact solids."
+order: 66
+sources: ["sdk/raea/src/mesh.ts"]
+---
+
+`<Mesh3d>` holds a shape and a material, as Bevy's Mesh3d and MeshMaterial3d do. The shapes are Bevy's primitives
+(`Cuboid`, `Sphere`, `Cylinder`, `Capsule3d`, `Cone`, `Torus`, `Plane3d` and the rest) with Bevy's fields.
+`<BufferMesh>` takes your own vertices; `<Instances>` and `scatter` draw many copies at once; `Solid` builds exact
+solids with booleans, for parts that must fit together.
+
+```tsx
+import { Cuboid, Mesh3d } from "raea/mesh";
+import { StandardMaterial } from "raea/pbr";
+import { Transform } from "raea/transform";
+
+const Box = () => (
+ <Mesh3d transform={Transform.fromXyz(0, 0.5, 0)}>
+ <Cuboid half_size={[0.5, 0.5, 0.5]} />
+ <StandardMaterial base_color="#4a7ae8" />
+ </Mesh3d>
+);
+```
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { ATTRIBUTE_COLOR, ATTRIBUTE_NORMAL, ATTRIBUTE_POSITION, ATTRIBUTE_TANGENT } from "raea/mesh"
+```
+
+`raea/mesh` exports 14 components, 1 function, 2 classes, 10 values, 24 types. Bevy's counterpart: `bevy_mesh, bevy_shape`. Source: [sdk/raea/src/mesh.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/mesh.ts).
+
+## Components
+
+### `BufferMesh`
+
+A mesh from its own vertex buffers, as the geometry of a <Mesh> (Bevy's Mesh built from attributes): a terrain from
+a height field, a procedural shape, a ribbon, an imported point list. Drawn as flat triangles, or with indices and
+normals as Bevy's indexed Mesh.
+
+Bevy: `bevy_mesh::mesh::Mesh`.
+
+Takes [`BufferMeshProps`](3d.md#buffermeshprops)'s props.
+
+Used in: [3d/vertex_colors](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/vertex_colors.tsx), [shader_advanced/compute_mesh](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/compute_mesh.tsx).
+
+### `Capsule`
+
+A capsule (Bevy's Capsule3d, three.js's CapsuleGeometry): [radius, length of the straight part], standing up
+(along y); its whole height is length + 2 x radius. A character's stand-in, a pill, a collider's look.
+
+Also takes the props of [`CapsuleProps`](3d.md#capsuleprops) (`args`).
+
+### `Capsule3d`
+
+*From Bevy's `bevy_shape::Capsule3d`:* A 3D capsule primitive centered on the origin A three-dimensional capsule is defined as a surface at a distance (radius) from a line
+
+Also takes the props of [`Capsule3dProps`](3d.md#capsule3dprops) (`radius`, `half_length`, `args`).
+
+### `Cone`
+
+A cone: [radius, height], its point up (along y).
+
+Bevy: `bevy_shape::Cone`.
+
+Also takes the props of [`ConeProps`](3d.md#coneprops) (`args`, `radius`, `height`).
+
+### `ConicalFrustum`
+
+*From Bevy's `bevy_shape::ConicalFrustum`:* A conical frustum primitive. A conical frustum can be created by slicing off a section of a cone.
+
+Also takes the props of [`ConicalFrustumProps`](#conicalfrustumprops) (`radius_top`, `radius_bottom`, `height`, `args`).
+
+### `Cuboid`
+
+Bevy's Cuboid: `<Cuboid half_size={[1, 0.5, 1]} />` is a Box of args [2, 1, 2].
+
+Bevy: `bevy_shape::Cuboid`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `args` | `[number, number, number]` | – |
+
+Also takes the props of [`CuboidProps`](3d.md#cuboidprops) (`half_size`).
+
+Used in: [ui/render_ui_to_texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/render_ui_to_texture.tsx), [ui/widgets/viewport_node](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/viewport_node.tsx), [3d/fog](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/fog.tsx), [3d/transparency_3d](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/transparency_3d.tsx), [3d/animated_material](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/animated_material.tsx), [3d/two_passes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/two_passes.tsx), [3d/spotlight](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/spotlight.tsx), [3d/orthographic](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/orthographic.tsx), and 34 more.
+
+### `Cylinder`
+
+[radiusTop, radiusBottom, height], standing up (along y) as three.js has it.
+
+Bevy: `bevy_shape::Cylinder`.
+
+Also takes the props of [`CylinderProps`](3d.md#cylinderprops) (`args`, `radius`, `half_height`).
+
+Used in: [shader/shader_material_bindless](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader/shader_material_bindless.tsx).
+
+### `Instances`
+
+One glTF (or one mesh) drawn at many placements, loaded once and drawn by the GPU as instances: a meadow's grass
+and flowers, a forest, a suburb's houses. `<Instances src={staticFile("daisy.glb")} at={scatter({...})} />`. The
+copies share one surface and can't play a clip.
+
+Bevy: `bevy_pbr::render::mesh::MeshPipeline (automatic batching of entities sharing a mesh and material)`.
+
+Takes [`InstancesProps`](3d.md#instancesprops)'s props.
+
+### `Mesh2d`
+
+Bevy's Mesh2d with its Transform, a primitive and a ColorMaterial: <Shape2D> in Bevy's 2D world.
+
+Takes [`Mesh2dProps`](#mesh2dprops)'s props.
+
+### `Mesh3d`
+
+Bevy's Mesh3d on an entity with its Transform: a shape (Cuboid, Sphere...) and a material inside, and any page
+element inside as a page layer in the world at it, or on it with layer="surface" (`meshLayers`).
+
+Bevy: `bevy_mesh::components::Mesh3d`, `bevy_pbr::mesh_material::MeshMaterial3d<bevy_pbr::pbr_material::StandardMaterial>
+castShadow={false} and receiveShadow={false} put Bevy's markers on it:`, `bevy_light::NotShadowCaster`, `bevy_light::NotShadowReceiver
+`layers` is its RenderLayers (a light's and a camera's too):`, `bevy_camera::visibility::render_layers::RenderLayers
+shadow="only" draws it with the shadow-only material (engine/render shadow_only.rs):`, `bevy_pbr::mesh_material::MeshMaterial3d<raea_render::engine::shadow_only::ShadowOnlyMaterial>`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `transform` | `TransformValue` | – |
+| `visibility` | `"Visible" \| "Hidden" \| "Inherited"` | Bevy's Visibility: "Hidden" draws nothing; "Visible" and "Inherited" draw |
+| `children` | `ReactNode` | – |
+
+Also takes the props of `MeshProps` (`animate`, `name`, `pass`, `quaternion`, `allowOverlap`, `posed`, `shape`, `driven`, `shadow`, `material`, `castShadow`, `surface`, `receiveShadow`, `attributes`, `compressed`, `layers`); `PointerHandlers3d` (`onClick`, `onDrag`, `onDragEnd`, `onDragEnter`, `onDragLeave`, `onDragOver`, `onDragStart`, `onDrop`, `onPointerDown`, `onPointerMove`, `onPointerUp`, `onPointerEnter`, `onPointerLeave`, `onPointerOver`, `onPointerOut`, `onWheel`).
+
+Used in: [ui/render_ui_to_texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/render_ui_to_texture.tsx), [ui/widgets/viewport_node](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/viewport_node.tsx), [3d/fog](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/fog.tsx), [3d/vertex_colors](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/vertex_colors.tsx), [3d/rotate_environment_map](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/rotate_environment_map.tsx), [3d/transparency_3d](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/transparency_3d.tsx), [3d/spherical_area_lights](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/spherical_area_lights.tsx), [3d/animated_material](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/animated_material.tsx), and 54 more.
+
+### `MeshSequence`
+
+A baked simulation, one mesh a frame.
+
+Takes [`MeshSequenceProps`](3d.md#meshsequenceprops)'s props.
+
+### `Plane3d`
+
+*From Bevy's `bevy_shape::Plane3d`:* A bounded plane in 3D space. It forms a surface starting from the origin with a defined height and width.
+
+Takes [`Plane3dProps`](3d.md#plane3dprops)'s props.
+
+Used in: [3d/vertex_colors](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/vertex_colors.tsx), [3d/transparency_3d](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/transparency_3d.tsx), [3d/spherical_area_lights](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/spherical_area_lights.tsx), [3d/texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/texture.tsx), [3d/shadow_caster_receiver](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/shadow_caster_receiver.tsx), [3d/split_screen](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/split_screen.tsx), [3d/two_passes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/two_passes.tsx), [3d/spotlight](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/spotlight.tsx), and 16 more.
+
+### `Sphere`
+
+*From Bevy's `bevy_shape::Sphere`:* A sphere primitive, representing the set of all points some distance from the origin
+
+Also takes the props of [`SphereProps`](3d.md#sphereprops) (`args`, `radius`, `ico`, `uv`).
+
+Used in: [3d/fog](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/fog.tsx), [3d/rotate_environment_map](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/rotate_environment_map.tsx), [3d/transparency_3d](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/transparency_3d.tsx), [3d/spherical_area_lights](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/spherical_area_lights.tsx), [3d/shadow_caster_receiver](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/shadow_caster_receiver.tsx), [3d/pbr](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/pbr.tsx), [3d/spotlight](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/spotlight.tsx), [3d/rect_light](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/rect_light.tsx), and 7 more.
+
+### `Torus`
+
+*From Bevy's `bevy_shape::Torus`:* A torus primitive, often representing a ring or donut shape The set of points some distance from a circle centered at the origin
+
+Also takes the props of [`TorusProps`](3d.md#torusprops) (`args`, `major_radius`, `minor_radius`).
+
+## Functions
+
+### `scatter`
+
+Points scattered over an area for an <Instances>: seeded (the same layout every frame and every run), at least
+`spacing` apart, clear of `avoid` and `clearOf`, on the ground `y` gives, kept by `density`. A spatial hash keeps
+thousands quick. Call it once at module level, not per frame.
+
+```ts
+function scatter(o: ScatterOptions): Instance[]
+```
+
+## Classes
+
+### `CrossSection`
+
+A 2D shape (Manifold's CrossSection), held by value: its contours (counter-clockwise solid, clockwise holes),
+area and bounds. Offset, combine and move it, then extrude or revolve it into a Solid.
+
+| Member | What it does |
+| --- | --- |
+| `new CrossSection(a: SectionAnswer)` | – |
+| `CrossSection.from(a: SectionAnswer): CrossSection` | From an engine answer (a slice, a projection, an operation). |
+| `CrossSection.of(polygons: Polygons): CrossSection` | Contours, overlaps merged and self-crossings resolved (Manifold's positive fill rule). |
+| `.polygons: Polygons` | – |
+| `.area: number` | – |
+| `.contours: number` | – |
+| `.bounds: { min: [number, number]; max: [number, number]; }` | – |
+| `.union(...others: CrossSection[]): CrossSection` | This and the others together. |
+| `.minus(...others: CrossSection[]): CrossSection` | This with the others cut away. |
+| `.intersect(...others: CrossSection[]): CrossSection` | Only where this and every other overlap. |
+| `.hull(...others: CrossSection[]): CrossSection` | The convex hull of this and the others. |
+| `.offset(delta: number, o?: { join?: JoinType \| undefined; miterLimit?: number \| undefined; segments?: number \| undefined; }): CrossSection` | Grown outward by `delta` (shrunk when negative), corners joined round (default), square, miter or bevel. |
+| `.minkowski(other: CrossSection): CrossSection` | Swept by another shape (the 2D Minkowski sum). |
+| `.simplify(epsilon?: number): CrossSection` | Fewer points: those within `epsilon` of a straight line dropped. |
+| `.move(x: number, y: number): CrossSection` | Moved by (x, y). |
+| `.rotate(degrees: number): CrossSection` | Turned by `degrees` about the origin. |
+| `.scale(x: number, y?: number): CrossSection` | Scaled uniformly, or per axis. |
+| `.mirror(nx: number, ny: number): CrossSection` | Mirrored across the line through the origin with this normal. |
+| `.warp(fn: (x: number, y: number) => [number, number]): CrossSection` | Every point moved by `fn`, then re-unioned (crossings resolved). |
+| `.decompose(): CrossSection[]` | Its separate pieces (each outline with its holes). |
+| `.isEmpty(): boolean` | Whether nothing is left. |
+| `.extrude(height: number, o?: { divisions?: number \| undefined; twist?: number \| undefined; scaleTop?: [number, number] \| undefined; }): Solid` | Extruded along z into a Solid (see manifold.extrude). |
+| `.revolve(o?: { degrees?: number \| undefined; segments?: number \| undefined; }): Solid` | Revolved about the z axis into a Solid (see manifold.revolve). |
+
+### `Solid`
+
+A handle to a native solid. Free it when done with many (or let the run end).
+
+| Member | What it does |
+| --- | --- |
+| `new Solid(id: number, expr: string)` | – |
+| `.id: number` | – |
+| `.expr: string` | the expression that rebuilds this solid (what a mesh row draws) |
+| `.union(...others: Solid[]): Solid` | This and the others together. |
+| `.minus(...others: Solid[]): Solid` | This with the others cut away. |
+| `.intersect(...others: Solid[]): Solid` | Only where this and every other overlap. |
+| `.hull(...others: Solid[]): Solid` | The convex hull of this and the others. |
+| `.move(x: number, y: number, z: number): Solid` | Moved by (x, y, z). |
+| `.rotate(x: number, y: number, z: number): Solid` | Turned by x, y and z degrees. |
+| `.scale(s: number, y?: number \| undefined, z?: number \| undefined): Solid` | Scaled uniformly, or per axis. |
+| `.volume(): number` | Its volume. |
+| `.bounds(): Bounds` | Its bounding box. |
+| `.triangles(): number` | How many triangles its mesh has. |
+| `.isEmpty(): boolean` | Whether nothing is left (a boolean that removed everything). |
+| `.slice(z: number): Section` | Its cross-section at height z (in a space-time mask, z is the frame). |
+| `.mirror(nx: number, ny: number, nz: number): Solid` | Mirrored across the plane through the origin with this normal. |
+| `.transform(m: number[]): Solid` | Transformed by a 3x4 matrix given column by column (x axis, y axis, z axis, translation). |
+| `.trim(nx: number, ny: number, nz: number, offset?: number): Solid` | What's on the normal's side of the plane n. p = offset. |
+| `.splitByPlane(nx: number, ny: number, nz: number, offset?: number): [Solid, Solid]` | Cut in two by the plane n. p = offset: [the normal's side, the other side]. |
+| `.split(cutter: Solid): [Solid, Solid]` | Cut in two by another solid: [inside it, outside it]. |
+| `.refine(n: number): Solid` | Each triangle cut into n x n. |
+| `.smooth(o?: { angle?: number \| undefined; smoothness?: number \| undefined; refine?: number \| undefined; }): Solid` | Edges sharper than `angle` degrees kept, the rest rounded (smoothness 0..1 for the sharp ones too), then refined. |
+| `.minkowski(other: Solid): Solid` | This swept by another solid (the Minkowski sum): rounded by a sphere, thickened by a box. |
+| `.minkowskiDiff(other: Solid): Solid` | This eroded by another solid (the Minkowski difference). |
+| `.mesh(): { verts: Float32Array<ArrayBufferLike>; tris: Uint32Array<ArrayBufferLike>; }` | Its triangles: positions (x y z) and indices by threes. |
+| `.warp(fn: (x: number, y: number, z: number) => [number, number, number]): Solid` | Every vertex moved by `fn` (the topology kept): a bend, a twist, a wave. |
+| `.simplify(tolerance: number): Solid` | The mesh coarsened: vertices closer than `tolerance` merged where the shape allows. |
+| `.refineToLength(length: number): Solid` | Refined until no edge is longer than `length`. |
+| `.refineToTolerance(tolerance: number): Solid` | Refined until its smoothed surface is within `tolerance` of the true curve. |
+| `.crossSection(z: number): CrossSection` | Its cross-section at height z as a CrossSection (to offset, combine or extrude again). |
+| `.project(): CrossSection` | Its silhouette seen from above (+z), on the x-y plane. |
+| `.decompose(): Solid[]` | Its disconnected pieces, each a Solid. |
+| `.minGap(other: Solid, searchLength: number): number` | The smallest gap between this and another, looking no further than `searchLength` (which it answers when nothing is closer). |
+| `.rayCast(from: Vec3, to: Vec3): { distance: number; position: Vec3; normal: Vec3; }[]` | Where the segment from `from` to `to` crosses the surface, nearest first (distance 0..1 along it). |
+| `.area(): number` | Its surface area. |
+| `.genus(): number` | Its genus (how many holes go through it: a torus has 1). |
+| `.export(path: string, format?: "obj" \| "glb" \| undefined): number` | Written as OBJ or glTF binary (by the extension, or `format`); the file's size. |
+| `.free(): void` | Let the engine drop it. |
+
+## Values
+
+### `ATTRIBUTE_COLOR`
+
+Bevy's Mesh::ATTRIBUTE_COLOR: a vertex's linear RGBA colour (id 5, Float32x4)
+
+### `ATTRIBUTE_NORMAL`
+
+Bevy's Mesh::ATTRIBUTE_NORMAL: a vertex's normal (id 1, Float32x3)
+
+### `ATTRIBUTE_POSITION`
+
+Bevy's Mesh::ATTRIBUTE_* (ids 0 to 5), as a Material's vertex buffer names them.
+
+Used in: [shader_advanced/custom_vertex_attribute](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/custom_vertex_attribute.tsx).
+
+### `ATTRIBUTE_TANGENT`
+
+Bevy's Mesh::ATTRIBUTE_TANGENT: a vertex's tangent, its w the bitangent's sign (id 4, Float32x4)
+
+### `ATTRIBUTE_UV_0`
+
+Bevy's Mesh::ATTRIBUTE_UV_0: a vertex's first texture coordinates (id 2, Float32x2)
+
+### `ATTRIBUTE_UV_1`
+
+Bevy's Mesh::ATTRIBUTE_UV_1: a vertex's second texture coordinates, as a lightmap's (id 3, Float32x2)
+
+### `crossSection`
+
+2D shapes as CrossSections, made natively.
+
+### `manifold`
+
+### `MeshVertexAttribute`
+
+A vertex attribute: its name, its unique id (a high random one for your own, as Bevy asks, so it sorts after the
+built-in ones) and its format. MeshVertexAttribute.new("BlendColor", 988540917, "Float32x4") is Bevy's
+MeshVertexAttribute::new; Mesh's own are ATTRIBUTE_POSITION and the rest.
+
+Bevy: `bevy_mesh::MeshVertexAttribute`.
+
+Used in: [shader_advanced/custom_vertex_attribute](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/custom_vertex_attribute.tsx).
+
+### `outline`
+
+2D outlines for extrude and revolve.
+
+## Types
+
+### `Animate3d`
+
+A 3D node's declared animation: tracks by property, or a move.
+
+```ts
+type Animate3d = Record<string, TrackSpec | TrackSpec[] | Keys> | Move
+```
+
+### `Bounds`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `min` (required) | `Vec3` | – |
+| `max` (required) | `Vec3` | – |
+
+### `BufferMeshProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `positions` (required) | `number[]` | x, y, z of each vertex |
+| `indices` | `number[]` | three vertex indices a triangle (counter-clockwise seen from its front); without them each three positions are one. With normals too it is Bevy's indexed Mesh, its index buffer kept, as a compute that writes a mesh expects |
+| `normals` | `number[]` | x, y, z of each vertex's normal (without them each face is flat, facing its front) |
+| `uvs` | `number[]` | u, v of each vertex (without them a picture map is projected onto the mesh's bounds) |
+| `colors` | `number[] \| string[]` | each vertex's colour: r, g, b, a (linear, 0 to 1) per vertex, or one "#rrggbb" per vertex; the material's colour is multiplied by it (Bevy's ATTRIBUTE_COLOR), so leave the material white to see them as given |
+| `attributes` | `Record<string, { size: number; values: number[] }>` | a mesh's own attributes beyond those, for a three.js shader that reads them (<ThreeShaderMaterial>): each one's size (1 to 4 numbers a vertex) and values, per vertex |
+
+### `Capsule3dProps`
+
+Bevy's Capsule3d: radius and half_length, the straight part's half (0.5 each by Bevy's default), standing up.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `radius` | `number` | – |
+| `half_length` | `number` | – |
+| `args` | `[number, number]` | – |
+
+### `CapsuleProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `args` | `[number, number]` | – |
+
+### `ConeProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `args` | `[number, number]` | – |
+| `radius` | `number` | – |
+| `height` | `number` | – |
+
+### `ConicalFrustumProps`
+
+Bevy's ConicalFrustum: a cylinder whose ends differ, radius_top and radius_bottom (Bevy's 0.25 and 0.5) and its
+height (0.5), standing up: a tapered Cylinder of args [radius_top, radius_bottom, height].
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `radius_top` | `number` | – |
+| `radius_bottom` | `number` | – |
+| `height` | `number` | – |
+| `args` | `[number, number, number]` | – |
+
+### `CuboidProps`
+
+Bevy's Cuboid: half its size along each axis ([0.5, 0.5, 0.5], a 1 m cube, as Bevy's default).
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `half_size` | `[number, number, number]` | – |
+
+### `CylinderProps`
+
+`args`, or Bevy's Cylinder fields: radius and half_height (0.5 each by Bevy's default).
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `args` | `[number, number, number]` | – |
+| `radius` | `number` | – |
+| `half_height` | `number` | – |
+
+### `Instance`
+
+One copy's placement in an <Instances>, in the Instances' own space (its position, rotation and scale move every
+copy together). Rotation in radians, XYZ order, as everywhere.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `position` (required) | `Vec3` | – |
+| `rotation` | `Vec3` | – |
+| `scale` | `number \| Vec3` | – |
+
+### `InstancesProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `src` | `string` | a glTF file drawn at every placement: staticFile("models/house.glb"). Without it, a geometry child (or `shape`) and a material child draw a mesh at every placement |
+| `at` (required) | `Instance[]` | where each copy stands. Fixed for the shot: the first frame's list is drawn on every frame (move, turn, scale, hide or recolour the whole set by the Instances' own props) |
+| `name` | `string` | – |
+| `position` | `Vec3` | – |
+| `rotation` | `Vec3` | radians |
+| `scale` | `number \| Vec3` | – |
+| `scene` | `number` | of a glTF: which of its scenes (0 by default) |
+| `shape` | `string \| Solid` | a Manifold solid or its expression for the mesh form; wins over the geometry child |
+| `shadow` | `boolean` | false: the copies cast no shadow (true by default). Grass and flowers by the thousand usually want false |
+| `receiveShadow` | `boolean` | false: no shadow falls on the copies |
+| `pass` | `string` | – |
+| `children` | `ReactNode` | the mesh form: a geometry and a material (MeshStandardMaterial, MeshPhysicalMaterial or MeshBasicMaterial). The glTF form: MeshStandardMaterial children re-covering its materials, as on a Model |
+
+### `Mesh2dProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `transform` | `TransformValue` | – |
+| `visibility` | `"Inherited" \| "Visible" \| "Hidden"` | – |
+| `children` | `ReactNode` | one of bevy_math's 2D primitives (<Circle>, <Capsule2d>,...) and a <ColorMaterial>, or your own <Material> |
+| `name` | `string` | – |
+| `onClick` | `(e: Event3d) => void` | – |
+| `onDrag` | `(e: Event3d) => void` | – |
+| `onDragEnd` | `(e: Event3d) => void` | – |
+| `onDragEnter` | `(e: Event3d) => void` | – |
+| `onDragLeave` | `(e: Event3d) => void` | – |
+| `onDragOver` | `(e: Event3d) => void` | – |
+| `onDragStart` | `(e: Event3d) => void` | – |
+| `onDrop` | `(e: Event3d) => void` | – |
+| `onPointerDown` | `(e: Event3d) => void` | – |
+| `onPointerMove` | `(e: Event3d) => void` | – |
+| `onPointerUp` | `(e: Event3d) => void` | – |
+| `onPointerEnter` | `(e: Event3d) => void` | – |
+| `onPointerLeave` | `(e: Event3d) => void` | – |
+| `onPointerOver` | `(e: Event3d) => void` | – |
+| `onPointerOut` | `(e: Event3d) => void` | – |
+| `onWheel` | `(e: Event3d) => void` | – |
+| `quat` | `Quat` | Bevy's rotation as it is, a quaternion [x, y, z, w] in Bevy's axes (y up, z toward the viewer), in place of `rotation`: a turn out of the frame's plane too, as a Sprite's Transform takes it (camera/2d_on_ui) |
+| `opacity` | `number` | 0 to 1 (1 by default) |
+
+### `Mesh3dProps`
+
+The props of [`Mesh3d`](#mesh3d), tabled there.
+
+### `MeshAttribute`
+
+One attribute's values on a mesh: one a vertex, each a number or a list of the format's size.
+
+```ts
+type MeshAttribute = [MeshVertexAttribute, (number | number[])[]]
+```
+
+### `MeshSequenceProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` | `string` | – |
+| `src` (required) | `string` | a.rseq (tools/goo writes them; raea_render::meshseq) |
+| `frame` (required) | `number` | which of its frames (clamped) |
+| `position` | `Vec3` | – |
+| `rotation` | `Vec3` | – |
+| `scale` | `number` | – |
+| `color` | `string` | multiplies the vertex colours |
+| `roughness` | `number` | – |
+| `metalness` | `number` | – |
+| `clearcoat` | `number` | – |
+| `clearcoatRoughness` | `number` | – |
+| `reflectance` | `number` | 0..1 specular strength at normal incidence (0.5: 4%, a dielectric's) |
+| `subsurface` | `number` | 0..1 light let through (diffuse transmission): a jelly's glow |
+| `thickness` | `number` | – |
+| `transmission` | `number` | 0..1 light let straight through and bent (a clear liquid: water, tea, juice), with its index of refraction (1.33 water) and, for a tinted one, the colour it takes after `attenuationDistance` metres through it. Screen space: it refracts what's on screen behind it, and one clear layer doesn't show another through it |
+| `ior` | `number` | – |
+| `attenuationColor` | `string` | – |
+| `attenuationDistance` | `number` | – |
+| `opacity` | `number` | – |
+| `map` | `string` | a picture over its texture coordinates |
+| `doubleSided` | `boolean` | – |
+
+### `PlanBox`
+
+A box on the plan (x, z, metres): the room SDK's Footprint, or any { min, max }.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `min` (required) | `[number, number]` | – |
+| `max` (required) | `[number, number]` | – |
+
+### `Plane3dProps`
+
+Bevy's Plane3d: a flat rectangle facing `normal` (Bevy's default +Y, a floor), `half_size` its half extent along
+its two axes ([0.5, 0.5]), laid out as Bevy's PlaneMeshBuilder does: facing +Z it is a Plane of args
+[2 x half_size]. The normal is along an axis; a tilted plane is a rotated Mesh3d.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `normal` | `Vec3` | – |
+| `half_size` | `[number, number]` | – |
+
+### `Polygons`
+
+A 2D outline: contours of [x, y] points (counter-clockwise for solid, clockwise for a hole).
+
+```ts
+type Polygons = [number, number][][]
+```
+
+### `ScatterOptions`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `area` (required) | `PlanBox` | where the points fall: a box on the plan (x, z) |
+| `count` (required) | `number` | how many (fewer when the area fills up: spacing and avoid leave no room) |
+| `spacing` | `number` | the least distance between two points, metres (0: none) |
+| `avoid` | `PlanBox[]` | boxes on the plan to keep clear of, grown by `margin` |
+| `margin` | `number` | how far to stay off each avoided box (spacing / 2 by default) |
+| `clearOf` | `Instance[]` | points kept off already-placed ones too: a second scatter (flowers) clear of the first (stones) by `spacing` |
+| `seed` | `number` | 1 by default; the same seed gives the same points, every frame, render and play |
+| `yaw` | `boolean \| number \| [number, number]` | each point's turn about y (radians): true (the default) any, false none, a number that one, [lo, hi] between |
+| `tilt` | `number` | a lean off upright, radians: each point tipped by up to this much in a random direction (0 by default) |
+| `scale` | `number \| [number, number]` | a scale, or [lo, hi] between (uniform) |
+| `y` | `number \| ((x: number, z: number) => number)` | the ground's height: a number (0), or the terrain's height at (x, z) |
+| `density` | `(x: number, z: number) => number` | how likely a point is kept at (x, z), 0 to 1: a density map (a path worn bare, a patch thicker by the chair) |
+
+### `Section`
+
+A cross-section of a solid at a height: its area, how many contours, and the contours themselves.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `area` (required) | `number` | – |
+| `contours` (required) | `number` | – |
+| `polygons` (required) | `[number, number][][]` | – |
+
+### `SphereProps`
+
+`args`, or Bevy's Sphere field: radius (0.5 by Bevy's default). Its mesh is Bevy's Sphere::mesh(): an icosphere of 5
+subdivisions, or `ico` of them (Bevy's `.ico(n)`, 0 to 80), or a UV sphere of `uv` = [sectors, stacks] (`.uv(s, t)`).
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `args` | `[number]` | – |
+| `radius` | `number` | – |
+| `ico` | `number` | – |
+| `uv` | `[number, number]` | – |
+
+### `TorusProps`
+
+`args`, or Bevy's Torus fields: major_radius (0.75) and minor_radius (0.25), the tube's.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `args` | `[number, number]` | – |
+| `major_radius` | `number` | – |
+| `minor_radius` | `number` | – |
+
+### `Vec3`
+
+```ts
+type Vec3 = [number, number, number]
+```
+
+### `VertexFormat`
+
+A vertex attribute's format, as Bevy's VertexFormat names it.
+
+```ts
+type VertexFormat = "Float32" | "Float32x2" | "Float32x3" | "Float32x4" | "Uint32" | "Uint32x2" | "Uint32x3" | "Uint32x4" | "Sint32" | "Sint32x4"
+```
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/pbr.md b/docs/manual/reference/sdk/pbr.md
new file mode 100644
index 00000000..f20eadf4
--- /dev/null
+++ b/docs/manual/reference/sdk/pbr.md
@@ -0,0 +1,802 @@
+---
+title: "raea/pbr"
+summary: "Materials and volumes: StandardMaterial, extended and toon materials, custom shaders, decals, fog and fire."
+order: 65
+sources: ["sdk/raea/src/pbr.ts"]
+---
+
+`<StandardMaterial>` is Bevy's physically based material, with its fields named as Bevy names them (`base_color`,
+`perceptual_roughness`, `metallic`, `emissive` and the rest). An `ExtendedMaterial` adds a shader extension on top of
+it; `ToonMaterial` and the paint and wear extensions give stylised looks; `ShaderMesh` and `SurfaceShader` take your
+own shader. Fog, volumetric fog, decals and fire are here too.
+
+```tsx
+import { Sphere } from "raea/3d";
+import { Mesh3d } from "raea/mesh";
+import { StandardMaterial } from "raea/pbr";
+
+const Ball = () => (
+ <Mesh3d>
+ <Sphere radius={0.5} />
+ <StandardMaterial base_color="#c03030" perceptual_roughness={0.2} metallic={0.1} clearcoat={1} />
+ </Mesh3d>
+);
+```
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { AmbientOcclusion, Decal, ExtendedMaterial, Fire } from "raea/pbr"
+```
+
+`raea/pbr` exports 22 components, 1 function, 1 value, 35 types. Bevy's counterpart: `bevy_pbr, bevy_material`. Source: [sdk/raea/src/pbr.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/pbr.ts).
+
+## Components
+
+### `AmbientOcclusion`
+
+Screen-space ambient occlusion: creases, corners and the ground under things darken where the sky's and the room's
+light can't reach. It darkens ambient and environment light (an <AmbientLight>, an <Environment>), not the direct
+light of a sun or a lamp. Turns multisampling off, so the edges are smoothed by SMAA instead (see <AntiAliasing>).
+Put it inside the Canvas3D, once; the first frame's holds for the piece.
+
+Bevy: `bevy_pbr::ssao::ScreenSpaceAmbientOcclusion`.
+
+Takes [`AmbientOcclusionProps`](3d.md#ambientocclusionprops)'s props.
+
+### `Decal`
+
+A picture pressed onto whatever surface it lies across: a label on a jar, a stain on a counter, tiles on a wall, a
+sticker on a laptop (Bevy's forward decal; the camera gets a depth prepass for it). Placed and keyed like any part,
+so it moves and fades with a render's clock and a game's play alike.
+
+Bevy: `bevy_pbr::mesh_material::MeshMaterial3d<bevy_pbr::extended_material::ExtendedMaterial<bevy_pbr::pbr_material::StandardMaterial, bevy_pbr::decal::forward::ForwardDecalMaterialExt>>`.
+
+Takes [`DecalProps`](3d.md#decalprops)'s props.
+
+### `ExtendedMaterial`
+
+Bevy's ExtendedMaterial: a StandardMaterial with one of raea's extensions (GridExtension, PaintExtension, ToonExtension) drawn on it.
+
+ <ExtendedMaterial base={<StandardMaterial base_color="#cfc8bb" />} extension={<GridExtension cell={0.5} major={2} />} />
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `base` (required) | `ReactElement` | a <StandardMaterial>, or another <ExtendedMaterial> to put a second extension on (grid and paint both) |
+| `extension` (required) | `ReactElement` | a <GridExtension>, <PaintExtension> or <ToonExtension> |
+
+Used in: [shader/extended_material](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader/extended_material.tsx), [shader/extended_material_bindless](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader/extended_material_bindless.tsx).
+
+### `Fire`
+
+A fire: a flame drawn as a volume, its tongues rising, curling and tearing off as it burns, with a flickering light
+on its surroundings. Every pixel of it is a function of the frame (rising 3D noise in a tapering envelope), so a
+render of any frame equals its play. Stand it on its fuel (a pyre, a brazier); put embers and smoke round it
+yourself.
+
+Bevy: `bevy_pbr::mesh_material::MeshMaterial3d<raea_render::engine::fire::FireMaterial>`.
+
+Takes [`FireProps`](3d.md#fireprops)'s props.
+
+### `Fog`
+
+Distance fog: far things fade into `color`. Inside the <Camera3d> it is Bevy's DistanceFog on that camera, with all of
+Bevy's fields (an atmospheric falloff, the sun's colour); inside the Canvas3D it fogs the scene's camera by near, far
+or density.
+
+Bevy: `bevy_pbr::fog::DistanceFog`.
+
+Takes [`FogProps`](3d.md#fogprops)'s props.
+
+### `FogVolume`
+
+A box of air that light shows in: dust in a sunbeam, smoke, a haze of blood. Needs a <VolumetricFog> in the
+Canvas3D; lights marked `volumetric` throw shafts through it, and every light's glow fills it softly. A part, so it
+keeps its name across frames: animate its density, colour and placement.
+
+Bevy: `bevy_light::volumetric::FogVolume`.
+
+Takes [`FogVolumeProps`](3d.md#fogvolumeprops)'s props.
+
+Used in: [3d/fog_volumes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/fog_volumes.tsx).
+
+### `GridExtension`
+
+raea's grid over a StandardMaterial, as an ExtendedMaterial's extension (engine/render grid.rs):
+
+Bevy: `bevy_pbr::mesh_material::MeshMaterial3d<bevy_pbr::extended_material::ExtendedMaterial<bevy_pbr::pbr_material::StandardMaterial, raea_render::engine::grid::Grid>>`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `cell` (required) | `number` | – |
+| `major` | `number` | – |
+| `color` | `string` | – |
+| `edge` | `string` | – |
+
+### `Lightmap`
+
+A light bake on the meshes of a <Model> its `mesh` names, lighting them in place of the scene's lights, scaled by
+their material's lightmap_exposure (a <StandardMaterial lightmap_exposure> in the same Model, by material). Goes in
+a <Model>.
+
+Bevy: `bevy_pbr::lightmap::Lightmap`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `mesh` (required) | `string` | the glTF mesh it lies on, by name (Bevy's GltfMeshName): every primitive of it |
+| `image` (required) | `string` | the bake: a.ktx2 (or other picture) file, staticFile("lightmaps/room.ktx2"), sampled by the mesh's second UVs |
+| `uv_rect` | `{ min: [number, number]; max: [number, number] }` | the rect in the image those UVs are relative to, for meshes packed in one atlas ({ min: [0, 0], max: [1, 1] } by default) |
+| `bicubic_sampling` | `boolean` | bicubic sampling: smoother, slower, may leak light (false by default) |
+
+Used in: [3d/lightmaps](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/lightmaps.tsx).
+
+### `PaintExtension`
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `breakup` | `number` | – |
+| `scale` | `number` | – |
+| `color` | `string` | – |
+| `amount` | `number` | – |
+
+### `ProceduralExtension`
+
+raea's procedural surface over a StandardMaterial, as an ExtendedMaterial's extension (systems/procmat):
+
+ <ExtendedMaterial base={<StandardMaterial />} extension={<ProceduralExtension pattern="brick" dirt={0.3} />} />
+
+Bevy: `bevy_pbr::mesh_material::MeshMaterial3d<bevy_pbr::extended_material::ExtendedMaterial<bevy_pbr::pbr_material::StandardMaterial, raea_sys_procmat::Procedural>>`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `pattern` (required) | `ProceduralSurface["pattern"]` | – |
+| `colors` | `[string, string]` | – |
+| `scale` | `number` | – |
+| `rough_a` | `number` | – |
+| `rough_b` | `number` | – |
+| `bump` | `number` | – |
+| `tile` | `[number, number]` | – |
+| `gap` | `number` | – |
+| `gap_color` | `string` | – |
+| `dust` | `number` | – |
+| `dirt` | `number` | – |
+| `edges` | `number` | – |
+| `dust_color` | `string` | – |
+| `dirt_color` | `string` | – |
+| `seed` | `number` | – |
+
+### `Refinish`
+
+Every <Model> inside re-covered: each of its glTF materials (all, or the one each names by `material`) given the
+colour, texture or finish each gives, the rest of it kept (a run of cabinets painted, the doors and drawers with them;
+`map: null` takes the wood's picture off). A model's own <MeshStandardMaterial> children go first.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `materials` (required) | `MeshStandardMaterialProps[]` | – |
+| `children` | `ReactNode` | – |
+
+### `ShaderExtension`
+
+Also takes the props of [`SurfaceShaderSpec`](3d.md#surfaceshaderspec).
+
+Used in: [shader/extended_material](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader/extended_material.tsx), [shader/extended_material_bindless](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader/extended_material_bindless.tsx).
+
+### `ShaderMesh`
+
+A mesh drawn by a material written here in WESL or WGSL: one generic Bevy material
+(rdb's ShaderMaterial, an AsBindGroup of 16 uniform slots and 4 textures) whose fragment shader is this source, so
+a dissolve, a toon ramp, a hologram or a procedural pattern needs no Rust. Uniforms may change from frame to frame
+(they're set again on any frame where they change); the shader isn't compiled again (#28).
+
+Bevy: `bevy_pbr::mesh_material::MeshMaterial3d<raea_sys_material::shader_material::ShaderMaterial>`.
+
+Takes [`ShaderMeshProps`](3d.md#shadermeshprops)'s props.
+
+### `Splat`
+
+A gaussian splat: a reconstructed scene or object, drawn back to front for the frame's camera, behind any mesh in
+front of it, through the frame's look. Animate it with reveal, assemble, disperse, explode, wave, twist, morph and
+pulse, all values of the frame.
+
+Bevy: `bevy_pbr::mesh_material::MeshMaterial3d<raea_render::engine::splat::SplatMaterial>`, `bevy_pbr::mesh_material::MeshMaterial3d<raea_render::engine::splat::SplatMask>`.
+
+Takes [`SplatProps`](3d.md#splatprops)'s props.
+
+### `StandardMaterial`
+
+Bevy's StandardMaterial for the Mesh3d it's inside. Unlit draws as MeshBasicMaterial; a clearcoat or transmission
+as MeshPhysicalMaterial; anything else as MeshStandardMaterial, all on Bevy's StandardMaterial in the engine.
+
+Bevy: `bevy_pbr::pbr_material::StandardMaterial`.
+
+Also takes the props of [`StandardMaterialProps`](#standardmaterialprops).
+
+Used in: [ui/render_ui_to_texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/render_ui_to_texture.tsx), [ui/widgets/viewport_node](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/viewport_node.tsx), [3d/fog](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/fog.tsx), [3d/vertex_colors](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/vertex_colors.tsx), [3d/rotate_environment_map](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/rotate_environment_map.tsx), [3d/transparency_3d](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/transparency_3d.tsx), [3d/spherical_area_lights](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/spherical_area_lights.tsx), [3d/lightmaps](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/lightmaps.tsx), and 42 more.
+
+### `SurfaceShader`
+
+One shader over every lit standard surface in the scene that has none of its own (meshes, Models' materials,
+Characters), so the whole scene shares one look. Unlit, toon, paint, flat and looked
+surfaces and ShaderMesh keep theirs. In the 3D beside the camera; one per scene.
+
+Bevy: `bevy_pbr::mesh_material::MeshMaterial3d<bevy_pbr::extended_material::ExtendedMaterial<bevy_pbr::pbr_material::StandardMaterial, raea_sys_shader::ShaderExt>>`.
+
+Takes [`SurfaceShaderSpec`](3d.md#surfaceshaderspec)'s props.
+
+### `ThreeShaderMaterial`
+
+A three.js shader on the mesh it's in, as it is: a ShaderMaterial's GLSL (or a node material's WGSL) with its
+uniforms, drawn by raea's engine with three's built-ins. `<R3F>` makes these from an R3F scene's materials.
+
+Takes [`ThreeShaderMaterialProps`](3d.md#threeshadermaterialprops)'s props.
+
+### `ToonExtension`
+
+Also takes the props of [`ToonExtensionProps`](#toonextensionprops).
+
+### `ToonMaterial`
+
+raea's ToonMaterial: a StandardMaterial's colour, texture and emission drawn in bands, as
+`<ExtendedMaterial base={<StandardMaterial />} extension={<ToonExtension />} />` is (the old MeshToonMaterial).
+
+Bevy: `bevy_pbr::mesh_material::MeshMaterial3d<bevy_pbr::extended_material::ExtendedMaterial<bevy_pbr::pbr_material::StandardMaterial, raea_render::engine::toon::ToonExt>>`, `bevy_pbr::mesh_material::MeshMaterial3d<raea_render::engine::toon::OutlineMaterial>`.
+
+Also takes the props of [`StandardMaterialProps`](#standardmaterialprops) (`material`, `base_color`, `base_color_texture`, `emissive`, `alpha_mode`); [`ToonExtensionProps`](#toonextensionprops).
+
+### `Volume`
+
+A simulated volume: density and heat in a box, put in by its sources and puffs, lifted by heat, weighed down,
+carried by the wind and its own curls, drawn lit and shadowed by itself. Smoke, a cloud or a contrail is a choice of
+these (examples/volumes).
+Simulated and raymarched by engine/render volume.rs:
+
+Bevy: `bevy_pbr::mesh_material::MeshMaterial3d<raea_render::engine::volume::VolumeMaterial>`.
+
+Takes [`VolumeProps`](3d.md#volumeprops)'s props.
+
+### `VolumetricFog`
+
+Volumetric fog on the camera: light in the air, drawn inside every <FogVolume>, with shafts from the lights marked
+`volumetric`. Put it inside the Canvas3D, once; without it fog volumes draw nothing.
+
+Bevy: `bevy_light::volumetric::VolumetricFog`, `bevy_light::volumetric::VolumetricLight`.
+
+Takes [`VolumetricFogProps`](3d.md#volumetricfogprops)'s props.
+
+Used in: [3d/fog_volumes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/fog_volumes.tsx).
+
+### `WearExtension`
+
+raea's chips, grime and rust over a StandardMaterial, as an ExtendedMaterial's extension (systems/wear):
+
+Bevy: `bevy_pbr::mesh_material::MeshMaterial3d<bevy_pbr::extended_material::ExtendedMaterial<bevy_pbr::pbr_material::StandardMaterial, raea_sys_wear::Wear>>`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `amount` (required) | `number` | – |
+| `scale` | `number` | – |
+| `chips` | `number` | – |
+| `grime` | `number` | – |
+| `rust` | `number` | – |
+| `seed` | `number` | – |
+| `chip_color` | `string` | – |
+| `grime_color` | `string` | – |
+| `rust_color` | `string` | – |
+
+## Functions
+
+### `volumeShadow`
+
+a volume's `shadow` as the row's number: 1 by default, 0 for none
+
+```ts
+function volumeShadow(owner: string, v: unknown): number
+```
+
+## Values
+
+### `FogFalloff`
+
+FogFalloff's constructors: the visibility distance (5% contrast left at it by default) to a density
+
+Bevy: `bevy_pbr::FogFalloff`.
+
+Used in: [3d/atmospheric_fog](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/atmospheric_fog.tsx).
+
+## Types
+
+### `AlphaMode`
+
+Bevy's AlphaMode, as it reflects.
+
+```ts
+type AlphaMode = "Opaque" | "Blend" | "Premultiplied" | "Add" | "Multiply" | "AlphaToCoverage" | { Mask: number }
+```
+
+### `AmbientOcclusionProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `quality` | `"low" \| "medium" \| "high" \| "ultra"` | how many samples a pixel takes: "low" (4), "medium" (8, the default), "high" (18), "ultra" (54) |
+| `thickness` | `number` | how thick, in metres, a surface is taken to be behind what the camera sees (0.25 by default): larger darkens more behind thin things |
+
+### `DecalProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `src` (required) | `string` | the picture pressed onto the surface: staticFile("label.png"); its clear parts show the surface through |
+| `name` | `string` | – |
+| `normalMap` | `string` | – |
+| `size` | `number \| [number, number]` | width by height in metres (a number: a square) |
+| `position` | `Vec3` | – |
+| `normal` | `Vec3` | which way the surface faces at the decal (out of it; [0, 1, 0], a floor or counter, by default): turns the decal so the picture lies on it, upright on a wall, its top toward -z on a floor. Instead of rotation |
+| `spin` | `number` | a turn about the normal (radians) |
+| `rotation` | `Vec3` | radians, the decal's +y out of the surface (rather than normal) |
+| `color` | `string` | a tint times the picture (keyed: a stain darkening) |
+| `opacity` | `number` | 0 to 1 (keyed: a label fading in) |
+| `roughness` | `number` | – |
+| `metalness` | `number` | – |
+| `unlit` | `boolean` | – |
+| `fade` | `number` | how far off its plane (metres) it still lies on a surface, fading to nothing there (0.05 by default). Anything nearer the plane than this takes it, a cabinet's side or a fridge's as well as the wall: keep it small |
+
+### `ExtendedMaterialProps`
+
+The props of [`ExtendedMaterial`](#extendedmaterial), tabled there.
+
+### `FireProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` | `string` | parts are matched by name across frames: name a fire that comes and goes |
+| `position` | `Vec3` | the flame's foot: where it stands on its fuel |
+| `scale` | `number \| Vec3` | its size in metres: one number for its height (it's half as wide), or [width, height, depth] (1 by default) |
+| `intensity` | `number` | how bright its core is, as a material's emissiveIntensity (6 by default): 3 a guttering fire, 10-20 a roaring one in the dark. Values over 1 bloom under a <Bloom> |
+| `color` | `string` | the flame's body (orange, "#ff7a1f", by default); its edges go deep red and its core yellow-white |
+| `seed` | `number` | which flame: fires with different seeds don't flicker together (0 by default) |
+| `speed` | `number` | how fast its tongues rise, 1 by default (a big fire's rise more slowly than a small one's on their own) |
+| `time` | `number` | seconds on its clock (by default the Sequence's time: frame / fps) |
+| `steps` | `number` | samples along each ray through it (48 by default): fewer is cheaper and blurrier |
+| `opacity` | `number` | how much of what's behind it its body hides (1 by default): raise it (3-6) in daylight, where a bright wall behind would wash out a flame that only adds light |
+| `light` | `number` | the light it casts on what's around it: a flickering PointLight's intensity (1 by default; 0 for none) |
+
+### `FogProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `color` | `FogColor` | what far things fade into: match the background |
+| `near` | `number` | linear fog from `near` to `far` (in the Canvas3D 5 and 20 by default; on the camera Bevy's 0 and 100) |
+| `far` | `number` | – |
+| `density` | `number` | or exponential fog of this density (0.05-0.3), instead of near and far |
+| `falloff` | `FogFalloff` | on the camera: Bevy's FogFalloff, in place of near, far and density (Bevy's default Linear 0 to 100) |
+| `directional_light_color` | `FogColor` | on the camera: the sun's colour in the fog looking towards it, its alpha its strength (Bevy's default none) |
+| `directional_light_exponent` | `number` | on the camera: how tight the sun's glow is (Bevy's default 8) |
+
+### `FogVolumeProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` | `string` | parts are matched by name across frames: name a volume that comes and goes |
+| `position` | `Vec3` | the box's centre |
+| `rotation` | `Vec3` | radians |
+| `scale` | `number \| Vec3` | the box's size in metres: one number for a cube, or [x, y, z] (1 by default) |
+| `density` | `number` | how thick the air is (0.1 by default: dusty; 0.02 a faint haze; 0.5 smoke). Animate it to let dust settle, smoke roll in or a volume vanish (0) |
+| `color` | `string` | the fog's own colour, what light scattering out of it takes on (white by default; a dark red for blood in the air) |
+| `absorption` | `number` | how much light it swallows (0.3 by default): higher reads as soot or smoke |
+| `scattering` | `number` | how much light it throws back toward the eye (0.3 by default): higher reads as bright dust or mist |
+| `anisotropy` | `number` | how far forward it scatters, -1 to 1 (0.5 by default): near 1 the shafts glow when you look toward the light |
+| `falloff` | `number` | how fast it thins going up, per metre from the box's floor (0 by default: even throughout): 0.5 is a ground fog that's a third as thick two metres up. A box wide and tall with a falloff is height fog. Only <VolumetricFog mode="froxel"> draws it; the march draws the box evenly |
+| `density_texture` | `string` | Bevy's density_texture: a 3D.ktx2 image in the media folder whose values scale the density through the box (a cloud, a bunny of smoke); the box draws evenly without one. Only the march draws it |
+
+### `GridExtensionProps`
+
+raea's extension of StandardMaterial (a Bevy MaterialExtension of raea's): graph paper over the surface for
+greybox levels, lines every `cell` world units (fixed in the world, so they run on across shapes), a heavier one
+every `major` cells (4), in `color`, and each face of a Box outlined in `edge` ("" for no outlines). Its colours are
+the first frame's. It goes in an ExtendedMaterial's `extension`.
+
+The props of [`GridExtension`](#gridextension), tabled there.
+
+### `LightmapProps`
+
+The props of [`Lightmap`](#lightmap), tabled there.
+
+### `MetallicRoughnessMaps`
+
+Separate greyscale maps packed into Bevy's metallic_roughness_texture when they load: the roughness map's grey as
+its green, the metalness map's as its blue (white without one, so metallic is its factor exactly). Poly Haven's
+"_rough" sets come this way; a packed "_arm" map is a plain path.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `roughness` | `string` | – |
+| `metalness` | `string` | – |
+
+### `PaintExtensionProps`
+
+raea's extension of StandardMaterial for a paint look (<Look mode="paint">): the surface broken up by world-space
+noise of `scale` metres (1), its tone boundaries wandering by `breakup` (0.5) and patches of it taking `color`
+(`amount`, 0.6, of the way): a mottled field, rust, a wall's uneven paint. It goes in an ExtendedMaterial's
+`extension`.
+
+The props of [`PaintExtension`](#paintextension), tabled there.
+
+### `ProceduralExtensionProps`
+
+raea's extension of StandardMaterial that draws a pattern on the GPU in place of its flat colour (the engine's
+Procedural MaterialExtension, systems/procmat): `pattern` (noise, wood, marble, stone, brick, tiles, fabric,
+brushed, plaster) in `colors` with roughness `rough_a`/`rough_b`, features `scale` metres across, a `bump`; brick
+and tiles in `tile` [w, h] metre cells with `gap` metre joints in `gap_color`. Over it, each 0-1: `dust` on what
+faces up, `dirt` in joints, hollows, undersides and the floor line, `edges` worn lighter. The pattern overrides the
+base's colour and roughness; its lighting stays. It goes in an ExtendedMaterial's `extension`, alone.
+
+The props of [`ProceduralExtension`](#proceduralextension), tabled there.
+
+### `SampledImage`
+
+A picture read with its own sampler: Bevy's load_with_settings, whose ImageLoaderSettings give the Image its
+ImageSamplerDescriptor ({ path: "checker.png", sampler: { filter: "nearest" } } for hard pixels).
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `path` (required) | `string` | – |
+| `sampler` (required) | `SamplerSpec` | – |
+
+### `ShaderExtensionProps`
+
+raea's extension of StandardMaterial written in WESL: its
+`fn surface` runs before Bevy's lighting and its `fn lit` after it, on the base's inputs, so the surface stays lit
+and shadowed. raea/3d's <MeshStandardMaterial shader> is the same thing; the spec is SurfaceShaderSpec. It goes in an
+ExtendedMaterial's `extension`, alone.
+
+Bevy: `bevy_pbr::extended_material::ExtendedMaterial<bevy_pbr::pbr_material::StandardMaterial, raea_sys_shader::ShaderExt>`.
+
+The props of [`ShaderExtension`](#shaderextension), tabled there.
+
+### `ShaderMeshProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `shape` (required) | `string \| ({ primitive: string } & Record<string, unknown>)` | its geometry: a Manifold shape ("box(1, 1, 1)") or one of Bevy's primitives ({ primitive: "Sphere", radius: 1 }) |
+| `wesl` | `string` | WESL (Bevy 0.20's standard; give this or `wgsl`): a `fn shade(in: VertexOutput) -> vec4<f32>` (in.uv, in.world_position, in.world_normal), or a module with its own |
+| `wgsl` | `string` | the same in plain WGSL (compiled as WESL, its superset: Bevy 0.20 has no naga_oil, so no `#import`) |
+| `uniforms` | `Record<string, number \| number[] \| string>` | up to 16: a number (f32), [x, y], [x, y, z], [x, y, z, w] or "#rrggbb" (a linear vec4) |
+| `textures` | `Record<string, string \| Record<string, unknown>>` | up to 4: an asset path, a picture made in code ({ width, height, pixels }) or "render:NAME"; and one array, { layers: [picture,...] } or { src, layers: N }, read as texture_2d_array<f32> tex_NAME by layer |
+| `defs` | `ShaderDefs` | shader defs: each NAME a WESL condition for `@if(NAME)`, and a whole number also `constants::NAME` |
+| `alpha` | `"opaque" \| "blend" \| "add" \| "premultiplied"` | – |
+| `doubleSided` | `boolean` | – |
+| `name` | `string` | – |
+| `position` | `Vec3` | – |
+| `rotation` | `Vec3` | – |
+| `scale` | `Vec3 \| number` | – |
+
+### `SplatMorph`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `to` (required) | `string` | the splat file it becomes |
+| `amount` (required) | `number` | 0 this splat, 1 the other (each splat flies to the one matched to it) |
+| `crop` | `number` | only the other's splats this many metres from its centre (a trained scene's subject without its surroundings) |
+
+### `SplatProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` | `string` | parts are matched by name across frames: name a splat that comes and goes |
+| `src` (required) | `string` | the splat file (staticFile("x.ply")): a 3DGS.ply (spherical harmonics up to degree 3), a.splat or a.spz. A `x.ply.json` beside it (raea splat train writes one) places it: +Y up, centred, metres |
+| `position` | `Vec3` | – |
+| `rotation` | `Vec3` | radians, Euler XYZ |
+| `scale` | `number \| Vec3` | – |
+| `splatScale` | `number` | every gaussian's size times this (1 by default): below 1 the scene breaks into points |
+| `opacity` | `number` | – |
+| `brightness` | `number` | grade: colour times brightness, saturation and contrast about mid grey, times tint |
+| `saturation` | `number` | – |
+| `contrast` | `number` | – |
+| `tint` | `string` | – |
+| `reveal` | `number` | reveal 0..1: each splat scales in as a front passes it, from `revealFrom` (a point; the centre by default) outward, or along `revealAxis` (a plane sweeping through) when that's given |
+| `revealFrom` | `Vec3` | – |
+| `revealAxis` | `Vec3` | – |
+| `revealSoft` | `number` | how wide the front is, as a share of the sweep (0.15) |
+| `revealGlow` | `number` | the front's glow (0 none, 1 bright), in `glowColor` |
+| `glowColor` | `string` | the colour of reveal and pulse glows (warm white) |
+| `disperse` | `number` | disperse 0..1: blown off on a curl-noise wind, the upwind side first, shrinking to specks |
+| `assemble` | `number` | assemble 0..1: from a cloud of dust round the scene into its shape (1 whole) |
+| `wind` | `Vec3` | the wind's direction ([1, 0.15, 0]) |
+| `curl` | `number` | how much the wind curls (1) |
+| `spread` | `number` | the dust cloud's radius in metres (the splat's own size, before scale; 1.6 times its size by default) |
+| `explode` | `number` | explode 0..1: thrown out from the centre, falling and fading |
+| `wave` | `SplatWave` | – |
+| `twist` | `number` | radians a metre about the vertical through the centre |
+| `morph` | `SplatMorph` | – |
+| `pulse` | `number` | a value the composition passes (a beat's envelope 0..1): bigger by pulseScale, brighter by pulseGlow |
+| `pulseScale` | `number` | – |
+| `pulseGlow` | `number` | – |
+| `crop` | `number` | nothing past this many metres from the centre (trims a trained scene's floaters) |
+| `bands` | `number` | the light in this many flat bands (0 none); a paint or cartoon <Look> sets it |
+| `paint` | `number` | 0..1: the splats themselves painted (flat bands, grown into strokes with hard edges), for a painted shot in a timeline whose frame <Look> isn't paint |
+| `seed` | `number` | which randomness: the scatter, the jitter (0) |
+
+### `SplatWave`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `amplitude` (required) | `number` | how high the ripple lifts the splats, metres |
+| `wavelength` | `number` | from crest to crest, metres (1 by default) |
+| `phase` | `number` | where the ripple is in its cycle, radians: animate it (frame * 0.2) to run it outward |
+
+### `StandardMaterialAnimate`
+
+The StandardMaterial fields `animate` takes, each a track of its own kind of value. An emissive brighter than white
+is LinearRgba keys of one colour: track({ 0: E.mul(0), 30: E.mul(2.5) }) with E = LinearRgba.from(Srgba.hex(c)).
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `base_color` | `TrackSpec<string>` | – |
+| `emissive` | `TrackSpec<string> \| TrackSpec<LinearRgba>` | – |
+| `perceptual_roughness` | `TrackSpec<number>` | – |
+| `metallic` | `TrackSpec<number>` | – |
+| `emissive_exposure_weight` | `TrackSpec<number>` | – |
+| `reflectance` | `TrackSpec<number>` | – |
+| `specular_tint` | `TrackSpec<string>` | – |
+| `diffuse_transmission` | `TrackSpec<number>` | – |
+| `specular_transmission` | `TrackSpec<number>` | – |
+| `thickness` | `TrackSpec<number>` | – |
+| `ior` | `TrackSpec<number>` | – |
+| `attenuation_distance` | `TrackSpec<number>` | – |
+| `attenuation_color` | `TrackSpec<string>` | – |
+| `clearcoat` | `TrackSpec<number>` | – |
+| `clearcoat_perceptual_roughness` | `TrackSpec<number>` | – |
+| `anisotropy_strength` | `TrackSpec<number>` | – |
+| `anisotropy_rotation` | `TrackSpec<number>` | – |
+| `depth_bias` | `TrackSpec<number>` | – |
+| `parallax_depth_scale` | `TrackSpec<number>` | – |
+| `max_parallax_layer_count` | `TrackSpec<number>` | – |
+| `lightmap_exposure` | `TrackSpec<number>` | – |
+
+### `StandardMaterialProps`
+
+Bevy's StandardMaterial fields (colours as CSS colours, textures as file paths), with Bevy's defaults.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `base_color` | `string \| Srgba` | a colour, or Bevy's Srgba (its alpha shows with alpha_mode "Blend": Srgba.hex("#88ccff").with_alpha(0.5)) |
+| `base_color_texture` | `Tex \| null` | a picture in the media folder; null (Bevy's None) inside a Model drops the model's own base map |
+| `emissive` | `string \| LinearRgba` | a colour, or Bevy's LinearRgba for one brighter than white (LinearRgba.from(Srgba.hex("#ff8800")).mul(3)) |
+| `emissive_texture` | `Tex` | – |
+| `perceptual_roughness` | `number` | 0.5 by Bevy's default |
+| `metallic` | `number` | – |
+| `metallic_roughness_texture` | `Tex \| MetallicRoughnessMaps` | – |
+| `normal_map_texture` | `Tex` | – |
+| `occlusion_texture` | `Tex` | – |
+| `uv_transform` | `Affine2` | every texture's UVs scaled, turned and moved (Affine2.fromScale([5, 5]) tiles a map five times across each face; a scaled texture repeats) |
+| `reflectance` | `number` | 0.5 by Bevy's default |
+| `clearcoat` | `number` | – |
+| `clearcoat_perceptual_roughness` | `number` | – |
+| `clearcoat_normal_texture` | `Tex` | the clearcoat layer's own normal map, read as data (not sRGB), as Bevy's examples load it with is_srgb false |
+| `specular_transmission` | `number` | – |
+| `ior` | `number` | – |
+| `thickness` | `number` | – |
+| `unlit` | `boolean` | – |
+| `alpha_mode` | `AlphaMode` | – |
+| `double_sided` | `boolean` | – |
+| `cull_mode` | `"Back" \| "Front" \| null` | the faces not drawn: "Back" (Bevy's default), "Front", or null for neither |
+| `material` | `string` | in a <Model>: the glTF material it re-covers, as MeshStandardMaterial's |
+| `fog_enabled` | `boolean` | false: left out of the scene's <Fog> |
+| `specular_tint` | `string` | the highlight's colour, over `reflectance` |
+| `anisotropy_strength` | `number` | stretched highlights (brushed metal, hair), 0..1, turned anisotropy_rotation radians along the tangent |
+| `anisotropy_rotation` | `number` | – |
+| `attenuation_distance` | `number` | light absorbed through a transmissive volume (with specular_transmission and thickness) |
+| `attenuation_color` | `string` | – |
+| `depth_map` | `Tex` | a greyscale height map (white deep) the parallax fields carve a flat face with |
+| `parallax_depth_scale` | `number` | 0.1 by Bevy's default |
+| `parallax_mapping_method` | `"Occlusion" \| { Relief: { max_steps: number } }` | "Occlusion" (Bevy's default) or { Relief: { max_steps } } |
+| `max_parallax_layer_count` | `number` | 16 by Bevy's default |
+| `depth_bias` | `number` | drawn this much nearer in depth (a decal-like layer over a coplanar face) |
+| `opaque_render_method` | `"Forward" \| "Deferred"` | "Forward" or "Deferred" (in the deferred pass, with a camera that has one) |
+| `diffuse_transmission` | `number` | light passed through and scattered (leaves, paper, wax), 0..1; lightmap_exposure: a <Lightmap>'s bake times this |
+| `lightmap_exposure` | `number` | – |
+| `animate` | `StandardMaterialAnimate` | its fields' tracks, sampled by the engine from the frame clock: { base_color: track({ 0: "#3060ff", 30: "#ff4070" }) } |
+
+### `SurfaceDrawProps`
+
+How a surface's alpha and faces draw (Bevy's StandardMaterial alpha_mode, alpha cutoff, double_sided and cull_mode),
+from the first frame.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `alphaMode` | `"opaque" \| "blend" \| "mask" \| "add" \| "multiply" \| "premultiplied" \| "coverage"` | "opaque" (the default), "blend" (what `transparent` gives), "mask" (cut out where the alpha is under `alphaCutoff`: leaves, chain-link, a sprite's edge; no sorting), "add" (glows add up: sparks, light beams), "multiply" (darkens what's behind: stained glass, a shadow decal), "premultiplied", "coverage" (soft cut-out edges from the alpha over MSAA's samples: hair cards, foliage; needs <AntiAliasing mode="msaa">, without it draws solid) |
+| `alphaCutoff` | `number` | with alphaMode="mask": the alpha under which it's cut away, 0..1 (0.5) |
+| `side` | `"front" \| "back" \| "double"` | which faces draw: "front" (the default), "back" (the inside only: a sky dome, a room seen from outside), "double" (both, lit on both: a leaf, a flag, a sheet of paper) |
+
+### `SurfaceShaderSpec`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `wesl` | `string` | the source in WESL (Bevy 0.20's shader language, a superset of WGSL) |
+| `wgsl` | `string` | the same in plain WGSL |
+| `fragment` | `string` | the source as an asset path (staticFile("shaders/x.wesl")), as Bevy's MaterialExtension::fragment_shader names one: read as written but for its own bindings' numbers (any, in the order declared: one uniform struct, which gets its uniforms packed in its layout, up to 4 texture_2d and their one sampler; one under |
+| `uniforms` | `Record<string, number \| number[] \| string>` | up to 16: a number (f32), [x, y], [x, y, z], [x, y, z, w] or "#rrggbb" (a linear vec4) |
+| `textures` | `Record<string, ShaderTexture \| ShaderTexture[]>` | up to 4: an asset path, a picture made in code ({ width, height, pixels }) or "render:NAME"; with a sampler, { src, sampler } (or a picture with its `sampler`). One more may be an array, read as texture_2d_array<f32> by layer: { layers: [picture,...] } (one size and format) or { src, layers: N } (N layers stacked top to bottom). A <Material>'s may also bind one binding_array<texture_2d<f32>>, a list of 1 to 16 pictures (Bevy's texture_binding_array; a GPU without texture binding arrays refuses it) |
+| `defs` | `ShaderDefs` | shader defs: each NAME a WESL condition for `@if(NAME)` (a number is true), and a whole number also `constants::NAME`; each set of defs compiles its own pipeline |
+| `own` | `OwnMaterialFields` | a <Material>'s own: what its Material methods give, and its storage buffers; set by <Material> only |
+| `buffers` | `Record<string, StorageValue>` | – |
+
+### `ThreeShaderMaterialProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `glsl` | `{ vertex: string; fragment: string; raw?: boolean; vertexColors?: boolean }` | a ShaderMaterial's GLSL, its `#include`s expanded and its `defines` as #define lines in front; `raw` for a RawShaderMaterial (which declares three's built-ins itself), `vertexColors` as the material's |
+| `wgsl` | `{ vertex: string; fragment: string; uniforms?: { name: string; type: string; array?: nu…` | a node material's WGSL, as three's TSL builder writes it for raea (sdk/r3f's input/tsl.ts): the contract's `three_vertex` and `three_fragment`, its uniforms' types, the mesh attributes it reads beyond the standard four |
+| `uniforms` | `Record<string, ThreeUniform>` | each uniform's value this frame |
+| `textures` | `Record<string, string \| { src: string; colorSpace?: "srgb" \| "linear"; sampler?: Record…` | each sampler's picture: a file, a data URL, "render:NAME" (at most four); `colorSpace: "linear"` for one three samples raw (NoColorSpace: a distance field, a data map), "srgb" (the default) for a colour picture |
+| `output` | `"display" \| "linear"` | "display": its colour is what three's canvas shows (a ShaderMaterial's); "linear": scene light, tone-mapped as the rest of the frame is (a node material's) |
+| `transparent` | `boolean` | – |
+| `blending` | `"normal" \| "additive" \| "add" \| "multiply" \| "none"` | – |
+| `side` | `"front" \| "back" \| "double"` | – |
+| `depthWrite` | `boolean` | – |
+| `depthTest` | `boolean` | – |
+| `alphaTest` | `number` | – |
+| `time` | `[number, number, number]` | three's clock this frame: [seconds, delta, frame] |
+| `color` | `string` | the colour it's drawn in where its shader can't run (named in the render's warnings) |
+
+### `ToonBand`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `at` (required) | `number` | where the band starts, as r: the share of the light reaching a point that it faces (0 faces none of it, 1 faces every light); the first band starts at 0 whatever this says |
+| `color` | `string` | the band's colour; left out, it's mixed (in Oklab) between the shadow colour and `color` by its place |
+
+### `ToonExtensionAnimate`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `shadow_color` | `TrackSpec<string>` | – |
+| `rim_intensity` | `TrackSpec<number>` | – |
+| `highlight_intensity` | `TrackSpec<number>` | – |
+| `outline_width` | `TrackSpec<number>` | – |
+
+### `ToonExtensionProps`
+
+raea's extension of StandardMaterial that cel-shades it (the engine's ToonExt; three.js's MeshToonMaterial): the
+scene's lights in `steps` hard bands (2; `bands` for an explicit ramp, darkest first), the bottom one
+`shadow_color` (the base colour darker, nudged towards violet), with an optional rim, highlight and ink outline
+(true for their defaults). Its base gives base_color, base_color_texture, emissive, alpha_mode and material; a
+toon surface has no roughness or metal. It goes in an ExtendedMaterial's `extension`, alone.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `steps` | `number` | – |
+| `bands` | `ToonBand[]` | – |
+| `shadow_color` | `string` | – |
+| `rim` | `boolean \| ToonRim` | – |
+| `highlight` | `boolean \| ToonHighlight` | – |
+| `outline` | `boolean \| ToonOutline` | – |
+| `rim_intensity` | `number` | – |
+| `highlight_intensity` | `number` | – |
+| `outline_width` | `number` | – |
+| `animate` | `ToonExtensionAnimate` | its fields' tracks, as a StandardMaterial's `animate` (its base animates base_color and emissive) |
+
+### `ToonHighlight`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `intensity` | `number` | 0..1 (1 by default) |
+| `color` | `string` | "#ffffff" by default |
+| `size` | `number` | 0..1: the highlight's angular radius, up to half a radian (0.2 by default) |
+
+### `ToonMaterialProps`
+
+The props of [`ToonMaterial`](#toonmaterial), tabled there.
+
+### `ToonOutline`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `width` | `number` | pixels at the composition's size, the same near and far (2 by default) |
+| `color` | `string` | ink colour; by default the surface colour's hue, very dark |
+
+### `ToonRim`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `intensity` | `number` | 0..1, how much the rim colour covers the band (1 by default) |
+| `color` | `string` | "#ffffff" by default |
+| `width` | `number` | 0..1 of the Fresnel range from the silhouette inwards (0.3 by default) |
+
+### `VolumeCommon`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` | `string` | parts are matched by name across frames |
+| `time` | `number` | seconds on the simulation's clock (the Sequence's time, frame / fps, by default) |
+| `resolution` | `number` | cells along the box's longest side (64 by default; 32 is a quarter the cost a step, 96 finer) |
+| `seed` | `number` | the same seed simulates the same volume (0) |
+| `colors` | `[string, string, string]` | its tones under a paint look: [lit, mid, dark] |
+| `threshold` | `number` | the density its painted surface sits at (0.12): lower is fatter, higher thinner |
+| `erode` | `number` | how much noise tears the painted surface's edge (0.08), and the tears' size in metres (0.6) |
+| `erodeSize` | `number` | – |
+| `absorb` | `number` | how much light a unit of it stops (its shadow on itself; 1.2) |
+| `wind` | `Vec3` | the wind, m/s ([0, 0, 0]); how fast the volume takes it up, a second (1.2 smoke, 0.6 otherwise); the height it's full from, metres, weaker below (0: full everywhere) |
+| `windPull` | `number` | – |
+| `windHeight` | `number` | – |
+| `drag` | `number` | velocity the still air takes away a second (0.4) |
+| `vorticity` | `number` | curl kept curling (6); a drifting turbulent force, m/s² (0), and its size in metres (2) |
+| `turbulence` | `number` | – |
+| `turbulenceSize` | `number` | – |
+| `steps` | `number` | samples along each ray (96) |
+| `shadow` | `boolean \| number` | its shadow, cast in the scene's light as a mesh's is (on by default): soft moving shadows on the ground, meshes and models under it, and, with a `volumetric` sun and a <FogVolume> under <VolumetricFog>, the sun's shafts breaking through the gaps between clouds. The shadow is where the volume has stopped half the sun; a number scales the density it sees: 1 as drawn, more reaches into its thinner parts (a fatter shadow; up to 4, a thin contrail's made to show), less keeps to the dense cores. false or 0 casts none. Under a paint look the shadow is the painted shape. Soften its edge with the sun's `softShadow` (2-4 for clouds) |
+
+### `VolumeProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `position` | `Vec3` | the box's foot (the centre of its floor), metres ([0, 0, 0]) |
+| `size` (required) | `Vec3` | the box it lives in, [width, height, depth] in metres: what leaves it is cut |
+| `sources` | `VolumeSource[]` | where density and heat come in over time, and the puffs of density it starts with ([x, y, z, radius] in metres from the foot) |
+| `puffs` | `[number, number, number, number][]` | – |
+| `buoyancy` | `number` | heat's lift (4) and the density's weight (0.4), m/s² a unit; the heat lost a second (0.8) and the density lost a second (0.02), fractions |
+| `weight` | `number` | – |
+| `cooling` | `number` | – |
+| `dissipation` | `number` | – |
+| `fire` | `[string, string, string] \| false` | fire where it's hot: three colours [red, orange, yellow] (paint's by default), or false for none; and the heat (a fraction of the hottest source's) each colour starts at ([0.35, 0.6, 0.85]) |
+| `fireAt` | `[number, number, number]` | – |
+| `name` | `string` | parts are matched by name across frames |
+| `time` | `number` | seconds on the simulation's clock (the Sequence's time, frame / fps, by default) |
+| `resolution` | `number` | cells along the box's longest side (64 by default; 32 is a quarter the cost a step, 96 finer) |
+| `seed` | `number` | the same seed simulates the same volume (0) |
+| `colors` | `[string, string, string]` | its tones under a paint look: [lit, mid, dark] |
+| `threshold` | `number` | the density its painted surface sits at (0.12): lower is fatter, higher thinner |
+| `erode` | `number` | how much noise tears the painted surface's edge (0.08), and the tears' size in metres (0.6) |
+| `erodeSize` | `number` | – |
+| `absorb` | `number` | how much light a unit of it stops (its shadow on itself; 1.2) |
+| `wind` | `Vec3` | the wind, m/s ([0, 0, 0]); how fast the volume takes it up, a second (1.2 smoke, 0.6 otherwise); the height it's full from, metres, weaker below (0: full everywhere) |
+| `windPull` | `number` | – |
+| `windHeight` | `number` | – |
+| `drag` | `number` | velocity the still air takes away a second (0.4) |
+| `vorticity` | `number` | curl kept curling (6); a drifting turbulent force, m/s² (0), and its size in metres (2) |
+| `turbulence` | `number` | – |
+| `turbulenceSize` | `number` | – |
+| `steps` | `number` | samples along each ray (96) |
+| `shadow` | `boolean \| number` | its shadow, cast in the scene's light as a mesh's is (on by default): soft moving shadows on the ground, meshes and models under it, and, with a `volumetric` sun and a <FogVolume> under <VolumetricFog>, the sun's shafts breaking through the gaps between clouds. The shadow is where the volume has stopped half the sun; a number scales the density it sees: 1 as drawn, more reaches into its thinner parts (a fatter shadow; up to 4, a thin contrail's made to show), less keeps to the dense cores. false or 0 casts none. Under a paint look the shadow is the painted shape. Soften its edge with the sun's `softShadow` (2-4 for clouds) |
+
+### `VolumeSource`
+
+where density and heat come in: a burner, or an engine moving `at` -> `to` (a contrail)
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `at` (required) | `Vec3` | where (metres from the box's foot), and where it has moved to by `until` if it moves |
+| `to` | `Vec3` | – |
+| `from` | `number` | when it puts out, seconds ([0, Infinity]) |
+| `until` | `number` | – |
+| `radius` | `number` | its radius (0.5 m); the density and heat it puts out a second at its centre (4 and 4); the velocity it pushes out with, m/s ([0, 0, 0]) |
+| `rate` | `number` | – |
+| `heat` | `number` | – |
+| `speed` | `Vec3` | – |
+
+### `VolumetricFogProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `steps` | `number` | mode="march": samples along each ray through a fog volume (64 by default): too few stair-step a shaft's edges, so 128 for a render with hard-edged shafts, or 32 with `dither`; about 0.1 ms a step at 1920x1080 on an M5 Pro |
+| `dither` | `boolean` | mode="march": start each pixel's march a fraction of a step in, by a fixed noise seeded from the pixel and the frame number (false by default): the shafts' steps become fine grain instead of bands, so fewer steps look smooth. The noise is a function of the frame, so a render still equals its play |
+| `resolution` | `number` | mode="march": the fraction of the frame's resolution the fog is marched at (1 by default): 0.5 marches a quarter of the pixels and puts the result over the frame guided by depth, so an edge in front of a shaft keeps no fog from what's behind it. 0.5, 1/3 or 0.25; each frame on its own, so a render still equals its play |
+| `ambient` | `number` | light the fog has everywhere, lit or not (0 by default). Bevy lights a volume's whole box with it whatever its density, so the box's edges show: keep it 0, or small with the camera inside the volume |
+| `ambientColor` | `string` | that light's colour (white by default) |
+| `mode` | `"march" \| "froxel"` | how the fog is drawn: "froxel" (the default: every volume written into one grid of cells along the view, lit once a cell and integrated front to back once, with the `hero` lights' shafts integrated exactly along epipolar lines: no steps, no dither, its cost the grid's whatever the resolution or the number of volumes, overlapping volumes mixed as one medium, see-through surfaces fogged at their own depth) or "march" (Bevy's ray march through each volume, as before). `steps`, `dither` and `resolution` are the march's; `slices`, `tile`, `samples` and `hero` the grid's |
+| `slices` | `number` | the grid's cells along the view, spaced evenly in log depth from the camera to the farthest volume (64 by default; 32 to 256) |
+| `tile` | `number` | the grid's cells across the frame, in pixels a side (16 by default; 4, 8 or 16) |
+| `samples` | `number` | points lit in each cell, spread along its depth (1 by default; 1 to 8): more keeps thin shadows in the grid's soft light (a hero light's shafts don't need them) |
+| `hero` | `boolean` | the grid's shafts: true (the default) integrates the first two volumetric spot lights and the first two volumetric directional lights exactly, over their shadow maps texel by texel, so a blind's bars or a doorway's edge are as crisp as the shadow map: integrated at samples along lines from the light across the frame (Chen et al.'s epipolar sampling), more of them where the depth or the light changes, and each pixel read from the samples either side of it at its depth; false lights them in the grid's cells with the rest |
+
+### `WearExtensionProps`
+
+raea's extension of StandardMaterial that wears it (the engine's Wear MaterialExtension, systems/wear): its paint
+mottled, chipped back to `chip_color` on edges and a few spots, `grime` gathered low and underneath and `rust` run
+down in streaks, fixed in the part's own space as it moves. `amount` 0-1; `chips`, `grime` and `rust` each 0-1 of it
+(0.6, 0.5, 0.25); `scale` a blotch's size in metres (0.08); `seed` moves the pattern. It goes in an
+ExtendedMaterial's `extension`.
+
+The props of [`WearExtension`](#wearextension), tabled there.
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/picking.md b/docs/manual/reference/sdk/picking.md
new file mode 100644
index 00000000..825cf247
--- /dev/null
+++ b/docs/manual/reference/sdk/picking.md
@@ -0,0 +1,70 @@
+---
+title: "raea/picking"
+summary: "What the pointer is over: the nearest part under it, and the ray it casts."
+order: 69
+sources: ["sdk/raea/src/picking.ts"]
+---
+
+`pick` finds the nearest part under the pointer, given the camera and the parts, and `pointerRay` gives the ray the
+pointer casts into the scene. Both are pure functions, so a game's step function can use them and still replay
+exactly.
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { pick, pointerRay } from "raea/picking"
+```
+
+`raea/picking` exports 2 functions, 3 types. Bevy's counterpart: `bevy_picking`. Source: [sdk/raea/src/picking.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/picking.ts).
+
+## Functions
+
+### `pick`
+
+The nearest part under the pointer, or null. `size` is the frame's (useVideoConfig's width and height), whose
+pixels the pointer is in.
+
+```ts
+function pick(pointer: { x: number; y: number; }, camera: PickCamera, parts: readonly Pickable[], size: { width: number; height: number; }): Hit | null
+```
+
+### `pointerRay`
+
+The pointer's ray: from the camera through the pointer (x, y in the frame's pixels, y down), as the engine draws it
+(Bevy's looking_at, with +Z for up when the camera looks straight up or down, as rdb does).
+
+```ts
+function pointerRay(pointer: { x: number; y: number; }, camera: PickCamera, size: { width: number; height: number; }): { origin: Vec3; direction: Vec3; }
+```
+
+## Types
+
+### `Hit`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` (required) | `string` | – |
+| `distance` (required) | `number` | metres from the camera (from its near plane's point, for an orthographic one) along the ray |
+| `point` (required) | `Vec3` | where the ray first meets it, in world space |
+
+### `Pickable`
+
+Something the pointer can hit: an axis-aligned box or a sphere, in world space.
+
+```ts
+type Pickable = { name: string; box: { min: Vec3; max: Vec3 } } | { name: string; sphere: { center: Vec3; radius: number } }
+```
+
+### `PickCamera`
+
+The camera as a scene sets it: a PerspectiveCamera's props (fov in degrees, vertical) or an OrthographicCamera's.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `position` | `Vec3` | – |
+| `lookAt` | `Vec3` | – |
+| `fov` | `number` | vertical field of view in degrees (50 by default); ignored when `height` is set |
+| `height` | `number` | an orthographic camera's view height in metres |
+| `up` | `Vec3` | – |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/post_process.md b/docs/manual/reference/sdk/post_process.md
new file mode 100644
index 00000000..a277fbb4
--- /dev/null
+++ b/docs/manual/reference/sdk/post_process.md
@@ -0,0 +1,289 @@
+---
+title: "raea/post_process"
+summary: "What's done to the frame after it's drawn: tone mapping, bloom, depth of field, motion blur, grading and outlines."
+order: 68
+sources: ["sdk/raea/src/post_process.ts"]
+---
+
+These are Bevy's post-processing passes, placed beside the camera: `<ToneMapping>`, `<Bloom>`, `<DepthOfField>`,
+`<MotionBlur>`, `<AntiAliasing>`, lens distortion and fisheye, plus raea's `<Grade>` for colour grading, `<Outline>`
+and `<Look>`, which sets a whole finish at once. `<FramePass>` and `<Compute>` run your own shaders on the frame.
+
+```tsx
+import { Camera3d } from "raea/camera";
+import { Bloom, ToneMapping } from "raea/post_process";
+import { Transform } from "raea/transform";
+
+const Glow = () => (
+ <>
+ <Camera3d transform={Transform.fromXyz(-2, 2.5, 5).lookingAt([0, 0, 0])} />
+ <ToneMapping mode="tony" />
+ <Bloom intensity={1} threshold={0} />
+ </>
+);
+```
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { AntiAliasing, Bloom, Compute, DepthOfField } from "raea/post_process"
+```
+
+`raea/post_process` exports 12 components, 14 types. Bevy's counterpart: `bevy_post_process, bevy_anti_alias`. Source: [sdk/raea/src/post_process.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/post_process.ts).
+
+## Components
+
+### `AntiAliasing`
+
+How the 3D's edges are smoothed. Put it inside the Canvas3D, once; the first frame's holds for the piece.
+
+Bevy: `bevy_anti_alias::smaa::Smaa`, `bevy_anti_alias::fxaa::Fxaa`.
+
+Takes [`AntiAliasingProps`](3d.md#antialiasingprops)'s props.
+
+### `Bloom`
+
+Glow around bright parts (emissive materials, strong highlights). Put it inside the Canvas3D.
+
+Bevy: `bevy_post_process::bloom::settings::Bloom`.
+
+Takes [`BloomProps`](3d.md#bloomprops)'s props.
+
+### `Compute`
+
+A compute over the frame, in the 3D beside the camera; several run in the order written, before the cameras draw.
+
+Bevy: `raea_sys_compute::Computes`.
+
+Takes [`ComputeProps`](3d.md#computeprops)'s props.
+
+### `DepthOfField`
+
+A lens's depth of field: what's nearer or farther than the camera's `focus` blurs. Put it inside the Canvas3D;
+pull focus by animating the camera's `focus`. Inside a Camera3d it is Bevy's component on the camera, its
+focal_distance the camera's focus.
+
+Bevy: `bevy_post_process::dof::DepthOfField`.
+
+Takes [`DepthOfFieldProps`](3d.md#depthoffieldprops)'s props.
+
+### `Fisheye`
+
+A fisheye lens on the camera: a pass over the 3D after tone mapping (the page over it stays straight). Every value
+animates per frame; a lens's vignette and colour fringes are <Grade>'s. Put it inside the Canvas3D.
+
+Takes [`FisheyeProps`](3d.md#fisheyeprops)'s props.
+
+### `FramePass`
+
+A full-screen pass over the scene camera's frame, beside the camera; several run in the order written. With a
+frame <Look> they run on its cells, before the look's composite.
+
+Bevy: `raea_sys_framepass::FramePasses`.
+
+Takes [`FramePassProps`](3d.md#framepassprops)'s props.
+
+### `Grade`
+
+The camera's colour grade (lift, gamma, gain and saturation per range of light, before tone mapping), a lens
+vignette and colour fringes: one grade over every scene, so a film looks of a piece. Put it inside the Canvas3D.
+
+Bevy: `bevy_render::view::ColorGrading`, `bevy_post_process::effect_stack::chromatic_aberration::ChromaticAberration`, `bevy_post_process::effect_stack::vignette::Vignette`.
+
+Takes [`GradeProps`](3d.md#gradeprops)'s props.
+
+### `LensDistortion`
+
+Barrel or pincushion distortion (Brown-Conrady k1, k2) on the camera, a pass after tone mapping as Fisheye's.
+Put it inside the Canvas3D.
+
+Bevy: `bevy_post_process::LensDistortion`.
+
+Takes [`LensDistortionProps`](3d.md#lensdistortionprops)'s props.
+
+### `Look`
+
+The whole frame drawn as a model's look draws its model: every part of the scene in the one grain, its bloom,
+fog and blur inside it. Put it inside the Canvas3D. mode="paint" or "cartoon" draws every standard material as
+paint (engine/render paint.rs):
+
+Bevy: `bevy_pbr::mesh_material::MeshMaterial3d<bevy_pbr::extended_material::ExtendedMaterial<bevy_pbr::pbr_material::StandardMaterial, raea_render::engine::paint::Paint>>`.
+
+Takes [`LookProps`](3d.md#lookprops)'s props.
+
+### `MotionBlur`
+
+Motion blur from each part's and the camera's motion over the frame before (Bevy's MotionBlur): with it, each frame
+is drawn after the one before it, so a frame's blur is the same in a render, a seek and play. A frame without it has
+none. Put it inside the Canvas3D.
+
+Bevy: `bevy_post_process::motion_blur::MotionBlur`.
+
+Takes [`MotionBlurProps`](3d.md#motionblurprops)'s props.
+
+### `Outline`
+
+Ink lines where the scene's depth steps or its surfaces turn, drawn before bloom and tone mapping; under a <Look>
+a cell wide (Return of the Obra Dinn's line). Put it inside the Canvas3D.
+
+Bevy: `bevy_ui::Outline`.
+
+Takes [`OutlineProps`](3d.md#outlineprops)'s props.
+
+### `ToneMapping`
+
+The camera's tone mapping and exposure. Put it inside the Canvas3D.
+
+Bevy: `bevy_render::view::Tonemapping`, `bevy_camera::camera::Exposure`.
+
+Takes [`ToneMappingProps`](3d.md#tonemappingprops)'s props.
+
+## Types
+
+### `AntiAliasingProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `mode` (required) | `"msaa" \| "smaa" \| "fxaa" \| "none"` | "msaa" (4x multisampling, the default), "smaa" (morphological, high preset: the default with AmbientOcclusion, which can't multisample), "fxaa" (cheapest, softest) or "none". Each draws a frame from that frame alone, so a render equals its play (temporal anti-aliasing isn't offered: it needs the frames before) |
+
+### `BloomProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `intensity` | `number` | 1 is a natural glow, 2 strong; 0 none |
+| `threshold` | `number` | only what's brighter than this glows (0 = everything a little; 1 = only emissive parts and highlights) |
+| `skip` | `string[]` | composition passes (a part's `pass`) left out of it: they neither glow nor take the glow |
+| `passes` | `Record<string, number>` | each named pass's share of it, 0 (as skip) to 1 (all of it, as "scene" has) |
+
+### `ComputeProps`
+
+A compute shader (raea-sys-compute). Its source has one `@compute` entry point and reads `time()` (seconds),
+`u_NAME()` for each uniform, each buffer as `NAME: array<f32>` (read and written) and each image as
+`NAME: texture_storage_2d<rgba8unorm, write>`.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `file` | `string` | a shader file compiled as written, staticFile("shaders/x.wesl"), in place of wesl: its `@group(0)` storage textures and uniforms its own, as a Bevy example's render-graph node binds them |
+| `entry` | `string \| null` | a file's entry point this frame (null or left out: nothing dispatched), as a node picks its pipeline |
+| `bind` | `Record<string, string>` | a file's storage textures this frame, each an image's key ({ input: "a", output: "b" }), as a node picks its bind group (a ping-pong swaps them frame by frame) |
+| `wesl` | `string` | the source in WESL (a superset of WGSL) |
+| `wgsl` | `string` | the same in plain WGSL |
+| `workgroups` (required) | `number[]` | how many workgroups a frame dispatches: [x], [x, y] or [x, y, z] |
+| `uniforms` | `Record<string, number \| number[] \| string \| Record<string, number \| number[] \| string \|…` | up to 16, as a surface shader's; a file's struct field may be { start: NAME } or { end: NAME }: the range of the mesh buffer NAME binds in its slab, in its array's elements (compute_mesh's `range.start * 8`) |
+| `buffers` | `Record<string, { size: number } \| number[] \| StorageValue \| MeshSlab>` | up to 4, the compute's own, kept from frame to frame: { size } (that many f32s, zeroed) or its first contents. A file's: each `var<storage>` it declares, its first contents in its type's layout or a mesh's slab |
+| `images` | `Record<string, string \| { src: string; sampler?: SamplerSpec }>` | up to 4 "render:NAME" (or "render:NAME:WxH") images it writes, which any shader's texture reads by that name (a file's may be { src, sampler }: the sampler it is drawn with) |
+| `defs` | `ShaderDefs` | shader defs, as a surface shader's |
+
+### `DepthOfFieldProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `aperture` | `number` | the lens's f-number: lower blurs more (1.4 dreamy, 2.8 cinematic, 8 nearly sharp); 2.8 by default |
+| `mode` | `"bokeh" \| "gaussian"` | "bokeh" (round, as a real lens; the default) or "gaussian" (soft, cheaper) |
+| `maxBlur` | `number` | the largest blur, in pixels of the frame (64 by default) |
+| `focal_distance` | `number` | Bevy's fields, as Bevy's DepthOfField component on a Camera3d (inside it), Bevy's defaults: the distance in focus (10; the camera's `focus`), the f-number (1), the largest blur in pixels (64), "Bokeh" or "Gaussian" |
+| `aperture_f_stops` | `number` | – |
+| `max_circle_of_confusion_diameter` | `number` | – |
+
+### `FisheyeProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `strength` | `number` | 0..1 (1 by default): 0 is the camera's own picture, pixel for pixel; ramp it in and out on beats |
+| `mode` | `"equidistant" \| "stereographic"` | "equidistant" (the default) or "stereographic" (gentler at the edges) |
+| `fov` | `number` | the vertical field of view, in degrees, the camera widens to at strength 1 (its own by default): 100-150 for a real fisheye; the picture is still remapped corner to corner, so nothing goes black |
+| `zoom` | `number` | above 1 crops in, below 1 shows past the picture's edge (see `edges`) |
+| `edges` | `"clamp" \| "black"` | what shows where the lens looks past the picture: its edge pixels ("clamp", the default) or "black" |
+| `animate` | `Animate3d` | declared animation of its numbers (strength, fov, k1, k2, zoom) |
+
+### `FramePassProps`
+
+A shader over the whole frame. Its source defines
+ fn shade(in: FullscreenVertexOutput) -> vec4<f32>
+(or its own
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `file` | `string` | a shader file compiled as written, staticFile("shaders/x.wesl"), in place of wesl: its `@group(0)` bindings its own, as custom_post_processing's pipeline binds them: each texture_2d<f32> the frame (the one `frame` names) or an image of `textures`, each sampler Bevy's default (nearest) or `samplers`' one, each var<uniform> its value in `uniforms` (which may change frame by frame) |
+| `frame` | `string` | a file's texture that reads the frame as drawn so far |
+| `entry` | `string` | a file's fragment entry point ("fragment" by default) |
+| `samplers` | `Record<string, SamplerSpec>` | a file's samplers by name |
+| `wesl` | `string` | the source in WESL (a superset of WGSL) |
+| `wgsl` | `string` | the same in plain WGSL |
+| `uniforms` | `Record<string, number \| number[] \| string \| StorageValue>` | up to 16, as a surface shader's (a file's: each var<uniform>, a struct's { field: value }) |
+| `textures` | `Record<string, string \| Record<string, unknown>>` | up to 4, as a surface shader's, each read with its own sampler |
+| `defs` | `ShaderDefs` | shader defs, as a surface shader's |
+| `at` | `"before-tonemap" \| "after-tonemap"` | "after-tonemap" (display colours; the default) or "before-tonemap" (the HDR frame, after bloom) |
+| `prepass` | `boolean \| { depth?: boolean; normal?: boolean }` | the camera's depth and normal prepasses, for depth(uv) and normal(uv) (turns its multisampling off) |
+
+### `GradeProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `temperature` | `number` | warmer (+) or cooler (-): a shift of the CIE x chromaticity, about -0.3 to 0.3 |
+| `tint` | `number` | magenta (+) or green (-) |
+| `saturation` | `number` | the whole frame's saturation after tone mapping (1 keeps it) |
+| `shadows` | `GradeSection` | – |
+| `midtones` | `GradeSection` | – |
+| `highlights` | `GradeSection` | – |
+| `vignette` | `number \| { intensity?: number; radius?: number; smoothness?: number; color?: string }` | the corners darkened: 0 none, 1 black; or {intensity, radius (0.75), smoothness (5), color} |
+| `aberration` | `number` | a lens's colour fringes at edges, as a fraction of the frame (0.005 subtle, 0.02 strong) |
+| `skip` | `string[]` | composition passes (a part's `pass`) the grade leaves as drawn: no fringes or vignette on them, and on an untonemapped camera (a paint Look's) no colour grading either |
+| `passes` | `Record<string, number>` | each named pass's share of the grade, 0 (as skip) to 1 |
+
+### `GradeSection`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `saturation` | `number` | 1 keeps the colour; 0 grey; above 1 richer |
+| `contrast` | `number` | 1 keeps it; above 1 harder |
+| `gamma` | `number` | 1 keeps it; above 1 darker mids |
+| `gain` | `number` | a multiplier: 1 keeps it |
+| `lift` | `number` | added: 0 keeps it, positive lifts the blacks |
+
+### `LensCommon`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `edges` | `"clamp" \| "black"` | what shows where the lens looks past the picture: its edge pixels ("clamp", the default) or "black" |
+| `animate` | `Animate3d` | declared animation of its numbers (strength, fov, k1, k2, zoom) |
+
+### `LensDistortionProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `k1` | `number` | Brown-Conrady: r' = r (1 + k1 r^2 + k2 r^4), r a share of the half-diagonal. Above 0 barrel, below 0 pincushion |
+| `k2` | `number` | – |
+| `zoom` | `number` | by default just enough for a barrel's corners to stay inside the picture (1 for pincushion) |
+| `edges` | `"clamp" \| "black"` | what shows where the lens looks past the picture: its edge pixels ("clamp", the default) or "black" |
+| `animate` | `Animate3d` | declared animation of its numbers (strength, fov, k1, k2, zoom) |
+
+### `LookProps`
+
+### `MotionBlurProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `shutterAngle` | `number` | the fraction of a frame the shutter is open (0.5 by default, a 180-degree shutter); above 1 smears further |
+| `samples` | `number` | samples each way per pixel (4 by default) |
+| `animate` | `Animate3d` | – |
+
+### `OutlineProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `color` | `string` | the line's colour, a hex colour (black by default) |
+| `depth` | `number` | a silhouette: how far behind the nearer surface (a fraction of its distance) a neighbour must be (0.04) |
+| `normal` | `number` | a crease: how far the surface must turn between neighbours, 1 - cos of the angle (0.3, about 45 degrees; 0 for none) |
+| `width` | `number` | the line's width in pixels (1 by default; a cartoon's line is about 6) |
+| `far` | `number` | how far from the camera lines reach, in metres: they fade out over its last third, so a far field meeting the sky draws no line along the horizon (no limit by default) |
+| `skip` | `string[]` | composition passes (a part's `pass`) drawn with no line: none on their pixels and no crease against them (a scene object's silhouette in front of one still draws, on the object) |
+
+### `ToneMappingProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `mode` | `"tony" \| "aces" \| "agx" \| "neutral" \| "reinhard" \| "none"` | how bright light maps to the screen: "tony" (Bevy's default), "aces" (filmic, contrasty), "agx", "neutral", "reinhard", "none" |
+| `exposure` | `number` | stops brighter (+) or darker (-) than the default exposure |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/raea.md b/docs/manual/reference/sdk/raea.md
new file mode 100644
index 00000000..40d049e6
--- /dev/null
+++ b/docs/manual/reference/sdk/raea.md
@@ -0,0 +1,1722 @@
+---
+title: "raea"
+summary: "The main entry: compositions, sequences, time, interpolation, springs, footage, sound and words."
+order: 2
+sources: ["sdk/raea/src/index.ts"]
+---
+
+`raea` is the path nearly every composition starts from. A file registers its compositions with `registerRoot`;
+each `<Composition>` has a size, a frame rate, a length and a component. Inside it, `useCurrentFrame()` is the frame
+being drawn, `<Sequence>` shifts time for what it holds, and `interpolate` and `spring` turn frames into values. The
+entry also re-exports the footage, sound, word and state helpers, which have pages of their own.
+
+```tsx
+import { AbsoluteFill, Composition, Sequence, interpolate, registerRoot, useCurrentFrame } from "raea";
+
+function Title({ text }: { text: string }) {
+ const frame = useCurrentFrame();
+ const opacity = interpolate(frame, [0, 12], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
+ return <AbsoluteFill style={{ justifyContent: "center", alignItems: "center", fontSize: 120, color: "#fff", opacity }}>{text}</AbsoluteFill>;
+}
+
+registerRoot(() => (
+ <Composition id="main" width={1080} height={1920} fps={30} durationInFrames={90} component={() => (
+ <AbsoluteFill style={{ background: "#000" }}>
+ <Sequence from={0} durationInFrames={45}><Title text="Hello" /></Sequence>
+ <Sequence from={45} durationInFrames={45}><Title text="world" /></Sequence>
+ </AbsoluteFill>
+ )} />
+));
+```
+
+See [Your first video](../../start/first-video.md) for the whole loop, and
+[Compositions](../../concepts/compositions.md) for how frames, sequences and time work.
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { AbsoluteFill, ACTION_KEY, actionsIn, Animate } from "raea"
+```
+
+`raea` exports 18 components, 8 hooks, 52 functions, 8 values, 91 types. Source: [sdk/raea/src/index.tsx](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/index.tsx).
+
+## Components
+
+### `AbsoluteFill`
+
+A box over the whole of its parent, laid out as a flex column; `style` is merged over that.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `style` | `CSSProperties` | – |
+| `className` | `string` | – |
+| `children` | `ReactNode` | – |
+
+Used in: [ui/images/image_node](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node.tsx), [ui/images/ui_texture_slice_flip_and_tile](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_slice_flip_and_tile.tsx), [ui/images/image_node_resizing](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node_resizing.tsx), [ui/images/ui_texture_atlas_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas_slice.tsx), [ui/images/ui_texture_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_slice.tsx), [ui/images/ui_texture_atlas](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas.tsx), [ui/layout/grid](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/grid.tsx), [ui/layout/ghost_nodes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/ghost_nodes.tsx), and 98 more.
+
+### `Animate`
+
+<Animate>, memoised by its props' content (React skips a render whose props fingerprint matches the last). The
+fingerprint is on it as `Animate.fingerprint` for a runtime's own bailout. Its declaration is the engine's
+Animation (@bevy raea_core_animate::spec::Animation), typed from the registry (animate.gen.ts), sent as data-raea-anim and
+read back as that type by sdk/react animate.rs.
+
+Also takes the props of [`AnimateOwnProps`](animation.md#animateownprops).
+
+### `Audio`
+
+Sound in step with the frame; no picture. A muted or ended Audio is silent.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `src` (required) | `string \| GeneratedAsset` | a file URL, or a generated asset from lyria() or sao() |
+
+Also takes the props of [`MediaProps`](video.md#mediaprops).
+
+### `Clock`
+
+What time a composition is at: the frame, frame rate, size and length its hooks read, and its words, perception
+and input. The renderer, the live view and tests put one around every composition; a composition never needs its
+own.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `frame` (required) | `number` | – |
+| `fps` (required) | `number` | – |
+| `width` (required) | `number` | – |
+| `height` (required) | `number` | – |
+| `durationInFrames` (required) | `number` | – |
+| `id` | `string` | – |
+| `defaultProps` | `Record<string, unknown>` | – |
+| `words` | `readonly TimelineWord[]` | – |
+| `perception` | `Perception` | – |
+| `input` | `InputTimeline` | – |
+| `children` | `ReactNode` | – |
+
+### `Composition`
+
+Declares a composition inside the root. It draws nothing itself; a renderer finds it through registerRoot.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `id` (required) | `string` | – |
+| `component` (required) | `ComponentType<P>` | – |
+| `width` (required) | `number` | – |
+| `height` (required) | `number` | – |
+| `fps` (required) | `number` | – |
+| `durationInFrames` (required) | `number` | – |
+| `defaultProps` | `P` | – |
+| `edit` | `Edit` | a hand edit laid over the composition (docs/craft-system.md, L): written back by the app's timeline |
+
+Used in: [ui/images/image_node](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node.tsx), [ui/images/ui_texture_slice_flip_and_tile](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_slice_flip_and_tile.tsx), [ui/images/image_node_resizing](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node_resizing.tsx), [ui/images/ui_texture_atlas_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas_slice.tsx), [ui/images/ui_texture_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_slice.tsx), [ui/images/ui_texture_atlas](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas.tsx), [ui/layout/grid](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/grid.tsx), [ui/layout/ghost_nodes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/ghost_nodes.tsx), and 152 more.
+
+### `Freeze`
+
+Shows its children as they are at `frame`, whatever the parent's frame.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `frame` (required) | `number` | – |
+| `children` | `ReactNode` | – |
+
+### `Img`
+
+An image; the renderer holds the frame until it has loaded and fails the render (naming src) if it can't.
+
+Also takes the props of `ImgHTMLAttributes` (`alt`, `crossOrigin`, `decoding`, `fetchPriority`, `height`, `loading`, `referrerPolicy`, `sizes`, `src`, `srcSet`, `useMap`, `width`); `HTMLAttributes` (`defaultChecked`, `defaultValue`, `suppressContentEditableWarning`, `suppressHydrationWarning`, `accessKey`, `autoCapitalize`, `autoFocus`, `className`, `contentEditable`, `contextMenu`, `dir`, `draggable`, `enterKeyHint`, `hidden`, `id`, `lang`, `nonce`, `slot`, `spellCheck`, `style`, `tabIndex`, `title`, `translate`, `radioGroup`, `role`, `about`, `content`, `datatype`, `inlist`, `prefix`, `property`, `rel`, `resource`, `rev`, `typeof`, `vocab`, `autoCorrect`, `autoSave`, `color`, `itemProp`, `itemScope`, `itemType`, `itemID`, `itemRef`, `results`, `security`, `unselectable`, `popover`, `popoverTargetAction`, `popoverTarget`, `inert`, `inputMode`, `is`, `exportparts`, `part`); `AriaAttributes` (`aria-activedescendant`, `aria-atomic`, `aria-autocomplete`, `aria-braillelabel`, `aria-brailleroledescription`, `aria-busy`, `aria-checked`, `aria-colcount`, `aria-colindex`, `aria-colindextext`, `aria-colspan`, `aria-controls`, `aria-current`, `aria-describedby`, `aria-description`, `aria-details`, `aria-disabled`, `aria-dropeffect`, `aria-errormessage`, `aria-expanded`, `aria-flowto`, `aria-grabbed`, `aria-haspopup`, `aria-hidden`, `aria-invalid`, `aria-keyshortcuts`, `aria-label`, `aria-labelledby`, `aria-level`, `aria-live`, `aria-modal`, `aria-multiline`, `aria-multiselectable`, `aria-orientation`, `aria-owns`, `aria-placeholder`, `aria-posinset`, `aria-pressed`, `aria-readonly`, `aria-relevant`, `aria-required`, `aria-roledescription`, `aria-rowcount`, `aria-rowindex`, `aria-rowindextext`, `aria-rowspan`, `aria-selected`, `aria-setsize`, `aria-sort`, `aria-valuemax`, `aria-valuemin`, `aria-valuenow`, `aria-valuetext`); `DOMAttributes` (`children`, `dangerouslySetInnerHTML`, `onCopy`, `onCopyCapture`, `onCut`, `onCutCapture`, `onPaste`, `onPasteCapture`, `onCompositionEnd`, `onCompositionEndCapture`, `onCompositionStart`, `onCompositionStartCapture`, `onCompositionUpdate`, `onCompositionUpdateCapture`, `onFocus`, `onFocusCapture`, `onBlur`, `onBlurCapture`, `onChange`, `onChangeCapture`, `onBeforeInput`, `onBeforeInputCapture`, `onInput`, `onInputCapture`, `onReset`, `onResetCapture`, `onSubmit`, `onSubmitCapture`, `onInvalid`, `onInvalidCapture`, `onLoad`, `onLoadCapture`, `onError`, `onErrorCapture`, `onKeyDown`, `onKeyDownCapture`, `onKeyPress`, `onKeyPressCapture`, `onKeyUp`, `onKeyUpCapture`, `onAbort`, `onAbortCapture`, `onCanPlay`, `onCanPlayCapture`, `onCanPlayThrough`, `onCanPlayThroughCapture`, `onDurationChange`, `onDurationChangeCapture`, `onEmptied`, `onEmptiedCapture`, `onEncrypted`, `onEncryptedCapture`, `onEnded`, `onEndedCapture`, `onLoadedData`, `onLoadedDataCapture`, `onLoadedMetadata`, `onLoadedMetadataCapture`, `onLoadStart`, `onLoadStartCapture`, `onPause`, `onPauseCapture`, `onPlay`, `onPlayCapture`, `onPlaying`, `onPlayingCapture`, `onProgress`, `onProgressCapture`, `onRateChange`, `onRateChangeCapture`, `onSeeked`, `onSeekedCapture`, `onSeeking`, `onSeekingCapture`, `onStalled`, `onStalledCapture`, `onSuspend`, `onSuspendCapture`, `onTimeUpdate`, `onTimeUpdateCapture`, `onVolumeChange`, `onVolumeChangeCapture`, `onWaiting`, `onWaitingCapture`, `onAuxClick`, `onAuxClickCapture`, `onClick`, `onClickCapture`, `onContextMenu`, `onContextMenuCapture`, `onDoubleClick`, `onDoubleClickCapture`, `onDrag`, `onDragCapture`, `onDragEnd`, `onDragEndCapture`, `onDragEnter`, `onDragEnterCapture`, `onDragExit`, `onDragExitCapture`, `onDragLeave`, `onDragLeaveCapture`, `onDragOver`, `onDragOverCapture`, `onDragStart`, `onDragStartCapture`, `onDrop`, `onDropCapture`, `onMouseDown`, `onMouseDownCapture`, `onMouseEnter`, `onMouseLeave`, `onMouseMove`, `onMouseMoveCapture`, `onMouseOut`, `onMouseOutCapture`, `onMouseOver`, `onMouseOverCapture`, `onMouseUp`, `onMouseUpCapture`, `onSelect`, `onSelectCapture`, `onTouchCancel`, `onTouchCancelCapture`, `onTouchEnd`, `onTouchEndCapture`, `onTouchMove`, `onTouchMoveCapture`, `onTouchStart`, `onTouchStartCapture`, `onPointerDown`, `onPointerDownCapture`, `onPointerMove`, `onPointerMoveCapture`, `onPointerUp`, `onPointerUpCapture`, `onPointerCancel`, `onPointerCancelCapture`, `onPointerEnter`, `onPointerLeave`, `onPointerOver`, `onPointerOverCapture`, `onPointerOut`, `onPointerOutCapture`, `onGotPointerCapture`, `onGotPointerCaptureCapture`, `onLostPointerCapture`, `onLostPointerCaptureCapture`, `onScroll`, `onScrollCapture`, `onScrollEnd`, `onScrollEndCapture`, `onWheel`, `onWheelCapture`, `onAnimationStart`, `onAnimationStartCapture`, `onAnimationEnd`, `onAnimationEndCapture`, `onAnimationIteration`, `onAnimationIterationCapture`, `onToggle`, `onBeforeToggle`, `onTransitionCancel`, `onTransitionCancelCapture`, `onTransitionEnd`, `onTransitionEndCapture`, `onTransitionRun`, `onTransitionRunCapture`, `onTransitionStart`, `onTransitionStartCapture`).
+
+### `InputRegion`
+
+Its children hear the pointer in their own box (x, y, w, h in points; the page's pixels are `scale` points each), as
+a panel does when it's a page of its own: a press inside the box is the box's until it's let go. Outside the box,
+and while another box holds a press, they see no pointer; keys reach every box.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `x` (required) | `number` | – |
+| `y` (required) | `number` | – |
+| `w` (required) | `number` | – |
+| `h` (required) | `number` | – |
+| `scale` | `number` | – |
+| `children` | `ReactNode` | – |
+
+### `Loop`
+
+Repeats its children every `durationInFrames` frames, `times` times (forever by default).
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `durationInFrames` (required) | `number` | – |
+| `times` | `number` | – |
+| `name` | `string` | – |
+| `layout` | `SequenceLayout` | – |
+| `style` | `CSSProperties` | – |
+| `className` | `string` | – |
+| `children` | `ReactNode` | – |
+
+### `Mix`
+
+The master: every sound in the composition brought to `lufs` integrated loudness (-14) under a true-peak limiter at
+`ceiling` dBTP (-1.5), as the platforms play back. Put one in the composition, around the soundtrack or anywhere.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `lufs` | `number` | integrated loudness the mix is brought to (EBU R128, LUFS) |
+| `ceiling` | `number` | the limiter's true-peak ceiling (dBTP) |
+| `children` | `ReactNode` | what it masters, when it's written around the soundtrack (<Mix><Voice /><Bed /></Mix>): rendered as they are |
+
+### `Nudge`
+
+Places its child: an element gets the move in front of its own transform and the fade times its own opacity; a
+component, whose box it can't reach, is placed inside a full-frame layer.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `x` | `number` | how far to move it, in the composition's pixels |
+| `y` | `number` | – |
+| `scale` | `number` | how much bigger (2) or smaller (0.5), about its centre |
+| `rotate` | `number` | a turn, in degrees, about its centre |
+| `opacity` | `number` | 0 (gone) to 1 (as it was), times its own opacity |
+| `children` | `ReactNode` | – |
+
+### `Overlay`
+
+Its children only in a render asked for the overlay `name`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `name` (required) | `string` | – |
+| `children` | `ReactNode` | – |
+
+### `Region`
+
+A box at the band its name stands for, clear of the face perception found at this frame.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `name` | `RegionName` | – |
+| `margin` | `number` | – |
+| `style` | `CSSProperties` | – |
+| `className` | `string` | – |
+| `children` | `ReactNode` | – |
+
+### `Sequence`
+
+Shifts time by `from` and shows its children only for `durationInFrames` frames.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `from` | `number` | – |
+| `durationInFrames` | `number` | – |
+| `name` | `string` | – |
+| `layout` | `SequenceLayout` | – |
+| `width` | `number` | – |
+| `height` | `number` | – |
+| `style` | `CSSProperties` | – |
+| `className` | `string` | – |
+| `children` | `ReactNode` | – |
+
+Used in: [manual: hello](https://github.com/shinyobjectz/raea/blob/main/docs/manual/examples/hello.tsx).
+
+### `Series`
+
+Plays its Series.Sequence children back to back, each shifted by its own offset.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `children` | `ReactNode` | – |
+
+### `SongPlot`
+
+The map drawn for a human to check: section bands named, the energy curve with builds, stops, dips and drops on
+it, hits, the feature lanes, and the pacing (cuts per bar). `raea song FILE --plot OUT.png` renders it.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `map` (required) | `SongMap` | – |
+| `width` | `number` | – |
+| `height` | `number` | – |
+| `title` | `string` | – |
+
+### `Stagger`
+
+Each child in its own <Animate>, entrances `each` frames apart (or by grid distance). The same content as last
+render gives the same element back.
+
+Also takes the props of [`StaggerProps`](animation.md#staggerprops) (`each`, `grid`, `exitEach`); [`AnimateOwnProps`](animation.md#animateownprops).
+
+### `Video`
+
+A video clip in step with the frame; `data-source-time` is the source time (seconds) to show.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `framing` | `"face"` | ours: frame the take on the largest face |
+| `punchIn` | `number` | ours: multiplies the framing's scale (1.15 is the usual) |
+
+Also takes the props of [`MediaProps`](video.md#mediaprops).
+
+## Hooks
+
+### `useCurrentFrame`
+
+The frame being rendered, counted from the start of the nearest enclosing Sequence.
+
+```ts
+function useCurrentFrame(): number
+```
+
+Used in: [ui/scroll_and_overflow/overflow_transform](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/overflow_transform.tsx), [ui/render_ui_to_texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/render_ui_to_texture.tsx), [ui/ui_material](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/ui_material.tsx), [ui/styling/gradients](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/gradients.tsx), [ui/text/text_debug](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/text_debug.tsx), [ui/text/text](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/text.tsx), [ui/text/font_atlas_debug](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/font_atlas_debug.tsx), [3d/fog_volumes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/fog_volumes.tsx), and 46 more.
+
+### `useGameEvents`
+
+The frames, in order, at which `isEvent(before, after)` holds: `after` is the state `step` makes at frame f from
+`before`, the state at f - 1. It runs the same (kept) fold as useGameState through the composition's last frame,
+counted from the nearest enclosing Sequence, so sound can be cued to what happens in the game. While a person plays
+(live input) it runs only through this frame: what comes next hasn't been played yet. The list is read-only (frozen):
+the same one is handed out while nothing new happened, so copy it before changing it.
+
+```ts
+function useGameEvents<S>(initial: S, step: Step<S>, isEvent: (before: S, after: S) => boolean): number[]
+```
+
+### `useGameState`
+
+The game's state at this frame: `initial` at frame 0, then `step(state, input, g)` applied for each earlier frame g
+in order. Frames count from the nearest enclosing Sequence, so a game starts when its Sequence does.
+
+```ts
+function useGameState<S>(initial: S, step: Step<S>): S
+```
+
+Used in: [shader/shader_prepass](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader/shader_prepass.tsx), [shader/sprite_material](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader/sprite_material.tsx), [manual: squash](https://github.com/shinyobjectz/raea/blob/main/docs/manual/examples/squash.tsx).
+
+### `useInput`
+
+This frame's input ({keys: []} when there was none). Its `gamepads` are Bevy's (bevy_gilrs's Gamepad entities, read
+by engine/render's gamepad_keys):
+
+Bevy: `bevy_input::gamepad::Gamepad`.
+
+```ts
+function useInput(): FrameInput
+```
+
+Used in: [shader/shader_prepass](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader/shader_prepass.tsx), [shader/sprite_material](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader/sprite_material.tsx).
+
+### `useRegion`
+
+The Region this is rendered inside: its name and box in composition px.
+
+```ts
+function useRegion(): RegionBox
+```
+
+### `useSong`
+
+Where the song is at the current frame (frame 0 of the enclosing Sequence is `offset` seconds into the song), with
+the map bound to the composition's fps as `song`.
+
+```ts
+function useSong(map: SongMap, options?: UseSongOptions): SongMoment & { song: Song; }
+```
+
+### `useVideoConfig`
+
+The settings of the composition being rendered (a Sequence's width and height win inside it).
+
+```ts
+function useVideoConfig(): VideoConfig
+```
+
+Used in: [manual: title](https://github.com/shinyobjectz/raea/blob/main/docs/manual/examples/title.tsx), [manual: turntable](https://github.com/shinyobjectz/raea/blob/main/docs/manual/examples/turntable.tsx).
+
+### `useWords`
+
+Every word heard on the timeline, in the frames of the nearest enclosing Sequence.
+
+```ts
+function useWords(): TimelineWord[]
+```
+
+## Functions
+
+### `actionsIn`
+
+The actions handed in this frame, in order.
+
+```ts
+function actionsIn(input: FrameInput): { name: string; args: any; }[]
+```
+
+### `applyActions`
+
+`state` with this frame's handed-in actions run on it, in order (an unknown name is skipped).
+
+```ts
+function applyActions<S>(actions: PanelActions<S>, state: S, input: FrameInput): S
+```
+
+### `curveFn`
+
+A curve name as a function (the engine's easing::Easing::parse, the same names).
+
+```ts
+function curveFn(name: string, fps?: number): (t: number) => number
+```
+
+### `delay`
+
+The same move later by `frames`.
+
+```ts
+function delay(m: MoveLike, frames: number): Move
+```
+
+### `fade`
+
+opacity 0 to 1 over `frames` (6).
+
+```ts
+function fade(o?: { frames?: number; ease?: Curve; }): Move
+```
+
+### `feedIn`
+
+What the app tells the panels, by name ("transcript", "object"); undefined until it has.
+
+```ts
+function feedIn<T = any>(input: FrameInput, what: string): T | undefined
+```
+
+### `fill`
+
+a bar filling: width 0 to `to` (100%) over `frames` (24), out-cubic.
+
+```ts
+function fill(o?: { to?: number; frames?: number; unit?: "px" | "%"; ease?: Curve; }): Move
+```
+
+### `findPhrase`
+
+Finds the composition frame where `phrase` is said in a transcript.
+
+```ts
+function findPhrase(words: readonly HeardWord[], phrase: string, options?: WordOptions): number
+```
+
+### `fish`
+
+Retired on 2026-11-05: Fish narration is no longer part of raea. Narrate with `<Speech text start>` from
+raea/speech (Pocket TTS, on this computer), or make a line with a `raea gen` step on `fish:<model>` and your own
+FISH_API_KEY. Kept as a name only, so an older edit says what to use instead of failing to bundle.
+
+```ts
+function fish(text: string, _options?: Record<string, unknown>): never
+```
+
+### `getCompositions`
+
+The compositions the registered root declares, in order.
+
+```ts
+function getCompositions(): RegisteredComposition[]
+```
+
+### `gridDelay`
+
+A grid item's distance from an origin, in steps (raea-animate's StaggerPattern::Grid, the same rule).
+
+```ts
+function gridDelay(cols: number, rows: number, from: GridFrom, index: number): number
+```
+
+### `inState`
+
+Whether `name` is active in the snapshot (the leaf or any state around it), as XState's `state.matches`.
+
+```ts
+function inState<N extends string>(snap: Snapshot<N>, name: N): boolean
+```
+
+### `interpolate`
+
+`x` mapped from the `input` range onto the `output` range, piece by piece: `input` rises, and the two have the same
+length. `options.easing` shapes each piece; `extrapolateLeft` and `extrapolateRight` say what happens outside the
+range (`extend`, the default, carries on; `clamp` holds the end value; `identity` returns `x`; `wrap` repeats).
+
+```ts
+function interpolate(x: number, input: readonly number[], output: readonly number[], options?: InterpolateOptions): number
+```
+
+Used in: [manual: turntable](https://github.com/shinyobjectz/raea/blob/main/docs/manual/examples/turntable.tsx), [manual: hello](https://github.com/shinyobjectz/raea/blob/main/docs/manual/examples/hello.tsx).
+
+### `isGeneratedAsset`
+
+Whether a value is a generated asset (what sao, tokensynthNote and lyria return), not a file path.
+
+```ts
+function isGeneratedAsset(v: unknown): v is GeneratedAsset
+```
+
+### `keyEdges`
+
+The input edges between two frames' keys, as events for a machine's `on`: "keydown:K" for each key pressed this
+frame, "keyup:K" for each released (keep last frame's keys in the game state to have `prev`).
+
+```ts
+function keyEdges(prev: readonly string[] | undefined, now: readonly string[] | undefined): string[]
+```
+
+### `lyria`
+
+Music an older edit generated (30 seconds by default). Retired: a take already made plays, a new one is refused.
+
+```ts
+function lyria(prompt: string, options?: { seconds?: number; }): GeneratedAsset
+```
+
+### `machine`
+
+A machine for contexts of type C, stepped with an env of type E (a game's frame input and world, a workflow's facts).
+Curried so the state names are inferred from the definition while C and E are given:
+`machine<Player, Env>()({ id, initial, states })`. A transition to a state that doesn't exist, or a guard reading a
+field C lacks, fails to compile; what types can't hold (an initial that isn't a substate, unreachable states, dead
+ends) throws here, when the module loads.
+
+```ts
+function machine<C, E = unknown>(): <const N extends string, const K extends string = "sm">(config: MachineConfig<C, E, N, K>) => Machine<C, E, N, K>
+```
+
+### `measureSpring`
+
+How many frames a spring with these settings takes to settle (before any stretching).
+
+```ts
+function measureSpring(opts: { fps: number; config?: SpringConfig; durationRestThreshold?: number; }): number
+```
+
+### `move`
+
+A move from its tracks, by property: `move({ opacity: track({ 0: 0, 6: 1 }), y: track({ 0: 30, 6: 0 }) })`. Its
+length is its last key. The named moves (rise, pop and the rest) are built with it.
+
+```ts
+function move(tracks: Record<string, TrackSpec<string | number> | TrackSpec<string | number>[] | Keys<string | number>>): Move
+```
+
+### `overlays`
+
+The overlays this render was asked for ([] in a clean render and in live play).
+
+```ts
+function overlays(): string[]
+```
+
+### `parallel`
+
+Every step at once.
+
+```ts
+function parallel(...steps: Step[]): Group
+```
+
+### `pop`
+
+scale `from` (0.6), `peak` (1.08) at `frames`/2, 1 at `frames` (8); in over 3 frames.
+
+```ts
+function pop(o?: { from?: number; peak?: number; frames?: number; ease?: Curve; }): Move
+```
+
+### `proofBoxes`
+
+Checks measured part boxes; returns one fault per problem, empty when all is well.
+
+```ts
+function proofBoxes({ width, height, face, parts }: ProofInput): string[]
+```
+
+### `propsFingerprint`
+
+A props object's fingerprint: what <Animate> and <Stagger> compare to know a render would give the same element,
+and what a runtime's bailout can key on (`Animate.fingerprint`).
+
+```ts
+function propsFingerprint(props: object): number
+```
+
+### `pushIn`
+
+a slow push-in on footage: scale 1 to 1 + `amount` (0.04) across `frames` (90), linear.
+
+```ts
+function pushIn(o?: { amount?: number; frames?: number; }): Move
+```
+
+### `regionBand`
+
+Works out the vertical band each name stands for, given perception and the composition size.
+
+```ts
+function regionBand(name: RegionName, width: number, height: number, perception: Perception, margin?: number): Band
+```
+
+### `registerRoot`
+
+Names the root component the renderer starts from, and records its compositions. Call it once.
+
+```ts
+function registerRoot(given: ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentType): void
+```
+
+Used in: [ui/images/image_node](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node.tsx), [ui/images/ui_texture_slice_flip_and_tile](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_slice_flip_and_tile.tsx), [ui/images/image_node_resizing](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node_resizing.tsx), [ui/images/ui_texture_atlas_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas_slice.tsx), [ui/images/ui_texture_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_slice.tsx), [ui/images/ui_texture_atlas](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas.tsx), [ui/layout/grid](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/grid.tsx), [ui/layout/ghost_nodes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/ghost_nodes.tsx), and 152 more.
+
+### `replayDecider`
+
+A decider that replays recorded decisions: `log[machine][n]` is the edge chosen at that machine's step n (missing:
+wait). How a model's or a person's choices, taken outside the step, re-enter it exactly.
+
+```ts
+function replayDecider(log: Record<string, Record<number, number | { edge: number; evidence?: unknown; }>>, name?: string): Decider
+```
+
+### `reverse`
+
+A move played backwards: it leaves the way it came (each curve reversed, so an out-curve becomes the matching
+in-curve). An exit is its entrance reversed.
+
+```ts
+function reverse(m: MoveLike): Move
+```
+
+### `rise`
+
+y offset `distance` to 0 over `frames` (30 px over 6), fading in over `fade` (5).
+
+```ts
+function rise(o?: { distance?: number; frames?: number; fade?: number; ease?: Curve; }): Move
+```
+
+### `sampleAnimation`
+
+What an Animation sets at composition frame `frame`: page style keys, a counter's text, or 3D props
+(raea-animate's Sampled, here for plain bun).
+
+```ts
+function sampleAnimation(a: Animation, frame: number): { style: Record<string, string | number>; text?: string; values: Record<string, string | number>; }
+```
+
+### `sao`
+
+A sound effect to generate (2 seconds by default).
+
+```ts
+function sao(prompt: string, options?: { seconds?: number; }): GeneratedAsset
+```
+
+### `sequence`
+
+Each step when the one before it ends (`gap` frames apart: sequenceGap).
+
+```ts
+function sequence(...steps: Step[]): Group
+```
+
+### `sequenceGap`
+
+Each step when the one before it ends, `gap` frames later (a negative gap overlaps them).
+
+```ts
+function sequenceGap(gap: number, ...steps: Step[]): Group
+```
+
+### `slam`
+
+a hit: scale `from` (1.3), `dip` (0.96) at `frames`/2, 1 at `frames` (8); in over 2 frames.
+
+```ts
+function slam(o?: { from?: number; dip?: number; frames?: number; ease?: Curve; }): Move
+```
+
+### `slide`
+
+arrives from a side: `distance` px (30) over `frames` (7), fading in over 5. `from` is where it comes from.
+
+```ts
+function slide(o?: { from?: Dir; distance?: number; frames?: number; ease?: Curve; }): Move
+```
+
+### `song`
+
+A song map bound to a frame rate (and where frame 0 sits in the song): frames from song times, and the reverse.
+
+```ts
+function song(map: SongMap, options: SongOptions): Song
+```
+
+### `songAt`
+
+Where the song is at `t` seconds: a pure function of the map.
+
+```ts
+function songAt(map: SongMap, t: number): SongMoment
+```
+
+### `spring`
+
+A damped spring's value at `frame`: from `from` (0) to `to` (1), started `delay` frames late, by its `config`
+(mass 1, damping 10, stiffness 100). It overshoots and settles unless `overshootClamping` is set; `durationInFrames`
+stretches it to end at that frame. `measureSpring` says how long one takes to settle.
+
+```ts
+function spring(opts: SpringOptions): number
+```
+
+Used in: [manual: title](https://github.com/shinyobjectz/raea/blob/main/docs/manual/examples/title.tsx).
+
+### `stagger`
+
+The parts `each` frames apart, each with `m`. With `grid`, delays spread by grid distance from an origin.
+
+```ts
+function stagger(parts: string[], each: number, m: MoveLike, grid?: { cols: number; rows?: number; from?: GridFrom; } | undefined): Group
+```
+
+### `stateOf`
+
+The active leaf of a snapshot (undefined before the first step).
+
+```ts
+function stateOf<N extends string>(snap: Snapshot<N>): N | undefined
+```
+
+### `staticFile`
+
+The URL of a file in the space's media folder, each path segment URL-encoded.
+
+```ts
+function staticFile(path: string): string
+```
+
+Used in: [ui/images/image_node](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node.tsx), [ui/images/ui_texture_slice_flip_and_tile](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_slice_flip_and_tile.tsx), [ui/images/image_node_resizing](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node_resizing.tsx), [ui/images/ui_texture_atlas_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas_slice.tsx), [ui/images/ui_texture_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_slice.tsx), [ui/images/ui_texture_atlas](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas.tsx), [ui/layout/grid](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/grid.tsx), [ui/layout/ghost_nodes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/ghost_nodes.tsx), and 100 more.
+
+### `stepAll`
+
+One frame for each entity of a list, each carrying its own machine (one per enemy), in order.
+
+```ts
+function stepAll<C, E, N extends string, K extends string>(m: Machine<C, E, N, K>, entities: readonly C[], env: E, opts?: readonly string[] | StepOptions): C[]
+```
+
+### `strike`
+
+a strike-through line drawn: width 0 to 100% over `frames` (8).
+
+```ts
+function strike(o?: { frames?: number; ease?: Curve; }): Move
+```
+
+### `tick`
+
+a number counting from `from` (0) to `to` over `frames` (24), written as the element's text: `digits` decimals,
+`separator` between its thousands ("," or true writes 12,345; none by default), `prefix` and `suffix` around it
+("$", " pts"). Hidden until it starts, then in over `fade` frames (2; 0 shows it at `from` the whole time).
+
+```ts
+function tick(o: { to: number; from?: number; frames?: number; digits?: number; ease?: Curve; prefix?: string; suffix?: string; separator?: string | boolean; fade?: number; }): Move
+```
+
+### `tickClocks`
+
+Tells every mounted Clock's frame readers that the frame is about to move on, in the same batch as the update that
+moves it, so they render in that one commit. A host that steps frames back to back calls it with its frame update:
+else each Clock tells them as its frame commits, a second commit each frame, and React stops a chain of more than 50
+(raea's bake steps a range of frames as one chain: many_cubes stalled at frame 26).
+
+```ts
+function tickClocks(): void
+```
+
+### `timeline`
+
+Steps placed in time (a sequence of them). Each part's start is decided here, once.
+
+```ts
+function timeline(...steps: Step[]): Plan
+```
+
+### `toMove`
+
+A name, a move or several moves together, as one move.
+
+```ts
+function toMove(m: MoveLike): Move
+```
+
+### `track`
+
+A track: `track({ 0: 30, 6: 0 })` is a 30 px rise over 6 frames, out-cubic by default.
+
+```ts
+function track<V = string | number>(keys: Keys<V>, ease?: Curve | Curve[], opts?: Omit<TrackSpec<string | number>, "ease" | "keys">): TrackSpec<V>
+```
+
+### `transitionOf`
+
+The transition a step took, read from two snapshots of one machine (null when none fired): how a trace that only
+sees states (a playtest over a game's pure fold) recovers the TransitionRecord a sink would have had, minus evidence.
+
+```ts
+function transitionOf(m: AnyMachine, before: Snapshot<string> | undefined, after: Snapshot<string>): TransitionRecord | null
+```
+
+### `wipe`
+
+a reveal wiping across from `from` (left) over `frames` (8), in-out-cubic, by clipping.
+
+```ts
+function wipe(o?: { from?: Dir; frames?: number; ease?: Curve; }): Move
+```
+
+### `word`
+
+The composition frame where `phrase` is said. Call it while rendering (it reads the Clock).
+
+```ts
+function word(phrase: string, options?: WordOptions): number
+```
+
+## Values
+
+### `ACTION_KEY`
+
+The prefix the app puts on an action handed in as input: a key `action:NAME ARGS_JSON`, held for one frame.
+
+### `curve`
+
+Curve helpers: `curve.bezier(0.05, 0.7, 0.1, 1)`, `curve.spring({ damping: 15, stiffness: 120 })`.
+
+### `Easing`
+
+The easing curves, each a function of progress 0..1: `linear`, `quad`, `cubic`, `poly(n)`, `sin`, `circle`, `exp`,
+`back`, `elastic`, `bounce` and `bezier(x1, y1, x2, y2)`, eased in as they are; `Easing.out(f)` and `Easing.inOut(f)`
+turn one round. Pass one as `interpolate`'s `easing`.
+
+Used in: [manual: turntable](https://github.com/shinyobjectz/raea/blob/main/docs/manual/examples/turntable.tsx).
+
+### `FEED_KEY`
+
+The prefix of the keys the app hands every panel for what it knows: `feed:transcript` (the conversation's last lines,
+[{ who: "you" | "agent" | "tool" | "note", text, live }]), `feed:object` (the object on the stage: { name, kind }) and
+`feed:stage` (what the object publishes with data-feed-publish, as a panel's publishes reach the object) and
+`feed:player` (the stage's player: { frame, frames, rate, playing }; frames is 0 for a game, which runs on).
+Handed in only on the frame it changes (and when the panel opens), so keep it in state:
+`useGameState([], (s, input) => feedIn(input, "transcript") ?? s)`. A panel standing in for the terminal sends by
+publishing { send: { n, text } } (a higher n is a new message); a panel drives the player by publishing
+{ control: { n, do: "play" | "pause" | "seek", frame } } the same way.
+
+### `firstDecider`
+
+The default decider: the first candidate.
+
+### `MEDIA_ROOT`
+
+Where the space's media folder is served from.
+
+### `moves`
+
+The named moves by name, as `enter="rise"` finds them.
+
+### `SPACE_KEY`
+
+The prefix of the key the app holds on the stage for each panel that publishes (`data-feed-publish` on an element):
+`space:PANEL JSON`, held while the value stands, so the object on the stage reads what the panels picked.
+
+## Types
+
+### `AbsoluteFillProps`
+
+The props of [`AbsoluteFill`](#absolutefill), tabled there.
+
+### `Action`
+
+An action: a pure function returning the new context (never a changed old one).
+
+```ts
+type Action = (ctx: C, env: E) => C
+```
+
+### `Actions`
+
+```ts
+type Actions = Action<C, E> | readonly Action<C, E>[]
+```
+
+### `Analysis`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `id` (required) | `string` | – |
+| `states` (required) | `{ name: N; parent: N \| null; depth: number; kind: "leaf" \| "compound" \| "final"; initia…` | – |
+| `edges` (required) | `Edge<N>[]` | – |
+| `reachable` (required) | `N[]` | states some sequence of transitions reaches from the initial state (guards assumed satisfiable) |
+| `unreachable` (required) | `N[]` | – |
+| `deadEnds` (required) | `N[]` | non-final leaves with no transition out (their own or an enclosing state's): once entered, never left |
+
+### `AnimateOwnProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `enter` | `MoveLike` | the entrance: a move's name, a move, or several together |
+| `exit` | `MoveLike` | the exit, played at `exitAt` (an entrance reversed: `exit="rise"` sinks back out) |
+| `animate` | `Record<string, TrackSpec \| TrackSpec[] \| Keys> \| Move` | free tracks by property, in local frames: `{ backgroundColor: track({ 0: "#fff", 20: "#000" }) }` |
+| `at` | `number` | local frame the entrance starts (0) |
+| `exitAt` | `number` | local frame the exit starts |
+| `timeline` | `Plan` | a timeline's plan and this element's part in it: the part's move, at its start (plus `at`) |
+| `part` | `string` | – |
+| `mount` | `"during" \| "always"` | "always" (default): in the tree, and its layout, the whole time (invisible before an entrance that fades in); "during": only from the entrance's start until the exit ends (it takes its space when it arrives) |
+| `as` | `string` | the element: "div" by default |
+| `style` | `CSSProperties` | – |
+| `className` | `string` | – |
+| `children` | `ReactNode` | – |
+
+### `AnimateProps`
+
+```ts
+type AnimateProps = AnimateOwnProps & { [attr: string]: unknown }
+```
+
+### `Animation`
+
+raea_core_animate::spec::Animation
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `origin` (required) | `number` | – |
+| `freeze` (required) | `number \| null` | – |
+| `fps` (required) | `number` | – |
+| `tracks` (required) | `(AnimTrack)[]` | – |
+| `show_from` (required) | `number \| null` | – |
+| `show_until` (required) | `number \| null` | – |
+
+### `AnimKey`
+
+raea_core_animate::spec::AnimKey
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `at` (required) | `number` | – |
+| `value` (required) | `number` | – |
+| `color` (required) | `string` | – |
+| `ease` (required) | `string` | – |
+
+### `AnimTrack`
+
+raea_core_animate::spec::AnimTrack
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `prop` (required) | `string` | – |
+| `keys` (required) | `(AnimKey)[]` | – |
+| `unit` (required) | `string` | – |
+| `repeat` (required) | `string` | – |
+| `digits` (required) | `number` | – |
+| `prefix` (required) | `string` | – |
+| `suffix` (required) | `string` | – |
+| `separator` (required) | `string` | – |
+
+### `AnyMachine`
+
+```ts
+type AnyMachine = Machine<any, any, string, string>
+```
+
+### `AssetKind`
+
+```ts
+type AssetKind = "lyria" | "sao" | "tokensynth"
+```
+
+### `AudioProps`
+
+The props of [`Audio`](#audio), tabled there.
+
+### `ChoicePoint`
+
+A choice point as a decider sees it: which machine, where, and the candidates whose guards hold.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `machine` (required) | `string` | – |
+| `state` (required) | `string` | the state whose `choose` list this is, and the active leaf |
+| `leaf` (required) | `string` | – |
+| `n` (required) | `number` | the machine's step |
+| `candidates` (required) | `{ edge: number; to: string; description?: string }[]` | the candidates whose guards hold, in their order (each an edge of machine.edges) |
+| `ctx` (required) | `C` | – |
+| `env` (required) | `E` | – |
+
+### `ClockProps`
+
+The props of [`Clock`](#clock), tabled there.
+
+### `CompositionProps`
+
+The props of [`Composition`](#composition), tabled there.
+
+### `Curve`
+
+```ts
+type Curve = CurveName | (string & {})
+```
+
+### `CurveName`
+
+Curve names. Any of these, or `bezier(x1,y1,x2,y2)`, `steps(n)`, `spring(mass,damping,stiffness)`,
+`reverse(<curve>)`.
+
+```ts
+type CurveName = | "linear" | "ease" | `${"in" | "out" | "in-out"}-${"quad" | "cubic" | "quart" | "quint" | "sine" | "expo" | "circ" | "back" | "elastic" | "bounce"}`
+```
+
+### `CutOptions`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `by` | `"section" \| "bar"` | "section" (default) takes each section's rate, steady across it; "bar" each bar's own |
+| `scale` | `number` | multiplies every rate (2: twice as many cuts), kept on the ladder 0.25..4 |
+| `drops` | `boolean` | cut on every drop (default true) |
+| `stops` | `boolean` | cut on a stop's hits (default true) |
+| `builds` | `boolean` | double the rate through a build's second half (default true) |
+| `minGap` | `number` | cuts closer than this many frames are merged, the earlier kept (default a quarter second) |
+| `from` | `number` | first frame (inclusive), default 0 |
+| `to` | `number` | last frame (exclusive), default the song's end |
+
+### `Decider`
+
+Picks a transition at a choice point. Called inside the step, so it must answer synchronously: a model or a person
+is asked outside the step and their answer replayed (`replayDecider`). Deterministic deciders keep a fold pure.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` (required) | `string` | – |
+| `decide` (required) | `(point: ChoicePoint<unknown, unknown>) => Decision` | – |
+
+### `Decision`
+
+What a decider answers: the edge it picks (one of the candidates' `edge`), or null to wait this step; `evidence` is
+whatever supports the choice (a bot's score, a model's probabilities), recorded beside the transition.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `edge` (required) | `number \| null` | – |
+| `evidence` | `unknown` | – |
+
+### `EasingFn`
+
+```ts
+type EasingFn = (p: number) => number
+```
+
+### `Edge`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `index` (required) | `number` | – |
+| `from` (required) | `N` | – |
+| `to` (required) | `N` | – |
+| `kind` (required) | `"always" \| "after" \| "on" \| "done" \| "choose"` | – |
+| `event` | `string` | the event an `on` edge waits for |
+| `after` (required) | `number` | steps in `from` before it may fire |
+| `guarded` (required) | `boolean` | – |
+| `description` | `string` | – |
+
+### `Edit`
+
+A hand edit: `segments` are the composition's own frame ranges, [from, to), played one after another, so a trim,
+a split, a cut word or a moved span is a change to this list; the length becomes their sum.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `segments` | `readonly (readonly [number, number])[]` | – |
+
+### `ExtrapolateMode`
+
+```ts
+type ExtrapolateMode = "extend" | "clamp" | "identity" | "wrap"
+```
+
+### `FrameInput`
+
+One frame's input for a game.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `keys` (required) | `string[]` | the keys held (KeyboardEvent.key names: "ArrowLeft", "a", " ") |
+| `pointer` | `{ x: number; y: number; down: boolean }` | the primary pointer in composition px, and whether it's pressed |
+| `buttons` | `string[]` | the mouse buttons held besides the primary one: "Right", "Middle", "Back", "Forward" (Bevy's MouseButton names) |
+| `wheel` | `{ x: number; y: number }` | the wheel turned this frame, in CSS px, down and right positive (the DOM's deltaX and deltaY) |
+| `gamepads` | `{ buttons: string[]; axes: Record<string, number> }[]` | each connected gamepad: the buttons held and the sticks' and triggers' axes, by Bevy's GamepadButton and GamepadAxis names ("South", "DPadUp", "RightTrigger2"; "LeftStickX" -1..1, "LeftZ") |
+| `touches` | `{ id: number; x: number; y: number }[]` | the fingers down, in composition px |
+
+### `FrameRange`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `from` | `number` | first frame (inclusive), default 0 |
+| `to` | `number` | last frame (exclusive), default the song's end |
+
+### `FreezeProps`
+
+The props of [`Freeze`](#freeze), tabled there.
+
+### `GeneratedAsset`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `kind` (required) | `AssetKind` | – |
+| `prompt` (required) | `string` | – |
+| `seconds` (required) | `number` | – |
+| `id` (required) | `string` | a stable hash of kind, prompt and seconds |
+| `src` (required) | `string` | "asset:<kind>/<id>" |
+| `options` | `Record<string, unknown>` | the generator's own settings (a TokenSynth note's midi, velocity, seed and device) |
+
+### `GridFrom`
+
+```ts
+type GridFrom = "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center" | "top" | "bottom" | "left" | "right"
+```
+
+### `Group`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `kind` (required) | `"sequence" \| "parallel"` | – |
+| `steps` (required) | `Step[]` | – |
+| `gap` (required) | `number` | frames between steps of a sequence (negative overlaps) |
+
+### `Guard`
+
+A trigger: polled each step while its state is active (the context, and whatever the step passes as env).
+
+```ts
+type Guard = (ctx: C, env: E) => boolean
+```
+
+### `ImgProps`
+
+The props of [`Img`](#img), tabled there.
+
+### `InputTimeline`
+
+Recorded input by composition frame; frames without an entry had no input.
+
+```ts
+type InputTimeline = Record<number, Partial<FrameInput> | undefined>
+```
+
+### `InterpolateOptions`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `easing` | `EasingFn \| EasingFn[]` | – |
+| `extrapolateLeft` | `ExtrapolateMode` | – |
+| `extrapolateRight` | `ExtrapolateMode` | – |
+
+### `Keys`
+
+Keyframes by local frame: numbers, or colour text for colour properties (a material's `animate` takes other
+values for its own fields, LinearRgba for an emissive).
+
+```ts
+type Keys = Record<number, V>
+```
+
+### `LoopProps`
+
+The props of [`Loop`](#loop), tabled there.
+
+### `Machine`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `id` (required) | `string` | – |
+| `key` (required) | `K` | – |
+| `states` (required) | `readonly N[]` | every state, in definition order (outer before inner) |
+| `edges` (required) | `readonly Edge<N>[]` | every transition, in the order they're checked within a state |
+| `start` (required) | `() => Snapshot<N>` | a snapshot before the first step: the first step enters the initial states (running their entry actions) |
+| `step` (required) | `(ctx: C, env: E, opts?: readonly string[] \| StepOptions \| undefined) => C` | One step: poll the active states' transitions (innermost first, then outward; within a state `on` for this step's events, then `always`, `after`, `onDone`, then the `choose` candidates for the decider), take the first that fires (at most one a step), then run the active states' tick actions. Returns the new context with its snapshot; the old one is unchanged. The third argument is this step's events, or StepOptions. |
+| `state` (required) | `(ctx: C) => N` | the active leaf (the initial leaf before the first step) |
+| `path` (required) | `(ctx: C) => N[]` | the active states, outermost first |
+| `is` (required) | `(ctx: C, name: N) => boolean` | whether `name` is active (the leaf or a state around it) |
+| `steps` (required) | `(ctx: C, name?: N \| undefined) => number` | steps since `name` (the leaf by default) was entered; -1 when it isn't active |
+| `entered` (required) | `(before: C, after: C, name?: N \| undefined) => boolean` | whether the step from `before` to `after` entered `name` (any state when omitted) |
+| `watch` (required) | `(ctx: C) => Watched` | this machine's state in `ctx`, for a trace |
+| `analyze` (required) | `() => Analysis<N>` | the static analysis machine checks read |
+
+### `MachineConfig`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `id` (required) | `string` | the machine's name in traces and reports |
+| `initial` (required) | `NoInfer<N>` | – |
+| `states` (required) | `{ [S in N]?: StateConfig<C, E, N> }` | – |
+| `key` | `K` | the context's field holding the snapshot ("sm") |
+| `strict` | `boolean` | refuse unreachable states and non-final dead ends when the machine is built (true) |
+
+### `MediaProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `src` (required) | `string` | – |
+| `startFrom` | `number` | – |
+| `endAt` | `number` | – |
+| `trimBefore` | `number` | – |
+| `trimAfter` | `number` | – |
+| `volume` | `VolumeProp` | linear gain, 1 being unity (0.5 is about -6 dB, 1.78 about +5 dB), or a function of the media's own frame |
+| `gainDb` | `VolumeProp` | ours: the gain in decibels (or a function of the media's own frame returning it); wins over volume |
+| `fadeIn` | `number` | ours: seconds to ramp the sound in from silence at its start (applied by the renderer at the audio's rate) |
+| `fadeOut` | `number` | ours: seconds to ramp the sound out to silence at its end |
+| `playbackRate` | `number` | – |
+| `muted` | `boolean` | – |
+| `loop` | `boolean` | – |
+| `bus` | `string` | the bus it plays into: a named channel of the edit's Tone graph (music, sfx, voice, ambience, ui), so it takes that bus's volume, effects and ducking (raea/tone `buses`) |
+| `name` | `string` | – |
+| `className` | `string` | – |
+| `style` | `CSSProperties` | – |
+
+### `MixProps`
+
+The props of [`Mix`](#mix), tabled there.
+
+### `Move`
+
+Tracks by property, in frames from the move's own start.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `tracks` (required) | `Record<string, TrackSpec \| TrackSpec[]>` | – |
+| `frames` (required) | `number` | how long it runs (its last key) |
+
+### `MoveLike`
+
+```ts
+type MoveLike = MoveName | Move | MoveLike[]
+```
+
+### `MoveName`
+
+```ts
+type MoveName = "rise" | "pop" | "slam" | "slide" | "wipe" | "fill" | "strike" | "pushIn" | "fade"
+```
+
+### `NudgeProps`
+
+The props of [`Nudge`](#nudge), tabled there.
+
+### `PanelAction`
+
+One action: what it does (for the agent), its arguments by name with a few words each, and what it does to the
+panel's state.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `about` (required) | `string` | – |
+| `args` | `Record<string, string>` | – |
+| `run` (required) | `(state: S, args: A) => S` | – |
+
+### `PanelActions`
+
+```ts
+type PanelActions = Record<string, PanelAction<S>>
+```
+
+### `Perception`
+
+What perception saw at this frame: the largest face, and the platform's safe area (composition px).
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `face` | `Rect` | – |
+| `safe` | `{ top?: number; bottom?: number }` | – |
+
+### `Plan`
+
+A timeline's plan: each part's start frame and move, and the whole length.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `parts` (required) | `Record<string, { at: number; move: Move }>` | – |
+| `frames` (required) | `number` | – |
+
+### `Playtest`
+
+What a playtester needs from a game, exported beside the view as `export const playtest: Playtest<S> = {...}`
+(sdk/react/docs/playtest.md). Optional: a game without one is played from pixels and events alone. Everything here is
+pure, so a bot steps the game headlessly, restores any state it has seen (states are values) and searches from it;
+whatever it plays is an input timeline `raea render --input` turns back into the same frames.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `initial` (required) | `S` | the state at frame 0, as useGameState is given it |
+| `step` (required) | `Step<S>` | the fold useGameState is given: the same function, so a bot plays the game the render shows |
+| `actions` (required) | `string[][]` | the key chords worth trying ([] is "nothing held"); a bot's moves are these, each held some frames |
+| `observe` | `(state: S, frame: number) => O` | what a player could know at this frame, as plain JSON (positions, lives, what's near): a model reads it |
+| `progress` | `(state: S, frame: number) => number` | how far toward the goal, 0..1: search follows it, and "stuck" means it stopped rising |
+| `outcome` | `(state: S, frame: number) => "won" \| "lost" \| null` | "won" when the goal is reached, "lost" on game over, null while play goes on |
+| `events` | `Record<string, (before: S, after: S) => boolean>` | named moments as useGameEvents takes them (a death, a coin): counted, placed and rendered for the judge |
+| `machines` | `(state: S) => Record<string, Watched>` | every state machine in the state, by entity name (`{ player: player.watch(s.player), flow: flow.watch(s) }`): the trace records each one's state and transitions, and the machine checks (coverage, softlocks, unreachable states, reached) read them (sdk/react/docs/state-machines.md) |
+
+### `ProofInput`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `width` (required) | `number` | – |
+| `height` (required) | `number` | – |
+| `face` | `Rect` | – |
+| `parts` (required) | `ProofPart[]` | – |
+
+### `ProofPart`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` (required) | `string` | – |
+| `band` | `[number, number]` | the band the part must fit in, [top, bottom] in px |
+| `x` (required) | `number` | – |
+| `y` (required) | `number` | – |
+| `w` (required) | `number` | – |
+| `h` (required) | `number` | – |
+
+### `RaeaCSSProperties`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `baselineSource` | `Globals \| "auto" \| "first" \| "last" \| undefined` | which baseline of a box aligns it in its line: its first line's or its last's (css-inline-3) |
+| `flexLineCount` | `Globals \| number \| undefined` | a flex container's line count when it balances its items across lines (css-flexbox-2): a positive integer |
+| `maskPositionX` | `Property.BackgroundPositionX<TLength> \| undefined` | a mask image's horizontal position, as background-position-x takes it (css-masking-1) |
+| `maskPositionY` | `Property.BackgroundPositionY<TLength> \| undefined` | a mask image's vertical position, as background-position-y takes it (css-masking-1) |
+| `textDecorationInset` | `Globals \| TLength \| "auto" \| (string & {}) \| undefined` | how far an underline or line-through reaches past (or short of) the text at each end: auto, or one or two lengths (css-text-decor-4) |
+
+### `Rect`
+
+A box in composition px.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `x` (required) | `number` | – |
+| `y` (required) | `number` | – |
+| `w` (required) | `number` | – |
+| `h` (required) | `number` | – |
+
+### `RegionBox`
+
+The band a Region occupies, in composition px.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` (required) | `RegionName` | – |
+| `x` (required) | `number` | – |
+| `y` (required) | `number` | – |
+| `w` (required) | `number` | – |
+| `h` (required) | `number` | – |
+
+### `RegionName`
+
+```ts
+type RegionName = "auto" | "top" | "bottom" | "center" | "full"
+```
+
+### `RegionProps`
+
+The props of [`Region`](#region), tabled there.
+
+### `RegisteredComposition`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `id` (required) | `string` | – |
+| `component` (required) | `ComponentType<any>` | – |
+| `width` (required) | `number` | – |
+| `height` (required) | `number` | – |
+| `fps` (required) | `number` | – |
+| `durationInFrames` (required) | `number` | – |
+| `defaultProps` (required) | `Record<string, unknown>` | – |
+
+### `SequenceLayout`
+
+```ts
+type SequenceLayout = "absolute-fill" | "none"
+```
+
+### `SequenceProps`
+
+The props of [`Sequence`](#sequence), tabled there.
+
+### `SeriesSequenceProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `offset` | `number` | – |
+| `height` | `number` | – |
+| `style` | `CSSProperties` | – |
+| `children` | `ReactNode` | – |
+| `className` | `string` | – |
+| `name` | `string` | – |
+| `width` | `number` | – |
+| `durationInFrames` | `number` | – |
+
+### `Snapshot`
+
+The machine's runtime state, kept in the context it drives. `path` is the active states outermost first ([] before
+the first step); `at[i]` is the step on which path[i] was entered; `n` counts the machine's steps from 0; `e` is the
+edge the last transition took (an index into machine.edges); `by` names the decider that chose it (absent: a
+guard); `hist` is each history state's last substate.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `path` (required) | `N[]` | – |
+| `at` (required) | `number[]` | – |
+| `n` (required) | `number` | – |
+| `e` (required) | `number` | – |
+| `by` | `string` | – |
+| `hist` | `{ [S in N]?: N }` | – |
+
+### `Song`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `map` (required) | `SongMap` | – |
+| `fps` (required) | `number` | – |
+| `offset` (required) | `number` | – |
+| `frame` (required) | `(seconds: number) => number` | the frame a song time falls on |
+| `seconds` (required) | `(frame: number) => number` | the song's seconds at a frame |
+| `at` (required) | `(frame: number) => SongMoment` | where the song is at a frame |
+| `onBeat` (required) | `(every?: number \| undefined, range?: FrameRange \| undefined) => number[]` | frames of every `every`-th beat (1: each beat), counted from the song's first |
+| `onDownbeat` (required) | `(every?: number \| undefined, range?: FrameRange \| undefined) => number[]` | frames of every `every`-th downbeat |
+| `eventsOf` (required) | `(kind: SongEventKind, range?: FrameRange \| undefined) => { frame: number; event: SongEv…` | frames of every event of a kind (a build's or stop's start), with the event |
+| `cutsAt` (required) | `(options?: CutOptions \| undefined) => number[]` | frames to cut on, paced to the energy: each section's (or bar's) rate, on its beats, plus drops, a stop's hits, and a build's second half at double rate |
+
+### `SongBar`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `time` (required) | `number` | – |
+| `beat` (required) | `number` | – |
+| `beats` (required) | `number` | – |
+| `energy` (required) | `number` | – |
+| `cuts` (required) | `number` | – |
+
+### `SongEvent`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `kind` (required) | `SongEventKind` | – |
+| `time` (required) | `number` | seconds from the song's start: a beat (drop, a downbeat) or the grid's nearest beat or half beat (hit) |
+| `end` | `number` | spans (build, stop, dip, break) end here |
+| `beat` (required) | `number` | – |
+| `bar` (required) | `number` | – |
+| `beats` | `number` | – |
+| `strength` (required) | `number` | 0..1 |
+| `into` | `number \| null` | a build or stop: the drop it leads into, seconds |
+| `hits` | `SongHit[]` | a stop: its sparse hits |
+| `rise` | `number` | a drop: the energy of the bar after minus the bar before (negative when the band cuts after one big hit) |
+| `holds` | `boolean` | a drop: the bar after stays up (false: one hit, then the band cuts out) |
+| `afterStop` | `boolean` | – |
+| `afterBuild` | `boolean` | – |
+| `gapBefore` | `boolean` | a drop: a breath of near-silence just before it |
+| `at` | `number` | a hit: the onset's own time; how far over the groove it stands |
+| `over` | `number` | – |
+
+### `SongEventKind`
+
+```ts
+type SongEventKind = "build" | "drop" | "stop" | "hit" | "dip" | "break"
+```
+
+### `SongFeatures`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `loudness` (required) | `number[]` | – |
+| `onsets` (required) | `number[]` | – |
+| `brightness` (required) | `number[]` | – |
+| `low` (required) | `number[]` | – |
+| `high` (required) | `number[]` | – |
+| `energy` (required) | `number[]` | – |
+
+### `SongHit`
+
+A hit inside a stop: `time` on the beat grid (a beat or half beat), `at` where the onset is.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `time` (required) | `number` | – |
+| `at` (required) | `number` | – |
+| `strength` (required) | `number` | – |
+
+### `SongLevel`
+
+```ts
+type SongLevel = "intro" | "low" | "mid" | "high" | "outro"
+```
+
+### `SongMap`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `version` (required) | `number` | – |
+| `duration` (required) | `number` | – |
+| `tempo` (required) | `number \| null` | – |
+| `beatsPerBar` (required) | `number` | – |
+| `beats` (required) | `number[]` | – |
+| `downbeats` (required) | `number[]` | – |
+| `features` (required) | `SongFeatures` | one value a beat, 0..1 over the song |
+| `bars` (required) | `SongBar[]` | – |
+| `sections` (required) | `SongSection[]` | – |
+| `events` (required) | `SongEvent[]` | – |
+| `sectionsFrom` | `"markers" \| "novelty"` | – |
+| `boundaries` | `{ time: number; beat: number; bar: number; strength: number }[]` | – |
+| `source` | `string \| null` | – |
+
+### `SongMoment`
+
+Where a moment of the song is. Seconds are the song's; infinities when there's no such event.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `time` (required) | `number` | – |
+| `beat` (required) | `number` | the beat at or before `time` (-1 before the first) |
+| `bar` (required) | `number` | the bar at or before `time` (-1 before the first beat) |
+| `beatInBar` (required) | `number` | 0-based position in the bar |
+| `phase` (required) | `number` | 0..1 through the beat, and through the bar |
+| `barPhase` (required) | `number` | – |
+| `energy` (required) | `number` | the features at `time`, interpolated between beats |
+| `loudness` (required) | `number` | – |
+| `onsets` (required) | `number` | – |
+| `brightness` (required) | `number` | – |
+| `low` (required) | `number` | – |
+| `section` (required) | `SongSection \| null` | – |
+| `sectionIndex` (required) | `number` | – |
+| `sectionProgress` (required) | `number` | 0..1 through the section |
+| `cutsPerBar` (required) | `number` | the bar's suggested cut rate (cuts per bar) |
+| `drop` (required) | `SongEvent \| null` | the last drop at or before `time`, the next after it |
+| `nextDrop` (required) | `SongEvent \| null` | – |
+| `sinceDrop` (required) | `number` | – |
+| `untilDrop` (required) | `number` | – |
+| `build` (required) | `SongEvent \| null` | the build `time` is in, and 0..1 through it |
+| `inBuild` (required) | `boolean` | – |
+| `buildProgress` (required) | `number` | – |
+| `stop` (required) | `SongEvent \| null` | the stop `time` is in |
+| `inStop` (required) | `boolean` | – |
+| `dip` (required) | `SongEvent \| null` | the dip or break `time` is in |
+| `next` (required) | `SongEvent \| null` | the next event of any kind after `time` |
+
+### `SongOptions`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `fps` (required) | `number` | the composition's frame rate |
+| `offset` | `number` | seconds into the song at frame 0 (where an <Audio> of it starts: its startFrom over fps) |
+
+### `SongPlotProps`
+
+The props of [`SongPlot`](#songplot), tabled there.
+
+### `SongSection`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` (required) | `string` | – |
+| `level` (required) | `SongLevel` | – |
+| `time` (required) | `number` | – |
+| `end` (required) | `number` | – |
+| `beat` (required) | `number` | – |
+| `bar` (required) | `number` | – |
+| `energy` (required) | `number` | – |
+| `cuts` (required) | `number` | suggested cuts per bar: 0.25, 0.5, 1, 2 or 4 |
+
+### `SpringConfig`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `mass` | `number` | – |
+| `damping` | `number` | – |
+| `stiffness` | `number` | – |
+| `overshootClamping` | `boolean` | – |
+
+### `SpringOptions`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `frame` (required) | `number` | – |
+| `fps` (required) | `number` | – |
+| `from` | `number` | – |
+| `to` | `number` | – |
+| `config` | `SpringConfig` | – |
+| `durationInFrames` | `number` | – |
+| `durationRestThreshold` | `number` | – |
+| `delay` | `number` | – |
+| `reverse` | `boolean` | – |
+
+### `StaggerProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `each` (required) | `number` | frames between one child's entrance and the next |
+| `grid` | `{ cols: number; rows?: number; from?: GridFrom }` | spread by grid distance instead of order |
+| `exitEach` | `number` | the exit staggered too, `exitEach` frames apart (0: all together) |
+| `style` | `CSSProperties` | – |
+| `animate` | `Record<string, TrackSpec \| TrackSpec[] \| Keys> \| Move` | free tracks by property, in local frames: `{ backgroundColor: track({ 0: "#fff", 20: "#000" }) }` |
+| `as` | `string` | the element: "div" by default |
+| `exit` | `MoveLike` | the exit, played at `exitAt` (an entrance reversed: `exit="rise"` sinks back out) |
+| `children` | `ReactNode` | – |
+| `enter` | `MoveLike` | the entrance: a move's name, a move, or several together |
+| `at` | `number` | local frame the entrance starts (0) |
+| `exitAt` | `number` | local frame the exit starts |
+| `mount` | `"during" \| "always"` | "always" (default): in the tree, and its layout, the whole time (invisible before an entrance that fades in); "during": only from the entrance's start until the exit ends (it takes its space when it arrives) |
+| `className` | `string` | – |
+
+### `StateConfig`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `entry` | `Actions<C, E>` | run when the state is entered (outer states before inner ones) |
+| `exit` | `Actions<C, E>` | run when the state is left (inner states before outer ones) |
+| `tick` | `Actions<C, E>` | run every step the state is active, after this step's transition (outer before inner, the entry step too) |
+| `always` | `Transitions<C, E, N>` | triggers polled every step, in order: the first whose guard holds fires (XState's eventless `always`) |
+| `after` | `{ readonly [steps: number]: Transitions<C, E, N> }` | delays in steps: `after: { 30: "fall" }` fires once the state has been active 30 steps (and its guard holds) |
+| `on` | `{ readonly [event: string]: Transitions<C, E, N> }` | named events the step is given this time (input edges: games.ts keyEdges gives "keydown:ArrowUp") |
+| `choose` | `Transitions<C, E, N>` | a choice point: of these candidates, those whose guards hold go to the step's Decider, which picks one or waits (no decider: firstDecider takes the first). Polled after `always` and `after`. |
+| `initial` | `NoInfer<N>` | a compound state's first substate |
+| `states` | `{ [K in N]?: StateConfig<C, E, N> }` | substates: names are unique across the whole machine, so `to: "run"` names one state wherever it is |
+| `history` | `"shallow" \| "deep"` | re-entering this compound state resumes the substate it left ("shallow"), or that substate's own (deep) |
+| `onDone` | `Transitions<C, E, N>` | a compound state's transition taken when its active substate is final |
+| `type` | `"final"` | a final state: no transitions out (a dead enemy, the game won, the work shipped) |
+| `description` | `string` | – |
+
+### `StateName`
+
+The state names of a machine.
+
+```ts
+type StateName = M extends Machine<any, any, infer N, any> ? N : never
+```
+
+### `Step`
+
+A timeline step: [part, move], a group from sequence/parallel/stagger, or a pause in frames.
+
+```ts
+type Step = [part: string, move: MoveLike] | { part: string; move: MoveLike; offset?: number } | Group | number
+```
+
+### `StepOptions`
+
+What a step may be given besides the context and env.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `events` | `readonly string[]` | named events this step (an `on` edge waits for one) |
+| `decide` | `Decider` | picks at choice points (default firstDecider) |
+| `trace` | `(r: TransitionRecord) => void` | receives every transition this step takes, as a row |
+
+### `TimelineWord`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `text` (required) | `string` | – |
+| `from` (required) | `number` | first frame of the word |
+| `to` (required) | `number` | frame after the word ends (exclusive) |
+
+### `TrackSpec`
+
+One property's keyframes: values by frame, the curve between each pair (one for all, or one per segment).
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `keys` (required) | `[number, V][]` | – |
+| `ease` (required) | `Curve \| Curve[]` | – |
+| `unit` | `"px" \| "%"` | – |
+| `repeat` | `"hold" \| "loop" \| "pingpong" \| `${"loop" \| "pingpong"}:${number}`` | – |
+| `digits` | `number` | – |
+| `prefix` | `string` | a `text` counter's text before and after the number, and between its thousands ("," writes 12,345) |
+| `suffix` | `string` | – |
+| `separator` | `string` | – |
+
+### `TransitionConfig`
+
+A transition: where to go (`to`, or XState's `target`), when (`when`, or XState's `guard`; none: always), after how
+many steps in the state at least (`after`), and what to do on the way (`actions`).
+
+```ts
+type TransitionConfig = Target<N> & When<C, E> & { /** steps in the state before this transition may fire (0) */ after?: number; actions?: Actions<C, E>; /** what the transition means: a decider reads it (a model's option description), reports show it */ description?: string; }
+```
+
+### `TransitionRecord`
+
+One transition as a row: what a trace keeps and rdb loads (step, machine, from, to, edge, decider, evidence). `from` is
+null for the first step's entry into the initial states.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `machine` (required) | `string` | – |
+| `step` (required) | `number` | – |
+| `from` (required) | `string \| null` | – |
+| `to` (required) | `string` | – |
+| `edge` (required) | `number` | – |
+| `kind` (required) | `Edge["kind"] \| "start"` | – |
+| `by` (required) | `string` | "guard" for a trigger, "start" for the first entry, else the decider's name |
+| `evidence` | `unknown` | – |
+
+### `Transitions`
+
+A target's name alone, one transition, or several checked in order.
+
+```ts
+type Transitions = | NoInfer<N> | TransitionConfig<C, E, N> | readonly (NoInfer<N> | TransitionConfig<C, E, N>)[]
+```
+
+### `UseSongOptions`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `offset` | `number` | seconds into the song at frame 0 of the enclosing Sequence |
+
+### `VideoConfig`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `id` (required) | `string` | – |
+| `width` (required) | `number` | – |
+| `height` (required) | `number` | – |
+| `fps` (required) | `number` | – |
+| `durationInFrames` (required) | `number` | – |
+| `defaultProps` (required) | `Record<string, unknown>` | – |
+
+### `VideoProps`
+
+The props of [`Video`](#video), tabled there.
+
+### `VolumeProp`
+
+```ts
+type VolumeProp = number | ((mediaFrame: number) => number)
+```
+
+### `Watched`
+
+A machine's state in some context, for a trace (`Playtest.machines`).
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `machine` (required) | `AnyMachine` | – |
+| `snapshot` (required) | `Snapshot` | – |
+
+### `WordOptions`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `occurrence` | `number` | which time the phrase is said, from 1 |
+| `edge` | `"start" \| "end"` | "start": the phrase's first frame; "end": the frame after its last word ends |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/remote.md b/docs/manual/reference/sdk/remote.md
new file mode 100644
index 00000000..2759c0fa
--- /dev/null
+++ b/docs/manual/reference/sdk/remote.md
@@ -0,0 +1,81 @@
+---
+title: "raea/remote"
+summary: "A headless Bevy App you open, step and query from TypeScript, through Bevy's remote protocol."
+order: 103
+sources: ["sdk/raea/src/remote.ts"]
+---
+
+`BevyApp.open` starts a headless Bevy App with the plugins you name and hands back an object that speaks Bevy's
+remote protocol (BRP): spawn entities, insert and query components, set resources, trigger events and step frames.
+TypeScript systems run inside its schedules. It's how a test or a [`raea run`](../cli/run.md) script drives the
+engine without a composition.
+
+```ts
+import { BevyApp } from "raea/remote";
+
+const app = BevyApp.open({ plugins: [] });
+const e = app.spawn();
+app.step(3);
+console.log(app.methods.length, e);
+```
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { BevyApp } from "raea/remote"
+```
+
+`raea/remote` exports 1 class, 1 type. Bevy's counterpart: `bevy_remote`. Source: [sdk/raea/src/remote.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/remote.ts).
+
+## Classes
+
+### `BevyApp`
+
+A headless Bevy App driven from TypeScript through Bevy's remote protocol: open it with its plugins, then spawn,
+insert, query and step it, and add TypeScript systems to its schedules.
+
+| Member | What it does |
+| --- | --- |
+| `new BevyApp(id: number, methods: string[])` | – |
+| `BevyApp.open(o: OpenOptions): BevyApp` | A headless App with these plugins; Startup has run, no frame has stepped. TypeScript plugins are built in order once the App is open, then finished and cleaned up; their Startup systems run before the first frame. |
+| `BevyApp.stepTogether(apps: BevyApp[], frames?: number): number[]` | Apps stepped together, a frame at a time: a network's peers. Returns each one's frame. |
+| `.methods: string[]` | the methods this App answers (BRP's, raea's and its plugins') |
+| `.id: number` | – |
+| `.isPluginAdded(name: string): boolean` | Whether a plugin of this name is in the App (Bevy's is_plugin_added), Rust or TypeScript. |
+| `.addPlugins(...refs: PluginRef[]): BevyApp` | Adds TypeScript plugins and groups (Bevy's add_plugins): each built in order, then each finished, then each cleaned up. A Rust plugin is compiled in and must be named when the App opens; naming a new one here throws. |
+| `.addSystems(schedule: string, systems: ((app: BevyApp, frame: number) => void) \| ((app: BevyApp, frame: number) => void)[], o?: SystemOptions): BevyApp` | Systems in a schedule (Bevy's add_systems), each as `system` adds one; one of the startup schedules (PreStartup, Startup, PostStartup) runs them once, before the App's next frame. Returns the App, to chain. |
+| `.insertResource<T>(r: Resource<T>, value: T): BevyApp` | Bevy's insert_resource: the resource's value set (setResource). |
+| `.addObserver<T>(e: string \| Event<T>, o?: { entity?: number \| undefined; then?: Then[] \| undefined; }): Observing<T>` | Bevy's add_observer: an observer of an event inside the App (observer). |
+| `.step(frames?: number): number` | `frames` frames on. Returns the frame it's on. With TypeScript systems (`system`), each frame is run schedule by schedule and they run in theirs. |
+| `.system(schedule: string, run: (app: BevyApp, frame: number) => void, o?: SystemOptions): () => void` | A system written in TypeScript: `run` is called every frame right after Bevy's own systems of `schedule` (one of the frame's: "First", "PreUpdate", "StateTransition", "RunFixedMainLoop", the fixed step's "FixedFirst", "FixedPreUpdate", "FixedUpdate", "FixedPostUpdate", "FixedLast" (one fixed step a frame: the clock's step is the timestep), "Update", "SpawnScene", "PostUpdate", "Last"), on that frame's World, before the next schedule's; it queries, changes and observes through the App's methods (query, get, insert, call("world.mutate_components"), observe...). Returns a function that removes it. `o` places it as Bevy's add_systems(...).run_if().before().after().in_set() would: `when` is its run condition (asked every frame before it runs; see `conditions`), `before`/`after` name other systems or sets of the same schedule it runs before or after (a cycle is refused), `set` puts it in a set that `configureSet` gives a condition and an order. Without an order, systems run in the order they were added. |
+| `.configureSet(name: string, o: { when?: Condition \| undefined; before?: string \| string[] \| undefined; after?: string \| string[] \| undefined; }): void` | A set of TypeScript systems (Bevy's SystemSet with configure_sets): `when` is asked once per schedule run, before its first member, and a false skips them all; `before`/`after` order the whole set against systems or sets. |
+| `.oneShot<R = void>(fn: (app: BevyApp, frame: number) => R): OneShot<R>` | A one-shot system (Bevy's register_system + run_system): `run()` runs it now, on the World as it is; `queue()` runs it once the current TypeScript system returns (as Commands::run_system applies at the next sync point), or at the end of the frame if called outside a step. `remove()` unregisters it. |
+| `.frameSchedules(): string[]` | The schedules a frame runs, in order (Bevy's MainScheduleOrder). |
+| `.call<A = unknown>(method: string, params?: unknown): A` | Any method of the App's table, run now: its answer, or a throw with the method's message. |
+| `.spawn(...components: With[]): number` | A new entity with these components. |
+| `.insert(entity: number, ...components: With[]): void` | – |
+| `.get<T>(entity: number, c: Component<T>): T \| undefined` | One component of an entity, or undefined when it hasn't got one. |
+| `.query(o: { data?: Component<unknown>[] \| undefined; has?: Component<unknown>[] \| undefined; without?: Component<unknown>[] \| undefined; }): { entity: number…` | Entities with every component in `has` (and none in `without`), with the `data` components' values. |
+| `.resource<T>(r: Resource<T>): T` | – |
+| `.setResource<T>(r: Resource<T>, value: T): void` | – |
+| `.trigger<T>(e: Event<T>, value: T): void` | Triggers an event: its observers run now. |
+| `.write<T>(m: Message<T>, value: T): void` | Writes a message, for its readers' next run. |
+| `.observe<T>(e: Event<T>, entity?: number \| undefined): () => T[]` | Starts observing an event (BRP's world.observe+watch). Each call of the returned function gives the events triggered since the last call, in order. `entity` limits it to events aimed at that entity. |
+| `.hook(on: "Add" \| "Insert" \| "Discard" \| "Remove" \| "Despawn", component: string \| Component<unknown>, then?: Then[]): Observing<unknown>` | A component hook as an observer inside the App: when `component` is added, inserted, discarded, removed or its entity despawned, `then`'s calls (BRP methods, "$entity" in their params standing for the entity) run right there, in the same flush, before anything else sees the World. `seen()` gives the entities it fired for since the last call; `stop()` removes it. |
+| `.observer<T>(e: string \| Event<T>, o?: { entity?: number \| undefined; then?: Then[] \| undefined; }): Observing<T>` | An observer inside the App for a reflected event: on each trigger (or each aimed at `entity`), `then`'s calls run in the same flush, "$event" standing for the event's value and "$entity" for its target. |
+| `.state<T>(s: State<T>): T \| null` | A state's value (null before it exists). |
+| `.setState<T>(s: State<T>, value: T): void` | A state's next value: it changes at the next frame's StateTransition. |
+| `.schema(crates?: string[] \| undefined): Record<string, unknown>` | The App's registered types as JSON schema (BRP's registry.schema), filtered by crate. |
+| `.close(): void` | – |
+
+## Types
+
+### `OpenOptions`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `plugins` (required) | `PluginRef[]` | the App's plugins, in order: Rust ones by the name this build registered them under (a declaration's name, or its halves: lightyear_server), compiled in and added before Startup; TypeScript ones (definePlugin) built after |
+| `fps` | `number` | frames a second: one step is 1/fps of Time (default 60) |
+| `serve` | `number` | serve BRP over HTTP on this port (a dev tool, a BRP client, curl) |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/sprite.md b/docs/manual/reference/sdk/sprite.md
new file mode 100644
index 00000000..87ed1698
--- /dev/null
+++ b/docs/manual/reference/sdk/sprite.md
@@ -0,0 +1,492 @@
+---
+title: "raea/sprite"
+summary: "2D pictures and flat shapes, drawn by Bevy's 2D renderer inside a Canvas3D."
+order: 82
+sources: ["sdk/raea/src/sprite.ts"]
+---
+
+`<Sprite>` is Bevy's sprite: a picture in the 2D world, or one cell of a sprite sheet or atlas. `<Mesh2d>` holds a
+flat shape and a `ColorMaterial`; the shapes are Bevy's 2D primitives (`Circle`, `Rectangle`, `Ellipse`, `Annulus`,
+`RegularPolygon`, `Triangle2d` and the rest). They draw inside a `<Canvas3D>`, in Bevy's 2D coordinates: the centre
+of the frame is the origin, +Y is up, and a unit is a pixel.
+
+```tsx
+import { staticFile } from "raea";
+import { Canvas3D } from "raea/camera";
+import { Circle, ColorMaterial, Mesh2d, Sprite } from "raea/sprite";
+
+const Shot = () => (
+ <Canvas3D layered clearColor="rgb(43, 44, 47)">
+ <Sprite src={staticFile("branding/bevy_bird_dark.png")} x={640} y={360} />
+ <Mesh2d transform={{ translation: [-300, 0, 0] }}>
+ <Circle radius={50} />
+ <ColorMaterial color="#e8b04a" />
+ </Mesh2d>
+ </Canvas3D>
+);
+```
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { Annulus, Capsule2d, Circle, CircularSector } from "raea/sprite"
+```
+
+`raea/sprite` exports 17 components, 1 class, 20 types. Bevy's counterpart: `bevy_sprite`. Source: [sdk/raea/src/sprite.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/sprite.ts).
+
+## Components
+
+### `Annulus`
+
+*From Bevy's `bevy_shape::Annulus`:* A primitive shape formed by the region between two circles, also known as a ring.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `inner_circle` | `{ radius: number }` | Bevy: The inner circle of the annulus |
+| `outer_circle` | `{ radius: number }` | Bevy: The outer circle of the annulus |
+
+Also takes the props of [`MeshAttributes`](#meshattributes) (`vertex_colors`); [`RingProps`](#ringprops) (`ring`, `inner`).
+
+Used in: [2d/2d_shapes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/2d_shapes.tsx).
+
+### `Capsule2d`
+
+*From Bevy's `bevy_shape::Capsule2d`:* A 2D capsule primitive, also known as a stadium or pill shape.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `radius` | `number` | Bevy: The radius of the capsule |
+| `half_length` | `number` | Bevy: Half the height of the capsule, excluding the semicircles |
+
+Also takes the props of [`MeshAttributes`](#meshattributes) (`vertex_colors`); [`RingProps`](#ringprops) (`ring`, `inner`).
+
+Used in: [2d/2d_shapes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/2d_shapes.tsx).
+
+### `Circle`
+
+bevy_math's Circle (radius 0.5 by default, as Bevy's)
+
+Bevy: `bevy_shape::Circle`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `radius` | `number` | Bevy: The radius of the circle |
+
+Also takes the props of [`MeshAttributes`](#meshattributes) (`vertex_colors`); [`RingProps`](#ringprops) (`ring`, `inner`).
+
+Used in: [2d/2d_shapes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/2d_shapes.tsx).
+
+### `CircularSector`
+
+bevy_math's other 2D primitives, their fields as Bevy reflects them (each over Bevy's default)
+
+Bevy: `bevy_shape::CircularSector`.
+
+Takes [`ArcProps`](#arcprops)'s props.
+
+Used in: [2d/2d_shapes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/2d_shapes.tsx).
+
+### `CircularSegment`
+
+*From Bevy's `bevy_shape::CircularSegment`:* A primitive representing a circular segment: the area enclosed by the arc of a circle and its chord (the line between its endpoints).
+
+Takes [`ArcProps`](#arcprops)'s props.
+
+Used in: [2d/2d_shapes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/2d_shapes.tsx).
+
+### `ColorMaterial`
+
+bevy_sprite_render's ColorMaterial: a colour (white by default), a texture it tints, and its AlphaMode2d
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `color` | `string \| Srgba \| LinearRgba` | white by default; it tints the texture, and its alpha is the material's (Bevy's Srgba or LinearRgba, or a hex) |
+| `texture` | `string \| SampledImage` | a picture, by the mesh's UVs, or one with its own sampler ({ path, sampler }, Bevy's load_with_settings) |
+| `uv_transform` | `Affine2` | the texture's UVs scaled, turned and moved (glam's Affine2: Affine2.fromScale([2, 3])) |
+| `alpha_mode` | `AlphaMode2d` | Bevy's AlphaMode2d, "Blend" by default |
+
+Used in: [2d/mesh2d_vertex_color_texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/mesh2d_vertex_color_texture.tsx), [2d/mesh2d_alpha_mode](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/mesh2d_alpha_mode.tsx), [2d/mesh2d](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/mesh2d.tsx), [2d/mesh2d_repeated_texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/mesh2d_repeated_texture.tsx), [2d/2d_shapes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/2d_shapes.tsx).
+
+### `ConvexPolygon`
+
+*From Bevy's `bevy_shape::ConvexPolygon`:* A convex polygon with `N` vertices.
+
+Takes [`VerticesProps`](#verticesprops)'s props.
+
+### `Ellipse`
+
+bevy_math's Ellipse (half_size [1, 0.5] by default)
+
+Bevy: `bevy_shape::Ellipse`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `half_size` | `Vec2` | Bevy: Half of the width and height of the ellipse. |
+
+Also takes the props of [`MeshAttributes`](#meshattributes) (`vertex_colors`); [`RingProps`](#ringprops) (`ring`, `inner`).
+
+Used in: [2d/2d_shapes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/2d_shapes.tsx).
+
+### `Mesh2d`
+
+Bevy's Mesh2d with its Transform, a primitive and a ColorMaterial: <Shape2D> in Bevy's 2D world.
+
+Takes [`Mesh2dProps`](mesh.md#mesh2dprops)'s props.
+
+Used in: [shader/shader_material_2d_bindless](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader/shader_material_2d_bindless.tsx), [shader/shader_material_2d](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader/shader_material_2d.tsx), [shader/pipeline_constants](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader/pipeline_constants.tsx), [2d/mesh2d_vertex_color_texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/mesh2d_vertex_color_texture.tsx), [2d/mesh2d_alpha_mode](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/mesh2d_alpha_mode.tsx), [2d/mesh2d](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/mesh2d.tsx), [2d/mesh2d_repeated_texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/mesh2d_repeated_texture.tsx), [2d/2d_shapes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/2d_shapes.tsx).
+
+### `Polyline2d`
+
+*From Bevy's `bevy_shape::Polyline2d`:* A series of connected line segments in 2D space.
+
+Takes [`VerticesProps`](#verticesprops)'s props.
+
+Used in: [2d/2d_shapes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/2d_shapes.tsx).
+
+### `Rectangle`
+
+bevy_math's Rectangle (half_size [0.5, 0.5] by default)
+
+Bevy: `bevy_shape::Rectangle`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `half_size` | `Vec2` | Bevy: Half of the width and height of the rectangle |
+
+Also takes the props of [`MeshAttributes`](#meshattributes) (`vertex_colors`); [`RingProps`](#ringprops) (`ring`, `inner`).
+
+Used in: [shader/shader_material_2d_bindless](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader/shader_material_2d_bindless.tsx), [shader/shader_material_2d](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader/shader_material_2d.tsx), [shader/pipeline_constants](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader/pipeline_constants.tsx), [2d/mesh2d_vertex_color_texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/mesh2d_vertex_color_texture.tsx), [2d/mesh2d_alpha_mode](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/mesh2d_alpha_mode.tsx), [2d/mesh2d](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/mesh2d.tsx), [2d/mesh2d_repeated_texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/mesh2d_repeated_texture.tsx), [2d/2d_shapes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/2d_shapes.tsx).
+
+### `RegularPolygon`
+
+bevy_math's RegularPolygon (circumradius 0.5, 6 sides by default)
+
+Bevy: `bevy_shape::RegularPolygon`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `circumcircle` | `{ radius: number }` | Bevy: The circumcircle on which all vertices lie |
+| `sides` | `number` | Bevy: The number of sides |
+
+Also takes the props of [`MeshAttributes`](#meshattributes) (`vertex_colors`); [`RingProps`](#ringprops) (`ring`, `inner`).
+
+Used in: [2d/2d_shapes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/2d_shapes.tsx).
+
+### `Rhombus`
+
+*From Bevy's `bevy_shape::Rhombus`:* A rhombus primitive, also known as a diamond shape. A four sided polygon, centered on the origin, where opposite sides are parallel but without requiring right angles.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `half_diagonals` | `Vec2` | Bevy: Size of the horizontal and vertical diagonals of the rhombus |
+
+Also takes the props of [`MeshAttributes`](#meshattributes) (`vertex_colors`); [`RingProps`](#ringprops) (`ring`, `inner`).
+
+Used in: [2d/2d_shapes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/2d_shapes.tsx).
+
+### `Segment2d`
+
+*From Bevy's `bevy_shape::Segment2d`:* A line segment defined by two endpoints in 2D space.
+
+Takes [`VerticesProps`](#verticesprops)'s props.
+
+Used in: [2d/2d_shapes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/2d_shapes.tsx).
+
+### `Shape2D`
+
+A flat shape in 2D, over the 3D, in one colour: Bevy's Mesh2d with a ColorMaterial (raea-sys-sprite). Put it
+inside the Canvas3D.
+
+Bevy: `bevy_sprite_render::mesh2d::color_material::ColorMaterial`, `bevy_sprite_render::mesh2d::material::MeshMaterial2d<bevy_sprite_render::mesh2d::color_material::ColorMaterial>`, `bevy_mesh::components::Mesh2d`.
+
+Takes [`Shape2DProps`](3d.md#shape2dprops)'s props.
+
+Used in: [animation/color_animation](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/animation/color_animation.tsx), [2d/text2d](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/text2d.tsx).
+
+### `Sprite`
+
+A picture in 2D, over the 3D: Bevy's Sprite, drawn as a quad with its sprite material, a sprite sheet's cells cut
+by a texture atlas (raea-sys-sprite). Put it inside the Canvas3D.
+
+Bevy: `bevy_sprite::sprite::Sprite`, `bevy_sprite_render::sprite_mesh::sprite_mesh_material::SpriteMeshMaterial`, `bevy_sprite_render::mesh2d::material::MeshMaterial2d<bevy_sprite_render::sprite_mesh::sprite_mesh_material::SpriteMeshMaterial>`, `bevy_sprite_render::sprite_mesh::sprite_extended_material::SpriteMaterial`, `bevy_image::texture_atlas::TextureAtlasLayout`.
+
+Takes [`SpriteProps`](3d.md#spriteprops)'s props.
+
+### `Triangle2d`
+
+*From Bevy's `bevy_shape::Triangle2d`:* A triangle in 2D space
+
+Takes [`VerticesProps`](#verticesprops)'s props.
+
+Used in: [2d/2d_shapes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/2d_shapes.tsx).
+
+## Classes
+
+### `TextureAtlasBuilder`
+
+Pictures packed into one atlas, as Bevy's TextureAtlasBuilder: `padding([x, y])` px around each, `addTexture` in
+order, then `build({ sampler })` (the atlas's own sampler, Bevy's default otherwise).
+
+Bevy: `bevy_image::texture_atlas_builder::TextureAtlasBuilder`, `bevy_image::texture_atlas::TextureAtlasSources`.
+
+| Member | What it does |
+| --- | --- |
+| `.padding(p: [number, number]): TextureAtlasBuilder` | – |
+| `.addTexture(src: string): TextureAtlasBuilder` | – |
+| `.build({ sampler }?: { sampler?: SamplerSpec \| undefined; }): BuiltAtlas` | – |
+
+Used in: [2d/texture_atlas](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/texture_atlas.tsx).
+
+## Types
+
+### `AlphaMode2d`
+
+bevy_sprite_render's AlphaMode2d
+
+```ts
+type AlphaMode2d = "Opaque" | "Blend" | { Mask: number }
+```
+
+### `AnnulusProps`
+
+The props of [`Annulus`](#annulus), tabled there.
+
+### `ArcProps`
+
+an arc: its radius and half its angle in radians (Bevy's CircularSector::new(r, a) gives half_angle a)
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `arc` | `{ radius: number; half_angle: number }` | – |
+| `vertex_colors` | `(LinearRgba \| [number, number, number, number])[]` | – |
+| `ring` | `number` | – |
+| `inner` | `Record<string, unknown>` | – |
+
+### `AtlasSprite`
+
+What a <Sprite> takes to show a built atlas: the whole of it, or one of its pictures (`atlasPick`).
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `src` (required) | `string` | – |
+| `sampler` | `SamplerSpec` | – |
+| `atlasPick` | `number` | – |
+
+### `BuiltAtlas`
+
+A built atlas: `image` the whole atlas as a sprite's picture, `sources.handle(texture)` one picture of it
+(TextureAtlasSources::handle).
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `image` (required) | `AtlasSprite` | – |
+| `sources` (required) | `{ handle(texture: string): AtlasSprite }` | – |
+
+### `Capsule2dProps`
+
+The props of [`Capsule2d`](#capsule2d), tabled there.
+
+### `CircleProps`
+
+The props of [`Circle`](#circle), tabled there.
+
+### `ColorMaterialProps`
+
+The props of [`ColorMaterial`](#colormaterial), tabled there.
+
+### `EllipseProps`
+
+The props of [`Ellipse`](#ellipse), tabled there.
+
+### `Mesh2dProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `transform` | `TransformValue` | – |
+| `visibility` | `"Inherited" \| "Visible" \| "Hidden"` | – |
+| `children` | `ReactNode` | one of bevy_math's 2D primitives (<Circle>, <Capsule2d>,...) and a <ColorMaterial>, or your own <Material> |
+| `name` | `string` | – |
+| `onClick` | `(e: Event3d) => void` | – |
+| `onDrag` | `(e: Event3d) => void` | – |
+| `onDragEnd` | `(e: Event3d) => void` | – |
+| `onDragEnter` | `(e: Event3d) => void` | – |
+| `onDragLeave` | `(e: Event3d) => void` | – |
+| `onDragOver` | `(e: Event3d) => void` | – |
+| `onDragStart` | `(e: Event3d) => void` | – |
+| `onDrop` | `(e: Event3d) => void` | – |
+| `onPointerDown` | `(e: Event3d) => void` | – |
+| `onPointerMove` | `(e: Event3d) => void` | – |
+| `onPointerUp` | `(e: Event3d) => void` | – |
+| `onPointerEnter` | `(e: Event3d) => void` | – |
+| `onPointerLeave` | `(e: Event3d) => void` | – |
+| `onPointerOver` | `(e: Event3d) => void` | – |
+| `onPointerOut` | `(e: Event3d) => void` | – |
+| `onWheel` | `(e: Event3d) => void` | – |
+| `quat` | `Quat` | Bevy's rotation as it is, a quaternion [x, y, z, w] in Bevy's axes (y up, z toward the viewer), in place of `rotation`: a turn out of the frame's plane too, as a Sprite's Transform takes it (camera/2d_on_ui) |
+| `opacity` | `number` | 0 to 1 (1 by default) |
+
+### `MeshAttributes`
+
+a primitive's mesh attributes: its Mesh::ATTRIBUTE_COLOR, one linear colour per vertex (as mesh.insert_attribute)
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `vertex_colors` | `(LinearRgba \| [number, number, number, number])[]` | – |
+
+### `Place2dProps`
+
+Where a 2D part is: composition px from the frame's top left, y down (as the page's), its centre there; and its
+pointer and drag handlers, called as a 3D part's are (2D parts are picked first, the top one by z).
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` | `string` | – |
+| `x` | `number` | – |
+| `y` | `number` | – |
+| `rotation` | `number` | radians, clockwise (as CSS rotate) |
+| `quat` | `Quat` | Bevy's rotation as it is, a quaternion [x, y, z, w] in Bevy's axes (y up, z toward the viewer), in place of `rotation`: a turn out of the frame's plane too, as a Sprite's Transform takes it (camera/2d_on_ui) |
+| `scale` | `number \| [number, number]` | 1 by default; [x, y] to stretch |
+| `z` | `number` | draw order among the 2D parts: higher draws over lower (0 by default) |
+| `opacity` | `number` | 0 to 1 (1 by default) |
+| `onClick` | `(e: Event3d) => void` | – |
+| `onPointerDown` | `(e: Event3d) => void` | – |
+| `onPointerUp` | `(e: Event3d) => void` | – |
+| `onPointerOver` | `(e: Event3d) => void` | – |
+| `onPointerOut` | `(e: Event3d) => void` | – |
+| `onPointerEnter` | `(e: Event3d) => void` | – |
+| `onPointerLeave` | `(e: Event3d) => void` | – |
+| `onPointerMove` | `(e: Event3d) => void` | – |
+| `onWheel` | `(e: Event3d) => void` | – |
+| `onDragStart` | `(e: Event3d) => void` | – |
+| `onDrag` | `(e: Event3d) => void` | – |
+| `onDragEnd` | `(e: Event3d) => void` | – |
+| `onDragEnter` | `(e: Event3d) => void` | – |
+| `onDragOver` | `(e: Event3d) => void` | – |
+| `onDragLeave` | `(e: Event3d) => void` | – |
+| `onDrop` | `(e: Event3d) => void` | – |
+
+### `RectangleProps`
+
+The props of [`Rectangle`](#rectangle), tabled there.
+
+### `RegularPolygonProps`
+
+The props of [`RegularPolygon`](#regularpolygon), tabled there.
+
+### `RhombusProps`
+
+The props of [`Rhombus`](#rhombus), tabled there.
+
+### `RingProps`
+
+a 2D shape as Bevy's Ring: of it and `inner` (the same shape's fields), or its to_ring(`ring`, a thickness)
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `ring` | `number` | – |
+| `inner` | `Record<string, unknown>` | – |
+
+### `Shape2DProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `shape` | `"rect" \| "circle" \| "ellipse" \| "triangle" \| "polygon"` | a rect by default; a polygon has `sides` (5 by default) |
+| `size` | `[number, number]` | [width, height] in px ([100, 100] by default); a circle's and a polygon's diameter is the width |
+| `sides` | `number` | – |
+| `color` | `string` | a CSS colour (white by default); with a texture, it tints it |
+| `srgb` | `[number, number, number]` | the colour as a Bevy Srgba's [r, g, b], unrounded, over `color` (a Mesh2d's ColorMaterial gives it) |
+| `texture` | `string \| { path: string; sampler: SamplerSpec }` | a picture on it, mapped by the mesh's UVs (Bevy's ColorMaterial texture), or one with its own sampler (Bevy's load_with_settings: { path, sampler: { wrap: "repeat" } }) |
+| `uv_transform` | `{ scale: [number, number]; angle: number; translation: [number, number] }` | the texture's UVs scaled, turned and moved (ColorMaterial's uv_transform, glam's Affine2 as raea/transform's) |
+| `alpha_mode` | `AlphaMode2d` | Bevy's AlphaMode2d: "Blend" (Bevy's default), "Opaque", or { Mask: cutoff } |
+| `vertex_colors` | `[number, number, number, number][]` | one linear [r, g, b, a] per vertex of the shape's mesh (Bevy's Mesh::ATTRIBUTE_COLOR): the material's colour and texture are multiplied by them. A rect has 4 (top right, top left, bottom left, bottom right), a triangle 3. |
+| `shader` | `Record<string, unknown>` | its own Material2d in place of the ColorMaterial: the spec a <Material> in a Mesh2d makes; the shape's colour, texture and alpha_mode are then the material's to draw |
+| `primitive` | `Record<string, unknown>` | one of Bevy's 2D primitives in place of `shape`, its reflected fields over Bevy's default: { primitive: "Capsule2d", radius: 25, half_length: 25 }; a 2D shape given `inner` (the same shape's fields) is Bevy's Ring, or given `ring: thickness` its to_ring (raea-sys-mesh primitive_mesh). A Mesh2d's primitive child makes it. |
+| `name` | `string` | – |
+| `x` | `number` | – |
+| `y` | `number` | – |
+| `rotation` | `number` | radians, clockwise (as CSS rotate) |
+| `quat` | `Quat` | Bevy's rotation as it is, a quaternion [x, y, z, w] in Bevy's axes (y up, z toward the viewer), in place of `rotation`: a turn out of the frame's plane too, as a Sprite's Transform takes it (camera/2d_on_ui) |
+| `scale` | `number \| [number, number]` | 1 by default; [x, y] to stretch |
+| `z` | `number` | draw order among the 2D parts: higher draws over lower (0 by default) |
+| `opacity` | `number` | 0 to 1 (1 by default) |
+| `onClick` | `(e: Event3d) => void` | – |
+| `onPointerDown` | `(e: Event3d) => void` | – |
+| `onPointerUp` | `(e: Event3d) => void` | – |
+| `onPointerOver` | `(e: Event3d) => void` | – |
+| `onPointerOut` | `(e: Event3d) => void` | – |
+| `onPointerEnter` | `(e: Event3d) => void` | – |
+| `onPointerLeave` | `(e: Event3d) => void` | – |
+| `onPointerMove` | `(e: Event3d) => void` | – |
+| `onWheel` | `(e: Event3d) => void` | – |
+| `onDragStart` | `(e: Event3d) => void` | – |
+| `onDrag` | `(e: Event3d) => void` | – |
+| `onDragEnd` | `(e: Event3d) => void` | – |
+| `onDragEnter` | `(e: Event3d) => void` | – |
+| `onDragOver` | `(e: Event3d) => void` | – |
+| `onDragLeave` | `(e: Event3d) => void` | – |
+| `onDrop` | `(e: Event3d) => void` | – |
+
+### `SpriteImageMode`
+
+Bevy's SpriteImageMode, as its reflected value
+
+Bevy: `bevy_sprite::sprite::SpriteImageMode`.
+
+```ts
+type SpriteImageMode = | "Auto" | { Scale: "FillCenter" | "FillStart" | "FillEnd" | "FitCenter" | "FitStart" | "FitEnd" } | { Sliced: { border?: number | { min_inset: [number, number]; max_inset: [number, number] }; center_scale_mode?: SliceScaleMode; sides_scale_mode?: SliceScaleMode; max_corner_scale?: number } } | {…
+```
+
+### `SpriteProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `src` (required) | `string` | a picture in the media folder: staticFile("hero.png"), or a "render:NAME" image a camera or a <Compute> draws (a frame may switch it to another by name) |
+| `width` | `number` | size in px (the picture's, or one cell's, by default); one given, the other follows the picture's shape |
+| `height` | `number` | – |
+| `grid` | `[number, number]` | a sprite sheet: the picture is `[columns, rows]` cells of equal size, read left to right, top to bottom |
+| `atlasPick` | `number` | one picture of a built atlas (TextureAtlasBuilder's sources.handle gives it with its src): its index in the atlas's list |
+| `frame` | `number` | with `grid`: which cell shows (0 is the top left); animate it to play the sheet: frame={Math.floor(f / 3)} |
+| `flipX` | `boolean` | – |
+| `flipY` | `boolean` | – |
+| `color` | `string` | a tint multiplied over the picture (white by default) |
+| `tileX` | `boolean` | Bevy's SpriteImageMode::Tiled: the picture repeats across the sprite's width (tileX) or height (tileY) instead of stretching to it, a tile every `tileStretch` x the picture's size (1 by default): a floor, a fence, a wall. Animate width and height to show more or fewer tiles |
+| `tileY` | `boolean` | – |
+| `tileStretch` | `number` | – |
+| `image_mode` | `SpriteImageMode` | Bevy's SpriteImageMode, as its reflected value: "Auto" (stretched to the size), { Scale: "FillCenter" } (and FillStart, FillEnd, FitCenter, FitStart, FitEnd: the picture kept to its shape, cropped or fitted), { Sliced: TextureSlicer } (nine-slice: border a number of px or { min_inset: [x, y], max_inset: [x, y] }; center_scale_mode and sides_scale_mode "Stretch" or { Tile: { stretch_value } }; max_corner_scale) or { Tiled: { tile_x, tile_y, stretch_value } }. Not with tileX or tileY |
+| `sampler` | `SamplerSpec` | the picture's sampler (Bevy's load_with_settings: { filter, mipmap, wrap, anisotropy }), Bevy's default (linear) otherwise; { filter: "nearest" } is pixel art as Bevy's ImagePlugin::default_nearest() draws it |
+| `children` | `ReactNode` | your own <Material> as its child: Bevy's SpriteMaterial, extending the sprite's own material (the shader reads the sprite's picture, tint and alpha with bevy_sprite_render::sprite_mesh::functions), its uniforms per frame |
+| `name` | `string` | – |
+| `x` | `number` | – |
+| `y` | `number` | – |
+| `rotation` | `number` | radians, clockwise (as CSS rotate) |
+| `quat` | `Quat` | Bevy's rotation as it is, a quaternion [x, y, z, w] in Bevy's axes (y up, z toward the viewer), in place of `rotation`: a turn out of the frame's plane too, as a Sprite's Transform takes it (camera/2d_on_ui) |
+| `scale` | `number \| [number, number]` | 1 by default; [x, y] to stretch |
+| `z` | `number` | draw order among the 2D parts: higher draws over lower (0 by default) |
+| `opacity` | `number` | 0 to 1 (1 by default) |
+| `onClick` | `(e: Event3d) => void` | – |
+| `onPointerDown` | `(e: Event3d) => void` | – |
+| `onPointerUp` | `(e: Event3d) => void` | – |
+| `onPointerOver` | `(e: Event3d) => void` | – |
+| `onPointerOut` | `(e: Event3d) => void` | – |
+| `onPointerEnter` | `(e: Event3d) => void` | – |
+| `onPointerLeave` | `(e: Event3d) => void` | – |
+| `onPointerMove` | `(e: Event3d) => void` | – |
+| `onWheel` | `(e: Event3d) => void` | – |
+| `onDragStart` | `(e: Event3d) => void` | – |
+| `onDrag` | `(e: Event3d) => void` | – |
+| `onDragEnd` | `(e: Event3d) => void` | – |
+| `onDragEnter` | `(e: Event3d) => void` | – |
+| `onDragOver` | `(e: Event3d) => void` | – |
+| `onDragLeave` | `(e: Event3d) => void` | – |
+| `onDrop` | `(e: Event3d) => void` | – |
+
+### `VerticesProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `vertices` | `Vec2[]` | – |
+| `vertex_colors` | `(LinearRgba \| [number, number, number, number])[]` | – |
+| `ring` | `number` | – |
+| `inner` | `Record<string, unknown>` | – |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/state.md b/docs/manual/reference/sdk/state.md
new file mode 100644
index 00000000..7c30d02b
--- /dev/null
+++ b/docs/manual/reference/sdk/state.md
@@ -0,0 +1,352 @@
+---
+title: "raea/state"
+summary: "State machines stepped by frame, for game logic and workflows, typed so a wrong transition doesn't compile."
+order: 25
+sources: ["sdk/raea/src/state.ts"]
+---
+
+A game's logic in raea is a pure step: given the last state and this frame's input, return the next state. That
+makes a play-through repeatable, so the same input renders the same frames. `machine` defines a state machine whose
+states and transitions are checked by TypeScript: a transition to a state that doesn't exist fails to compile.
+`useGameState` and `useGameEvents` run a step function inside a composition.
+
+```ts
+import { machine } from "raea/state";
+
+type Player = { y: number; vy: number };
+type Env = { jump: boolean };
+
+const player = machine<Player, Env>()({
+ id: "player",
+ initial: "standing",
+ states: {
+ standing: { always: { to: "jumping", when: (_c, e) => e.jump } },
+ jumping: { always: { to: "standing", when: (c) => c.y <= 0 } },
+ },
+});
+```
+
+See [Your first game](../../start/first-game.md) for a whole game built on a step function.
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { firstDecider, inState, machine, replayDecider } from "raea/state"
+```
+
+`raea/state` exports 2 hooks, 6 functions, 1 value, 20 types. Bevy's counterpart: `bevy_state`. Source: [sdk/raea/src/state.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/state.ts).
+
+## Hooks
+
+### `useGameEvents`
+
+The frames, in order, at which `isEvent(before, after)` holds: `after` is the state `step` makes at frame f from
+`before`, the state at f - 1. It runs the same (kept) fold as useGameState through the composition's last frame,
+counted from the nearest enclosing Sequence, so sound can be cued to what happens in the game. While a person plays
+(live input) it runs only through this frame: what comes next hasn't been played yet. The list is read-only (frozen):
+the same one is handed out while nothing new happened, so copy it before changing it.
+
+```ts
+function useGameEvents<S>(initial: S, step: Step<S>, isEvent: (before: S, after: S) => boolean): number[]
+```
+
+### `useGameState`
+
+The game's state at this frame: `initial` at frame 0, then `step(state, input, g)` applied for each earlier frame g
+in order. Frames count from the nearest enclosing Sequence, so a game starts when its Sequence does.
+
+```ts
+function useGameState<S>(initial: S, step: Step<S>): S
+```
+
+## Functions
+
+### `inState`
+
+Whether `name` is active in the snapshot (the leaf or any state around it), as XState's `state.matches`.
+
+```ts
+function inState<N extends string>(snap: Snapshot<N>, name: N): boolean
+```
+
+### `machine`
+
+A machine for contexts of type C, stepped with an env of type E (a game's frame input and world, a workflow's facts).
+Curried so the state names are inferred from the definition while C and E are given:
+`machine<Player, Env>()({ id, initial, states })`. A transition to a state that doesn't exist, or a guard reading a
+field C lacks, fails to compile; what types can't hold (an initial that isn't a substate, unreachable states, dead
+ends) throws here, when the module loads.
+
+```ts
+function machine<C, E = unknown>(): <const N extends string, const K extends string = "sm">(config: MachineConfig<C, E, N, K>) => Machine<C, E, N, K>
+```
+
+### `replayDecider`
+
+A decider that replays recorded decisions: `log[machine][n]` is the edge chosen at that machine's step n (missing:
+wait). How a model's or a person's choices, taken outside the step, re-enter it exactly.
+
+```ts
+function replayDecider(log: Record<string, Record<number, number | { edge: number; evidence?: unknown; }>>, name?: string): Decider
+```
+
+### `stateOf`
+
+The active leaf of a snapshot (undefined before the first step).
+
+```ts
+function stateOf<N extends string>(snap: Snapshot<N>): N | undefined
+```
+
+### `stepAll`
+
+One frame for each entity of a list, each carrying its own machine (one per enemy), in order.
+
+```ts
+function stepAll<C, E, N extends string, K extends string>(m: Machine<C, E, N, K>, entities: readonly C[], env: E, opts?: readonly string[] | StepOptions): C[]
+```
+
+### `transitionOf`
+
+The transition a step took, read from two snapshots of one machine (null when none fired): how a trace that only
+sees states (a playtest over a game's pure fold) recovers the TransitionRecord a sink would have had, minus evidence.
+
+```ts
+function transitionOf(m: AnyMachine, before: Snapshot<string> | undefined, after: Snapshot<string>): TransitionRecord | null
+```
+
+## Values
+
+### `firstDecider`
+
+The default decider: the first candidate.
+
+## Types
+
+### `Action`
+
+An action: a pure function returning the new context (never a changed old one).
+
+```ts
+type Action = (ctx: C, env: E) => C
+```
+
+### `Actions`
+
+```ts
+type Actions = Action<C, E> | readonly Action<C, E>[]
+```
+
+### `Analysis`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `id` (required) | `string` | – |
+| `states` (required) | `{ name: N; parent: N \| null; depth: number; kind: "leaf" \| "compound" \| "final"; initia…` | – |
+| `edges` (required) | `Edge<N>[]` | – |
+| `reachable` (required) | `N[]` | states some sequence of transitions reaches from the initial state (guards assumed satisfiable) |
+| `unreachable` (required) | `N[]` | – |
+| `deadEnds` (required) | `N[]` | non-final leaves with no transition out (their own or an enclosing state's): once entered, never left |
+
+### `AnyMachine`
+
+```ts
+type AnyMachine = Machine<any, any, string, string>
+```
+
+### `ChoicePoint`
+
+A choice point as a decider sees it: which machine, where, and the candidates whose guards hold.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `machine` (required) | `string` | – |
+| `state` (required) | `string` | the state whose `choose` list this is, and the active leaf |
+| `leaf` (required) | `string` | – |
+| `n` (required) | `number` | the machine's step |
+| `candidates` (required) | `{ edge: number; to: string; description?: string }[]` | the candidates whose guards hold, in their order (each an edge of machine.edges) |
+| `ctx` (required) | `C` | – |
+| `env` (required) | `E` | – |
+
+### `Decider`
+
+Picks a transition at a choice point. Called inside the step, so it must answer synchronously: a model or a person
+is asked outside the step and their answer replayed (`replayDecider`). Deterministic deciders keep a fold pure.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` (required) | `string` | – |
+| `decide` (required) | `(point: ChoicePoint<unknown, unknown>) => Decision` | – |
+
+### `Decision`
+
+What a decider answers: the edge it picks (one of the candidates' `edge`), or null to wait this step; `evidence` is
+whatever supports the choice (a bot's score, a model's probabilities), recorded beside the transition.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `edge` (required) | `number \| null` | – |
+| `evidence` | `unknown` | – |
+
+### `Edge`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `index` (required) | `number` | – |
+| `from` (required) | `N` | – |
+| `to` (required) | `N` | – |
+| `kind` (required) | `"always" \| "after" \| "on" \| "done" \| "choose"` | – |
+| `event` | `string` | the event an `on` edge waits for |
+| `after` (required) | `number` | steps in `from` before it may fire |
+| `guarded` (required) | `boolean` | – |
+| `description` | `string` | – |
+
+### `Guard`
+
+A trigger: polled each step while its state is active (the context, and whatever the step passes as env).
+
+```ts
+type Guard = (ctx: C, env: E) => boolean
+```
+
+### `Machine`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `id` (required) | `string` | – |
+| `key` (required) | `K` | – |
+| `states` (required) | `readonly N[]` | every state, in definition order (outer before inner) |
+| `edges` (required) | `readonly Edge<N>[]` | every transition, in the order they're checked within a state |
+| `start` (required) | `() => Snapshot<N>` | a snapshot before the first step: the first step enters the initial states (running their entry actions) |
+| `step` (required) | `(ctx: C, env: E, opts?: readonly string[] \| StepOptions \| undefined) => C` | One step: poll the active states' transitions (innermost first, then outward; within a state `on` for this step's events, then `always`, `after`, `onDone`, then the `choose` candidates for the decider), take the first that fires (at most one a step), then run the active states' tick actions. Returns the new context with its snapshot; the old one is unchanged. The third argument is this step's events, or StepOptions. |
+| `state` (required) | `(ctx: C) => N` | the active leaf (the initial leaf before the first step) |
+| `path` (required) | `(ctx: C) => N[]` | the active states, outermost first |
+| `is` (required) | `(ctx: C, name: N) => boolean` | whether `name` is active (the leaf or a state around it) |
+| `steps` (required) | `(ctx: C, name?: N \| undefined) => number` | steps since `name` (the leaf by default) was entered; -1 when it isn't active |
+| `entered` (required) | `(before: C, after: C, name?: N \| undefined) => boolean` | whether the step from `before` to `after` entered `name` (any state when omitted) |
+| `watch` (required) | `(ctx: C) => Watched` | this machine's state in `ctx`, for a trace |
+| `analyze` (required) | `() => Analysis<N>` | the static analysis machine checks read |
+
+### `MachineConfig`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `id` (required) | `string` | the machine's name in traces and reports |
+| `initial` (required) | `NoInfer<N>` | – |
+| `states` (required) | `{ [S in N]?: StateConfig<C, E, N> }` | – |
+| `key` | `K` | the context's field holding the snapshot ("sm") |
+| `strict` | `boolean` | refuse unreachable states and non-final dead ends when the machine is built (true) |
+
+### `Playtest`
+
+What a playtester needs from a game, exported beside the view as `export const playtest: Playtest<S> = {...}`
+(sdk/react/docs/playtest.md). Optional: a game without one is played from pixels and events alone. Everything here is
+pure, so a bot steps the game headlessly, restores any state it has seen (states are values) and searches from it;
+whatever it plays is an input timeline `raea render --input` turns back into the same frames.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `initial` (required) | `S` | the state at frame 0, as useGameState is given it |
+| `step` (required) | `Step<S>` | the fold useGameState is given: the same function, so a bot plays the game the render shows |
+| `actions` (required) | `string[][]` | the key chords worth trying ([] is "nothing held"); a bot's moves are these, each held some frames |
+| `observe` | `(state: S, frame: number) => O` | what a player could know at this frame, as plain JSON (positions, lives, what's near): a model reads it |
+| `progress` | `(state: S, frame: number) => number` | how far toward the goal, 0..1: search follows it, and "stuck" means it stopped rising |
+| `outcome` | `(state: S, frame: number) => "won" \| "lost" \| null` | "won" when the goal is reached, "lost" on game over, null while play goes on |
+| `events` | `Record<string, (before: S, after: S) => boolean>` | named moments as useGameEvents takes them (a death, a coin): counted, placed and rendered for the judge |
+| `machines` | `(state: S) => Record<string, Watched>` | every state machine in the state, by entity name (`{ player: player.watch(s.player), flow: flow.watch(s) }`): the trace records each one's state and transitions, and the machine checks (coverage, softlocks, unreachable states, reached) read them (sdk/react/docs/state-machines.md) |
+
+### `Snapshot`
+
+The machine's runtime state, kept in the context it drives. `path` is the active states outermost first ([] before
+the first step); `at[i]` is the step on which path[i] was entered; `n` counts the machine's steps from 0; `e` is the
+edge the last transition took (an index into machine.edges); `by` names the decider that chose it (absent: a
+guard); `hist` is each history state's last substate.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `path` (required) | `N[]` | – |
+| `at` (required) | `number[]` | – |
+| `n` (required) | `number` | – |
+| `e` (required) | `number` | – |
+| `by` | `string` | – |
+| `hist` | `{ [S in N]?: N }` | – |
+
+### `StateConfig`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `entry` | `Actions<C, E>` | run when the state is entered (outer states before inner ones) |
+| `exit` | `Actions<C, E>` | run when the state is left (inner states before outer ones) |
+| `tick` | `Actions<C, E>` | run every step the state is active, after this step's transition (outer before inner, the entry step too) |
+| `always` | `Transitions<C, E, N>` | triggers polled every step, in order: the first whose guard holds fires (XState's eventless `always`) |
+| `after` | `{ readonly [steps: number]: Transitions<C, E, N> }` | delays in steps: `after: { 30: "fall" }` fires once the state has been active 30 steps (and its guard holds) |
+| `on` | `{ readonly [event: string]: Transitions<C, E, N> }` | named events the step is given this time (input edges: games.ts keyEdges gives "keydown:ArrowUp") |
+| `choose` | `Transitions<C, E, N>` | a choice point: of these candidates, those whose guards hold go to the step's Decider, which picks one or waits (no decider: firstDecider takes the first). Polled after `always` and `after`. |
+| `initial` | `NoInfer<N>` | a compound state's first substate |
+| `states` | `{ [K in N]?: StateConfig<C, E, N> }` | substates: names are unique across the whole machine, so `to: "run"` names one state wherever it is |
+| `history` | `"shallow" \| "deep"` | re-entering this compound state resumes the substate it left ("shallow"), or that substate's own (deep) |
+| `onDone` | `Transitions<C, E, N>` | a compound state's transition taken when its active substate is final |
+| `type` | `"final"` | a final state: no transitions out (a dead enemy, the game won, the work shipped) |
+| `description` | `string` | – |
+
+### `StateName`
+
+The state names of a machine.
+
+```ts
+type StateName = M extends Machine<any, any, infer N, any> ? N : never
+```
+
+### `StepOptions`
+
+What a step may be given besides the context and env.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `events` | `readonly string[]` | named events this step (an `on` edge waits for one) |
+| `decide` | `Decider` | picks at choice points (default firstDecider) |
+| `trace` | `(r: TransitionRecord) => void` | receives every transition this step takes, as a row |
+
+### `TransitionConfig`
+
+A transition: where to go (`to`, or XState's `target`), when (`when`, or XState's `guard`; none: always), after how
+many steps in the state at least (`after`), and what to do on the way (`actions`).
+
+```ts
+type TransitionConfig = Target<N> & When<C, E> & { /** steps in the state before this transition may fire (0) */ after?: number; actions?: Actions<C, E>; /** what the transition means: a decider reads it (a model's option description), reports show it */ description?: string; }
+```
+
+### `TransitionRecord`
+
+One transition as a row: what a trace keeps and rdb loads (step, machine, from, to, edge, decider, evidence). `from` is
+null for the first step's entry into the initial states.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `machine` (required) | `string` | – |
+| `step` (required) | `number` | – |
+| `from` (required) | `string \| null` | – |
+| `to` (required) | `string` | – |
+| `edge` (required) | `number` | – |
+| `kind` (required) | `Edge["kind"] \| "start"` | – |
+| `by` (required) | `string` | "guard" for a trigger, "start" for the first entry, else the decider's name |
+| `evidence` | `unknown` | – |
+
+### `Transitions`
+
+A target's name alone, one transition, or several checked in order.
+
+```ts
+type Transitions = | NoInfer<N> | TransitionConfig<C, E, N> | readonly (NoInfer<N> | TransitionConfig<C, E, N>)[]
+```
+
+### `Watched`
+
+A machine's state in some context, for a trace (`Playtest.machines`).
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `machine` (required) | `AnyMachine` | – |
+| `snapshot` (required) | `Snapshot` | – |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/text.md b/docs/manual/reference/sdk/text.md
new file mode 100644
index 00000000..bdc7331b
--- /dev/null
+++ b/docs/manual/reference/sdk/text.md
@@ -0,0 +1,195 @@
+---
+title: "raea/text"
+summary: "Text in the 3D world, fonts, and time anchored to the words said."
+order: 44
+sources: ["sdk/raea/src/text.ts"]
+---
+
+Two kinds of text live here. `<RichText>` and `<Text3D>` put text into a 3D scene, each glyph a lit entity that the
+same named moves as 2D can animate glyph by glyph. `word()`, `findPhrase` and `useWords` anchor time to speech: the
+frame a phrase is said, from the transcript [`raea cut`](../cli/cut.md) writes, wherever the cut puts it.
+
+```tsx
+import { Sequence } from "raea";
+import { word } from "raea/text";
+
+function Callout() {
+ const at = word("forty countries");
+ return (
+ <Sequence from={at} durationInFrames={60}>
+ <h1 style={{ fontSize: 96, color: "#fff" }}>40 countries</h1>
+ </Sequence>
+ );
+}
+```
+
+See [Cutting by words](../../guides/words.md).
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { findPhrase, loadFont, RichText, Span } from "raea/text"
+```
+
+`raea/text` exports 3 components, 1 hook, 3 functions, 6 types. Bevy's counterpart: `bevy_text`. Source: [sdk/raea/src/text.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/text.ts).
+
+## Components
+
+### `RichText`
+
+Text in the 3D world: every glyph a real lit, shaded entity (bevy_rich_text3d's mesh over its glyph atlas, a
+StandardMaterial of its own), laid out as one line of shaped text (kerning, spans of other fonts and sizes) and
+then moved, turned, scaled, recoloured, faded and revealed glyph by glyph with the motion code 2D uses: the named
+moves staggered (`enter="rise" each={2}`), a typewriter's `reveal`, or a `glyph` function of the frame.
+
+ <RichText name="title" size={0.6} enter="pop" each={3}>Hello <Span color="#ffd400" weight={900}>world</Span></RichText>
+ <RichText glyph={(g) => ({ position: [0, Math.sin(frame / 6 + g.index) * 0.05, 0] })}>WAVE</RichText>
+
+Takes [`RichTextProps`](3d.md#richtextprops)'s props.
+
+### `Span`
+
+A run of a <RichText>'s text in its own font, weight, size or colour. Only inside a <RichText>.
+
+Takes [`SpanProps`](3d.md#spanprops)'s props.
+
+### `Text3D`
+
+Solid 3D letters (Manifold's text3d), as a Mesh's geometry: `<Mesh><Text3D size={0.6}>SALE</Text3D>...</Mesh>`.
+
+Takes [`Text3DProps`](3d.md#text3dprops)'s props.
+
+## Hooks
+
+### `useWords`
+
+Every word heard on the timeline, in the frames of the nearest enclosing Sequence.
+
+```ts
+function useWords(): TimelineWord[]
+```
+
+## Functions
+
+### `findPhrase`
+
+Finds the composition frame where `phrase` is said in a transcript.
+
+```ts
+function findPhrase(words: readonly HeardWord[], phrase: string, options?: WordOptions): number
+```
+
+### `loadFont`
+
+The page gets Google Fonts' `family` ("Inter", "Space Grotesk"); `fontFamily` is the name to style text with.
+
+```ts
+function loadFont(family: string): { fontFamily: string; }
+```
+
+### `word`
+
+The composition frame where `phrase` is said. Call it while rendering (it reads the Clock).
+
+```ts
+function word(phrase: string, options?: WordOptions): number
+```
+
+## Types
+
+### `GlyphInfo`
+
+What a glyph is, for a <RichText>'s `glyph` function.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `index` (required) | `number` | its place among the drawn glyphs (spaces aren't glyphs), from 0 |
+| `count` (required) | `number` | how many glyphs the block has |
+| `char` (required) | `string` | – |
+| `word` (required) | `number` | its word's place among the words, from 0, and how many there are |
+| `words` (required) | `number` | – |
+| `inWord` (required) | `number` | its place in its word, and the word's glyph count |
+| `wordLength` (required) | `number` | – |
+| `line` (required) | `number` | its line (by the newlines in the text), from 0 |
+| `span` (required) | `number` | its run: the <Span> it's in (0 for text outside any, counted in order) |
+
+### `GlyphStyle`
+
+A glyph's motion this frame, about its own centre, in the block's space: added to (position, rotation),
+multiplied into (scale, opacity) or replacing (color, visible) what the block's moves give it.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `position` | `Vec3` | metres, from its place in the block |
+| `rotation` | `Vec3` | radians, XYZ |
+| `scale` | `number \| Vec3` | – |
+| `color` | `string` | – |
+| `opacity` | `number` | – |
+| `visible` | `boolean` | – |
+
+### `RichTextProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` | `string` | what it's called across frames, and its glyphs' names over world.* (`${name}:${index}`) |
+| `pass` | `string` | the composition pass it draws in ("scene" by default): a frame-wide effect told to skip a pass (<Look skip>, <Outline skip>, <Bloom skip>, <Grade skip>) leaves its pixels as drawn, and <Look passes> gives one its own paint; a piece names at most three passes besides "scene"; keyed per frame |
+| `position` | `Vec3` | – |
+| `rotation` | `Vec3` | – |
+| `scale` | `number \| Vec3` | – |
+| `size` | `number` | the em in metres (0.5 by default) |
+| `font` | `string` | – |
+| `weight` | `number` | – |
+| `italic` | `boolean` | – |
+| `color` | `string` | each glyph's colour unless its <Span> gives one |
+| `align` | `"left" \| "center" \| "right"` | where the origin is: the left edge, the middle (default) or the right edge of the lines; the block's middle vertically |
+| `lineHeight` | `number` | times the em (1.2 by default) |
+| `maxWidth` | `number` | wrapped at this width in metres (no wrapping by default) |
+| `roughness` | `number` | – |
+| `metalness` | `number` | – |
+| `emissive` | `string` | – |
+| `emissiveIntensity` | `number` | – |
+| `unlit` | `boolean` | – |
+| `castShadow` | `boolean` | letter-shaped shadows (true by default) |
+| `receiveShadow` | `boolean` | – |
+| `layers` | `number[]` | – |
+| `enter` | `MoveLike` | each glyph's (or word's) entrance: a move's name, a move or several (rise, pop, slam, slide, fade... the 2D ones, their px read at 100 an em, their degrees as degrees), `each` frames apart from `at` |
+| `each` | `number` | frames between one glyph's (or word's) entrance and the next (2 by default) |
+| `by` | `"letter" \| "word"` | the entrance and exit staggered by letter (default) or by word |
+| `at` | `number` | – |
+| `exit` | `MoveLike` | – |
+| `exitAt` | `number` | – |
+| `exitEach` | `number` | frames between exits (0: together) |
+| `reveal` | `number` | how many glyphs are shown, a typewriter's count: the next one fades in over its fraction |
+| `glyph` | `(g: GlyphInfo) => GlyphStyle` | each glyph's own motion this frame, from anything the frame gives (useCurrentFrame, spring, interpolate) |
+| `children` | `ReactNode` | – |
+
+### `SpanProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `children` | `ReactNode` | – |
+| `font` | `string` | a family (raea's bundled faces: Inter, Montserrat, Oswald, Playfair Display...; or one on this machine) |
+| `weight` | `number` | – |
+| `italic` | `boolean` | – |
+| `size` | `number` | times the block's size |
+| `color` | `string` | – |
+
+### `Text3DProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `children` | `string` | the words, extruded |
+| `text` | `string` | – |
+| `size` | `number` | letter height in scene units (default 0.5) |
+| `depth` | `number` | extrusion depth (default 0.2) |
+| `font` | `string` | – |
+| `weight` | `number` | – |
+
+### `WordOptions`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `occurrence` | `number` | which time the phrase is said, from 1 |
+| `edge` | `"start" \| "end"` | "start": the phrase's first frame; "end": the frame after its last word ends |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/time.md b/docs/manual/reference/sdk/time.md
new file mode 100644
index 00000000..2b525cfc
--- /dev/null
+++ b/docs/manual/reference/sdk/time.md
@@ -0,0 +1,147 @@
+---
+title: "raea/time"
+summary: "The frame being drawn and the composition's time: useCurrentFrame, useVideoConfig and the Clock."
+order: 22
+sources: ["sdk/raea/src/time.ts"]
+---
+
+Time in raea is frames. `useCurrentFrame()` is the frame being drawn, counted from the start of the nearest
+`<Sequence>`; it's Bevy's `Time<Virtual>` stepped at the composition's frame rate, so a render and a live play of the
+same input draw the same frames. `useVideoConfig()` gives the composition's size, frame rate and length.
+`<Clock>` is what steps them; the renderer and the app put one around every composition.
+
+```tsx
+import { useCurrentFrame, useVideoConfig } from "raea/time";
+
+function Progress() {
+ const frame = useCurrentFrame();
+ const { durationInFrames, width } = useVideoConfig();
+ return <div style={{ width: (frame / durationInFrames) * width, height: 8, background: "#fff" }} />;
+}
+```
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { Clock, useCurrentFrame, useLocalTime, useVideoConfig } from "raea/time"
+```
+
+`raea/time` exports 1 component, 3 hooks, 7 types. Bevy's counterpart: `bevy_time`. Source: [sdk/raea/src/time.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/time.ts).
+
+## Components
+
+### `Clock`
+
+What time a composition is at: the frame, frame rate, size and length its hooks read, and its words, perception
+and input. The renderer, the live view and tests put one around every composition; a composition never needs its
+own.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `frame` (required) | `number` | – |
+| `fps` (required) | `number` | – |
+| `width` (required) | `number` | – |
+| `height` (required) | `number` | – |
+| `durationInFrames` (required) | `number` | – |
+| `id` | `string` | – |
+| `defaultProps` | `Record<string, unknown>` | – |
+| `words` | `readonly TimelineWord[]` | – |
+| `perception` | `Perception` | – |
+| `input` | `InputTimeline` | – |
+| `children` | `ReactNode` | – |
+
+## Hooks
+
+### `useCurrentFrame`
+
+The frame being rendered, counted from the start of the nearest enclosing Sequence.
+
+```ts
+function useCurrentFrame(): number
+```
+
+### `useLocalTime`
+
+The time where it's called: the nearest Sequence's (its local frame, where it starts, and the size it gives its
+children), or the Clock's outside any. `caller` names the hook in errors. The hook under useCurrentFrame, for components of your own that need more
+than the frame.
+
+```ts
+function useLocalTime(caller: string): LocalTime
+```
+
+### `useVideoConfig`
+
+The settings of the composition being rendered (a Sequence's width and height win inside it).
+
+```ts
+function useVideoConfig(): VideoConfig
+```
+
+## Types
+
+### `ClockProps`
+
+The props of [`Clock`](#clock), tabled there.
+
+### `FrameInput`
+
+One frame's input for a game.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `keys` (required) | `string[]` | the keys held (KeyboardEvent.key names: "ArrowLeft", "a", " ") |
+| `pointer` | `{ x: number; y: number; down: boolean }` | the primary pointer in composition px, and whether it's pressed |
+| `buttons` | `string[]` | the mouse buttons held besides the primary one: "Right", "Middle", "Back", "Forward" (Bevy's MouseButton names) |
+| `wheel` | `{ x: number; y: number }` | the wheel turned this frame, in CSS px, down and right positive (the DOM's deltaX and deltaY) |
+| `gamepads` | `{ buttons: string[]; axes: Record<string, number> }[]` | each connected gamepad: the buttons held and the sticks' and triggers' axes, by Bevy's GamepadButton and GamepadAxis names ("South", "DPadUp", "RightTrigger2"; "LeftStickX" -1..1, "LeftZ") |
+| `touches` | `{ id: number; x: number; y: number }[]` | the fingers down, in composition px |
+
+### `InputTimeline`
+
+Recorded input by composition frame; frames without an entry had no input.
+
+```ts
+type InputTimeline = Record<number, Partial<FrameInput> | undefined>
+```
+
+### `LocalTime`
+
+The local time a subtree sees: its own frame, and the composition frame its frame 0 falls on.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `frame` (required) | `number` | – |
+| `origin` (required) | `number` | – |
+| `width` (required) | `number` | width and height a Sequence overrides for its children |
+| `height` (required) | `number` | – |
+
+### `Perception`
+
+What perception saw at this frame: the largest face, and the platform's safe area (composition px).
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `face` | `Rect` | – |
+| `safe` | `{ top?: number; bottom?: number }` | – |
+
+### `TimelineWord`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `text` (required) | `string` | – |
+| `from` (required) | `number` | first frame of the word |
+| `to` (required) | `number` | frame after the word ends (exclusive) |
+
+### `VideoConfig`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `id` (required) | `string` | – |
+| `width` (required) | `number` | – |
+| `height` (required) | `number` | – |
+| `fps` (required) | `number` | – |
+| `durationInFrames` (required) | `number` | – |
+| `defaultProps` (required) | `Record<string, unknown>` | – |
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/transform.md b/docs/manual/reference/sdk/transform.md
new file mode 100644
index 00000000..87dca296
--- /dev/null
+++ b/docs/manual/reference/sdk/transform.md
@@ -0,0 +1,106 @@
+---
+title: "raea/transform"
+summary: "Where things are: Bevy's Transform and Quat, and nesting."
+order: 67
+sources: ["sdk/raea/src/transform.ts"]
+---
+
+`Transform` and `Quat` are Bevy's, with Bevy's methods: `Transform.fromXyz(...)`, `.lookingAt(...)`,
+`.withRotation(...)`, `Quat.fromEuler(...)` and the rest. Every 3D component takes a `transform`, and children of an
+entity are placed relative to it.
+
+```ts
+import { Quat, Transform } from "raea/transform";
+
+const camera = Transform.fromXyz(0, 1.6, 5).lookingAt([0, 0.5, 0]);
+const turned = Transform.IDENTITY.withRotation(Quat.fromEuler("XYZ", 0, Math.PI / 4, 0));
+```
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { eulerOf, Quat, surfaceTurn, Transform } from "raea/transform"
+```
+
+`raea/transform` exports 2 functions, 2 values, 4 types. Bevy's counterpart: `bevy_transform`. Source: [sdk/raea/src/transform.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/transform.ts).
+
+## Functions
+
+### `eulerOf`
+
+A part's Euler angles of a quaternion: a composition's `rotation` [x, y, z] is composed as three.js composes it,
+Quat::from_euler(EulerRot::XYZ, x, y, z) (runtime/scene `local`; the YXZ rot_x/rot_y/rot_z of
+raea-render's rows are read back from the world matrix), so this is that order's inverse.
+
+```ts
+function eulerOf(q: [number, number, number, number]): Vec3
+```
+
+Used in: [3d/3d_scene](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/3d_scene.tsx), [shader_advanced/compute_mesh](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/compute_mesh.tsx), [shader_advanced/custom_render_phase](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader_advanced/custom_render_phase.tsx).
+
+### `surfaceTurn`
+
+The turn that takes +y to `normal`, with the picture's top (a decal's -z) toward world up on a wall, toward -z on a
+floor, turned `spin` about the normal: a quaternion [x, y, z, w].
+
+```ts
+function surfaceTurn(normal: Vec3, spin?: number): [number, number, number, number]
+```
+
+## Values
+
+### `Quat`
+
+A rotation as glam's Quat: [x, y, z, w].
+glam's Quat constructors, by their Rust names in camelCase.
+
+Used in: [ui/render_ui_to_texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/render_ui_to_texture.tsx), [3d/3d_shapes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/3d_shapes.tsx), [3d/texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/texture.tsx), [3d/shadow_caster_receiver](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/shadow_caster_receiver.tsx), [3d/split_screen](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/split_screen.tsx), [3d/spotlight](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/spotlight.tsx), [3d/mesh_ray_cast](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/mesh_ray_cast.tsx), [3d/3d_scene](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/3d_scene.tsx), and 24 more.
+
+### `Transform`
+
+Bevy's Transform: the component's handle for a program (`with(Transform, Transform.fromXyz(1, 0, 0))`) and its
+builders for a scene (`<Mesh3d transform={Transform.fromXyz(0, 1, 0)}>`).
+
+Used in: [ui/render_ui_to_texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/render_ui_to_texture.tsx), [ui/widgets/viewport_node](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/viewport_node.tsx), [3d/fog_volumes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/fog_volumes.tsx), [3d/fog](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/fog.tsx), [3d/vertex_colors](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/vertex_colors.tsx), [3d/rotate_environment_map](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/rotate_environment_map.tsx), [3d/transparency_3d](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/transparency_3d.tsx), [3d/spherical_area_lights](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/spherical_area_lights.tsx), and 72 more.
+
+## Types
+
+### `EulerRot`
+
+glam's EulerRot, the intrinsic orders: "YXZ" turns about Y, then the turned X, then the turned Z.
+
+```ts
+type EulerRot = "XYZ" | "XZY" | "YXZ" | "YZX" | "ZXY" | "ZYX"
+```
+
+### `TransformBuilt`
+
+A Transform built with Bevy's builders: each returns a new one.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `withTranslation` (required) | `(v: Vec3) => TransformBuilt` | – |
+| `withRotation` (required) | `(q: Quat) => TransformBuilt` | – |
+| `withScale` (required) | `(s: number \| Vec3) => TransformBuilt` | – |
+| `lookingAt` (required) | `(target: Vec3, up?: Vec3 \| undefined) => TransformBuilt` | – |
+| `translation` (required) | `Vec3` | – |
+| `rotation` (required) | `Quat` | – |
+| `scale` (required) | `Vec3` | – |
+
+### `TransformValue`
+
+A Transform's value, as Bevy reflects it.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `translation` | `Vec3` | – |
+| `rotation` | `Quat` | – |
+| `scale` | `Vec3` | – |
+
+### `Vec3`
+
+```ts
+type Vec3 = [number, number, number]
+```
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/ui.md b/docs/manual/reference/sdk/ui.md
new file mode 100644
index 00000000..a5d552f0
--- /dev/null
+++ b/docs/manual/reference/sdk/ui.md
@@ -0,0 +1,1057 @@
+---
+title: "raea/ui"
+summary: "bevy_ui: Node and its layout fields, Text, images, scrolling, gradients and units."
+order: 83
+sources: ["sdk/raea/src/ui.ts", "sdk/render/src/bevy3d/ui.tsx"]
+---
+
+`raea/ui` is bevy_ui in TSX. `<Node>` takes Bevy's layout fields as props (`width`, `flex_direction`,
+`justify_content`, `padding` and the rest, with Bevy's defaults), and `px`, `percent`, `vw` and the other units build
+Bevy's `Val`. `<Text>` and `<TextSpan>` are Bevy's text; `<Text2d>` is text in the 2D world. Plain HTML elements with
+CSS work too; these components are for matching Bevy exactly.
+
+```tsx
+import { staticFile } from "raea";
+import { Srgba } from "raea/color";
+import { Node, Text, UiRect, percent, px } from "raea/ui";
+
+const Panel = () => (
+ <Node width={percent(100)} height={percent(100)} align_items="Center" justify_content="Center" flex_direction="Column">
+ <Node width={px(250)} height={px(250)} margin={UiRect.bottom(px(15))} background_color={new Srgba(0.92, 0.14, 0.05)} />
+ <Text font={staticFile("fonts/FiraSans-Bold.ttf")} font_size={{ Px: 33 }} color={new Srgba(0.9, 0.9, 0.9)}>Hello</Text>
+ </Node>
+);
+```
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { AbsoluteFill, ACTION_KEY, actionsIn, AngularColorStop } from "raea/ui"
+```
+
+`raea/ui` exports 20 components, 1 hook, 12 functions, 30 values, 37 types. Bevy's counterpart: `bevy_ui; drawn by Blitz, blitz-bevy.feature B5`. Source: [sdk/raea/src/ui.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/ui.ts).
+
+## Components
+
+### `AbsoluteFill`
+
+A box over the whole of its parent, laid out as a flex column; `style` is merged over that.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `style` | `CSSProperties` | – |
+| `className` | `string` | – |
+| `children` | `ReactNode` | – |
+
+### `BoxShadowSamples`
+
+bevy_ui_render's BoxShadowSamples: the steps each shadow's blur is summed in down its height (4 by default). Bevy sets
+it on a UI camera; here it wraps the UI that camera draws.
+
+Bevy: `bevy_ui_render::BoxShadowSamples`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `samples` (required) | `number` | – |
+| `children` | `ReactNode` | – |
+
+Used in: [ui/styling/box_shadow](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/box_shadow.tsx).
+
+### `EditableText`
+
+A text input's text, its caret drawn while it has focus.
+
+Bevy: `bevy_text::EditableText`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `children` | `string` | the text it starts with (EditableText::new) |
+| `visible_lines` | `number \| null` | visible_lines: its height in lines (1 by default; null leaves the height to the layout) |
+| `visible_width` | `number \| null` | visible_width: its width in "0"s (None by default: the width it's given) |
+| `allow_newlines` | `boolean` | allow_newlines (false by default): Enter adds a line, under input |
+| `max_characters` | `number \| null` | max_characters (None by default): the most characters typing can make it hold, under input |
+| `filter` | `(c: string) => boolean` | EditableTextFilter: the characters typing may add (each tested alone), under input |
+| `read_write_mode` | `"Editable" \| "ReadOnly" \| "Static"` | TextReadWriteMode ("Editable" by default): ReadOnly takes no edits, under input; Static draws no caret either |
+| `cursor_width` | `number` | cursor_width: the caret's width as a share of the font size (0.2 by default) |
+| `cursor_blink_period` | `number` | cursor_blink_period in seconds (1 by default) |
+| `cursor_style` | `TextCursorStyle` | TextCursorStyle |
+| `auto_focus` | `boolean` | AutoFocus: it has the input focus, so its caret is drawn |
+| `justify` | `TextProps["justify"]` | TextLayout's justify and linebreak |
+| `linebreak` | `TextProps["linebreak"]` | – |
+
+Also takes the props of [`NodeProps`](#nodeprops); `PickProps` (`popover`, `onClick`, `onPointerDown`, `onPointerUp`, `onPointerOver`, `onPointerOut`, `onPointerEnter`, `onPointerLeave`, `onPointerMove`); [`TextStyleProps`](#textstyleprops).
+
+Used in: [ui/text/multiline_text_input](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/multiline_text_input.tsx), [ui/text/multiple_text_inputs](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/multiple_text_inputs.tsx), [ui/text/editable_text_filter](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/editable_text_filter.tsx), [ui/text/ime_support](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/ime_support.tsx), [ui/text/text_input](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/text_input.tsx), [ui/widgets/virtual_keyboard](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/virtual_keyboard.tsx).
+
+### `GhostNode`
+
+bevy_ui's GhostNode: no box of its own, its children laid out as its parent's (CSS display: contents), each one a
+root when it is at the top.
+
+Bevy: `bevy_ui::experimental::GhostNode`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `children` | `ReactNode` | – |
+
+Used in: [ui/layout/ghost_nodes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/ghost_nodes.tsx).
+
+### `GlobalUiDebugOptions`
+
+bevy_ui's GlobalUiDebugOptions: the debug overlay for every node inside that has no UiDebugOptions of its own
+(a node's `ui_debug`).
+
+Bevy: `bevy_ui_render::GlobalUiDebugOptions`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `children` | `ReactNode` | – |
+
+Also takes the props of [`UiDebugOptions`](#uidebugoptions).
+
+Used in: [ui/images/image_node_resizing](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node_resizing.tsx).
+
+### `ImageNode`
+
+bevy_ui's ImageNode: a Node showing a picture stretched over its content box (inside its padding and border),
+sized by the picture when its width or height is auto, as bevy_ui's ImageNodeSize measures it. No children (an
+<img>).
+
+Bevy: `bevy_ui::widget::image::ImageNode`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `image` (required) | `string \| { path: string; sampler: SamplerSpec }` | the picture: staticFile("branding/icon.png"), or one with its own sampler ({ path, sampler: { filter: "nearest" } }, Bevy's load_with_settings) |
+| `color` | `Srgba` | its tint: white (none) by default; only white or a grey multiplies here yet (a picture's brightness) |
+| `flip_x` | `boolean` | Bevy: Whether the image should be flipped along its x-axis. |
+| `flip_y` | `boolean` | Bevy: Whether the image should be flipped along its y-axis. |
+| `texture_atlas` | `{ layout: TextureAtlasLayout; index: number }` | TextureAtlas: the one cell of a sheet laid out by a TextureAtlasLayout to draw (the picture is the sheet) |
+| `image_mode` | `"Auto" \| "Stretch" \| { Sliced: TextureSlicer }` | NodeImageMode: "Auto" (the default) sizes the node by the picture and draws it contained in the content box, its aspect kept; "Stretch" gives the node no size of its own and stretches the picture over its content box; Sliced cuts the picture in nine by a TextureSlicer (its corners kept, its sides and centre stretched or tiled), drawn as CSS border-image with bevy_ui's scale; a sliced ImageNode holds children |
+
+Also takes the props of [`NodeProps`](#nodeprops); `PickProps` (`popover`, `onClick`, `onPointerDown`, `onPointerUp`, `onPointerOver`, `onPointerOut`, `onPointerEnter`, `onPointerLeave`, `onPointerMove`).
+
+Used in: [ui/images/image_node](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node.tsx), [ui/images/ui_texture_slice_flip_and_tile](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_slice_flip_and_tile.tsx), [ui/images/image_node_resizing](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node_resizing.tsx), [ui/images/ui_texture_atlas_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas_slice.tsx), [ui/images/ui_texture_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_slice.tsx), [ui/images/ui_texture_atlas](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas.tsx), [ui/ui_transform](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/ui_transform.tsx), [ui/scroll_and_overflow/overflow](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/overflow.tsx), and 5 more.
+
+### `ImagePlugin`
+
+bevy_image's ImagePlugin: its default_sampler for every picture drawn inside it (Linear by default;
+ImagePlugin::default_nearest() is default_sampler="Nearest", for pixel art).
+
+Bevy: `bevy_image::ImagePlugin`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `default_sampler` | `"Linear" \| "Nearest"` | Bevy: The default image sampler to use when `ImageSampler` is set to `Default`. |
+| `children` | `ReactNode` | – |
+
+Used in: [ui/images/ui_texture_atlas](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas.tsx).
+
+### `InlineImage`
+
+bevy_ui's InlineImage: a picture in a <Text>'s line, as an inline box on its baseline (bevy_text's parley lays it
+out so, and Blitz's parley here), `width` and `height` px (the other by its aspect, or its own size), tinted by
+`color` (each pixel times it: the picture multiplied over the tint, its own alpha the mask).
+
+Bevy: `bevy_ui::widget::InlineImage`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `image` (required) | `string` | Bevy: Handle to the texture. |
+| `color` | `Color` | Bevy: The tint color used to draw the image. |
+| `width` | `number` | Bevy: Set a fixed width in logical pixels for the image's inline box target. |
+| `height` | `number` | Bevy: Set a fixed height in logical pixels for the image's inline box target. |
+
+Used in: [ui/text/inline_image](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/inline_image.tsx).
+
+### `MaterialNode`
+
+A node its own fragment shader draws (MaterialNode(handle) with a UiMaterial asset in Bevy).
+
+Bevy: `bevy_ui_render::ui_material::MaterialNode`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `fragment` (required) | `string` | the fragment shader's file, as UiMaterial::fragment_shader names one: staticFile("shaders/x.wesl") |
+| `uniforms` | `Record<string, Uniform \| Record<string, Uniform>>` | each `var<uniform>` the shader declares, by name: a number, [x, y], [x, y, z], [x, y, z, w] (a LinearRgba's to_f32_array()) or "#rrggbb"; a struct's as {field: value} |
+| `textures` | `Record<string, string>` | each `texture_2d<f32>` it declares, by name: a picture file (staticFile), sampled with Bevy's default sampler |
+| `defs` | `Record<string, boolean \| number>` | shader defs, as a Material's |
+| `children` | `ReactNode` | – |
+
+Also takes the props of [`NodeProps`](#nodeprops); `PickProps` (`popover`, `onClick`, `onPointerDown`, `onPointerUp`, `onPointerOver`, `onPointerOut`, `onPointerEnter`, `onPointerLeave`, `onPointerMove`).
+
+Used in: [ui/ui_material](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/ui_material.tsx).
+
+### `Node`
+
+A box of Bevy's UI, laid out as bevy_ui lays it (taffy, with Bevy's defaults). Put it over the 3D in an
+<AbsoluteFill> (after the <Canvas3D>): each root fills the frame as Bevy's window.
+
+Bevy: `bevy_ui::ui_node::Node`.
+
+Takes [`NodeProps`](#nodeprops)'s props.
+
+Used in: [ui/images/image_node](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node.tsx), [ui/images/ui_texture_slice_flip_and_tile](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_slice_flip_and_tile.tsx), [ui/images/image_node_resizing](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node_resizing.tsx), [ui/images/ui_texture_atlas_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas_slice.tsx), [ui/images/ui_texture_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_slice.tsx), [ui/images/ui_texture_atlas](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas.tsx), [ui/layout/grid](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/grid.tsx), [ui/layout/ghost_nodes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/ghost_nodes.tsx), and 56 more.
+
+### `Region`
+
+A box at the band its name stands for, clear of the face perception found at this frame.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `name` | `RegionName` | – |
+| `margin` | `number` | – |
+| `style` | `CSSProperties` | – |
+| `className` | `string` | – |
+| `children` | `ReactNode` | – |
+
+### `Scrollbar`
+
+A scrollbar's track: its ScrollbarThumb inside shows how much of its target is in view and where.
+
+Bevy: `bevy_ui_widgets::Scrollbar`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `target` (required) | `string` | the Name of the Node it scrolls (an overflow Scroll one) |
+| `orientation` (required) | `ControlOrientation` | Bevy: Whether the scrollbar is vertical or horizontal. |
+| `min_thumb_length` (required) | `number` | the thumb's least length, px |
+| `children` | `ReactNode` | its ScrollbarThumb |
+
+Also takes the props of [`NodeProps`](#nodeprops); `PickProps` (`popover`, `onClick`, `onPointerDown`, `onPointerUp`, `onPointerOver`, `onPointerOut`, `onPointerEnter`, `onPointerLeave`, `onPointerMove`).
+
+Used in: [ui/scroll_and_overflow/scrollbars](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/scrollbars.tsx).
+
+### `ScrollbarThumb`
+
+A Scrollbar's thumb: the track's width across it, its length the share of the target in view.
+
+Bevy: `bevy_ui_widgets::ScrollbarThumb`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `border_radius` | `BorderRadius` | Bevy: Border radius of the scrollbar thumb, used to update `ComputedNode::border_radius` in `UiSystems::Layout`. |
+| `border` | `UiRect` | the border's width on each side |
+| `background_color` | `NodeProps["background_color"]` | BackgroundColor |
+| `border_color` | `NodeProps["background_color"]` | BorderColor, every side |
+
+Used in: [ui/scroll_and_overflow/scrollbars](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/scrollbars.tsx).
+
+### `Text`
+
+Bevy's UI text: a Node whose content is its string and its <TextSpan> children, in its TextFont, TextColor,
+TextLayout and LineHeight (Bevy's defaults when left out).
+
+Bevy: `bevy_ui::widget::text::Text`.
+
+Takes [`TextProps`](#textprops)'s props.
+
+Used in: [ui/images/image_node_resizing](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node_resizing.tsx), [ui/images/ui_texture_atlas_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas_slice.tsx), [ui/images/ui_texture_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_slice.tsx), [ui/images/ui_texture_atlas](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas.tsx), [ui/layout/grid](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/grid.tsx), [ui/layout/ghost_nodes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/ghost_nodes.tsx), [ui/layout/flex_layout](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/flex_layout.tsx), [ui/layout/size_constraints](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/size_constraints.tsx), and 47 more.
+
+### `Text2d`
+
+Text in Bevy's 2D world, its block's centre at its Transform (Text2d; Bevy's Anchor::CENTER unless `anchor` says). bevy_text
+lays it out as a <Text>'s. Inside a <Canvas3D> it is Bevy's own Text2d (text2d.tsx), ordered with the 2D parts by z;
+after it, in the <AbsoluteFill>, it is that Text placed on the frame, over the 2D and 3D parts.
+
+Bevy: `bevy_sprite::text2d::Text2d`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `transform` | `TransformValue` | its place in Bevy's 2D world: the frame's centre the origin, +Y up, a unit a pixel, turns counterclockwise |
+| `justify` | `"Left" \| "Center" \| "Right" \| "Justified" \| "Start" \| "End"` | how its lines line up with each other (TextLayout's Justify, Left by default) |
+| `linebreak` | `"WordBoundary" \| "AnyCharacter" \| "WordOrCharacter" \| "NoWrap"` | TextLayout's LineBreak (WordBoundary by default); inside a Canvas3D |
+| `anchor` | `[number, number]` | Bevy's Anchor, as its Vec2: which point of the block sits at its Transform, [-0.5, -0.5] its bottom left to [0.5, 0.5] its top right ([0, 0], the centre, by default; Anchor::TOP_CENTER is [0, 0.5]) |
+| `bounds` | `[number \| null, number \| null]` | TextBounds: the box its lines wrap in, [width, height] px (either null, unbounded), the anchor then the box's point; inside a Canvas3D |
+| `shadow` | `Text2dShadow \| true` | Text2dShadow (true for its default); inside a Canvas3D |
+| `children` | `ReactNode` | – |
+
+Also takes the props of [`TextStyleProps`](#textstyleprops); [`TextRunProps`](#textrunprops) (`underline`, `strikethrough`, `underline_color`, `strikethrough_color`, `text_background_color`).
+
+Used in: [shader/pipeline_constants](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/shader/pipeline_constants.tsx), [2d/text2d](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/text2d.tsx), [2d/sprite_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/sprite_slice.tsx), [2d/texture_atlas](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/texture_atlas.tsx), [2d/sprite_scale](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/sprite_scale.tsx), [2d/mesh2d_repeated_texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/mesh2d_repeated_texture.tsx).
+
+### `TextSpan`
+
+A run of a <Text> in a style of its own (Bevy's defaults, not its Text's, where left out).
+
+Bevy: `bevy_text::text::TextSpan`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `children` | `ReactNode` | – |
+
+Also takes the props of [`TextStyleProps`](#textstyleprops); [`TextRunProps`](#textrunprops) (`underline`, `strikethrough`, `underline_color`, `strikethrough_color`, `text_background_color`).
+
+Used in: [ui/images/ui_texture_atlas](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas.tsx), [ui/scroll_and_overflow/overflow_debug](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/overflow_debug.tsx), [ui/text/text_debug](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/text_debug.tsx), [ui/text/text_background_colors](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/text_background_colors.tsx), [ui/text/inline_image](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/inline_image.tsx), [ui/text/strikethrough_and_underline](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/strikethrough_and_underline.tsx), [ui/text/text](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/text.tsx), [2d/text2d](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/2d/text2d.tsx).
+
+### `UiScale`
+
+bevy_ui's UiScale: every UI length inside times `value` (2 draws a 16 px node 32 px), as CSS's zoom: laid out
+and its text shaped at that size, in physical px, as Bevy lays out (a 3 px padding at 1.25 is 4 px, not 3 drawn 1.25
+times as big). Text2d and the 2D and 3D parts aren't UI, so they stay as they are.
+
+Bevy: `bevy_ui::UiScale`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `value` (required) | `number` | – |
+| `children` | `ReactNode` | – |
+
+Used in: [ui/images/ui_texture_slice_flip_and_tile](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_slice_flip_and_tile.tsx), [ui/scroll_and_overflow/scrollbars](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/scrollbars.tsx), [ui/scroll_and_overflow/drag_to_scroll](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/drag_to_scroll.tsx).
+
+### `UiTargetCamera`
+
+The roots inside drawn by their own Camera2d (bevy_ui's UiTargetCamera): a layer over the whole window, stacked by
+the camera's `order` as Bevy draws its cameras, lowest first. Cameras on one window share its main texture, which
+only the first of them clears (bevy_render's ViewTarget, its first call), so the window's clear is the layered
+<Canvas3D clearColor>'s and a later camera's own clear colour shows nowhere. Roots outside any are the default
+camera's (the highest order).
+
+Bevy: `bevy_ui::UiTargetCamera`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `order` | `number` | – |
+| `children` | `ReactNode` | – |
+
+Used in: [ui/ui_target_camera](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/ui_target_camera.tsx), [3d/split_screen](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/split_screen.tsx).
+
+### `UiTexture`
+
+The UI roots inside drawn into `target` instead of the window (a Camera2d with RenderTarget::Image, the roots'
+UiTargetCamera): laid out in a box the image's size, see-through where they draw nothing, and nowhere in the frame
+itself. A root's 100% is the image's size.
+
+Bevy: `bevy_camera::RenderTarget::Image`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `target` (required) | `string` | – |
+| `children` | `ReactNode` | – |
+
+Used in: [ui/render_ui_to_texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/render_ui_to_texture.tsx).
+
+### `Viewport`
+
+The UI camera's viewport (bevy_camera's Viewport on the Camera2d the UI draws through): its roots lay out in this
+region of the window, `physical_position` from its top left and `physical_size` big (px, at a scale factor of 1),
+and are clipped to it.
+
+Bevy: `bevy_camera::Viewport`.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `physical_position` (required) | `[number, number]` | Bevy: The physical position to render this viewport to within the `RenderTarget` of this `Camera`. (0,0) corresponds to the top-left corner |
+| `physical_size` (required) | `[number, number]` | Bevy: The physical size of the viewport rectangle to render to within the `RenderTarget` of this `Camera`. The origin of the rectangle is in the top-left corner. |
+| `children` | `ReactNode` | – |
+
+Used in: [ui/relative_cursor_position](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/relative_cursor_position.tsx), [3d/split_screen](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/3d/split_screen.tsx).
+
+## Hooks
+
+### `useRegion`
+
+The Region this is rendered inside: its name and box in composition px.
+
+```ts
+function useRegion(): RegionBox
+```
+
+## Functions
+
+### `actionsIn`
+
+The actions handed in this frame, in order.
+
+```ts
+function actionsIn(input: FrameInput): { name: string; args: any; }[]
+```
+
+### `applyActions`
+
+`state` with this frame's handed-in actions run on it, in order (an unknown name is skipped).
+
+```ts
+function applyActions<S>(actions: PanelActions<S>, state: S, input: FrameInput): S
+```
+
+### `feedIn`
+
+What the app tells the panels, by name ("transcript", "object"); undefined until it has.
+
+```ts
+function feedIn<T = any>(input: FrameInput, what: string): T | undefined
+```
+
+### `percent`
+
+Bevy's Val::Percent: of the parent's size on that axis (padding and margin: its width, as CSS)
+
+```ts
+function percent(n: number): string
+```
+
+Used in: [ui/images/image_node](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node.tsx), [ui/images/ui_texture_slice_flip_and_tile](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_slice_flip_and_tile.tsx), [ui/images/image_node_resizing](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node_resizing.tsx), [ui/images/ui_texture_atlas_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas_slice.tsx), [ui/images/ui_texture_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_slice.tsx), [ui/images/ui_texture_atlas](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas.tsx), [ui/layout/grid](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/grid.tsx), [ui/layout/ghost_nodes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/ghost_nodes.tsx), and 44 more.
+
+### `proofBoxes`
+
+Checks measured part boxes; returns one fault per problem, empty when all is well.
+
+```ts
+function proofBoxes({ width, height, face, parts }: ProofInput): string[]
+```
+
+### `px`
+
+Bevy's Val::Px: logical pixels
+
+```ts
+function px(n: number): string
+```
+
+Used in: [ui/images/image_node](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node.tsx), [ui/images/ui_texture_slice_flip_and_tile](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_slice_flip_and_tile.tsx), [ui/images/image_node_resizing](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node_resizing.tsx), [ui/images/ui_texture_atlas_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas_slice.tsx), [ui/images/ui_texture_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_slice.tsx), [ui/images/ui_texture_atlas](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas.tsx), [ui/layout/grid](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/grid.tsx), [ui/layout/ghost_nodes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/ghost_nodes.tsx), and 57 more.
+
+### `regionBand`
+
+Works out the vertical band each name stands for, given perception and the composition size.
+
+```ts
+function regionBand(name: RegionName, width: number, height: number, perception: Perception, margin?: number): Band
+```
+
+### `targetImage`
+
+An image the UI inside a <UiTexture> is drawn into, `width` x `height` px (bevy_image's Image::new_target_texture):
+pass it to a material's texture field, e.g. StandardMaterial's base_color_texture. The name tells one target
+from another (and from the composition's <Screen>s).
+
+Bevy: `bevy_image::Image::new_target_texture`.
+
+```ts
+function targetImage(name: string, width: number, height: number): string
+```
+
+Used in: [ui/render_ui_to_texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/render_ui_to_texture.tsx).
+
+### `vh`
+
+Bevy's Val::Vh: percent of the viewport's height
+
+```ts
+function vh(n: number): string
+```
+
+Used in: [ui/styling/stacked_gradients](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/stacked_gradients.tsx), [ui/text/letter_spacing](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/letter_spacing.tsx).
+
+### `vmax`
+
+Bevy's Val::VMax: percent of the viewport's larger side
+
+```ts
+function vmax(n: number): string
+```
+
+### `vmin`
+
+Bevy's Val::VMin: percent of the viewport's smaller side
+
+```ts
+function vmin(n: number): string
+```
+
+### `vw`
+
+Bevy's Val::Vw: percent of the viewport's width
+
+```ts
+function vw(n: number): string
+```
+
+Used in: [ui/text/letter_spacing](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/letter_spacing.tsx).
+
+## Values
+
+### `ACTION_KEY`
+
+The prefix the app puts on an action handed in as input: a key `action:NAME ARGS_JSON`, held for one frame.
+
+### `AngularColorStop`
+
+bevy_ui's AngularColorStop: a colour at `angle` radians round a conic gradient (spaced evenly when left out).
+
+Bevy: `bevy_ui::gradients::AngularColorStop`.
+
+Used in: [ui/styling/stacked_gradients](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/stacked_gradients.tsx), [ui/styling/gradients](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/gradients.tsx).
+
+### `auto`
+
+Bevy's Val::Auto
+
+Used in: [ui/text/text_input](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/text_input.tsx).
+
+### `BorderRadius`
+
+Bevy's BorderRadius: a Val (circular) or a CornerRadius (elliptical) for each corner (0 by default).
+
+Bevy: `bevy_ui::BorderRadius`.
+
+Used in: [ui/layout/ghost_nodes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/ghost_nodes.tsx), [ui/navigation/directional_navigation_overrides](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/navigation/directional_navigation_overrides.tsx), [ui/navigation/directional_navigation](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/navigation/directional_navigation.tsx), [ui/scroll_and_overflow/scrollbars](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/scrollbars.tsx), [ui/scroll_and_overflow/overflow_transform](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/overflow_transform.tsx), [ui/render_ui_to_texture](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/render_ui_to_texture.tsx), [ui/ui_material](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/ui_material.tsx), [ui/styling/gradients](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/gradients.tsx), and 7 more.
+
+### `BoxShadow`
+
+bevy_ui's BoxShadow: drop shadows under a node, drawn back to front.
+
+Bevy: `bevy_ui::BoxShadow`.
+
+Used in: [ui/scroll_and_overflow/overflow_transform](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/overflow_transform.tsx), [ui/styling/box_shadow](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/box_shadow.tsx), [ui/widgets/standard_widgets](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/standard_widgets.tsx).
+
+### `ColorStop`
+
+bevy_ui's ColorStop: a colour at `point` along the gradient (spaced evenly when left out, as CSS's), and `hint`, where
+between it and the next the colour is half way (0.5, linear, by default).
+
+Bevy: `bevy_ui::gradients::ColorStop`.
+
+Used in: [ui/styling/stacked_gradients](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/stacked_gradients.tsx), [ui/styling/gradients](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/gradients.tsx).
+
+### `ConicGradient`
+
+bevy_ui's ConicGradient: from `start` radians (0 up, clockwise) round `position`.
+
+Bevy: `bevy_ui::gradients::ConicGradient`.
+
+Used in: [ui/styling/stacked_gradients](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/stacked_gradients.tsx), [ui/styling/gradients](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/gradients.tsx).
+
+### `CornerRadius`
+
+Bevy's CornerRadius: a corner's x and y radii, an elliptical corner (a Val alone is a circular one).
+
+Bevy: `bevy_ui::CornerRadius`.
+
+Used in: [ui/styling/borders](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/borders.tsx).
+
+### `FEED_KEY`
+
+The prefix of the keys the app hands every panel for what it knows: `feed:transcript` (the conversation's last lines,
+[{ who: "you" | "agent" | "tool" | "note", text, live }]), `feed:object` (the object on the stage: { name, kind }) and
+`feed:stage` (what the object publishes with data-feed-publish, as a panel's publishes reach the object) and
+`feed:player` (the stage's player: { frame, frames, rate, playing }; frames is 0 for a game, which runs on).
+Handed in only on the frame it changes (and when the panel opens), so keep it in state:
+`useGameState([], (s, input) => feedIn(input, "transcript") ?? s)`. A panel standing in for the terminal sends by
+publishing { send: { n, text } } (a higher n is a new message); a panel drives the player by publishing
+{ control: { n, do: "play" | "pause" | "seek", frame } } the same way.
+
+### `FontAtlasSet`
+
+bevy_text's FontAtlasSet, the glyph atlases Bevy's text is drawn from, for one face at one size:
+`atlases(font, font_size, text)` is the pages a Text of `text` in the font file `font` at `font_size` px fills,
+each glyph rasterized and packed by bevy_text's own code (natively) in the order its layout meets them. A text that
+grows a character at a time fills them as its last version does.
+
+Bevy: `bevy_text::FontAtlasSet`.
+
+Used in: [ui/text/font_atlas_debug](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/font_atlas_debug.tsx).
+
+### `FontCx`
+
+bevy_text's FontCx, the font collection Bevy's text resolves families in: `family_names()` lists the system's
+families (natively, by fontique as Bevy's collection has them), sorted and each once.
+
+Bevy: `bevy_text::FontCx`.
+
+Used in: [ui/text/system_fonts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/system_fonts.tsx).
+
+### `FontFeatureTag`
+
+bevy_text's FontFeatureTag: the registered OpenType features' tags.
+
+Bevy: `bevy_text::FontFeatureTag`.
+
+Used in: [ui/text/text](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/text.tsx).
+
+### `FontSource`
+
+bevy_text's FontSource: a font file (a string, staticFile("fonts/x.ttf")), { Family } by name, or { Generic }.
+
+Bevy: `bevy_text::FontSource`.
+
+Used in: [ui/text/system_fonts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/system_fonts.tsx), [ui/text/generic_font_families](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/generic_font_families.tsx), [ui/text/ime_support](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/ime_support.tsx).
+
+### `FontVariationTag`
+
+bevy_text's FontVariationTag: the registered axes' OpenType tags.
+
+Bevy: `bevy_text::FontVariationTag`.
+
+Used in: [ui/text/font_variations](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/font_variations.tsx).
+
+### `FontWidth`
+
+bevy_text's FontWidth: a face's width as a share of its normal one (CSS's font-stretch), for a Text's font_width.
+
+Bevy: `bevy_text::FontWidth`.
+
+Used in: [ui/text/font_query](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/font_query.tsx).
+
+### `GridPlacement`
+
+bevy_ui's GridPlacement: a start line, an end line (1-based, negative from the end) and a span (1 by default).
+
+Bevy: `bevy_ui::GridPlacement`.
+
+Used in: [ui/images/image_node_resizing](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node_resizing.tsx), [ui/layout/grid](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/grid.tsx), [ui/layout/anchor_layout](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/anchor_layout.tsx), [ui/ui_drag_and_drop](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/ui_drag_and_drop.tsx), [ui/scroll_and_overflow/scrollbars](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/scrollbars.tsx), [ui/scroll_and_overflow/drag_to_scroll](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/drag_to_scroll.tsx), [ui/text/multiple_text_inputs](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/multiple_text_inputs.tsx), [ui/text/generic_font_families](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/generic_font_families.tsx).
+
+### `GridTrack`
+
+bevy_ui's GridTrack: a track sized between its min and max sizing functions.
+
+Bevy: `bevy_ui::GridTrack`.
+
+Used in: [ui/images/image_node_resizing](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node_resizing.tsx), [ui/layout/grid](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/grid.tsx), [ui/text/system_fonts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/system_fonts.tsx), [ui/text/multiple_text_inputs](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/multiple_text_inputs.tsx).
+
+### `LinearGradient`
+
+bevy_ui's LinearGradient: `angle` radians, 0 up and clockwise.
+
+Bevy: `bevy_ui::gradients::LinearGradient`.
+
+Used in: [ui/styling/stacked_gradients](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/stacked_gradients.tsx), [ui/styling/gradients](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/gradients.tsx).
+
+### `Overflow`
+
+Bevy's Overflow: each axis Visible, Clip, Hidden or Scroll.
+
+Bevy: `bevy_ui::Overflow`.
+
+Used in: [ui/scroll_and_overflow/overflow](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/overflow.tsx), [ui/scroll_and_overflow/scrollbars](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/scrollbars.tsx), [ui/scroll_and_overflow/drag_to_scroll](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/drag_to_scroll.tsx), [ui/scroll_and_overflow/scroll](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/scroll.tsx), [ui/scroll_and_overflow/overflow_clip_margin](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/overflow_clip_margin.tsx), [ui/text/multiple_text_inputs](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/multiple_text_inputs.tsx), [ui/text/text_wrap_debug](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/text_wrap_debug.tsx), [ui/widgets/headless_tabs](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/headless_tabs.tsx).
+
+### `OverflowClipMargin`
+
+Bevy's OverflowClipMargin: the box an overflow clip clips to, grown by a margin in px (the padding box by default).
+
+Bevy: `bevy_ui::OverflowClipMargin`.
+
+Used in: [ui/scroll_and_overflow/overflow_clip_margin](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/overflow_clip_margin.tsx), [ui/text/multiple_text_inputs](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/multiple_text_inputs.tsx).
+
+### `RadialGradient`
+
+bevy_ui's RadialGradient: centred, ClosestCorner by default.
+
+Bevy: `bevy_ui::gradients::RadialGradient`.
+
+Used in: [ui/styling/stacked_gradients](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/stacked_gradients.tsx), [ui/styling/gradients](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/gradients.tsx).
+
+### `RepeatedGridTrack`
+
+bevy_ui's RepeatedGridTrack: tracks repeated.
+bevy_ui's RepeatedGridTrack constructors: each GridTrack's, repeated `repetition` times.
+
+Bevy: `bevy_ui::RepeatedGridTrack`.
+
+Used in: [ui/layout/grid](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/grid.tsx), [ui/layout/anchor_layout](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/anchor_layout.tsx), [ui/scroll_and_overflow/scrollbars](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/scrollbars.tsx), [ui/scroll_and_overflow/drag_to_scroll](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/drag_to_scroll.tsx), [ui/scroll_and_overflow/overflow_debug](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/overflow_debug.tsx), [ui/scroll_and_overflow/scroll](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/scroll.tsx), [ui/text/multiline_text_input](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/multiline_text_input.tsx), [ui/text/multiple_text_inputs](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/multiple_text_inputs.tsx), and 1 more.
+
+### `Rot2`
+
+bevy_math's Rot2: a rotation by its cosine and sine; positive turns a UI node clockwise.
+
+Bevy: `bevy_math::Rot2`.
+
+Used in: [ui/ui_transform](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/ui_transform.tsx), [ui/navigation/directional_navigation](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/navigation/directional_navigation.tsx), [ui/scroll_and_overflow/overflow_debug](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/overflow_debug.tsx), [ui/scroll_and_overflow/overflow_transform](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/overflow_transform.tsx).
+
+### `SPACE_KEY`
+
+The prefix of the key the app holds on the stage for each panel that publishes (`data-feed-publish` on an element):
+`space:PANEL JSON`, held while the value stands, so the object on the stage reads what the panels picked.
+
+### `TextShadow`
+
+bevy_ui's TextShadow.
+
+Bevy: `bevy_ui::widget::text::TextShadow`.
+
+Used in: [ui/text/text](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/text/text.tsx), [ui/widgets/standard_widgets](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/standard_widgets.tsx), [ui/widgets/button](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/button.tsx), [ui/widgets/standard_widgets_observers](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/widgets/standard_widgets_observers.tsx).
+
+### `TextureAtlasLayout`
+
+bevy_image's TextureAtlasLayout: a sheet's size and its cells' rects in px.
+
+Bevy: `bevy_image::TextureAtlasLayout`.
+
+Used in: [ui/images/ui_texture_atlas_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas_slice.tsx), [ui/images/ui_texture_atlas](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas.tsx).
+
+### `UiPosition`
+
+bevy_ui's UiPosition: a point of the node, `anchor` from its centre (each axis -0.5 to 0.5 of its size), moved `x`
+and `y` from there: right and down from a left, top or centre anchor, left and up from a right or bottom one.
+
+Bevy: `bevy_ui::UiPosition`.
+
+Used in: [ui/styling/stacked_gradients](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/stacked_gradients.tsx), [ui/styling/gradients](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/styling/gradients.tsx).
+
+### `UiRect`
+
+Bevy's UiRect: a Val for each side (0 by default).
+
+Bevy: `bevy_ui::UiRect`.
+
+Used in: [ui/images/image_node](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node.tsx), [ui/images/image_node_resizing](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/image_node_resizing.tsx), [ui/images/ui_texture_atlas_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_atlas_slice.tsx), [ui/images/ui_texture_slice](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/images/ui_texture_slice.tsx), [ui/layout/grid](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/grid.tsx), [ui/layout/ghost_nodes](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/ghost_nodes.tsx), [ui/layout/flex_layout](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/flex_layout.tsx), [ui/layout/size_constraints](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/layout/size_constraints.tsx), and 43 more.
+
+### `UiTransform`
+
+bevy_ui's UiTransform: the node scaled, then turned, then moved, about its centre, after layout.
+
+Bevy: `bevy_ui::ui_transform::UiTransform`.
+
+Used in: [ui/ui_transform](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/ui_transform.tsx), [ui/navigation/directional_navigation](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/navigation/directional_navigation.tsx), [ui/scroll_and_overflow/overflow_debug](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/overflow_debug.tsx), [ui/scroll_and_overflow/overflow_transform](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/overflow_transform.tsx).
+
+### `Val2`
+
+bevy_ui's Val2: a translation's x and y (a percent of the node's own width and height; auto is 0).
+
+Bevy: `bevy_ui::ui_transform::Val2`.
+
+Used in: [ui/scroll_and_overflow/overflow_debug](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/bench/bevy-parity/ui/scroll_and_overflow/overflow_debug.tsx).
+
+## Types
+
+### `AbsoluteFillProps`
+
+The props of [`AbsoluteFill`](#absolutefill), tabled there.
+
+### `ControlOrientation`
+
+bevy_ui_widgets' ControlOrientation.
+
+Bevy: `bevy_ui_widgets::ControlOrientation`.
+
+```ts
+type ControlOrientation = "Horizontal" | "Vertical"
+```
+
+### `EditableTextProps`
+
+The props of [`EditableText`](#editabletext), tabled there.
+
+### `FontAtlas`
+
+One page of bevy_text's glyph atlas: its texture (a PNG data: URL, which an ImageNode shows) and its size.
+
+Bevy: `bevy_text::FontAtlas`.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `texture` (required) | `string` | Bevy: The texture where this font atlas is located |
+| `width` (required) | `number` | – |
+| `height` (required) | `number` | – |
+
+### `GenericFontFamily`
+
+bevy_text's GenericFontFamily.
+
+Bevy: `bevy_text::GenericFontFamily`.
+
+```ts
+type GenericFontFamily = "Serif" | "SansSerif" | "Cursive" | "Fantasy" | "Monospace" | "SystemUi" | "UiSerif" | "UiSansSerif" | "UiMonospace" | "UiRounded" | "Emoji"
+```
+
+### `Gradient`
+
+One of bevy_ui's Gradients.
+
+Bevy: `bevy_ui::gradients::Gradient`.
+
+```ts
+type Gradient = | { kind: "Linear"; angle: number; stops: ColorStop[]; color_space?: InterpolationColorSpace } | { kind: "Radial"; position: UiPosition; shape: RadialGradientShape; stops: ColorStop[]; color_space?: InterpolationColorSpace } | { kind: "Conic"; start: number; position: UiPosition; stops: AngularCo…
+```
+
+### `GridAutoFlow`
+
+bevy_ui's GridAutoFlow.
+
+Bevy: `bevy_ui::GridAutoFlow`.
+
+```ts
+type GridAutoFlow = "Row" | "Column" | "RowDense" | "ColumnDense"
+```
+
+### `GridTrackRepetition`
+
+bevy_ui's GridTrackRepetition: a count, or as many as fit (AutoFill), the empty ones collapsed (AutoFit).
+
+Bevy: `bevy_ui::GridTrackRepetition`.
+
+```ts
+type GridTrackRepetition = number | "AutoFill" | "AutoFit"
+```
+
+### `IgnoreScroll`
+
+bevy_ui's IgnoreScroll: the axes on which a node keeps its place while its parent scrolls (BVec2).
+
+Bevy: `bevy_ui::IgnoreScroll`.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `x` (required) | `boolean` | – |
+| `y` (required) | `boolean` | – |
+
+### `ImageNodeProps`
+
+The props of [`ImageNode`](#imagenode), tabled there.
+
+### `InterpolationColorSpace`
+
+bevy_ui's InterpolationColorSpace: Oklaba by default.
+
+Bevy: `bevy_ui::gradients::InterpolationColorSpace`.
+
+```ts
+type InterpolationColorSpace = "Oklaba" | "Oklcha" | "OklchaLong" | "Srgba" | "LinearRgba" | "Hsla" | "HslaLong" | "Okhsla" | "OkhslaLong"
+```
+
+### `MaterialNodeProps`
+
+The props of [`MaterialNode`](#materialnode), tabled there.
+
+### `MaxTrackSizingFunction`
+
+bevy_ui's MaxTrackSizingFunction: a MinTrackSizingFunction, a Fraction of the free space, or a fit-content limit.
+
+Bevy: `bevy_ui::MaxTrackSizingFunction`.
+
+```ts
+type MaxTrackSizingFunction = MinTrackSizingFunction | { Fraction: number } | { FitContentPx: number } | { FitContentPercent: number }
+```
+
+### `MinTrackSizingFunction`
+
+bevy_ui's MinTrackSizingFunction.
+
+Bevy: `bevy_ui::MinTrackSizingFunction`.
+
+```ts
+type MinTrackSizingFunction = | "Auto" | "MinContent" | "MaxContent" | { Px: number } | { Percent: number } | { Rem: number } | { Vw: number } | { Vh: number } | { VMin: number } | { VMax: number }
+```
+
+### `NodeProps`
+
+bevy_ui's Node: its layout fields as Bevy names them (each Bevy's default when left out), and the components that
+draw it: background_color (BackgroundColor), border_color (BorderColor, every side), z_index (ZIndex).
+
+Bevy: `bevy_ui::Node`.
+
+### `PanelAction`
+
+One action: what it does (for the agent), its arguments by name with a few words each, and what it does to the
+panel's state.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `about` (required) | `string` | – |
+| `args` | `Record<string, string>` | – |
+| `run` (required) | `(state: S, args: A) => S` | – |
+
+### `PanelActions`
+
+```ts
+type PanelActions = Record<string, PanelAction<S>>
+```
+
+### `Popover`
+
+A popup placed beside its parent's box (inside its border) after layout, at the first of `positions` the window
+(less `window_margin` px) hides least; absolutely positioned, as Bevy's position_popover makes it.
+
+Bevy: `bevy_ui_widgets::popover::Popover`.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `positions` (required) | `PopoverPlacement[]` | Bevy: List of potential positions for the popover element relative to the parent. |
+| `window_margin` | `number` | Bevy: Indicates how close to the window edge the popup is allowed to go. |
+
+### `PopoverPlacement`
+
+One of a Popover's placements beside its parent.
+
+Bevy: `bevy_ui_widgets::popover::PopoverPlacement`.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `side` | `"Top" \| "Bottom" \| "Left" \| "Right"` | PopoverSide: Bottom by default |
+| `align` | `"Start" \| "End" \| "Center"` | PopoverAlign: which edges line up along that side, Start by default |
+| `gap` | `number` | the gap from the parent, in px (0 by default) |
+
+### `ProofInput`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `width` (required) | `number` | – |
+| `height` (required) | `number` | – |
+| `face` | `Rect` | – |
+| `parts` (required) | `ProofPart[]` | – |
+
+### `ProofPart`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` (required) | `string` | – |
+| `band` | `[number, number]` | the band the part must fit in, [top, bottom] in px |
+| `x` (required) | `number` | – |
+| `y` (required) | `number` | – |
+| `w` (required) | `number` | – |
+| `h` (required) | `number` | – |
+
+### `RadialGradientShape`
+
+bevy_ui's RadialGradientShape (ClosestCorner by default): Bevy's ClosestSide and FarthestSide are circles to the
+nearest or farthest side, its ClosestCorner and FarthestCorner ellipses through the nearest or farthest sides on each
+axis (CSS's closest-side and farthest-side ellipses), Circle a radius, Ellipse two.
+
+Bevy: `bevy_ui::gradients::RadialGradientShape`.
+
+```ts
+type RadialGradientShape = "ClosestSide" | "FarthestSide" | "ClosestCorner" | "FarthestCorner" | { Circle: Val } | { Ellipse: [Val, Val] }
+```
+
+### `RegionBox`
+
+The band a Region occupies, in composition px.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `name` (required) | `RegionName` | – |
+| `x` (required) | `number` | – |
+| `y` (required) | `number` | – |
+| `w` (required) | `number` | – |
+| `h` (required) | `number` | – |
+
+### `RegionName`
+
+```ts
+type RegionName = "auto" | "top" | "bottom" | "center" | "full"
+```
+
+### `RegionProps`
+
+The props of [`Region`](#region), tabled there.
+
+### `ScrollbarProps`
+
+The props of [`Scrollbar`](#scrollbar), tabled there.
+
+### `ScrollbarThumbProps`
+
+The props of [`ScrollbarThumb`](#scrollbarthumb), tabled there.
+
+### `ShadowStyle`
+
+bevy_ui's ShadowStyle: one drop shadow's colour, offset, spread and blur.
+
+Bevy: `bevy_ui::ShadowStyle`.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `color` (required) | `unknown` | Bevy: The shadow's color |
+| `x_offset` (required) | `Val` | Bevy: Horizontal offset |
+| `y_offset` (required) | `Val` | Bevy: Vertical offset |
+| `spread_radius` (required) | `Val` | Bevy: How much the shadow should spread outward. |
+| `blur_radius` (required) | `Val` | Bevy: Blurriness of the shadow |
+
+### `SliceScaleMode`
+
+bevy_ui's SliceScaleMode: a side or the centre stretched, or tiled every slice x stretch_value px from its start
+
+```ts
+type SliceScaleMode = "Stretch" | { Tile: { stretch_value: number } }
+```
+
+### `Text2dProps`
+
+The props of [`Text2d`](#text2d), tabled there.
+
+### `TextCursorStyle`
+
+bevy_text's TextCursorStyle (color: SLATE_700 by default).
+
+Bevy: `bevy_text::TextCursorStyle`.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `color` | `Color` | Bevy: Color of the cursor |
+| `selection_color` | `Color` | Bevy: Background color of selected text |
+| `unfocused_selection_color` | `Color` | Bevy: Background color of unfocused selected text |
+| `selected_text_color` | `Color` | Bevy: If some, overrides the color of selected text |
+| `selection_radius` | `number` | Bevy: Corner radius of selection highlight rectangles, normalized relative to the selection height. |
+
+### `TextProps`
+
+### `TextRunProps`
+
+What bevy_text draws with a section's own glyphs (a Text's string, not its spans; a TextSpan's run).
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `underline` | `boolean` | Underline and Strikethrough: a line under or through the run, as thick as the font says |
+| `strikethrough` | `boolean` | – |
+| `underline_color` | `Color` | UnderlineColor and StrikethroughColor: the lines' colours (the text's colour by default) |
+| `strikethrough_color` | `Color` | – |
+| `text_background_color` | `Color` | TextBackgroundColor: a box behind the run, line by line |
+
+### `TextStyleProps`
+
+bevy_text's TextFont, TextColor, TextLayout and LineHeight, on a Text or a TextSpan.
+
+Bevy: `bevy_text::TextFont`.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `font` | `FontSource` | FontSource: a font file (staticFile("fonts/FiraSans-Bold.ttf")), FontSource.family(name) or a generic family (FontSource.serif()); Bevy's default font when left out |
+| `font_size` | `number \| { Px: number } \| { Rem: number } \| { Vw: number } \| { Vh: number } \| { VMin: n…` | Bevy's FontSize: a number of px, or { Px }, { Rem } (of bevy_text's 20 px rem), { Vw }, { Vh }, { VMin }, { VMax } |
+| `weight` | `number` | FontWeight: 100 to 900 (400 by default) |
+| `style` | `"Normal" \| "Italic" \| "Oblique"` | Bevy: The slant style of a font face: normal, italic, or oblique. |
+| `font_width` | `number` | TextFont's width (FontWidth): a share of the face's normal width, FontWidth.CONDENSED 0.75 (1 by default) |
+| `color` | `Color` | TextColor: white by default |
+| `line_height` | `{ Px: number } \| { RelativeToFont: number }` | LineHeight: { Px } or { RelativeToFont } (1.2 of the size by default) |
+| `font_variations` | `Record<string, number>` | FontVariations: a variable font's axes by their four-letter tag, { [FontVariationTag.WEIGHT]: 300 } |
+| `font_features` | `Record<string, number>` | FontFeatures: OpenType features by their four-letter tag, 1 to turn one on, { [FontFeatureTag.SMALL_CAPS]: 1 } |
+| `letter_spacing` | `{ Px: number } \| { Rem: number }` | LetterSpacing: { Px } or { Rem } (of bevy_text's 20 px rem) after every glyph (none by default) |
+| `font_smoothing` | `"AntiAliased" \| "None"` | TextFont's FontSmoothing: "None" draws the glyphs unantialiased (a <Text2d> inside a Canvas3D only) |
+
+### `TextureSlicer`
+
+bevy_sprite's TextureSlicer: the slices' insets in the picture's px, how the sides and centre scale (Stretch by
+default), and the corners' most scale (1 by default)
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `border` (required) | `{ left: number; right: number; top: number; bottom: number }` | – |
+| `center_scale_mode` | `SliceScaleMode` | – |
+| `sides_scale_mode` | `SliceScaleMode` | – |
+| `max_corner_scale` | `number` | – |
+
+### `UiDebugOptions`
+
+bevy_ui's UiDebugOptions (and GlobalUiDebugOptions): which of a node's boxes to outline, how thick (px), in what
+colour (each node its own by default), and whether a clipped or hidden node's outline shows. Every field Bevy's
+default when left out.
+
+Bevy: `bevy_ui_render::UiDebugOptions`.
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `enabled` | `boolean` | Bevy: Set to true to enable the UI debug overlay |
+| `outline_border_box` | `boolean` | Bevy: Show outlines for the border boxes of UI nodes |
+| `outline_padding_box` | `boolean` | Bevy: Show outlines for the padding boxes of UI nodes |
+| `outline_content_box` | `boolean` | Bevy: Show outlines for the content boxes of UI nodes |
+| `line_width` | `number` | Bevy: Width of the overlay's lines in logical pixels |
+| `line_color_override` | `Srgba` | one colour for every outline, instead of each node's (Hsla::sequential_dispersed of its index) |
+| `show_clipped` | `boolean` | an outline not cut by its ancestors' overflow |
+
+### `Val`
+
+A bevy_ui Val as CSS: px(12) is "12px", percent(50) "50%", auto "auto".
+
+```ts
+type Val = string
+```
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/sdk/video.md b/docs/manual/reference/sdk/video.md
new file mode 100644
index 00000000..647fb177
--- /dev/null
+++ b/docs/manual/reference/sdk/video.md
@@ -0,0 +1,157 @@
+---
+title: "raea/video"
+summary: "Footage and time-shifted sequences: Video, Sequence, Series, Loop and Freeze."
+order: 42
+sources: ["sdk/raea/src/video.ts"]
+---
+
+`<Video>` shows a clip in step with the frame: the renderer decodes it natively and draws the frame the composition
+asks for, so scrubbing and rendering agree. Trim it with `trimBefore` and `trimAfter`, set its level with `volume`
+or `gainDb`, and frame a talking take on its face with `framing="face"`. `<Sequence>` shifts time for what it holds,
+`<Series>` plays its children one after another, `<Loop>` repeats, and `<Freeze>` holds a frame.
+
+```tsx
+import { staticFile } from "raea";
+import { Series, Video } from "raea/video";
+
+function Cut() {
+ return (
+ <Series>
+ <Series.Sequence durationInFrames={90}>
+ <Video src={staticFile("media/interview.mp4")} trimBefore={120} framing="face" />
+ </Series.Sequence>
+ <Series.Sequence durationInFrames={60}>
+ <Video src={staticFile("media/broll.mp4")} muted />
+ </Series.Sequence>
+ </Series>
+ );
+}
+```
+
+<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->
+
+```ts
+import { Freeze, Loop, Sequence, Series } from "raea/video"
+```
+
+`raea/video` exports 5 components, 7 types. Bevy's counterpart: `raea's own; Bevy has no video crate`. Source: [sdk/raea/src/video.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/video.ts).
+
+## Components
+
+### `Freeze`
+
+Shows its children as they are at `frame`, whatever the parent's frame.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `frame` (required) | `number` | – |
+| `children` | `ReactNode` | – |
+
+### `Loop`
+
+Repeats its children every `durationInFrames` frames, `times` times (forever by default).
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `durationInFrames` (required) | `number` | – |
+| `times` | `number` | – |
+| `name` | `string` | – |
+| `layout` | `SequenceLayout` | – |
+| `style` | `CSSProperties` | – |
+| `className` | `string` | – |
+| `children` | `ReactNode` | – |
+
+### `Sequence`
+
+Shifts time by `from` and shows its children only for `durationInFrames` frames.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `from` | `number` | – |
+| `durationInFrames` | `number` | – |
+| `name` | `string` | – |
+| `layout` | `SequenceLayout` | – |
+| `width` | `number` | – |
+| `height` | `number` | – |
+| `style` | `CSSProperties` | – |
+| `className` | `string` | – |
+| `children` | `ReactNode` | – |
+
+### `Series`
+
+Plays its Series.Sequence children back to back, each shifted by its own offset.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `children` | `ReactNode` | – |
+
+### `Video`
+
+A video clip in step with the frame; `data-source-time` is the source time (seconds) to show.
+
+| Prop | Type | What it does |
+| --- | --- | --- |
+| `framing` | `"face"` | ours: frame the take on the largest face |
+| `punchIn` | `number` | ours: multiplies the framing's scale (1.15 is the usual) |
+
+Also takes the props of [`MediaProps`](#mediaprops).
+
+## Types
+
+### `FreezeProps`
+
+The props of [`Freeze`](#freeze), tabled there.
+
+### `LoopProps`
+
+The props of [`Loop`](#loop), tabled there.
+
+### `MediaProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `src` (required) | `string` | – |
+| `startFrom` | `number` | – |
+| `endAt` | `number` | – |
+| `trimBefore` | `number` | – |
+| `trimAfter` | `number` | – |
+| `volume` | `VolumeProp` | linear gain, 1 being unity (0.5 is about -6 dB, 1.78 about +5 dB), or a function of the media's own frame |
+| `gainDb` | `VolumeProp` | ours: the gain in decibels (or a function of the media's own frame returning it); wins over volume |
+| `fadeIn` | `number` | ours: seconds to ramp the sound in from silence at its start (applied by the renderer at the audio's rate) |
+| `fadeOut` | `number` | ours: seconds to ramp the sound out to silence at its end |
+| `playbackRate` | `number` | – |
+| `muted` | `boolean` | – |
+| `loop` | `boolean` | – |
+| `bus` | `string` | the bus it plays into: a named channel of the edit's Tone graph (music, sfx, voice, ambience, ui), so it takes that bus's volume, effects and ducking (raea/tone `buses`) |
+| `name` | `string` | – |
+| `className` | `string` | – |
+| `style` | `CSSProperties` | – |
+
+### `SequenceLayout`
+
+```ts
+type SequenceLayout = "absolute-fill" | "none"
+```
+
+### `SequenceProps`
+
+The props of [`Sequence`](#sequence), tabled there.
+
+### `SeriesSequenceProps`
+
+| Field | Type | What it is |
+| --- | --- | --- |
+| `offset` | `number` | – |
+| `height` | `number` | – |
+| `style` | `CSSProperties` | – |
+| `children` | `ReactNode` | – |
+| `className` | `string` | – |
+| `name` | `string` | – |
+| `width` | `number` | – |
+| `durationInFrames` | `number` | – |
+
+### `VideoProps`
+
+The props of [`Video`](#video), tabled there.
+
+<!-- generated:end -->
diff --git a/sdk/app/src/bevy/app.ts b/sdk/app/src/bevy/app.ts
index 5a91f939..5d1ae229 100644
--- a/sdk/app/src/bevy/app.ts
+++ b/sdk/app/src/bevy/app.ts
@@ -6,6 +6,8 @@ type Call = (name: string, args: unknown) => unknown;
const call: Call = (name, args) => (native as unknown as (n: string, a: unknown) => unknown)(name, args);
+/** A headless Bevy App driven from TypeScript through Bevy's remote protocol: open it with its plugins, then spawn,
+ * insert, query and step it, and add TypeScript systems to its schedules. */
export class BevyApp {
/** the methods this App answers (BRP's, raea's and its plugins') */
readonly methods: string[];
diff --git a/sdk/app/src/bevy/core.ts b/sdk/app/src/bevy/core.ts
index e2734595..df01d5e5 100644
--- a/sdk/app/src/bevy/core.ts
+++ b/sdk/app/src/bevy/core.ts
@@ -124,10 +124,13 @@ export function flatten(refs: PluginRef[]): (string | Plugin)[] {
/** Bevy's schedules by their labels, for `app.addSystems(Update, ...)` as in Rust. */
export const PreStartup = "PreStartup", Startup = "Startup", PostStartup = "PostStartup";
+/** The frame's schedules, in the order Bevy runs them (with StateTransition and the fixed step's inside). */
export const First = "First", PreUpdate = "PreUpdate", StateTransition = "StateTransition", RunFixedMainLoop = "RunFixedMainLoop";
+/** The fixed step's schedules, run once a frame at the clock's step. */
export const FixedFirst = "FixedFirst", FixedPreUpdate = "FixedPreUpdate", FixedUpdate = "FixedUpdate", FixedPostUpdate = "FixedPostUpdate", FixedLast = "FixedLast";
+/** The frame's main schedules: Update for game logic, then SpawnScene, PostUpdate and Last. */
export const Update = "Update", SpawnScene = "SpawnScene", PostUpdate = "PostUpdate", Last = "Last";
/** Bevy's startup schedules: a system added to one runs once, before the App's next frame. */
diff --git a/sdk/app/src/clock.tsx b/sdk/app/src/clock.tsx
index f622e255..6df6a3ef 100644
--- a/sdk/app/src/clock.tsx
+++ b/sdk/app/src/clock.tsx
@@ -172,6 +172,9 @@ export function useClockState(caller: string): ClockState {
* made one before (ZeroHeap) */
const rootTimes = new WeakMap<ClockState, LocalTime>();
+/** The time where it's called: the nearest Sequence's (its local frame, where it starts, and the size it gives its
+ * children), or the Clock's outside any. `caller` names the hook in errors. The hook under useCurrentFrame, for components of your own that need more
+ * than the frame. */
export function useLocalTime(caller: string): LocalTime {
const clock = useClockState(caller);
const local = useContext(LocalTimeContext);
@@ -223,6 +226,9 @@ const NO_PROPS = {};
const NO_WORDS: never[] = [];
const NO_PERCEPTION = {};
const NO_INPUT = {};
+/** What time a composition is at: the frame, frame rate, size and length its hooks read, and its words, perception
+ * and input. The renderer, the live view and tests put one around every composition; a composition never needs its
+ * own. */
export function Clock(props: ClockProps) {
const { frame, fps, width, height, durationInFrames, id = "main", defaultProps = NO_PROPS, words = NO_WORDS, perception = NO_PERCEPTION, input = NO_INPUT } = props;
if (typeof frame !== "number" || !Number.isFinite(frame)) {
diff --git a/sdk/asset/src/assets.ts b/sdk/asset/src/assets.ts
index c05b4245..9e7f8467 100644
--- a/sdk/asset/src/assets.ts
+++ b/sdk/asset/src/assets.ts
@@ -63,6 +63,7 @@ export function tokensynthNote(timbre: string, midi: number, options: { seconds?
return { ...a, id: key, src: `asset:tokensynth/${key}`, options: o };
}
+/** Whether a value is a generated asset (what sao, tokensynthNote and lyria return), not a file path. */
export function isGeneratedAsset(v: unknown): v is GeneratedAsset {
return (
typeof v === "object" &&
diff --git a/sdk/audio/src/mix.tsx b/sdk/audio/src/mix.tsx
index 2780de51..625e0eb8 100644
--- a/sdk/audio/src/mix.tsx
+++ b/sdk/audio/src/mix.tsx
@@ -18,6 +18,8 @@ export interface MixProps {
// of the same Mix through without counting it twice.
const claimed = new WeakMap<ClockState, { id: string; frame: number }>();
+/** The master: every sound in the composition brought to `lufs` integrated loudness (-14) under a true-peak limiter at
+ * `ceiling` dBTP (-1.5), as the platforms play back. Put one in the composition, around the soundtrack or anywhere. */
export function Mix({ lufs = -14, ceiling = -1.5, children }: MixProps) {
const clock = useClockState("Mix");
const id = useId();
diff --git a/sdk/audio/src/seedling.tsx b/sdk/audio/src/seedling.tsx
index 055362ba..8b5e7843 100644
--- a/sdk/audio/src/seedling.tsx
+++ b/sdk/audio/src/seedling.tsx
@@ -36,6 +36,9 @@ export interface SeedlingProps {
muffle?: number;
}
+/** A game's sample, played by bevy_seedling on raea's mixer from the frame it first shows until it leaves the page,
+ * with its effects in its chain. A render and a live play hear the same. Give a repeated one-shot a new `id` each
+ * time: `{hit && <Seedling src={staticFile("hit.wav")} id={`hit-${hits}`} />}`. */
export function Seedling(props: SeedlingProps): ReactNode {
const gen = isGeneratedAsset(props.src);
if (!gen && (typeof props.src !== "string" || !props.src)) throw new TypeError(`Seedling: src is a media file or a generated sound, got ${JSON.stringify(props.src)}`);
diff --git a/sdk/math/src/animate/core.ts b/sdk/math/src/animate/core.ts
index 60d9fcc8..f3ff1976 100644
--- a/sdk/math/src/animate/core.ts
+++ b/sdk/math/src/animate/core.ts
@@ -99,6 +99,8 @@ export interface Move {
frames: number;
}
+/** A move from its tracks, by property: `move({ opacity: track({ 0: 0, 6: 1 }), y: track({ 0: 30, 6: 0 }) })`. Its
+ * length is its last key. The named moves (rise, pop and the rest) are built with it. */
export function move(tracks: Record<string, TrackSpec | TrackSpec[] | Keys>): Move {
const out: Record<string, TrackSpec | TrackSpec[]> = {};
let frames = 0;
diff --git a/sdk/math/src/animate/moves.ts b/sdk/math/src/animate/moves.ts
index 6c3f087e..1a0d087b 100644
--- a/sdk/math/src/animate/moves.ts
+++ b/sdk/math/src/animate/moves.ts
@@ -95,6 +95,7 @@ export const pushIn: typeof pushInImpl = (o?: any) => made(28, o, undefined, und
export const fade: typeof fadeImpl = (o?: any) => made(29, o, undefined, undefined, () => fadeImpl(o));
+/** The named moves by name, as `enter="rise"` finds them. */
export const moves = { rise, pop, slam, slide, wipe, fill, tick, strike, pushIn, fade };
export type MoveName = "rise" | "pop" | "slam" | "slide" | "wipe" | "fill" | "strike" | "pushIn" | "fade";
diff --git a/sdk/math/src/animate/timelines.ts b/sdk/math/src/animate/timelines.ts
index b376c685..40b5065b 100644
--- a/sdk/math/src/animate/timelines.ts
+++ b/sdk/math/src/animate/timelines.ts
@@ -21,6 +21,7 @@ export function sequence(...steps: Step[]): Group {
return { kind: "sequence", steps, gap: 0 };
}
+/** Each step when the one before it ends, `gap` frames later (a negative gap overlaps them). */
export function sequenceGap(gap: number, ...steps: Step[]): Group {
return { kind: "sequence", steps, gap };
}
diff --git a/sdk/math/src/easing.ts b/sdk/math/src/easing.ts
index 58a5e6f0..3df248a4 100644
--- a/sdk/math/src/easing.ts
+++ b/sdk/math/src/easing.ts
@@ -79,6 +79,9 @@ function cubicBezier(x1: number, y1: number, x2: number, y2: number): EasingFn {
const OUT = new WeakMap<EasingFn, EasingFn>();
const IN_OUT = new WeakMap<EasingFn, EasingFn>();
+/** The easing curves, each a function of progress 0..1: `linear`, `quad`, `cubic`, `poly(n)`, `sin`, `circle`, `exp`,
+ * `back`, `elastic`, `bounce` and `bezier(x1, y1, x2, y2)`, eased in as they are; `Easing.out(f)` and `Easing.inOut(f)`
+ * turn one round. Pass one as `interpolate`'s `easing`. */
export const Easing = {
linear: ((p) => p) as EasingFn,
quad: power(2),
diff --git a/sdk/math/src/interpolate.ts b/sdk/math/src/interpolate.ts
index 5620f3b9..2379af1e 100644
--- a/sdk/math/src/interpolate.ts
+++ b/sdk/math/src/interpolate.ts
@@ -62,6 +62,9 @@ function checkMode(mode: string, side: string): ExtrapolateMode {
throw new RangeError(`interpolate: ${side} must be extend, clamp, identity or wrap, got "${mode}"`);
}
+/** `x` mapped from the `input` range onto the `output` range, piece by piece: `input` rises, and the two have the same
+ * length. `options.easing` shapes each piece; `extrapolateLeft` and `extrapolateRight` say what happens outside the
+ * range (`extend`, the default, carries on; `clamp` holds the end value; `identity` returns `x`; `wrap` repeats). */
export function interpolate(
x: number,
input: readonly number[],
diff --git a/sdk/math/src/spring.ts b/sdk/math/src/spring.ts
index cc227f07..039d1cf8 100644
--- a/sdk/math/src/spring.ts
+++ b/sdk/math/src/spring.ts
@@ -94,6 +94,9 @@ export function measureSpring(opts: {
return naturalFrames(osc, positive("fps", opts.fps), opts.durationRestThreshold ?? DEFAULT_REST);
}
+/** A damped spring's value at `frame`: from `from` (0) to `to` (1), started `delay` frames late, by its `config`
+ * (mass 1, damping 10, stiffness 100). It overshoots and settles unless `overshootClamping` is set; `durationInFrames`
+ * stretches it to end at that frame. `measureSpring` says how long one takes to settle. */
export function spring(opts: SpringOptions): number {
const fps = positive("fps", opts.fps);
const frame = finite("frame", opts.frame);
diff --git a/sdk/physics/src/physics/core.tsx b/sdk/physics/src/physics/core.tsx
index 8f67e300..bb492c64 100644
--- a/sdk/physics/src/physics/core.tsx
+++ b/sdk/physics/src/physics/core.tsx
@@ -54,12 +54,14 @@ export function snapPose(p: Vec3, step: number): Vec3 {
// ---- rotations ------------------------------------------------------------------------------------------------
+/** The product a × b of two quaternions [x, y, z, w], `b` applied first, as Bevy's Quat * Quat. */
export function quatMul(a: Quat, b: Quat): Quat {
const [ax, ay, az, aw] = a;
const [bx, by, bz, bw] = b;
return [aw * bx + ax * bw + ay * bz - az * by, aw * by - ax * bz + ay * bw + az * bx, aw * bz + ax * by - ay * bx + az * bw, aw * bw - ax * bx - ay * by - az * bz];
}
+/** The quaternion [x, y, z, w] turning `angle` radians about `axis`, as Bevy's Quat::from_axis_angle. */
export function quatAxis(axis: Vec3, angle: number): Quat {
const l = Math.hypot(...axis) || 1;
const s = Math.sin(angle / 2) / l;
diff --git a/sdk/render/src/3d/attribute.ts b/sdk/render/src/3d/attribute.ts
index 9d89c922..a40e6e25 100644
--- a/sdk/render/src/3d/attribute.ts
+++ b/sdk/render/src/3d/attribute.ts
@@ -22,10 +22,15 @@ export const MeshVertexAttribute = {
/** Bevy's Mesh::ATTRIBUTE_* (ids 0 to 5), as a Material's vertex buffer names them. */
export const ATTRIBUTE_POSITION = MeshVertexAttribute.new("Vertex_Position", 0, "Float32x3");
+/** Bevy's Mesh::ATTRIBUTE_NORMAL: a vertex's normal (id 1, Float32x3) */
export const ATTRIBUTE_NORMAL = MeshVertexAttribute.new("Vertex_Normal", 1, "Float32x3");
+/** Bevy's Mesh::ATTRIBUTE_UV_0: a vertex's first texture coordinates (id 2, Float32x2) */
export const ATTRIBUTE_UV_0 = MeshVertexAttribute.new("Vertex_Uv", 2, "Float32x2");
+/** Bevy's Mesh::ATTRIBUTE_UV_1: a vertex's second texture coordinates, as a lightmap's (id 3, Float32x2) */
export const ATTRIBUTE_UV_1 = MeshVertexAttribute.new("Vertex_Uv_1", 3, "Float32x2");
+/** Bevy's Mesh::ATTRIBUTE_TANGENT: a vertex's tangent, its w the bitangent's sign (id 4, Float32x4) */
export const ATTRIBUTE_TANGENT = MeshVertexAttribute.new("Vertex_Tangent", 4, "Float32x4");
+/** Bevy's Mesh::ATTRIBUTE_COLOR: a vertex's linear RGBA colour (id 5, Float32x4) */
export const ATTRIBUTE_COLOR = MeshVertexAttribute.new("Vertex_Color", 5, "Float32x4");
/** One attribute's values on a mesh: one a vertex, each a number or a list of the format's size. */
diff --git a/sdk/render/src/3d/three-shader.tsx b/sdk/render/src/3d/three-shader.tsx
index 65d06c8d..b19801c9 100644
--- a/sdk/render/src/3d/three-shader.tsx
+++ b/sdk/render/src/3d/three-shader.tsx
@@ -35,6 +35,8 @@ export interface ThreeShaderMaterialProps {
color?: string;
}
+/** A three.js shader on the mesh it's in, as it is: a ShaderMaterial's GLSL (or a node material's WGSL) with its
+ * uniforms, drawn by raea's engine with three's built-ins. `<R3F>` makes these from an R3F scene's materials. */
export function ThreeShaderMaterial(props: ThreeShaderMaterialProps) {
const { glsl, wgsl } = props;
if (!glsl === !wgsl) throw new TypeError("ThreeShaderMaterial: give glsl {vertex, fragment} or wgsl {vertex, fragment}, one of them");
diff --git a/sdk/render/src/bevy3d/ui-val.ts b/sdk/render/src/bevy3d/ui-val.ts
index 730ab966..cce2c08c 100644
--- a/sdk/render/src/bevy3d/ui-val.ts
+++ b/sdk/render/src/bevy3d/ui-val.ts
@@ -16,9 +16,13 @@ const num = (what: string, n: number) => {
export const px = (n: number): Val => `${num("px", n)}px`;
/** Bevy's Val::Percent: of the parent's size on that axis (padding and margin: its width, as CSS) */
export const percent = (n: number): Val => `${num("percent", n)}%`;
+/** Bevy's Val::Vw: percent of the viewport's width */
export const vw = (n: number): Val => `${num("vw", n)}vw`;
+/** Bevy's Val::Vh: percent of the viewport's height */
export const vh = (n: number): Val => `${num("vh", n)}vh`;
+/** Bevy's Val::VMin: percent of the viewport's smaller side */
export const vmin = (n: number): Val => `${num("vmin", n)}vmin`;
+/** Bevy's Val::VMax: percent of the viewport's larger side */
export const vmax = (n: number): Val => `${num("vmax", n)}vmax`;
/** Bevy's Val::Auto */
export const auto: Val = "auto";
diff --git a/sdk/render/src/bevy3d/ui.tsx b/sdk/render/src/bevy3d/ui.tsx
index 76e30a25..c057e7c9 100644
--- a/sdk/render/src/bevy3d/ui.tsx
+++ b/sdk/render/src/bevy3d/ui.tsx
@@ -25,7 +25,8 @@ import { useVideoConfig } from "@raea/app/clock";
type Color = Srgba | LinearRgba | string;
/** bevy_ui's Node: its layout fields as Bevy names them (each Bevy's default when left out), and the components that
- * draw it: background_color (BackgroundColor), border_color (BorderColor, every side), z_index (ZIndex). */
+ * draw it: background_color (BackgroundColor), border_color (BorderColor, every side), z_index (ZIndex).
+ * @bevy bevy_ui::Node */
export interface NodeProps extends PickProps {
/** bevy_ecs's Name, as a Scrollbar's target names its scroller (the element's id) */
name?: string;
@@ -237,7 +238,8 @@ export function GhostNode({ children }: { children?: ReactNode }) {
return useContext(InUi) === null ? <>{children}</> : <div style={{ display: "contents" }}>{children}</div>;
}
-/** bevy_text's TextFont, TextColor, TextLayout and LineHeight, on a Text or a TextSpan. */
+/** bevy_text's TextFont, TextColor, TextLayout and LineHeight, on a Text or a TextSpan.
+ * @bevy bevy_text::TextFont */
export interface TextStyleProps {
/** FontSource: a font file (staticFile("fonts/FiraSans-Bold.ttf")), FontSource.family(name) or a generic family
* (FontSource.serif()); Bevy's default font when left out */
diff --git a/sdk/render/src/grow.ts b/sdk/render/src/grow.ts
index 7bfa6fc0..d3f9059d 100644
--- a/sdk/render/src/grow.ts
+++ b/sdk/render/src/grow.ts
@@ -139,6 +139,8 @@ export interface TreeOptions {
export type LoftOutline = string | [number, number][];
+/** Generated growth as Solids, built natively: `tree`, `loft`, `terrain`, `boulder`, `rosette` and the rest. Draw one
+ * with `<Mesh shape={solid}>`; cut, join, measure and place it like any other Solid. */
export const grow = {
/** A tree grown by space colonization in its crown, thinned by the pipe model; `part` picks the wood or the leaves
* (draw them as two meshes with two materials). */
diff --git a/sdk/render/src/screen.tsx b/sdk/render/src/screen.tsx
index 9b041f15..ae2cbc0e 100644
--- a/sdk/render/src/screen.tsx
+++ b/sdk/render/src/screen.tsx
@@ -71,7 +71,7 @@ export interface ScreenSource {
src?: string;
/** an app to show instead of children: a module's path from the composition's folder ("chat.tsx"), its default
* export a React component given {width, height}. It runs on real react-dom in a document of its own, so npm's React
- * libraries work on it (assistant-ui, Radix; installed with `raea-motion add`). In play the pointer reaches it through
+ * libraries work on it (assistant-ui, Radix; installed with `raea add`). In play the pointer reaches it through
* the 3D, where it lands on the picture, and a press on it gives it the keys (the game doesn't get them) until a
* press elsewhere or Escape; in a render it runs on the frame's clock, so the render repeats */
app?: string;
diff --git a/sdk/video/src/registry.tsx b/sdk/video/src/registry.tsx
index 78809e9b..cf9c624f 100644
--- a/sdk/video/src/registry.tsx
+++ b/sdk/video/src/registry.tsx
@@ -13,7 +13,7 @@ export interface CompositionProps<P extends Record<string, unknown> = Record<str
fps: number;
durationInFrames: number;
defaultProps?: P;
- /** a hand edit laid over the composition (docs/craft-system.md, L): written back by void's timeline */
+ /** a hand edit laid over the composition (docs/craft-system.md, L): written back by the app's timeline */
edit?: Edit;
}
diff --git a/tools/manual-ref.sh b/tools/manual-ref.sh
new file mode 100755
index 00000000..93ce9c5b
--- /dev/null
+++ b/tools/manual-ref.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+# The manual's generated references (raea.io/docs/reference/cli/ and /sdk/): `gen` rewrites their generated blocks,
+# `check` fails when one is out of date, a flag has no description, or a verb or import path is in no group.
+# tools/manual-ref.sh gen|check (RAEA_BIN names the raea whose `help --json` the CLI pages come from)
+set -euo pipefail
+cd "$(dirname "$0")/.."
+mode="${1:-check}"
+bun tools/manual-ref/cli.ts "$mode"
+bun tools/manual-ref/sdk.ts "$mode"
diff --git a/tools/manual-ref/bevy-docs.json b/tools/manual-ref/bevy-docs.json
new file mode 100644
index 00000000..4a6df20b
--- /dev/null
+++ b/tools/manual-ref/bevy-docs.json
@@ -0,0 +1,1673 @@
+{
+ "bevy_animation::AnimationClip": {
+ "doc": "A list of `VariableCurve`s and the `AnimationTargetId`s to which they apply.",
+ "fields": {}
+ },
+ "bevy_animation::graph::AnimationGraph": {
+ "doc": "A graph structure that describes how animation clips are to be blended together.",
+ "fields": {
+ "graph": "The `petgraph` data structure that defines the animation graph.",
+ "root": "The index of the root node in the animation graph.",
+ "mask_groups": "The mask groups that each animation target (bone) belongs to."
+ }
+ },
+ "bevy_anti_alias::fxaa::Fxaa": {
+ "doc": "A component for enabling Fast Approximate Anti-Aliasing (FXAA) for a `bevy_camera::Camera`.",
+ "fields": {
+ "enabled": "Enable render passes for FXAA.",
+ "edge_threshold": "Use lower sensitivity for a sharper, faster, result. Use higher sensitivity for a slower, smoother, result. `Ultra` and `Extreme` settings can result in significant smearing and loss of detail.",
+ "edge_threshold_min": "Trims the algorithm from processing darks."
+ }
+ },
+ "bevy_anti_alias::smaa::Smaa": {
+ "doc": "A component for enabling Subpixel Morphological Anti-Aliasing (SMAA) for a `bevy_camera::Camera`.",
+ "fields": {
+ "preset": "A predefined set of SMAA parameters: i.e. a quality level."
+ }
+ },
+ "bevy_camera::Viewport": {
+ "doc": "Render viewport configuration for the `Camera` component.",
+ "fields": {
+ "physical_position": "The physical position to render this viewport to within the `RenderTarget` of this `Camera`. (0,0) corresponds to the top-left corner",
+ "physical_size": "The physical size of the viewport rectangle to render to within the `RenderTarget` of this `Camera`. The origin of the rectangle is in the top-left corner.",
+ "depth": "The minimum and maximum depth to render (on a scale from 0.0 to 1.0)."
+ }
+ },
+ "bevy_camera::camera::Camera": {
+ "doc": "The defining `Component` for camera entities, storing information about how and what to render through this camera.",
+ "fields": {
+ "viewport": "If set, this camera will render to the given `Viewport` rectangle within the configured `RenderTarget`.",
+ "order": "Cameras with a higher order are rendered later, and thus on top of lower order cameras.",
+ "is_active": "If this is set to `true`, this camera will be rendered to its specified `RenderTarget`. If `false`, this camera will not be rendered.",
+ "computed": "Computed values for this camera, such as the projection matrix and the render target size.",
+ "output_mode": "The `CameraOutputMode` for this camera.",
+ "msaa_writeback": "Controls when MSAA writeback occurs for this camera. See `MsaaWriteback` for available options.",
+ "clear_color": "The clear color operation to perform on the render target.",
+ "invert_culling": "Whether to switch culling mode so that materials that request backface culling cull front faces, and vice versa.",
+ "sub_camera_view": "If set, this camera will be a sub camera of a large view, defined by a `SubCameraView`."
+ }
+ },
+ "bevy_camera::camera::Exposure": {
+ "doc": "How much energy a `Camera3d` absorbs from incoming light.",
+ "fields": {
+ "ev100": "<https://en.wikipedia.org/wiki/Exposure_value#Tabulated_exposure_values>"
+ }
+ },
+ "bevy_camera::clear_color::ClearColorConfig": {
+ "doc": "For a camera, specifies the color used to clear the viewport before rendering or when writing to the final render target texture.",
+ "fields": {
+ "Default": "The clear color is taken from the world's `ClearColor` resource.",
+ "Custom": "The given clear color is used, overriding the `ClearColor` resource defined in the world.",
+ "None": "No clear color is used: the camera will simply draw on top of anything already in the viewport."
+ }
+ },
+ "bevy_camera::components::Camera3d": {
+ "doc": "A 3D camera component. Enables the main 3D render graph for a `Camera`.",
+ "fields": {
+ "depth_load_op": "The depth clear operation to perform for the main 3d pass.",
+ "depth_texture_usages": "The texture usages for the depth texture created for the main 3d pass."
+ }
+ },
+ "bevy_camera::components::Hdr": {
+ "doc": "If this component is added to a camera, the camera will use an intermediate \"high dynamic range\" render texture. This allows rendering with a wider range of lighting values. However, this does *not* affect whether the camera will render with hdr display output (which bevy does not support currently) and only affects the intermediate render texture.",
+ "fields": {}
+ },
+ "bevy_camera::projection::Projection": {
+ "doc": "Component that defines how to compute a `Camera`'s projection matrix.",
+ "fields": {}
+ },
+ "bevy_camera::visibility::render_layers::RenderLayers": {
+ "doc": "Defines which rendering layers an entity belongs to.",
+ "fields": {}
+ },
+ "bevy_color::Okhsla": {
+ "doc": "</div>",
+ "fields": {
+ "hue": "The hue channel. [0.0, 360.0]",
+ "saturation": "The saturation channel. [0.0, 1.0]",
+ "lightness": "The lightness channel. [0.0, 1.0]",
+ "alpha": "The alpha channel. [0.0, 1.0]"
+ }
+ },
+ "bevy_feathers::controls::AngleDegrees": {
+ "doc": "Unit representing an angle. Internally this is represented as radians, but the preferred display format is degrees. This will display the degree symbol (°) except when in editing mode, in which case it will use the suffix \"d\" which is easier to type.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::ButtonVariant": {
+ "doc": "Color variants for buttons. This also functions as a component used by the dynamic styling system to identify which entities are buttons.",
+ "fields": {
+ "Normal": "The standard button appearance",
+ "Primary": "A button with a more prominent color, this is used for \"call to action\" buttons, default buttons for dialog boxes, and so on.",
+ "Plain": "Don't display the button background unless hovering or pressed."
+ }
+ },
+ "bevy_feathers::controls::ColorChannel": {
+ "doc": "Indicates which color channel we want to edit.",
+ "fields": {
+ "Red": "Editing the RGB red channel (0..=1)",
+ "Green": "Editing the RGB green channel (0..=1)",
+ "Blue": "Editing the RGB blue channel (0..=1)",
+ "HslHue": "Editing the hue channel (0..=360)",
+ "HslSaturation": "Editing the chroma / saturation channel (0..=1)",
+ "HslLightness": "Editing the luminance channel (0..=1)",
+ "Alpha": "Editing the alpha channel (0..=1)",
+ "OkhslHue": "Editing the Okhsl Hue channel (0..=360)",
+ "OkhslSaturation": "Editing the Okhsl Saturation channel (0..=1)",
+ "OkhslLightness": "Editing the Okhsl Lightness channel (0..=1)"
+ }
+ },
+ "bevy_feathers::controls::Dimensionless": {
+ "doc": "A `UnitsFormat` meaning \"no units\", which is the default units. This just does straight-up number parsing and formatting with no suffix.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::FeathersButton": {
+ "doc": "A button widget.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::FeathersCheckbox": {
+ "doc": "A checkbox widget.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::FeathersColorInput": {
+ "doc": "A button which displays a color swatch; when clicked, it displays a popup containing a color picker.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::FeathersColorPlane": {
+ "doc": "A \"color plane\" widget, which is a 2d picker that allows selecting two components of a color space.",
+ "fields": {
+ "RedGreen": "Show red on the horizontal axis and green on the vertical.",
+ "RedBlue": "Show red on the horizontal axis and blue on the vertical.",
+ "GreenBlue": "Show green on the horizontal axis and blue on the vertical.",
+ "HueSaturation": "Show hue on the horizontal axis and saturation on the vertical.",
+ "HueLightness": "Show hue on the horizontal axis and lightness on the vertical.",
+ "OkhslHueSaturation": "Show OKHSL hue on horizontal axis and saturation on vertical.",
+ "OkhslHueLightness": "Show OKHSL hue on horizontal axis and lightness on vertical."
+ }
+ },
+ "bevy_feathers::controls::FeathersColorSlider": {
+ "doc": "A color slider widget.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::FeathersColorSwatch": {
+ "doc": "A color swatch widget.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::FeathersDisclosureToggle": {
+ "doc": "A toggle button which shows a chevron that points either right or down, used to expand or collapse a panel. Functionally, this is equivalent to a checkbox, and has a `Checked` state.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::FeathersLazyMenu": {
+ "doc": "Top-level menu container. This wraps the menu button and provides an anchor for the popover. This is slightly different from the normal `FeathersMenu` in that it dynamically spawns the menu popup when the menu is shown and despawns it when it is closed, instead of simply hiding the popup. This is the recommended approach for popups which are large, expensive to keep around, or whose items are dynamically generated.",
+ "fields": {
+ "popup": "Callback which constructs the popup"
+ }
+ },
+ "bevy_feathers::controls::FeathersListRow": {
+ "doc": "A selectable row in a list of items",
+ "fields": {}
+ },
+ "bevy_feathers::controls::FeathersListView": {
+ "doc": "A container that displays a scrolling list of items.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::FeathersMenu": {
+ "doc": "Top-level menu container. This wraps the menu button and provides an anchor for the popover.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::FeathersMenuButton": {
+ "doc": "A menu button widget. This produces a button that has a dropdown arrow.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::FeathersMenuDivider": {
+ "doc": "A decorative divider between menu items",
+ "fields": {}
+ },
+ "bevy_feathers::controls::FeathersMenuItem": {
+ "doc": "A menu item widget.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::FeathersMenuPopup": {
+ "doc": "A menu popup widget.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::FeathersMenuToolButton": {
+ "doc": "A menu button widget with the tool button form factor. This produces a button that has a dropdown arrow.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::FeathersNumberInput": {
+ "doc": "Widget that permits text entry of floating-point numbers. This widget implements two-way synchronization: * it emits values (via a `ValueChange<T>`) event as the user types or drags. The type of ``T`` will be ``f32``, ``f64``, ``i32``, or ``i64`` depending on the `NumberInputValue` component variant. * it listens for the insertion of the `NumberInputValue` component, and replaces the contents of the text buffer based on the value in that event.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::FeathersRadio": {
+ "doc": "A radio widget.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::FeathersScrollbar": {
+ "doc": "A scrollbar. The `target` property should point to an entity whose `ScrollPosition` will be synchronized with the scrollbar.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::FeathersSelect": {
+ "doc": "Select control which spawns a menu popup with a list of string options # Emitted events * `ValueChange<Entity>` when the selected option is changed.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::FeathersSlider": {
+ "doc": "A slider widget.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::FeathersTextInput": {
+ "doc": "Scene function to spawn a text input. For proper styling, this should be enclosed by a `FeathersTextInputContainer`.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::FeathersTextInputContainer": {
+ "doc": "Decorative frame around a text input widget. This is a separate entity to allow icons (such as \"search\" or \"clear\") to be inserted adjacent to the input.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::FeathersToggleSwitch": {
+ "doc": "A toggle switch widget.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::FeathersToolButton": {
+ "doc": "Tool button scene function: a smaller button for embedding in panel headers.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::LengthMeters": {
+ "doc": "Unit representing length, where the preferred unit is meters.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::NumberInputRange": {
+ "doc": "Represents numeric limits in different number formats.",
+ "fields": {
+ "F32": "An 'f32' range.",
+ "F64": "An 'f64' range.",
+ "I32": "An 'i32' range.",
+ "I64": "An 'i64' range."
+ }
+ },
+ "bevy_feathers::controls::NumberInputValue": {
+ "doc": "Represents numbers in different formats.",
+ "fields": {
+ "F32": "An `f32` value",
+ "F64": "An `f64` value",
+ "I32": "An `i32` value",
+ "I64": "An `i64` value"
+ }
+ },
+ "bevy_feathers::controls::NumberInputWrap": {
+ "doc": "Indicates whether the number input should wrap around the min/max value. This component only applies to `HardLimit`.",
+ "fields": {
+ "NoWrap": "The number input will not wrap around the min/max value.",
+ "Wrap": "The number input will wrap around the min/max value."
+ }
+ },
+ "bevy_feathers::controls::StandardUnitItem": {
+ "doc": "Contains the definition of a \"standard metrical unit\". The `StandardUnitKind` struct maintains a table of these items.",
+ "fields": {
+ "suffixes": "e.g. [\"km\"], or [\"cm\"], first entry is canonical",
+ "scale": "multiply a value in this unit to get the base unit (meters, radians, kg...)"
+ }
+ },
+ "bevy_feathers::controls::TimeSeconds": {
+ "doc": "Unit representing time, where the preferred unit is seconds.",
+ "fields": {}
+ },
+ "bevy_feathers::controls::VirtualKeyboard": {
+ "doc": "A virtual keyboard widget.",
+ "fields": {}
+ },
+ "bevy_feathers::rounded_corners::RoundedCorners": {
+ "doc": "Allows specifying which corners are rounded and which are sharp. All rounded corners have the same radius. Not all combinations are supported, only the ones that make sense for a segmented buttons.",
+ "fields": {
+ "None": "No corners are rounded.",
+ "All": "All corners are rounded.",
+ "TopLeft": "Top-left corner is rounded.",
+ "TopRight": "Top-right corner is rounded.",
+ "BottomRight": "Bottom-right corner is rounded.",
+ "BottomLeft": "Bottom-left corner is rounded.",
+ "Top": "Top corners are rounded.",
+ "Right": "Right corners are rounded.",
+ "Bottom": "Bottom corners are rounded.",
+ "Left": "Left corners are rounded."
+ }
+ },
+ "bevy_feathers::theme::SurfaceLevel": {
+ "doc": "Indicates the type of surface context for computing color assignments",
+ "fields": {
+ "Base": "The base layer - window and pane header",
+ "Higher": "A raised layer - pane and subpane bodies",
+ "Highest": "The highest level - groups and subpane headers",
+ "Floating": "An overlay such as a dialog or menu"
+ }
+ },
+ "bevy_feathers::theme::ThemeBackgroundColor": {
+ "doc": "Component which causes the background color of an entity to be set based on a theme color.",
+ "fields": {}
+ },
+ "bevy_feathers::theme::ThemeBorderColor": {
+ "doc": "Component which causes the border color of an entity to be set based on a theme color. Only supports setting all borders to the same color.",
+ "fields": {}
+ },
+ "bevy_feathers::theme::ThemeContext": {
+ "doc": "Component which is placed on a container and which propagates to children. This is used to modify the color assignments based on the background container.",
+ "fields": {}
+ },
+ "bevy_feathers::theme::ThemeProps": {
+ "doc": "A collection of properties that make up a theme.",
+ "fields": {
+ "token_assignments": "Map of design tokens to semantic tokens.",
+ "semantic_base": "Map of semantic tokens to colors.",
+ "semantic_overrides": "Map of semantic tokens + context to colors."
+ }
+ },
+ "bevy_feathers::theme::ThemedText": {
+ "doc": "A marker component that is used to indicate that the text entity wants to opt-in to using inherited text styles.",
+ "fields": {}
+ },
+ "bevy_feathers::theme::UiTheme": {
+ "doc": "The currently selected user interface theme. Overwriting this resource changes the theme.",
+ "fields": {}
+ },
+ "bevy_gizmos::retained::Gizmo": {
+ "doc": "A component that draws the gizmos of a `GizmoAsset`.",
+ "fields": {
+ "handle": "The handle to the gizmo to draw.",
+ "line_config": "The line specific configuration for this gizmo.",
+ "depth_bias": "How closer to the camera than real geometry the gizmo should be."
+ }
+ },
+ "bevy_image::ImagePlugin": {
+ "doc": "Adds the `Image` as an asset and makes sure that they are extracted and prepared for the GPU.",
+ "fields": {
+ "default_sampler": "The default image sampler to use when `ImageSampler` is set to `Default`.",
+ "default_compressed_image_processor_extensions": "The file extensions that will be assigned a default compressed image processor. This means they will be automatically compressed unless overridden with a `.meta` file."
+ }
+ },
+ "bevy_image::TextureAtlasLayout": {
+ "doc": "Stores a map used to lookup the position of a texture in a `TextureAtlas`. This can be used to either use and look up a specific section of a texture, or animate frame-by-frame as a sprite sheet.",
+ "fields": {
+ "size": "Total size of texture atlas.",
+ "textures": "The specific areas of the atlas where each texture can be found"
+ }
+ },
+ "bevy_image::image::Image": {
+ "doc": "This type is only meant for short-term transmission between same versions and should not be stored anywhere.",
+ "fields": {
+ "data": "Raw pixel data. If the image is being used as a storage texture which doesn't need to be initialized by the CPU, then this should be `None`. Otherwise, it should always be `Some`.",
+ "data_order": "For texture data with layers and mips, this field controls how wgpu interprets the buffer layout.",
+ "texture_descriptor": "Describes the data layout of the GPU texture.\\ For example, whether a texture contains 1D/2D/3D data, and what the format of the texture data is.",
+ "sampler": "The `ImageSampler` to use during rendering.",
+ "texture_view_descriptor": "Describes how the GPU texture should be interpreted.\\ For example, 2D image data could be read as plain 2D, an array texture of layers of 2D with the same dimensions (and the number of layers in that case), a cube map, an array of cube maps, etc.",
+ "asset_usage": "Where this image asset will be used. See `RenderAssetUsages` for more.",
+ "copy_on_resize": "Whether this image should be copied on the GPU when resized."
+ }
+ },
+ "bevy_image::texture_atlas::TextureAtlasLayout": {
+ "doc": "Stores a map used to lookup the position of a texture in a `TextureAtlas`. This can be used to either use and look up a specific section of a texture, or animate frame-by-frame as a sprite sheet.",
+ "fields": {
+ "size": "Total size of texture atlas.",
+ "textures": "The specific areas of the atlas where each texture can be found"
+ }
+ },
+ "bevy_image::texture_atlas::TextureAtlasSources": {
+ "doc": "Stores a mapping from sub texture handles to the related area index.",
+ "fields": {
+ "texture_ids": "Maps from a specific image handle to the index in `textures` where they can be found."
+ }
+ },
+ "bevy_image::texture_atlas_builder::TextureAtlasBuilder": {
+ "doc": "A builder which is used to create a texture atlas from many individual sprites.",
+ "fields": {}
+ },
+ "bevy_input::gamepad::Gamepad": {
+ "doc": "Stores a connected gamepad's metadata such as the name and its `GamepadButton` and `GamepadAxis`.",
+ "fields": {}
+ },
+ "bevy_light::NotShadowCaster": {
+ "doc": "Add this component to make a `Mesh3d` not cast shadows.",
+ "fields": {}
+ },
+ "bevy_light::NotShadowReceiver": {
+ "doc": "Add this component to make a `Mesh3d` not receive shadows.",
+ "fields": {}
+ },
+ "bevy_light::ShadowFilteringMethod": {
+ "doc": "Add this component to a `Camera3d` to control how to anti-alias shadow edges.",
+ "fields": {
+ "Hardware2x2": "Hardware 2x2.",
+ "Gaussian": "Approximates a fixed Gaussian blur, good when TAA isn't in use.",
+ "Temporal": "A randomized filter that varies over time, good when TAA is in use."
+ }
+ },
+ "bevy_light::ambient_light::AmbientLight": {
+ "doc": "An ambient light, which lights the entire scene equally.",
+ "fields": {
+ "color": "The color of the ambient light.",
+ "brightness": "A direct scale factor multiplied with `color` before being passed to the shader.",
+ "affects_lightmapped_meshes": "Whether this ambient light has an effect on meshes with lightmaps."
+ }
+ },
+ "bevy_light::cascade::CascadeShadowConfig": {
+ "doc": "Controls how cascaded shadow mapping works. Prefer using `CascadeShadowConfigBuilder` to construct an instance.",
+ "fields": {
+ "bounds": "The (positive) distance to the far boundary of each cascade.",
+ "overlap_proportion": "The proportion of overlap each cascade has with the previous cascade.",
+ "minimum_distance": "The (positive) distance to the near boundary of the first cascade."
+ }
+ },
+ "bevy_light::directional_light::DirectionalLight": {
+ "doc": "A Directional light.",
+ "fields": {
+ "color": "The color of the light.",
+ "illuminance": "Illuminance in lux (lumens per square meter), representing the amount of light projected onto surfaces by this light source. Lux is used here instead of lumens because a directional light illuminates all surfaces more-or-less the same way (depending on the angle of incidence). Lumens can only be specified for light sources which emit light from a specific area. The default is `light_consts::lux::AMBIENT_DAYLIGHT` = 10,000.",
+ "shadow_maps_enabled": "Whether this light casts shadows.",
+ "contact_shadows_enabled": "Whether this light casts contact shadows.",
+ "soft_shadow_size": "Whether soft shadows are enabled, and if so, the size of the light.",
+ "affects_lightmapped_mesh_diffuse": "Whether this directional light contributes diffuse lighting to meshes with lightmaps.",
+ "shadow_depth_bias": "A value that adjusts the tradeoff between self-shadowing artifacts and proximity of shadows to their casters.",
+ "shadow_normal_bias": "A bias applied along the direction of the fragment's surface normal. It is scaled to the shadow map's texel size so that it is automatically adjusted to the orthographic projection."
+ }
+ },
+ "bevy_light::directional_light::DirectionalLightShadowMap": {
+ "doc": "Controls the resolution of `DirectionalLight` and `SpotLight` shadow maps.",
+ "fields": {
+ "size": "Must be a power of two to avoid unstable cascade positioning."
+ }
+ },
+ "bevy_light::point_light::PointLight": {
+ "doc": "A light that emits light in all directions from a central point.",
+ "fields": {
+ "color": "The color of this light source.",
+ "intensity": "Luminous power in lumens, representing the amount of light emitted by this source in all directions.",
+ "range": "Cut-off for the light's area-of-effect. Fragments outside this range will not be affected by this light at all, so it's important to tune this together with `intensity` to prevent hard lighting cut-offs.",
+ "radius": "Simulates a light source coming from a spherical volume with the given radius.",
+ "shadow_maps_enabled": "Whether this light casts shadows.",
+ "contact_shadows_enabled": "Whether this light casts contact shadows.",
+ "soft_shadows_enabled": "Whether soft shadows are enabled.",
+ "affects_lightmapped_mesh_diffuse": "Whether this point light contributes diffuse lighting to meshes with lightmaps.",
+ "shadow_depth_bias": "A bias used when sampling shadow maps to avoid \"shadow-acne\", or false shadow occlusions that happen as a result of shadow-map fragments not mapping 1:1 to screen-space fragments. Too high of a depth bias can lead to shadows detaching from their casters, or \"peter-panning\". This bias can be tuned together with `shadow_normal_bias` to correct shadow artifacts for a given scene.",
+ "shadow_normal_bias": "A bias applied along the direction of the fragment's surface normal. It is scaled to the shadow map's texel size so that it can be small close to the camera and gets larger further away.",
+ "shadow_map_near_z": "The distance from the light to near Z plane in the shadow map."
+ }
+ },
+ "bevy_light::point_light::PointLightShadowMap": {
+ "doc": "Controls the resolution of `PointLight` shadow maps.",
+ "fields": {
+ "size": "The width and height of each of the 6 faces of the cubemap."
+ }
+ },
+ "bevy_light::probe::EnvironmentMapLight": {
+ "doc": "A pair of cubemap textures that represent the surroundings of a specific area in space.",
+ "fields": {
+ "diffuse_map": "The blurry image that represents diffuse radiance surrounding a region.",
+ "specular_map": "The typically-sharper, mipmapped image that represents specular radiance surrounding a region.",
+ "intensity": "Scale factor applied to the diffuse and specular light generated by this component.",
+ "rotation": "World space rotation applied to the environment light cubemaps. This is useful for users who require a different axis, such as the Z-axis, to serve as the vertical axis.",
+ "affects_lightmapped_mesh_diffuse": "Whether the light from this environment map contributes diffuse lighting to meshes with lightmaps."
+ }
+ },
+ "bevy_light::probe::GeneratedEnvironmentMapLight": {
+ "doc": "A generated environment map that is filtered at runtime.",
+ "fields": {
+ "environment_map": "Source cubemap to be filtered on the GPU, size must be a power of two.",
+ "intensity": "Scale factor applied to the diffuse and specular light generated by this component. Expressed in cd/m² (candela per square meter).",
+ "rotation": "World-space rotation applied to the cubemap.",
+ "affects_lightmapped_mesh_diffuse": "Whether this light contributes diffuse lighting to meshes that already have baked lightmaps."
+ }
+ },
+ "bevy_light::probe::Skybox": {
+ "doc": "Adds a skybox to a 3D camera, based on a cubemap texture.",
+ "fields": {
+ "image": "The cubemap to use.",
+ "brightness": "Scale factor applied to the skybox image. After applying this multiplier to the image samples, the resulting values should be in units of cd/m^2.",
+ "rotation": "View space rotation applied to the skybox cubemap. This is useful for users who require a different axis, such as the Z-axis, to serve as the vertical axis."
+ }
+ },
+ "bevy_light::rect_light::RectLight": {
+ "doc": "A rectangular area light.",
+ "fields": {
+ "color": "The color of the light.",
+ "intensity": "Luminous power in lumens, representing the amount of light emitted by this source in all directions.",
+ "range": "Cut-off for the light's area-of-effect. Fragments outside this range will not be affected by this light at all, so it's important to tune this together with `intensity` to prevent hard lighting cut-offs.",
+ "width": "Width of the light rectangle (along local X).",
+ "height": "Height of the light rectangle (along local Y)."
+ }
+ },
+ "bevy_light::spot_light::SpotLight": {
+ "doc": "A light that emits light in a given direction from a central point.",
+ "fields": {
+ "color": "The color of the light.",
+ "intensity": "Luminous power in lumens, representing the amount of light emitted by this source in all directions.",
+ "range": "Range in meters that this light illuminates.",
+ "radius": "Simulates a light source coming from a spherical volume with the given radius.",
+ "shadow_maps_enabled": "Whether this light casts shadows.",
+ "contact_shadows_enabled": "Whether this light casts contact shadows. Cameras must also have the `ContactShadows` component.",
+ "soft_shadows_enabled": "Whether soft shadows are enabled.",
+ "affects_lightmapped_mesh_diffuse": "Whether this spot light contributes diffuse lighting to meshes with lightmaps.",
+ "shadow_depth_bias": "A value that adjusts the tradeoff between self-shadowing artifacts and proximity of shadows to their casters.",
+ "shadow_normal_bias": "A bias applied along the direction of the fragment's surface normal. It is scaled to the shadow map's texel size so that it can be small close to the camera and gets larger further away.",
+ "shadow_map_near_z": "The distance from the light to the near Z plane in the shadow map.",
+ "outer_angle": "Angle defining the distance from the spot light direction to the outer limit of the light's cone of effect. `outer_angle` must be < `PI / 2.0`.",
+ "inner_angle": "Angle defining the distance from the spot light direction to the inner limit of the light's cone of effect. Light is attenuated from `inner_angle` to `outer_angle` to give a smooth falloff. `inner_angle` should be <= `outer_angle`"
+ }
+ },
+ "bevy_light::volumetric::FogVolume": {
+ "doc": "A unit cube of fog at the origin. Can be positioned and scaled with a `Transform`. Only visible by cameras with a `VolumetricFog` component when lit by a directional light with `VolumetricLight`.",
+ "fields": {
+ "fog_color": "The color of the fog.",
+ "density_factor": "The density of fog, which measures how dark the fog is.",
+ "density_texture": "Optional 3D voxel density texture for the fog.",
+ "density_texture_offset": "Configurable offset of the density texture in UVW coordinates.",
+ "absorption": "The absorption coefficient, which measures what fraction of light is absorbed by the fog at each step.",
+ "scattering": "The scattering coefficient, which measures the fraction of light that's scattered toward, and away from, the viewer.",
+ "scattering_asymmetry": "Measures the fraction of light that's scattered *toward* the camera, as opposed to *away* from the camera.",
+ "light_tint": "Applies a nonphysical color to the light.",
+ "light_intensity": "Scales the light by a fixed fraction."
+ }
+ },
+ "bevy_light::volumetric::VolumetricFog": {
+ "doc": "When placed on a `bevy_camera::Camera3d`, enables volumetric fog and volumetric lighting, also known as light shafts or god rays.",
+ "fields": {
+ "ambient_color": "Color of the ambient light.",
+ "ambient_intensity": "The brightness of the ambient light.",
+ "jitter": "The maximum distance to offset the ray origin randomly by, in meters.",
+ "step_count": "The number of raymarching steps to perform."
+ }
+ },
+ "bevy_light::volumetric::VolumetricLight": {
+ "doc": "Add this component to a `DirectionalLight` with a shadow map (`shadow_maps_enabled: true`) to make volumetric fog interact with it.",
+ "fields": {}
+ },
+ "bevy_math::Rot2": {
+ "doc": "A 2D rotation.",
+ "fields": {
+ "cos": "The cosine of the rotation angle.",
+ "sin": "The sine of the rotation angle."
+ }
+ },
+ "bevy_mesh::MeshVertexAttribute": {
+ "doc": "",
+ "fields": {
+ "name": "The friendly name of the vertex attribute",
+ "id": "The _unique_ id of the vertex attribute. This will also determine sort ordering when generating vertex buffers. Built-in / standard attributes will use \"close to zero\" indices. When in doubt, use a random / very large u64 to avoid conflicts.",
+ "format": "The format of the vertex attribute."
+ }
+ },
+ "bevy_mesh::components::Mesh2d": {
+ "doc": "A component for 2D meshes. Requires a `MeshMaterial2d` to be rendered, commonly using a `ColorMaterial`.",
+ "fields": {}
+ },
+ "bevy_mesh::components::Mesh3d": {
+ "doc": "A component for 3D meshes. Requires a `MeshMaterial3d` to be rendered, commonly using a `StandardMaterial`.",
+ "fields": {}
+ },
+ "bevy_mesh::mesh::Mesh": {
+ "doc": "A 3D object made out of vertices representing triangles, lines, or points, with \"attribute\" values for each vertex.",
+ "fields": {
+ "asset_usage": "`std::collections::BTreeMap` with all defined vertex attributes (Positions, Normals, ...) for this mesh. Attribute ids to attribute values. Uses a `BTreeMap` because, unlike `HashMap`, it has a defined iteration order, which allows easy stable `VertexBuffers` (i.e. same buffer order)",
+ "enable_raytracing": "Whether or not to build a BLAS for use with `bevy_solari` raytracing.",
+ "final_aabb": "Precomputed min and max extents of the mesh position data. Used mainly for constructing `Aabb`s for frustum culling and decompressing vertex positions. This data will be set if/when a mesh is extracted to the GPU or when compressing positions.",
+ "final_uv_ranges": "Precomputed min and max extents of the mesh UV channels data. Used mainly for decompressing vertex UVs. This will be set when compressing UVs."
+ }
+ },
+ "bevy_pbr::extended_material::ExtendedMaterial": {
+ "doc": "A material that extends a base `Material` with additional shaders and data.",
+ "fields": {}
+ },
+ "bevy_pbr::fog::DistanceFog": {
+ "doc": "Configures the “classic” computer graphics distance fog effect, in which objects appear progressively more covered in atmospheric haze the further away they are from the camera. Affects meshes rendered via the PBR `StandardMaterial`.",
+ "fields": {
+ "color": "The color of the fog effect.",
+ "directional_light_color": "Color used to modulate the influence of directional light colors on the fog, where the view direction aligns with each directional light direction, producing a “glow” or light dispersion effect. (e.g. around the sun)",
+ "directional_light_exponent": "The exponent applied to the directional light alignment calculation. A higher value means a more concentrated “glow”.",
+ "falloff": "Determines which falloff mode to use, and its parameters."
+ }
+ },
+ "bevy_pbr::lightmap::Lightmap": {
+ "doc": "A component that applies baked indirect diffuse global illumination from a lightmap.",
+ "fields": {
+ "image": "The lightmap texture.",
+ "uv_rect": "The rectangle within the lightmap texture that the UVs are relative to.",
+ "bicubic_sampling": "Whether bicubic sampling should be used for sampling this lightmap."
+ }
+ },
+ "bevy_pbr::mesh_material::MeshMaterial3d": {
+ "doc": "A material used for rendering a `Mesh3d`.",
+ "fields": {}
+ },
+ "bevy_pbr::pbr_material::StandardMaterial": {
+ "doc": "A material with \"standard\" properties used in PBR lighting. Standard property values with pictures here: <https://google.github.io/filament/notes/material_properties.html>.",
+ "fields": {
+ "base_color": "The color of the surface of the material before lighting.",
+ "base_color_channel": "The UV channel to use for the `StandardMaterial::base_color_texture`.",
+ "base_color_texture": "The texture component of the material's color before lighting. The actual pre-lighting color is `base_color * this_texture`.",
+ "emissive": "Color the material \"emits\" to the camera.",
+ "emissive_exposure_weight": "The weight in which the camera exposure influences the emissive color. A value of `0.0` means the emissive color is not affected by the camera exposure. In opposition, a value of `1.0` means the emissive color is multiplied by the camera exposure.",
+ "emissive_channel": "The UV channel to use for the `StandardMaterial::emissive_texture`.",
+ "emissive_texture": "The emissive map, multiplies pixels with `emissive` to get the final \"emitting\" color of a surface.",
+ "metallic": "How \"metallic\" the material appears, within `[0.0, 1.0]`.",
+ "metallic_roughness_channel": "The UV channel to use for the `StandardMaterial::metallic_roughness_texture`.",
+ "metallic_roughness_texture": "Metallic and roughness maps, stored as a single texture.",
+ "reflectance": "Specular intensity for non-metals on a linear scale of `[0.0, 1.0]`.",
+ "specular_tint": "A color with which to modulate the `StandardMaterial::reflectance` for non-metals.",
+ "diffuse_transmission": "The amount of light transmitted _diffusely_ through the material (i.e. “translucency”).",
+ "diffuse_transmission_channel": "The UV channel to use for the `StandardMaterial::diffuse_transmission_texture`.",
+ "diffuse_transmission_texture": "A map that modulates diffuse transmission via its alpha channel. Multiplied by `StandardMaterial::diffuse_transmission` to obtain the final result.",
+ "specular_transmission": "The amount of light transmitted _specularly_ through the material (i.e. via refraction).",
+ "specular_transmission_channel": "The UV channel to use for the `StandardMaterial::specular_transmission_texture`.",
+ "specular_transmission_texture": "A map that modulates specular transmission via its red channel. Multiplied by `StandardMaterial::specular_transmission` to obtain the final result.",
+ "thickness": "Thickness of the volume beneath the material surface.",
+ "thickness_channel": "The UV channel to use for the `StandardMaterial::thickness_texture`.",
+ "thickness_texture": "A map that modulates thickness via its green channel. Multiplied by `StandardMaterial::thickness` to obtain the final result.",
+ "ior": "The index of refraction of the material.",
+ "attenuation_distance": "How far, on average, light travels through the volume beneath the material's surface before being absorbed.",
+ "attenuation_color": "The resulting (non-absorbed) color after white light travels through the attenuation distance.",
+ "normal_map_channel": "The UV channel to use for the `StandardMaterial::normal_map_texture`.",
+ "normal_map_texture": "Used to fake the lighting of bumps and dents on a material.",
+ "flip_normal_map_y": "Normal map textures authored for DirectX have their y-component flipped. Set this to flip it to right-handed conventions.",
+ "occlusion_channel": "The UV channel to use for the `StandardMaterial::occlusion_texture`.",
+ "occlusion_texture": "Specifies the level of exposure to ambient light.",
+ "specular_channel": "The UV channel to use for the `StandardMaterial::specular_texture`.",
+ "specular_texture": "A map that specifies reflectance for non-metallic materials.",
+ "specular_tint_channel": "The UV channel to use for the `StandardMaterial::specular_tint_texture`.",
+ "specular_tint_texture": "A map that specifies color adjustment to be applied to the specular reflection for non-metallic materials.",
+ "clearcoat": "An extra thin translucent layer on top of the main PBR layer. This is typically used for painted surfaces.",
+ "clearcoat_channel": "The UV channel to use for the `StandardMaterial::clearcoat_texture`.",
+ "clearcoat_texture": "An image texture that specifies the strength of the clearcoat layer in the red channel. Values sampled from this texture are multiplied by the main `StandardMaterial::clearcoat` factor.",
+ "clearcoat_perceptual_roughness": "The roughness of the clearcoat material. This is specified in exactly the same way as the `StandardMaterial::perceptual_roughness`.",
+ "clearcoat_roughness_channel": "The UV channel to use for the `StandardMaterial::clearcoat_roughness_texture`.",
+ "clearcoat_roughness_texture": "An image texture that specifies the roughness of the clearcoat level in the green channel. Values from this texture are multiplied by the main `StandardMaterial::clearcoat_perceptual_roughness` factor.",
+ "clearcoat_normal_channel": "The UV channel to use for the `StandardMaterial::clearcoat_normal_texture`.",
+ "clearcoat_normal_texture": "An image texture that specifies a normal map that is to be applied to the clearcoat layer. This can be used to simulate, for example, scratches on an outer layer of varnish. Normal maps are in the same format as `StandardMaterial::normal_map_texture`.",
+ "anisotropy_strength": "Increases the roughness along a specific direction, so that the specular highlight will be stretched instead of being a circular lobe.",
+ "anisotropy_rotation": "The direction of increased roughness, in radians relative to the mesh tangent.",
+ "anisotropy_channel": "The UV channel to use for the `StandardMaterial::anisotropy_texture`.",
+ "anisotropy_texture": "An image texture that allows the `StandardMaterial::anisotropy_strength` and `StandardMaterial::anisotropy_rotation` to vary across the mesh.",
+ "double_sided": "Support two-sided lighting by automatically flipping the normals for \"back\" faces within the PBR lighting shader.",
+ "unlit": "Whether to apply only the base color to this material.",
+ "fog_enabled": "Whether to enable fog for this material.",
+ "alpha_mode": "How to apply the alpha channel of the `base_color_texture`.",
+ "depth_bias": "Adjust rendered depth.",
+ "depth_map": "The depth map used for [parallax mapping].",
+ "parallax_depth_scale": "How deep the offset introduced by the depth map should be.",
+ "parallax_mapping_method": "Which parallax mapping method to use.",
+ "max_parallax_layer_count": "In how many layers to split the depth maps for parallax mapping.",
+ "lightmap_exposure": "The exposure (brightness) level of the lightmap, if present.",
+ "opaque_render_method": "Render method used for opaque materials. (Where `alpha_mode` is `AlphaMode::Opaque` or `AlphaMode::Mask`)",
+ "deferred_lighting_pass_id": "Used for selecting the deferred lighting pass for deferred materials. Default is `DEFAULT_PBR_DEFERRED_LIGHTING_PASS_ID` for default PBR deferred lighting pass. Ignored in the case of forward materials.",
+ "uv_transform": "The transform applied to the UVs corresponding to `ATTRIBUTE_UV_0` on the mesh before sampling. Default is identity."
+ }
+ },
+ "bevy_pbr::render::mesh::MeshPipeline": {
+ "doc": "All data needed to construct a pipeline for rendering 3D meshes.",
+ "fields": {
+ "view_layouts": "A reference to all the mesh pipeline view layouts.",
+ "clustered_forward_buffer_binding_type": "A reference to all the mesh pipeline view layouts.",
+ "mesh_layouts": "A reference to all the mesh pipeline view layouts.",
+ "shader": "The shader asset handle.",
+ "per_object_buffer_batch_size": "`MeshUniform`s are stored in arrays in buffers. If storage buffers are available, they are used and this will be `None`, otherwise uniform buffers will be used with batches of this many `MeshUniform`s, stored at dynamic offsets within the uniform buffer. Use code like this in custom shaders: ```wesl @if(PER_OBJECT_BUFFER_BATCH_SIZE) @group(1) @binding(0) var<uniform> mesh: array<Mesh, u32(constants::PER_OBJECT_BUFFER_BATCH_SIZE)>; @else @group(1) @binding(0) var<storage> mesh: array<Mesh>; ```",
+ "binding_arrays_are_usable": "Whether binding arrays (a.k.a. bindless textures) are usable on the current render device.",
+ "clustered_decals_are_usable": "Whether clustered decals are usable on the current render device.",
+ "skins_use_uniform_buffers": "Whether skins will use uniform buffers on account of storage buffers being unavailable on this platform.",
+ "metadata_use_uniform_buffers": "Whether mesh metadata will use uniform buffers on account of storage buffers being unavailable on this platform."
+ }
+ },
+ "bevy_pbr::ssao::ScreenSpaceAmbientOcclusion": {
+ "doc": "Component to apply screen space ambient occlusion to a 3d camera.",
+ "fields": {
+ "quality_level": "Quality of the SSAO effect.",
+ "radius": "Maximum sample distance, in view-space units.",
+ "constant_object_thickness": "A constant estimated thickness of objects."
+ }
+ },
+ "bevy_post_process::bloom::settings::Bloom": {
+ "doc": "Applies a bloom effect to an HDR-enabled 2d or 3d camera.",
+ "fields": {
+ "intensity": "Controls the baseline of how much the image is scattered (default: 0.15).",
+ "low_frequency_boost": "Low frequency contribution boost. Controls how much more likely the light is to scatter completely sideways (low frequency image).",
+ "low_frequency_boost_curvature": "Low frequency contribution boost curve. Controls the curvature of the blend factor function making frequencies next to the lowest ones contribute more.",
+ "high_pass_frequency": "Tightens how much the light scatters (default: 1.0).",
+ "prefilter": "Controls the threshold filter used for extracting the brightest regions from the input image before blurring them and compositing back onto the original image.",
+ "composite_mode": "Controls whether bloom textures are blended between or added to each other. Useful if image brightening is desired and a must-change if `prefilter` is used.",
+ "max_mip_dimension": "Maximum size of each dimension for the largest mipchain texture used in downscaling/upscaling. Only tweak if you are seeing visual artifacts.",
+ "scale": "Amount to stretch the bloom on each axis. Artistic control, can be used to emulate anamorphic blur by using a large x-value. For large values, you may need to increase `Bloom::max_mip_dimension` to reduce sampling artifacts."
+ }
+ },
+ "bevy_post_process::dof::DepthOfField": {
+ "doc": "A component that enables a [depth of field] postprocessing effect when attached to a `Camera3d`, simulating the focus of a camera lens.",
+ "fields": {
+ "mode": "The appearance of the effect.",
+ "focal_distance": "The distance in meters to the location in focus.",
+ "sensor_height": "The height of the [image sensor format] in meters.",
+ "aperture_f_stops": "Along with the focal length, controls how much objects not in focus are blurred.",
+ "max_circle_of_confusion_diameter": "The maximum diameter, in pixels, that we allow a circle of confusion to be.",
+ "max_depth": "Objects are never considered to be farther away than this distance as far as depth of field is concerned, even if they actually are."
+ }
+ },
+ "bevy_post_process::effect_stack::chromatic_aberration::ChromaticAberration": {
+ "doc": "Adds colored fringes to the edges of objects in the scene.",
+ "fields": {
+ "color_lut": "The lookup texture that determines the color gradient.",
+ "intensity": "The size of the streaks around the edges of objects, as a fraction of the window size.",
+ "max_samples": "A cap on the number of texture samples that will be performed."
+ }
+ },
+ "bevy_post_process::effect_stack::vignette::Vignette": {
+ "doc": "Adds a gradual shading effect to the edges of the screen, drawing focus towards the center.",
+ "fields": {
+ "intensity": "Controls the strength of the darkening effect.",
+ "radius": "The size of the unvignetted center area.",
+ "smoothness": "The softness of the edge between the clear and dark areas.",
+ "roundness": "The shape of the vignette.",
+ "center": "The center of the vignette in UV coordinates (0.0 to 1.0).",
+ "edge_compensation": "Used to make the vignette effect fit the screen better.",
+ "color": "The color of the vignette."
+ }
+ },
+ "bevy_post_process::motion_blur::MotionBlur": {
+ "doc": "A component that enables and configures motion blur when added to a camera.",
+ "fields": {
+ "shutter_angle": "The strength of motion blur from `0.0` to `1.0`.",
+ "samples": "The quality of motion blur, corresponding to the number of per-pixel samples taken in each direction during blur."
+ }
+ },
+ "bevy_render::storage::ShaderBuffer": {
+ "doc": "A storage buffer that is prepared as a `RenderAsset` and uploaded to the GPU.",
+ "fields": {
+ "data": "Optional data used to initialize the buffer, as well as the buffer's size.",
+ "label": "A label that can be used to identify this buffer in a debugger.",
+ "buffer_usage": "How this buffer can legally be used.",
+ "asset_usage": "The asset usage of the storage buffer.",
+ "copy_on_resize": "Whether this buffer should be copied on the GPU when resized. The buffer should have `BufferUsages::COPY_SRC | BufferUsages::COPY_DST` usages to be copyable."
+ }
+ },
+ "bevy_render::view::ColorGrading": {
+ "doc": "Configures filmic color grading parameters to adjust the image appearance.",
+ "fields": {
+ "global": "Filmic color grading values applied to the image as a whole (as opposed to individual sections, like shadows and highlights).",
+ "shadows": "Color grading values that are applied to the darker parts of the image.",
+ "midtones": "Color grading values that are applied to the parts of the image with intermediate brightness.",
+ "highlights": "Color grading values that are applied to the lighter parts of the image."
+ }
+ },
+ "bevy_render::view::Tonemapping": {
+ "doc": "Optionally enables a tonemapping shader that attempts to map linear input stimulus into a perceptually uniform image for a given `Camera` entity.",
+ "fields": {
+ "None": "Bypass tonemapping. No color grading, exposure, or dither applies.",
+ "Linear": "Identity tone curve. `ColorGrading`, exposure, and `DebandDither` still apply. The output is unbounded display-linear.",
+ "Reinhard": "Suffers from lots hue shifting, brights don't desaturate naturally. Bright primaries and secondaries don't desaturate at all.",
+ "ReinhardLuminance": "Suffers from hue shifting. Brights don't desaturate much at all across the spectrum.",
+ "AcesFitted": "Same base implementation that Godot 4.0 uses for Tonemap ACES. <https://github.com/TheRealMJP/BakingLab/blob/master/BakingLab/ACES.hlsl> Not neutral, has a very specific aesthetic, intentional and dramatic hue shifting. Bright greens and reds turn orange. Bright blues turn magenta. Significantly increased contrast. Brights desaturate across the spectrum.",
+ "AgX": "By Troy Sobotka <https://github.com/sobotka/AgX> Very neutral. Image is somewhat desaturated when compared to other tonemappers. Little to no hue shifting. Subtle Abney shifting. NOTE: Requires the `tonemapping_luts` cargo feature.",
+ "SomewhatBoringDisplayTransform": "By Tomasz Stachowiak Has little hue shifting in the darks and mids, but lots in the brights. Brights desaturate across the spectrum. Is sort of between Reinhard and `ReinhardLuminance`. Conceptually similar to reinhard-jodie. Designed as a compromise if you want e.g. decent skin tones in low light, but can't afford to re-do your VFX to look good without hue shifting.",
+ "TonyMcMapface": "Current Bevy default. By Tomasz Stachowiak <https://github.com/h3r2tic/tony-mc-mapface> Very neutral. Subtle but intentional hue shifting. Brights desaturate across the spectrum. Comment from author: Tony is a display transform intended for real-time applications such as games. It is intentionally boring, does not increase contrast or saturation, and stays close to the input stimulus where compression isn't necessary. Brightness-equivalent luminance of the input stimulus is compressed. The non-linearity resembles Reinhard. Color hues are preserved during compression, except for a deliberate Bezold–Brücke shift. To avoid posterization, selective desaturation is employed, with care to avoid the Abney effect. NOTE: Requires the `tonemapping_luts` cargo feature.",
+ "BlenderFilmic": "Default Filmic Display Transform from blender. Somewhat neutral. Suffers from hue shifting. Brights desaturate across the spectrum. NOTE: Requires the `tonemapping_luts` cargo feature.",
+ "KhronosPbrNeutral": "Despite its name, it is not considered to be neutral. Highly saturated colors and tends to produce a very high contrast image. Suffers from significant Abney shifting, and tends to crush grays and desaturated colors. Designed for e-commerce to faithfully reproduce the colors of brand's logos when used with low brightness grayscale lighting. See the KhronosGroup spec for more information."
+ }
+ },
+ "bevy_sprite::sprite::Sprite": {
+ "doc": "Describes a sprite to be rendered to a 2D camera",
+ "fields": {
+ "image": "The image used to render the sprite",
+ "texture_atlas": "The (optional) texture atlas used to render the sprite",
+ "color": "The sprite's color tint",
+ "flip_x": "Flip the sprite along the `X` axis",
+ "flip_y": "Flip the sprite along the `Y` axis",
+ "custom_size": "An optional custom size for the sprite that will be used when rendering, instead of the size of the sprite's image",
+ "rect": "An optional rectangle representing the region of the sprite's image to render, instead of rendering the full image. This is an easy one-off alternative to using a `TextureAtlas`.",
+ "image_mode": "How the sprite's image will be scaled.",
+ "alpha_mode": "The sprite's alpha mode, defaulting to `Blend`."
+ }
+ },
+ "bevy_sprite::sprite::SpriteImageMode": {
+ "doc": "Controls how the image is altered when scaled.",
+ "fields": {
+ "Auto": "The sprite will take on the size of the image by default, and will be stretched or shrunk if `Sprite::custom_size` is set.",
+ "Scale": "The texture will be scaled to fit the rect bounds defined in `Sprite::custom_size`. Otherwise no scaling will be applied.",
+ "Sliced": "The texture will be cut in 9 slices, keeping the texture in proportions on resize",
+ "Tiled": "The texture will be repeated if stretched beyond `stretched_value`"
+ }
+ },
+ "bevy_sprite::text2d::Text2dShadow": {
+ "doc": "Adds a shadow behind `Text2d` text",
+ "fields": {
+ "offset": "Shadow displacement With a value of zero the shadow will be hidden directly behind the text",
+ "color": "Color of the shadow"
+ }
+ },
+ "bevy_sprite_render::mesh2d::color_material::ColorMaterial": {
+ "doc": "A 2d material that renders 2d meshes with a texture tinted by a uniform color",
+ "fields": {}
+ },
+ "bevy_sprite_render::mesh2d::material::MeshMaterial2d": {
+ "doc": "A material used for rendering a `Mesh2d`.",
+ "fields": {}
+ },
+ "bevy_sprite_render::sprite_mesh::sprite_extended_material::SpriteMaterial": {
+ "doc": "Allows extending the material of a `Sprite` using a `MaterialExtension2d`.",
+ "fields": {}
+ },
+ "bevy_text::EditableText": {
+ "doc": "A plain-text text input field.",
+ "fields": {
+ "viewport": "The bounds of the visible portion of the text layout.",
+ "pending_edits": "Text edit actions that have been requested but not yet applied.",
+ "cursor_margin": "Cursor reveal margins as fractions of the viewport size.",
+ "cursor_width": "Cursor width, relative to font size",
+ "cursor_blink_period": "Cursor blink period in seconds.",
+ "max_characters": "Maximum number of characters the text input can contain.",
+ "visible_lines": "Sets the input’s height in number of visible lines.",
+ "visible_width": "Sets the input's width in number of visible glyphs. For proportional fonts the final size is the given value times the \"0\" advance width.",
+ "allow_newlines": "Allow new lines"
+ }
+ },
+ "bevy_text::FontAtlas": {
+ "doc": "Rasterized glyphs are cached, stored in, and retrieved from, a `FontAtlas`.",
+ "fields": {
+ "dynamic_texture_atlas_builder": "Used to update the `TextureAtlasLayout`.",
+ "glyph_to_atlas_index": "A mapping between subpixel-offset glyphs and their `GlyphAtlasLocation`.",
+ "texture_atlas": "The layout for the font atlas.",
+ "texture": "The texture where this font atlas is located"
+ }
+ },
+ "bevy_text::FontAtlasSet": {
+ "doc": "Set of rasterized fonts stored in `FontAtlas`es.",
+ "fields": {}
+ },
+ "bevy_text::FontCx": {
+ "doc": "A font database and cache, used for font family resolution and text layout.",
+ "fields": {
+ "context": "A font database/cache (wrapper around a Fontique `Collection` and `SourceCache`)."
+ }
+ },
+ "bevy_text::FontFeatureTag": {
+ "doc": "An OpenType font feature tag.",
+ "fields": {}
+ },
+ "bevy_text::FontSource": {
+ "doc": "Determines how the font face for a text sections is selected.",
+ "fields": {
+ "Handle": "Use a specific font face referenced by a `Font` asset handle.",
+ "Family": "Resolve the font by family name using the font database.",
+ "Families": "Font family list in CSS format.",
+ "List": "Ordered list of font sources.",
+ "Generic": "Resolve the font using a generic font family."
+ }
+ },
+ "bevy_text::FontVariationTag": {
+ "doc": "An OpenType font variation tag.",
+ "fields": {}
+ },
+ "bevy_text::FontWidth": {
+ "doc": "The visual width of a font as a ratio of its normal width, typically 0.5 to 2.0. `<https://docs.microsoft.com/en-us/typography/opentype/spec/os2#uswidthclass>`",
+ "fields": {}
+ },
+ "bevy_text::GenericFontFamily": {
+ "doc": "Generic font families that are resolved through Parley's font database.",
+ "fields": {
+ "Serif": "Fonts with serifs — small decorative strokes at the ends of letterforms.",
+ "SansSerif": "Fonts without serifs.",
+ "Cursive": "Fonts that use a cursive or handwritten style.",
+ "Fantasy": "Decorative or expressive fonts.",
+ "Monospace": "Fonts in which all glyphs have the same fixed advance width.",
+ "SystemUi": "The default user interface system font.",
+ "UiSerif": "Alternative serif font for user interfaces.",
+ "UiSansSerif": "Alternative sans-serif font for user interfaces.",
+ "UiMonospace": "Alternative monospace font for user interfaces.",
+ "UiRounded": "Fonts that have rounded features.",
+ "Emoji": "Fonts that are specifically designed to render emoji.",
+ "Math": "This is for the particular stylistic concerns of representing mathematics: superscript and subscript, brackets that cross several lines, nesting expressions, and double struck glyphs with distinct meanings.",
+ "FangSong": "A particular style of Chinese characters that are between serif-style Song and cursive-style Kai forms. This style is often used for government documents."
+ }
+ },
+ "bevy_text::TextCursorStyle": {
+ "doc": "Controls text cursor appearance.",
+ "fields": {
+ "color": "Color of the cursor",
+ "selection_color": "Background color of selected text",
+ "unfocused_selection_color": "Background color of unfocused selected text",
+ "selected_text_color": "If some, overrides the color of selected text",
+ "selection_radius": "Corner radius of selection highlight rectangles, normalized relative to the selection height."
+ }
+ },
+ "bevy_text::TextFont": {
+ "doc": "`TextFont` determines the style of a text span within a `ComputedTextBlock`, specifically the font face, the font size, the line height, and the antialiasing method.",
+ "fields": {
+ "font": "Specifies the font face used for this text section.",
+ "font_size": "The vertical height of rasterized glyphs in the font atlas in pixels.",
+ "weight": "How thick or bold the strokes of a font appear.",
+ "width": "How condensed or expanded the glyphs appear horizontally.",
+ "style": "The slant style of a font face: normal, italic, or oblique.",
+ "font_smoothing": "The antialiasing method to use when rendering text.",
+ "font_features": "OpenType features for .otf fonts that support them.",
+ "font_variations": "OpenType variations for variable fonts that support them."
+ }
+ },
+ "bevy_text::text::TextSpan": {
+ "doc": "A span of text in a tree of spans.",
+ "fields": {}
+ },
+ "bevy_transform::components::transform::Transform": {
+ "doc": "Describe the position of an entity. If the entity has a parent, the position is relative to its parent position.",
+ "fields": {
+ "translation": "Position of the entity. In 2d, the last value of the `Vec3` is used for z-ordering.",
+ "rotation": "Rotation of the entity.",
+ "scale": "Scale of the entity."
+ }
+ },
+ "bevy_ui::BoxShadow": {
+ "doc": "List of shadows to draw for a `Node`.",
+ "fields": {}
+ },
+ "bevy_ui::GridAutoFlow": {
+ "doc": "Controls whether grid items are placed row-wise or column-wise as well as whether the sparse or dense packing algorithm is used.",
+ "fields": {
+ "Row": "Items are placed by filling each row in turn, adding new rows as necessary.",
+ "Column": "Items are placed by filling each column in turn, adding new columns as necessary.",
+ "RowDense": "Combines `Row` with the dense packing algorithm.",
+ "ColumnDense": "Combines `Column` with the dense packing algorithm."
+ }
+ },
+ "bevy_ui::GridPlacement": {
+ "doc": "Represents the position of a grid item in a single axis.",
+ "fields": {}
+ },
+ "bevy_ui::GridTrack": {
+ "doc": "A `GridTrack` is a Row or Column of a CSS Grid. This struct specifies what size the track should be. See below for the different \"track sizing functions\" you can specify.",
+ "fields": {}
+ },
+ "bevy_ui::GridTrackRepetition": {
+ "doc": "How many times to repeat a repeated grid track",
+ "fields": {
+ "Count": "Repeat the track fixed number of times",
+ "AutoFill": "Repeat the track to fill available space",
+ "AutoFit": "Repeat the track to fill available space but collapse any tracks that do not end up with an item placed in them."
+ }
+ },
+ "bevy_ui::IgnoreScroll": {
+ "doc": "Controls whether a UI element ignores its parent's `ScrollPosition` along specific axes.",
+ "fields": {}
+ },
+ "bevy_ui::MaxTrackSizingFunction": {
+ "doc": "",
+ "fields": {
+ "Px": "Track maximum size should be a fixed pixel value",
+ "Percent": "Track maximum size should be a percentage value",
+ "Em": "Track maximum size should be a multiple of the grid container's font size.",
+ "Rem": "Track maximum size should be a multiple of the root font size.",
+ "MinContent": "Track maximum size should be content sized under a min-content constraint",
+ "MaxContent": "Track maximum size should be content sized under a max-content constraint",
+ "FitContentPx": "Track maximum size should be sized according to the fit-content formula with a fixed pixel limit",
+ "FitContentPercent": "Track maximum size should be sized according to the fit-content formula with a percentage limit",
+ "Auto": "Track maximum size should be automatically sized",
+ "Fraction": "The dimension as a fraction of the total available grid space (`fr` units in CSS) Specified value is the numerator of the fraction. Denominator is the sum of all fractions specified in that grid dimension.",
+ "VMin": "Track maximum size should be a percent of the viewport's smaller dimension.",
+ "VMax": "Track maximum size should be a percent of the viewport's smaller dimension.",
+ "Vh": "Track maximum size should be a percent of the viewport's height dimension.",
+ "Vw": "Track maximum size should be a percent of the viewport's width dimension."
+ }
+ },
+ "bevy_ui::MinTrackSizingFunction": {
+ "doc": "",
+ "fields": {
+ "Px": "Track minimum size should be a fixed pixel value",
+ "Percent": "Track minimum size should be a percentage value",
+ "Em": "Track minimum size should be a multiple of the grid container's font size.",
+ "Rem": "Track minimum size should be a multiple of the root font size.",
+ "MinContent": "Track minimum size should be content sized under a min-content constraint",
+ "MaxContent": "Track minimum size should be content sized under a max-content constraint",
+ "Auto": "Track minimum size should be automatically sized",
+ "VMin": "Track minimum size should be a percent of the viewport's smaller dimension.",
+ "VMax": "Track minimum size should be a percent of the viewport's larger dimension.",
+ "Vh": "Track minimum size should be a percent of the viewport's height dimension.",
+ "Vw": "Track minimum size should be a percent of the viewport's width dimension."
+ }
+ },
+ "bevy_ui::Node": {
+ "doc": "The base component for UI entities. It describes UI layout and style properties.",
+ "fields": {
+ "display": "Which layout algorithm to use when laying out this node's contents: - `Display::Flex`: Use the Flexbox layout algorithm - `Display::Grid`: Use the CSS Grid layout algorithm - `Display::None`: Hide this node and perform layout as if it does not exist.",
+ "box_sizing": "Which part of a Node's box length styles like width and height control - `BoxSizing::BorderBox`: They refer to the \"border box\" size (size including padding and border) - `BoxSizing::ContentBox`: They refer to the \"content box\" size (size excluding padding and border)",
+ "position_type": "Whether a node should be laid out in-flow with, or independently of its siblings: - `PositionType::Relative`: Layout this node in-flow with other nodes using the usual (flexbox/grid) layout algorithm. - `PositionType::Absolute`: Layout this node on top and independently of other nodes.",
+ "overflow": "Whether overflowing content should be displayed or clipped.",
+ "scrollbar_width": "How much space in logical pixels should be reserved for scrollbars when overflow is set to scroll or auto on an axis.",
+ "overflow_clip_margin": "How the bounds of clipped content should be determined",
+ "left": "The horizontal position of the left edge of the node. - For relatively positioned nodes, this is relative to the node's position as computed during regular layout. - For absolutely positioned nodes, this is relative to the *parent* node's bounding box.",
+ "right": "The horizontal position of the right edge of the node. - For relatively positioned nodes, this is relative to the node's position as computed during regular layout. - For absolutely positioned nodes, this is relative to the *parent* node's bounding box.",
+ "top": "The vertical position of the top edge of the node. - For relatively positioned nodes, this is relative to the node's position as computed during regular layout. - For absolutely positioned nodes, this is relative to the *parent* node's bounding box.",
+ "bottom": "The vertical position of the bottom edge of the node. - For relatively positioned nodes, this is relative to the node's position as computed during regular layout. - For absolutely positioned nodes, this is relative to the *parent* node's bounding box.",
+ "width": "The ideal width of the node. `width` is used when it is within the bounds defined by `min_width` and `max_width`.",
+ "height": "The ideal height of the node. `height` is used when it is within the bounds defined by `min_height` and `max_height`.",
+ "min_width": "The minimum width of the node. `min_width` is used if it is greater than `width` and/or `max_width`.",
+ "min_height": "The minimum height of the node. `min_height` is used if it is greater than `height` and/or `max_height`.",
+ "max_width": "The maximum width of the node. `max_width` is used if it is within the bounds defined by `min_width` and `width`.",
+ "max_height": "The maximum height of the node. `max_height` is used if it is within the bounds defined by `min_height` and `height`.",
+ "aspect_ratio": "The aspect ratio of the node (defined as `width / height`)",
+ "align_items": "Used to control how each individual item is aligned by default within the space they're given. - For Flexbox containers, sets default cross axis alignment of the child items. - For CSS Grid containers, controls block (vertical) axis alignment of children of this grid container within their grid areas.",
+ "justify_items": "Used to control how each individual item is aligned by default within the space they're given. - For Flexbox containers, this property has no effect. See `justify_content` for main axis alignment of flex items. - For CSS Grid containers, sets default inline (horizontal) axis alignment of child items within their grid areas.",
+ "align_self": "Used to control how the specified item is aligned within the space it's given. - For Flexbox items, controls cross axis alignment of the item. - For CSS Grid items, controls block (vertical) axis alignment of a grid item within its grid area.",
+ "justify_self": "Used to control how the specified item is aligned within the space it's given. - For Flexbox items, this property has no effect. See `justify_content` for main axis alignment of flex items. - For CSS Grid items, controls inline (horizontal) axis alignment of a grid item within its grid area.",
+ "align_content": "Used to control how items are distributed. - For Flexbox containers, controls alignment of lines if `flex_wrap` is set to `FlexWrap::Wrap` and there are multiple lines of items. - For CSS Grid containers, controls alignment of grid rows.",
+ "justify_content": "Used to control how items are distributed. - For Flexbox containers, controls alignment of items in the main axis. - For CSS Grid containers, controls alignment of grid columns.",
+ "direction": "Sets the inline axis direction (LTR or RTL) used for layout.",
+ "margin": "The amount of space around a node outside its border.",
+ "padding": "The amount of space between the edges of a node and its contents.",
+ "border": "The amount of space between the margins of a node and its padding.",
+ "border_radius": "Used to add rounded corners to a UI node. You can set a UI node to have uniformly rounded corners or specify different radii for each corner. If a given radius exceeds half the length of the smallest dimension between the node's height or width, the radius will calculated as half the smallest dimension.",
+ "flex_direction": "Whether a Flexbox container should be a row or a column. This property has no effect on Grid nodes.",
+ "flex_wrap": "Whether a Flexbox container should wrap its contents onto multiple lines if they overflow. This property has no effect on Grid nodes.",
+ "flex_grow": "Defines how much a flexbox item should grow if there's space available. Defaults to 0 (don't grow at all).",
+ "flex_shrink": "Defines how much a flexbox item should shrink if there's not enough space available. Defaults to 1.",
+ "flex_basis": "The initial length of a flexbox in the main axis, before flex growing/shrinking properties are applied.",
+ "row_gap": "The size of the gutters between items in a vertical flexbox layout or between rows in a grid layout.",
+ "column_gap": "The size of the gutters between items in a horizontal flexbox layout or between column in a grid layout.",
+ "grid_auto_flow": "Controls whether automatically placed grid items are placed row-wise or column-wise as well as whether the sparse or dense packing algorithm is used. Only affects Grid layouts.",
+ "grid_template_rows": "Defines the number of rows a grid has and the sizes of those rows. If grid items are given explicit placements then more rows may be implicitly generated by items that are placed out of bounds. The sizes of those rows are controlled by `grid_auto_rows` property.",
+ "grid_template_columns": "Defines the number of columns a grid has and the sizes of those columns. If grid items are given explicit placements then more columns may be implicitly generated by items that are placed out of bounds. The sizes of those columns are controlled by `grid_auto_columns` property.",
+ "grid_auto_rows": "Defines the size of implicitly created rows. Rows are created implicitly when grid items are given explicit placements that are out of bounds of the rows explicitly created using `grid_template_rows`.",
+ "grid_auto_columns": "Defines the size of implicitly created columns. Columns are created implicitly when grid items are given explicit placements that are out of bounds of the columns explicitly created using `grid_template_columns`.",
+ "grid_row": "The row in which a grid item starts and how many rows it spans.",
+ "grid_column": "The column in which a grid item starts and how many columns it spans."
+ }
+ },
+ "bevy_ui::RepeatedGridTrack": {
+ "doc": "Represents a *possibly* repeated `GridTrack`.",
+ "fields": {}
+ },
+ "bevy_ui::ShadowStyle": {
+ "doc": "",
+ "fields": {
+ "color": "The shadow's color",
+ "x_offset": "Horizontal offset",
+ "y_offset": "Vertical offset",
+ "spread_radius": "How much the shadow should spread outward.",
+ "blur_radius": "Blurriness of the shadow"
+ }
+ },
+ "bevy_ui::UiPosition": {
+ "doc": "Responsive position relative to a UI node.",
+ "fields": {
+ "anchor": "Normalized anchor point",
+ "x": "Responsive horizontal position relative to the anchor point",
+ "y": "Responsive vertical position relative to the anchor point"
+ }
+ },
+ "bevy_ui::UiScale": {
+ "doc": "The current scale of the UI.",
+ "fields": {}
+ },
+ "bevy_ui::UiTargetCamera": {
+ "doc": "Indicates that this root `Node` entity should be rendered to a specific camera.",
+ "fields": {}
+ },
+ "bevy_ui::experimental::GhostNode": {
+ "doc": "Marker component for entities that should be ignored within UI hierarchies.",
+ "fields": {}
+ },
+ "bevy_ui::gradients::AngularColorStop": {
+ "doc": "An angular color stop for a conic gradient",
+ "fields": {
+ "color": "Color of the stop",
+ "angle": "The angle of the stop. Angles are relative to the start of the gradient and not other stops. If set to `None` the angle of the stop will be interpolated between the explicit stops or 0 and 2 PI degrees if there no explicit stops. Given angles are clamped to between `0.`, and `TAU`. This means that a list of stops: ``` # use std::f32::consts::TAU; # use bevy_ui::AngularColorStop; # use bevy_color::{Color, palettes::css::{RED, BLUE}}; let stops = [ AngularColorStop::new(Color::WHITE, 0.), AngularColorStop::new(Color::BLACK, -1.), AngularColorStop::new(RED, 2. * TAU), AngularColorStop::new(BLUE, TAU), ]; ``` is equivalent to: ``` # use std::f32::consts::TAU; # use bevy_ui::AngularColorStop; # use bevy_color::{Color, palettes::css::{RED, BLUE}}; let stops = [ AngularColorStop::new(Color::WHITE, 0.), AngularColorStop::new(Color::BLACK, 0.), AngularColorStop::new(RED, TAU), AngularColorStop::new(BLUE, TAU), ]; ``` Resulting in a black to red gradient, not white to blue.",
+ "hint": "Normalized angle between this and the following stop of the interpolation midpoint."
+ }
+ },
+ "bevy_ui::gradients::ColorStop": {
+ "doc": "A color stop for a gradient",
+ "fields": {
+ "color": "Color",
+ "point": "Logical position along the gradient line. Stop positions are relative to the start of the gradient and not other stops.",
+ "hint": "Normalized position between this and the following stop of the interpolation midpoint."
+ }
+ },
+ "bevy_ui::gradients::ConicGradient": {
+ "doc": "A conic gradient",
+ "fields": {
+ "color_space": "The color space used for interpolation.",
+ "start": "The starting angle of the gradient in radians",
+ "position": "The center of the conic gradient",
+ "stops": "The list of color stops"
+ }
+ },
+ "bevy_ui::gradients::Gradient": {
+ "doc": "",
+ "fields": {
+ "Linear": "A linear gradient",
+ "Radial": "A radial gradient",
+ "Conic": "A conic gradient"
+ }
+ },
+ "bevy_ui::gradients::InterpolationColorSpace": {
+ "doc": "The color space used for interpolation.",
+ "fields": {
+ "Oklaba": "Interpolates in OKLABA space.",
+ "Oklcha": "Interpolates in OKLCHA space, taking the shortest hue path.",
+ "OklchaLong": "Interpolates in OKLCHA space, taking the longest hue path.",
+ "Srgba": "Interpolates in sRGBA space.",
+ "LinearRgba": "Interpolates in linear sRGBA space.",
+ "Hsla": "Interpolates in HSLA space, taking the shortest hue path.",
+ "HslaLong": "Interpolates in HSLA space, taking the longest hue path.",
+ "Hsva": "Interpolates in HSVA space, taking the shortest hue path.",
+ "HsvaLong": "Interpolates in HSVA space, taking the longest hue path.",
+ "Okhsla": "Interpolates in OKHSLA space, taking the shortest hue path.",
+ "OkhslaLong": "Interpolates in OKHSLA space, taking the longest hue path."
+ }
+ },
+ "bevy_ui::gradients::LinearGradient": {
+ "doc": "A linear gradient",
+ "fields": {
+ "color_space": "The color space used for interpolation.",
+ "angle": "The direction of the gradient in radians. An angle of `0.` points upward, with the value increasing in the clockwise direction.",
+ "stops": "The list of color stops"
+ }
+ },
+ "bevy_ui::gradients::RadialGradient": {
+ "doc": "A radial gradient",
+ "fields": {
+ "color_space": "The color space used for interpolation.",
+ "position": "The center of the radial gradient",
+ "shape": "Defines the end shape of the radial gradient",
+ "stops": "The list of color stops"
+ }
+ },
+ "bevy_ui::gradients::RadialGradientShape": {
+ "doc": "",
+ "fields": {
+ "ClosestSide": "A circle with radius equal to the distance from its center to the closest side",
+ "FarthestSide": "A circle with radius equal to the distance from its center to the farthest side",
+ "ClosestCorner": "An ellipse with extents equal to the distance from its center to the nearest corner",
+ "FarthestCorner": "An ellipse with extents equal to the distance from its center to the farthest corner",
+ "Circle": "A circle",
+ "Ellipse": "An ellipse"
+ }
+ },
+ "bevy_ui::ui_node::Node": {
+ "doc": "The base component for UI entities. It describes UI layout and style properties.",
+ "fields": {
+ "display": "Which layout algorithm to use when laying out this node's contents: - `Display::Flex`: Use the Flexbox layout algorithm - `Display::Grid`: Use the CSS Grid layout algorithm - `Display::None`: Hide this node and perform layout as if it does not exist.",
+ "box_sizing": "Which part of a Node's box length styles like width and height control - `BoxSizing::BorderBox`: They refer to the \"border box\" size (size including padding and border) - `BoxSizing::ContentBox`: They refer to the \"content box\" size (size excluding padding and border)",
+ "position_type": "Whether a node should be laid out in-flow with, or independently of its siblings: - `PositionType::Relative`: Layout this node in-flow with other nodes using the usual (flexbox/grid) layout algorithm. - `PositionType::Absolute`: Layout this node on top and independently of other nodes.",
+ "overflow": "Whether overflowing content should be displayed or clipped.",
+ "scrollbar_width": "How much space in logical pixels should be reserved for scrollbars when overflow is set to scroll or auto on an axis.",
+ "overflow_clip_margin": "How the bounds of clipped content should be determined",
+ "left": "The horizontal position of the left edge of the node. - For relatively positioned nodes, this is relative to the node's position as computed during regular layout. - For absolutely positioned nodes, this is relative to the *parent* node's bounding box.",
+ "right": "The horizontal position of the right edge of the node. - For relatively positioned nodes, this is relative to the node's position as computed during regular layout. - For absolutely positioned nodes, this is relative to the *parent* node's bounding box.",
+ "top": "The vertical position of the top edge of the node. - For relatively positioned nodes, this is relative to the node's position as computed during regular layout. - For absolutely positioned nodes, this is relative to the *parent* node's bounding box.",
+ "bottom": "The vertical position of the bottom edge of the node. - For relatively positioned nodes, this is relative to the node's position as computed during regular layout. - For absolutely positioned nodes, this is relative to the *parent* node's bounding box.",
+ "width": "The ideal width of the node. `width` is used when it is within the bounds defined by `min_width` and `max_width`.",
+ "height": "The ideal height of the node. `height` is used when it is within the bounds defined by `min_height` and `max_height`.",
+ "min_width": "The minimum width of the node. `min_width` is used if it is greater than `width` and/or `max_width`.",
+ "min_height": "The minimum height of the node. `min_height` is used if it is greater than `height` and/or `max_height`.",
+ "max_width": "The maximum width of the node. `max_width` is used if it is within the bounds defined by `min_width` and `width`.",
+ "max_height": "The maximum height of the node. `max_height` is used if it is within the bounds defined by `min_height` and `height`.",
+ "aspect_ratio": "The aspect ratio of the node (defined as `width / height`)",
+ "align_items": "Used to control how each individual item is aligned by default within the space they're given. - For Flexbox containers, sets default cross axis alignment of the child items. - For CSS Grid containers, controls block (vertical) axis alignment of children of this grid container within their grid areas.",
+ "justify_items": "Used to control how each individual item is aligned by default within the space they're given. - For Flexbox containers, this property has no effect. See `justify_content` for main axis alignment of flex items. - For CSS Grid containers, sets default inline (horizontal) axis alignment of child items within their grid areas.",
+ "align_self": "Used to control how the specified item is aligned within the space it's given. - For Flexbox items, controls cross axis alignment of the item. - For CSS Grid items, controls block (vertical) axis alignment of a grid item within its grid area.",
+ "justify_self": "Used to control how the specified item is aligned within the space it's given. - For Flexbox items, this property has no effect. See `justify_content` for main axis alignment of flex items. - For CSS Grid items, controls inline (horizontal) axis alignment of a grid item within its grid area.",
+ "align_content": "Used to control how items are distributed. - For Flexbox containers, controls alignment of lines if `flex_wrap` is set to `FlexWrap::Wrap` and there are multiple lines of items. - For CSS Grid containers, controls alignment of grid rows.",
+ "justify_content": "Used to control how items are distributed. - For Flexbox containers, controls alignment of items in the main axis. - For CSS Grid containers, controls alignment of grid columns.",
+ "direction": "Sets the inline axis direction (LTR or RTL) used for layout.",
+ "margin": "The amount of space around a node outside its border.",
+ "padding": "The amount of space between the edges of a node and its contents.",
+ "border": "The amount of space between the margins of a node and its padding.",
+ "border_radius": "Used to add rounded corners to a UI node. You can set a UI node to have uniformly rounded corners or specify different radii for each corner. If a given radius exceeds half the length of the smallest dimension between the node's height or width, the radius will calculated as half the smallest dimension.",
+ "flex_direction": "Whether a Flexbox container should be a row or a column. This property has no effect on Grid nodes.",
+ "flex_wrap": "Whether a Flexbox container should wrap its contents onto multiple lines if they overflow. This property has no effect on Grid nodes.",
+ "flex_grow": "Defines how much a flexbox item should grow if there's space available. Defaults to 0 (don't grow at all).",
+ "flex_shrink": "Defines how much a flexbox item should shrink if there's not enough space available. Defaults to 1.",
+ "flex_basis": "The initial length of a flexbox in the main axis, before flex growing/shrinking properties are applied.",
+ "row_gap": "The size of the gutters between items in a vertical flexbox layout or between rows in a grid layout.",
+ "column_gap": "The size of the gutters between items in a horizontal flexbox layout or between column in a grid layout.",
+ "grid_auto_flow": "Controls whether automatically placed grid items are placed row-wise or column-wise as well as whether the sparse or dense packing algorithm is used. Only affects Grid layouts.",
+ "grid_template_rows": "Defines the number of rows a grid has and the sizes of those rows. If grid items are given explicit placements then more rows may be implicitly generated by items that are placed out of bounds. The sizes of those rows are controlled by `grid_auto_rows` property.",
+ "grid_template_columns": "Defines the number of columns a grid has and the sizes of those columns. If grid items are given explicit placements then more columns may be implicitly generated by items that are placed out of bounds. The sizes of those columns are controlled by `grid_auto_columns` property.",
+ "grid_auto_rows": "Defines the size of implicitly created rows. Rows are created implicitly when grid items are given explicit placements that are out of bounds of the rows explicitly created using `grid_template_rows`.",
+ "grid_auto_columns": "Defines the size of implicitly created columns. Columns are created implicitly when grid items are given explicit placements that are out of bounds of the columns explicitly created using `grid_template_columns`.",
+ "grid_row": "The row in which a grid item starts and how many rows it spans.",
+ "grid_column": "The column in which a grid item starts and how many columns it spans."
+ }
+ },
+ "bevy_ui::ui_transform::UiTransform": {
+ "doc": "Relative 2D transform for UI nodes",
+ "fields": {
+ "translation": "Translate the node.",
+ "scale": "Scale the node. A negative value reflects the node in that axis.",
+ "rotation": "Rotate the node clockwise."
+ }
+ },
+ "bevy_ui::ui_transform::Val2": {
+ "doc": "A pair of `Val`s used to represent a 2-dimensional size or offset.",
+ "fields": {
+ "x": "Translate the node along the x-axis. `Val::Percent` values are resolved based on the computed width of the Ui Node. `Val::Auto` is resolved to `0.`.",
+ "y": "Translate the node along the y-axis. `Val::Percent` values are resolved based on the computed height of the UI Node. `Val::Auto` is resolved to `0.`."
+ }
+ },
+ "bevy_ui::widget::InlineImage": {
+ "doc": "An inline image",
+ "fields": {
+ "color": "The tint color used to draw the image.",
+ "image": "Handle to the texture.",
+ "width": "Set a fixed width in logical pixels for the image's inline box target.",
+ "height": "Set a fixed height in logical pixels for the image's inline box target.",
+ "flip_x": "Flip the image on the x-axis.",
+ "flip_y": "Flip the image on the y-axis."
+ }
+ },
+ "bevy_ui::widget::image::ImageNode": {
+ "doc": "A UI Node that renders an image.",
+ "fields": {
+ "color": "The tint color used to draw the image.",
+ "image": "Handle to the texture.",
+ "texture_atlas": "The (optional) texture atlas used to render the image.",
+ "flip_x": "Whether the image should be flipped along its x-axis.",
+ "flip_y": "Whether the image should be flipped along its y-axis.",
+ "rect": "An optional rectangle representing the region of the image to render, instead of rendering the full image. This is an easy one-off alternative to using a `TextureAtlas`.",
+ "image_mode": "Controls how the image is altered to fit within the layout and how the layout algorithm determines the space to allocate for the image.",
+ "visual_box": "Which region of the UI node the image should be drawn within."
+ }
+ },
+ "bevy_ui::widget::text::TextShadow": {
+ "doc": "Adds a shadow behind text",
+ "fields": {
+ "offset": "Shadow displacement in logical pixels With a value of zero the shadow will be hidden directly behind the text",
+ "color": "Color of the shadow"
+ }
+ },
+ "bevy_ui_render::BoxShadowSamples": {
+ "doc": "Number of shadow samples. A larger value will result in higher quality shadows. Default is 4, values higher than ~10 offer diminishing returns.",
+ "fields": {}
+ },
+ "bevy_ui_render::GlobalUiDebugOptions": {
+ "doc": "Configuration for the UI debug overlay",
+ "fields": {
+ "enabled": "Set to true to enable the UI debug overlay",
+ "outline_border_box": "Show outlines for the border boxes of UI nodes",
+ "outline_padding_box": "Show outlines for the padding boxes of UI nodes",
+ "outline_content_box": "Show outlines for the content boxes of UI nodes",
+ "outline_scrollbars": "Show outlines for the scrollbar regions of UI nodes",
+ "line_width": "Width of the overlay's lines in logical pixels",
+ "line_color_override": "Override Color for the overlay's lines",
+ "show_hidden": "Show outlines for non-visible UI nodes",
+ "show_clipped": "Show outlines for clipped sections of UI nodes",
+ "ignore_border_radius": "Draw outlines with sharp corners even if the UI nodes have border radii"
+ }
+ },
+ "bevy_ui_render::UiDebugOptions": {
+ "doc": "Configuration for the UI debug overlay",
+ "fields": {
+ "enabled": "Set to true to enable the UI debug overlay",
+ "outline_border_box": "Show outlines for the border boxes of UI nodes",
+ "outline_padding_box": "Show outlines for the padding boxes of UI nodes",
+ "outline_content_box": "Show outlines for the content boxes of UI nodes",
+ "outline_scrollbars": "Show outlines for the scrollbar regions of UI nodes",
+ "line_width": "Width of the overlay's lines in logical pixels",
+ "line_color_override": "Override Color for the overlay's lines",
+ "show_hidden": "Show outlines for non-visible UI nodes",
+ "show_clipped": "Show outlines for clipped sections of UI nodes",
+ "ignore_border_radius": "Draw outlines with sharp corners even if the UI nodes have border radii"
+ }
+ },
+ "bevy_ui_widgets::ControlOrientation": {
+ "doc": "",
+ "fields": {
+ "Horizontal": "Horizontal orientation (stretching from left to right)",
+ "Vertical": "Vertical orientation (stretching from top to bottom)"
+ }
+ },
+ "bevy_ui_widgets::Scrollbar": {
+ "doc": "A headless scrollbar widget, which can be used to build custom scrollbars.",
+ "fields": {
+ "target": "Entity being scrolled.",
+ "orientation": "Whether the scrollbar is vertical or horizontal.",
+ "min_thumb_length": "Minimum length of the scrollbar thumb, in pixel units, in the direction parallel to the main scrollbar axis. The scrollbar will resize the thumb entity based on the proportion of visible size to content size, but no smaller than this. This prevents the thumb from disappearing in cases where the ratio of content size to visible size is large."
+ }
+ },
+ "bevy_ui_widgets::ScrollbarThumb": {
+ "doc": "This component indicates that the entity is a scrollbar thumb (the moving, draggable part of the scrollbar). This should be a child of the scrollbar entity.",
+ "fields": {
+ "border_radius": "Border radius of the scrollbar thumb, used to update `ComputedNode::border_radius` in `UiSystems::Layout`.",
+ "border": "Thickness of the thumb node's border."
+ }
+ },
+ "bevy_ui_widgets::popover::Popover": {
+ "doc": "Component which is inserted into a popover element to make it dynamically position relative to an parent element.",
+ "fields": {
+ "positions": "List of potential positions for the popover element relative to the parent.",
+ "window_margin": "Indicates how close to the window edge the popup is allowed to go."
+ }
+ },
+ "bevy_ui_widgets::popover::PopoverPlacement": {
+ "doc": "Indicates a possible position of a popover element relative to it's parent. You can specify multiple possible positions; the positioning code will check to see if there is sufficient space to display the popup without being clipped by the window edge. If any position has sufficient room, it will pick the first one; if there are none, then it will pick the least bad one.",
+ "fields": {
+ "side": "The side of the parent entity where the popover element should be placed.",
+ "align": "How the popover element should be aligned to the parent entity.",
+ "gap": "The size of the gap between the parent and the popover element, in logical pixels. This will offset the popover along the direction of `side`."
+ }
+ },
+ "raea_core_animate::spec::Animation": {
+ "doc": "One element's declared animation.",
+ "fields": {
+ "origin": "the composition frame the element's local frame 0 falls on (where its Sequence starts)",
+ "freeze": "a local frame to hold at whatever the composition's frame (inside a Freeze)",
+ "fps": "the frames per second its frames count; springs measure their settle time with it (0: the clock's)",
+ "tracks": "the frames per second its frames count; springs measure their settle time with it (0: the clock's)",
+ "show_from": "the local frame it's shown from, when it shows only for a window (mount=\"during\"); before it, display none",
+ "show_until": "the local frame it's hidden from again"
+ }
+ },
+ "raea_sys_compute::Computes": {
+ "doc": "The frame's computes, in order, and the frame's time.",
+ "fields": {}
+ },
+ "raea_sys_framepass::FramePasses": {
+ "doc": "The camera's passes, in order.",
+ "fields": {}
+ },
+ "raea_sys_phase::DepthCopy": {
+ "doc": "The image a camera's depth is copied into each frame.",
+ "fields": {}
+ },
+ "raea_sys_phase::GBufferPass": {
+ "doc": "A camera's fullscreen G-buffer draw: its shader file (as written), its G-buffer entry point and its shadow one (\"\" for none).",
+ "fields": {
+ "registered": "its shader file, registered as written (raea-sys-shader), and the id register gave it"
+ }
+ },
+ "raea_sys_phase::MeshPass": {
+ "doc": "A mesh's own pass: its shader file (as written) and entry points.",
+ "fields": {
+ "depth": "whether it tests and writes the view's depth (GreaterEqual), as a mesh in Bevy's opaque phase does",
+ "registered": "its shader file, registered as written (raea-sys-shader), and the id register gave it"
+ }
+ },
+ "raea_sys_phase::MeshShaderPass": {
+ "doc": "A camera's mesh-shader draw: its task shader file (\"\" for none), mesh and fragment shader files, and its workgroup count.",
+ "fields": {
+ "registered": "its files, registered as written (raea-sys-shader), and the ids register gave them (0 for no task shader)"
+ }
+ },
+ "raea_sys_phase::PhaseItem": {
+ "doc": "What a phase item draws: its shader file (as written) and entry points, its vertex buffer's words (32-bit each, each `stride` bytes a vertex) and attributes, its indices (u32), and its depth state: whether it writes depth and how it compares (Bevy's CompareFunction by name).",
+ "fields": {
+ "registered": "its shader file, registered as written (raea-sys-shader), and the id register gave it"
+ }
+ },
+ "raea_sys_phase::ShaderInstances": {
+ "doc": "A mesh's instances: your shader file (as written), and each instance's `stride` bytes of 32-bit words, read as its `attributes` say.",
+ "fields": {
+ "registered": "its shader file, registered as written (raea-sys-shader), and the id register gave it"
+ }
+ },
+ "name:Annulus": {
+ "doc": "A primitive shape formed by the region between two circles, also known as a ring.",
+ "fields": {
+ "inner_circle": "The inner circle of the annulus",
+ "outer_circle": "The outer circle of the annulus"
+ },
+ "from": "bevy_shape::Annulus"
+ },
+ "name:Atmosphere": {
+ "doc": "Atmosphere for one planet. The entity's `GlobalTransform` is the planet center in world space.",
+ "fields": {
+ "inner_radius": "Radius of the planet",
+ "outer_radius": "Radius at which we consider the atmosphere to 'end' for our calculations (from center of planet)",
+ "ground_albedo": "An approximation of the average albedo (or color, roughly) of the planet's surface. This is used when calculating multiscattering.",
+ "medium": "A handle to a `ScatteringMedium`, which describes the substance of the atmosphere and how it scatters light."
+ },
+ "from": "bevy_light::Atmosphere"
+ },
+ "name:BorderRadius": {
+ "doc": "Used to add rounded corners to a UI node. You can set a UI node to have uniformly rounded corners, elliptical corners, or specify a different radius for each corner. If a given radius exceeds half the length of the node's height or width, the radius will be calculated as half the height or width.",
+ "fields": {
+ "top_left": "Border radius of the top left corner",
+ "top_right": "Border radius of the top right corner",
+ "bottom_right": "Border radius of the bottom right corner",
+ "bottom_left": "Border radius of the bottom left corner"
+ },
+ "from": "bevy_ui::BorderRadius"
+ },
+ "name:Capsule2d": {
+ "doc": "A 2D capsule primitive, also known as a stadium or pill shape.",
+ "fields": {
+ "radius": "The radius of the capsule",
+ "half_length": "Half the height of the capsule, excluding the semicircles"
+ },
+ "from": "bevy_shape::Capsule2d"
+ },
+ "name:Capsule3d": {
+ "doc": "A 3D capsule primitive centered on the origin A three-dimensional capsule is defined as a surface at a distance (radius) from a line",
+ "fields": {
+ "radius": "The radius of the capsule",
+ "half_length": "Half the height of the capsule, excluding the hemispheres"
+ },
+ "from": "bevy_shape::Capsule3d"
+ },
+ "name:Circle": {
+ "doc": "A circle primitive, representing the set of points some distance from the origin",
+ "fields": {
+ "radius": "The radius of the circle"
+ },
+ "from": "bevy_shape::Circle"
+ },
+ "name:CircularSector": {
+ "doc": "A primitive representing a circular sector: a pie slice of a circle.",
+ "fields": {
+ "arc": "The arc defining the sector"
+ },
+ "from": "bevy_shape::CircularSector"
+ },
+ "name:CircularSegment": {
+ "doc": "A primitive representing a circular segment: the area enclosed by the arc of a circle and its chord (the line between its endpoints).",
+ "fields": {
+ "arc": "The arc defining the segment"
+ },
+ "from": "bevy_shape::CircularSegment"
+ },
+ "name:Cone": {
+ "doc": "A cone primitive centered on the midpoint between the tip of the cone and the center of its base.",
+ "fields": {
+ "radius": "The radius of the base",
+ "height": "The height of the cone"
+ },
+ "from": "bevy_shape::Cone"
+ },
+ "name:ConicalFrustum": {
+ "doc": "A conical frustum primitive. A conical frustum can be created by slicing off a section of a cone.",
+ "fields": {
+ "radius_top": "The radius of the top of the frustum",
+ "radius_bottom": "The radius of the base of the frustum",
+ "height": "The height of the frustum"
+ },
+ "from": "bevy_shape::ConicalFrustum"
+ },
+ "name:ConvexPolygon": {
+ "doc": "A convex polygon with `N` vertices.",
+ "fields": {},
+ "from": "bevy_shape::ConvexPolygon"
+ },
+ "name:CornerRadius": {
+ "doc": "The horizontal and vertical radii of a rounded corner's elliptical arc. If one field is auto, the resolved radius will be circular and clamped to half the length of the node's shortest side. If either field is zero, or both are auto, the node will have square corners.",
+ "fields": {
+ "x": "Responsive horizontal radius.",
+ "y": "Responsive vertical radius."
+ },
+ "from": "bevy_ui::CornerRadius"
+ },
+ "name:Cuboid": {
+ "doc": "A cuboid primitive, which is like a cube, except that the x, y, and z dimensions are not required to be the same.",
+ "fields": {
+ "half_size": "Half of the width, height and depth of the cuboid"
+ },
+ "from": "bevy_shape::Cuboid"
+ },
+ "name:Cylinder": {
+ "doc": "A cylinder primitive centered on the origin",
+ "fields": {
+ "radius": "The radius of the cylinder",
+ "half_height": "The half height of the cylinder"
+ },
+ "from": "bevy_shape::Cylinder"
+ },
+ "name:Ellipse": {
+ "doc": "An ellipse primitive, which is like a circle, but the width and height can be different",
+ "fields": {
+ "half_size": "Half of the width and height of the ellipse."
+ },
+ "from": "bevy_shape::Ellipse"
+ },
+ "name:FogFalloff": {
+ "doc": "Allows switching between different fog falloff modes, and configuring their parameters.",
+ "fields": {
+ "Linear": "A linear fog falloff that grows in intensity between `start` and `end` distances.",
+ "Exponential": "An exponential fog falloff with a given `density`.",
+ "ExponentialSquared": "A squared exponential fog falloff with a given `density`.",
+ "Atmospheric": "A more general form of the `FogFalloff::Exponential` mode. The falloff formula is separated into two terms, `extinction` and `inscattering`, for a somewhat simplified atmospheric scattering model. Additionally, individual color channels can have their own density values, resulting in a total of six different configuration parameters."
+ },
+ "from": "bevy_pbr::FogFalloff"
+ },
+ "name:GlobalAmbientLight": {
+ "doc": "The global ambient light, which lights the entire scene equally.",
+ "fields": {
+ "color": "The color of the ambient light.",
+ "brightness": "A direct scale factor multiplied with `color` before being passed to the shader.",
+ "affects_lightmapped_meshes": "Whether this ambient light has an effect on meshes with lightmaps."
+ },
+ "from": "bevy_light::GlobalAmbientLight"
+ },
+ "name:Hsla": {
+ "doc": "</div>",
+ "fields": {
+ "hue": "The hue channel. [0.0, 360.0]",
+ "saturation": "The saturation channel. [0.0, 1.0]",
+ "lightness": "The lightness channel. [0.0, 1.0]",
+ "alpha": "The alpha channel. [0.0, 1.0]"
+ },
+ "from": "bevy_color::Hsla"
+ },
+ "name:LensDistortion": {
+ "doc": "Simulates the warping of the image caused by real-world camera lenses.",
+ "fields": {
+ "intensity": "The overall strength of the distortion effect.",
+ "scale": "A global scale factor applied to the final distorted image.",
+ "multiplier": "A multiplier that determines how the distortion scales along the X and Y axes.",
+ "center": "The center point of the distortion effect in UV space `[0.0, 1.0]`.",
+ "edge_curvature": "Controls the sharpness of the distortion curve near the screen edges."
+ },
+ "from": "bevy_post_process::LensDistortion"
+ },
+ "name:LinearRgba": {
+ "doc": "</div>",
+ "fields": {
+ "red": "The red channel. [0.0, 1.0] for SDR colors.",
+ "green": "The green channel. [0.0, 1.0] for SDR colors.",
+ "blue": "The blue channel. [0.0, 1.0] for SDR colors.",
+ "alpha": "The alpha channel. [0.0, 1.0]"
+ },
+ "from": "bevy_color::LinearRgba"
+ },
+ "name:Oklaba": {
+ "doc": "</div>",
+ "fields": {
+ "lightness": "The 'lightness' channel. [0.0, 1.0]",
+ "a": "The 'a' channel. [-1.0, 1.0]",
+ "b": "The 'b' channel. [-1.0, 1.0]",
+ "alpha": "The alpha channel. [0.0, 1.0]"
+ },
+ "from": "bevy_color::Oklaba"
+ },
+ "name:Oklcha": {
+ "doc": "</div>",
+ "fields": {
+ "lightness": "The 'lightness' channel. [0.0, 1.0]",
+ "chroma": "The 'chroma' channel. [0.0, 1.0]",
+ "hue": "The 'hue' channel. [0.0, 360.0]",
+ "alpha": "The alpha channel. [0.0, 1.0]"
+ },
+ "from": "bevy_color::Oklcha"
+ },
+ "name:Outline": {
+ "doc": "The `Outline` component adds an outline outside the edge of a UI node. Outlines do not take up space in the layout.",
+ "fields": {
+ "width": "The width of the outline.",
+ "offset": "The amount of space between a node's outline the edge of the node.",
+ "color": "The color of the outline."
+ },
+ "from": "bevy_ui::Outline"
+ },
+ "name:Overflow": {
+ "doc": "Whether to show or hide overflowing items",
+ "fields": {
+ "x": "Whether to show or clip overflowing items on the x axis",
+ "y": "Whether to show or clip overflowing items on the y axis"
+ },
+ "from": "bevy_ui::Overflow"
+ },
+ "name:OverflowClipMargin": {
+ "doc": "The bounds of the visible area when a UI node is clipped.",
+ "fields": {
+ "visual_box": "Visible unclipped area",
+ "margin": "Width of the margin on each edge of the visual box in logical pixels. The width of the margin will be zero if a negative value is set."
+ },
+ "from": "bevy_ui::OverflowClipMargin"
+ },
+ "name:Plane3d": {
+ "doc": "A bounded plane in 3D space. It forms a surface starting from the origin with a defined height and width.",
+ "fields": {
+ "normal": "The normal of the plane. The plane will be placed perpendicular to this direction",
+ "half_size": "Half of the width and height of the plane"
+ },
+ "from": "bevy_shape::Plane3d"
+ },
+ "name:Polyline2d": {
+ "doc": "A series of connected line segments in 2D space.",
+ "fields": {
+ "vertices": "The vertices of the polyline"
+ },
+ "from": "bevy_shape::Polyline2d"
+ },
+ "name:Rectangle": {
+ "doc": "A rectangle primitive, which is like a square, except that the width and height can be different",
+ "fields": {
+ "half_size": "Half of the width and height of the rectangle"
+ },
+ "from": "bevy_shape::Rectangle"
+ },
+ "name:RegularPolygon": {
+ "doc": "A polygon centered on the origin where all vertices lie on a circle, equally far apart.",
+ "fields": {
+ "circumcircle": "The circumcircle on which all vertices lie",
+ "sides": "The number of sides"
+ },
+ "from": "bevy_shape::RegularPolygon"
+ },
+ "name:Rhombus": {
+ "doc": "A rhombus primitive, also known as a diamond shape. A four sided polygon, centered on the origin, where opposite sides are parallel but without requiring right angles.",
+ "fields": {
+ "half_diagonals": "Size of the horizontal and vertical diagonals of the rhombus"
+ },
+ "from": "bevy_shape::Rhombus"
+ },
+ "name:Segment2d": {
+ "doc": "A line segment defined by two endpoints in 2D space.",
+ "fields": {
+ "vertices": "The endpoints of the line segment."
+ },
+ "from": "bevy_shape::Segment2d"
+ },
+ "name:Sphere": {
+ "doc": "A sphere primitive, representing the set of all points some distance from the origin",
+ "fields": {
+ "radius": "The radius of the sphere"
+ },
+ "from": "bevy_shape::Sphere"
+ },
+ "name:Srgba": {
+ "doc": "</div>",
+ "fields": {
+ "red": "The red channel. [0.0, 1.0] for SDR colors.",
+ "green": "The green channel. [0.0, 1.0] for SDR colors.",
+ "blue": "The blue channel. [0.0, 1.0] for SDR colors.",
+ "alpha": "The alpha channel. [0.0, 1.0]"
+ },
+ "from": "bevy_color::Srgba"
+ },
+ "name:TextureView": {
+ "doc": "Describes a `Texture` with its associated metadata required by a pipeline or `BindGroup`.",
+ "fields": {},
+ "from": "bevy_render::TextureView"
+ },
+ "name:Torus": {
+ "doc": "A torus primitive, often representing a ring or donut shape The set of points some distance from a circle centered at the origin",
+ "fields": {
+ "minor_radius": "The radius of the tube of the torus",
+ "major_radius": "The distance from the center of the torus to the center of the tube"
+ },
+ "from": "bevy_shape::Torus"
+ },
+ "name:Triangle2d": {
+ "doc": "A triangle in 2D space",
+ "fields": {
+ "vertices": "The vertices of the triangle"
+ },
+ "from": "bevy_shape::Triangle2d"
+ },
+ "name:UiRect": {
+ "doc": "A type which is commonly used to define margins, paddings and borders.",
+ "fields": {
+ "left": "The value corresponding to the left side of the UI rect.",
+ "right": "The value corresponding to the right side of the UI rect.",
+ "top": "The value corresponding to the top side of the UI rect.",
+ "bottom": "The value corresponding to the bottom side of the UI rect."
+ },
+ "from": "bevy_ui::UiRect"
+ },
+ "name:Xyza": {
+ "doc": "</div>",
+ "fields": {
+ "x": "The x-axis. [0.0, 0.9505] for SDR colors.",
+ "y": "The y-axis, intended to represent luminance. [0.0, 1.0] for SDR colors.",
+ "z": "The z-axis. [0.0, 1.0889] for SDR colors.",
+ "alpha": "The alpha channel. [0.0, 1.0]"
+ },
+ "from": "bevy_color::Xyza"
+ }
+}
diff --git a/tools/manual-ref/bevy-docs.ts b/tools/manual-ref/bevy-docs.ts
new file mode 100644
index 00000000..185b6cf7
--- /dev/null
+++ b/tools/manual-ref/bevy-docs.ts
@@ -0,0 +1,123 @@
+// Bevy's own doc comments for the types the SDK names with @bevy (docs/manual.feature DM3): each type's doc and its
+// fields' and variants' docs, read from the Rust source of Bevy 0.20 (the cargo registry) and of raea's own crates,
+// kept in tools/manual-ref/bevy-docs.json so the SDK reference can be generated without the registry. sdk.ts gives a
+// prop Bevy's field doc, marked as Bevy's, where the SDK's own comment is missing.
+// bun tools/manual-ref/bevy-docs.ts rewrite tools/manual-ref/bevy-docs.json
+import { readdirSync, readFileSync, writeFileSync, existsSync, statSync } from "node:fs"
+import path from "node:path"
+import os from "node:os"
+
+const ROOT = path.resolve(import.meta.dir, "../..")
+const REG = path.join(os.homedir(), ".cargo/registry/src")
+const OUT = path.join(import.meta.dir, "bevy-docs.json")
+
+function rsFiles(dir: string): string[] {
+ if (!existsSync(dir)) return []
+ return readdirSync(dir).flatMap((n) => {
+ const p = path.join(dir, n)
+ return statSync(p).isDirectory() ? rsFiles(p) : n.endsWith(".rs") ? [p] : []
+ })
+}
+
+// a crate's source folder: Bevy's in the registry (0.20.0), raea's by its Cargo.toml name
+const raeaCrates = new Map<string, string>()
+function scanCrates(dir: string, depth = 0) {
+ if (depth > 3 || /node_modules|target|\.git/.test(dir)) return
+ for (const n of readdirSync(dir, { withFileTypes: true })) {
+ const p = path.join(dir, n.name)
+ if (n.isDirectory()) scanCrates(p, depth + 1)
+ else if (n.name === "Cargo.toml") {
+ const m = /^name\s*=\s*"([^"]+)"/m.exec(readFileSync(p, "utf8"))
+ if (m) raeaCrates.set(m[1].replace(/-/g, "_"), path.join(dir, "src"))
+ }
+ }
+}
+for (const top of ["systems", "core", "runtime", "engine", "io"]) if (existsSync(path.join(ROOT, top))) scanCrates(path.join(ROOT, top))
+function crateDir(krate: string): string | null {
+ if (raeaCrates.has(krate)) return raeaCrates.get(krate)!
+ if (!existsSync(REG)) return null
+ for (const idx of readdirSync(REG)) {
+ const d = path.join(REG, idx, `${krate}-0.20.0`, "src")
+ if (existsSync(d)) return d
+ }
+ return null
+}
+
+// the /// lines above a line, joined, its attributes skipped
+function docAbove(lines: string[], i: number): string {
+ const out: string[] = []
+ for (let k = i - 1; k >= 0; k--) {
+ const t = lines[k].trim()
+ if (t.startsWith("///")) { out.unshift(t.replace(/^\/\/\/\s?/, "")); continue }
+ // above the docs, or code: stop; an attribute (with its continuation lines) or a blank line under it: go on
+ if (out.length || /[;{}]$/.test(t) || t.startsWith("//")) break
+ }
+ // the first paragraph, without rustdoc's link brackets
+ const para = out.join("\n").split(/\n\s*\n/)[0] ?? ""
+ return para.replace(/\[`([^`\]]+)`\](\([^)]*\)|\[[^\]]*\])?/g, "`$1`").replace(/\[([^\]]+)\]\([^)]*\)/g, "$1").replace(/\s*\n\s*/g, " ").trim()
+}
+
+type Entry = { doc: string; fields: Record<string, string> }
+function find(krate: string, name: string): Entry | null {
+ const dir = crateDir(krate)
+ if (!dir) return null
+ for (const f of rsFiles(dir)) {
+ const lines = readFileSync(f, "utf8").split("\n")
+ const at = lines.findIndex((l) => new RegExp(`^\\s*pub (struct|enum) ${name}\\b`).test(l))
+ if (at < 0) continue
+ const entry: Entry = { doc: docAbove(lines, at), fields: {} }
+ if (!lines[at].includes("{") && !lines[at + 1]?.trim().startsWith("{")) return entry
+ // fields (pub name: T) and variants (Name, Name(..), Name { .. }) one level inside the braces
+ let depth = 0
+ for (let k = at; k < lines.length; k++) {
+ const l = lines[k]
+ const before = depth
+ depth += (l.match(/\{/g) ?? []).length - (l.match(/\}/g) ?? []).length
+ if (before === 1) {
+ const field = /^\s*pub\s+([a-z_][a-z0-9_]*)\s*:/.exec(l)
+ const variant = /^\s*([A-Z][A-Za-z0-9_]*)\s*(\(|\{|,|=|$)/.exec(l)
+ const key = field?.[1] ?? variant?.[1]
+ if (key) { const d = docAbove(lines, k); if (d) entry.fields[key] = d }
+ }
+ if (k > at && depth <= 0) break
+ }
+ return entry
+ }
+ return null
+}
+
+const tags = new Set<string>()
+const walk = (d: string): void => {
+ for (const n of readdirSync(d, { withFileTypes: true })) {
+ const p = path.join(d, n.name)
+ if (n.isDirectory()) { if (n.name !== "node_modules") walk(p) }
+ else if (/\.tsx?$/.test(n.name)) for (const m of readFileSync(p, "utf8").matchAll(/@bevy ([a-z_0-9]+(?:::[A-Za-z_0-9]+)+)/g)) tags.add(m[1])
+ }
+}
+for (const pkg of readdirSync(path.join(ROOT, "sdk"))) if (existsSync(path.join(ROOT, "sdk", pkg, "src"))) walk(path.join(ROOT, "sdk", pkg, "src"))
+
+const docs: Record<string, Entry> = {}
+let missing = 0
+for (const t of [...tags].sort()) {
+ const parts = t.split("::")
+ const e = find(parts[0], parts[parts.length - 1])
+ if (e && (e.doc || Object.keys(e.fields).length)) docs[t] = e
+ else missing++
+}
+// an export with no @bevy tag that has a Bevy type's name (raea mirrors Bevy's names): that type, found in these crates
+// and kept as "name:<Name>" with the crate it came from
+const CRATES = ["bevy_shape", "bevy_math", "bevy_pbr", "bevy_light", "bevy_camera", "bevy_sprite", "bevy_sprite_render", "bevy_ui", "bevy_text", "bevy_core_pipeline", "bevy_post_process", "bevy_anti_alias", "bevy_transform", "bevy_color", "bevy_image", "bevy_mesh", "bevy_animation", "bevy_audio", "bevy_input", "bevy_picking", "bevy_gizmos", "bevy_time", "bevy_render"]
+const scan = new Bun.Transpiler({ loader: "tsx" })
+const names = new Set<string>()
+for (const f of readdirSync(path.join(ROOT, "sdk/raea/src"))) if (/\.tsx?$/.test(f)) for (const n of scan.scan(readFileSync(path.join(ROOT, "sdk/raea/src", f), "utf8")).exports) if (/^[A-Z]/.test(n)) names.add(n)
+let byName = 0
+for (const n of [...names].sort()) {
+ if ([...tags].some((t) => t.endsWith("::" + n))) continue
+ for (const c of CRATES) {
+ const e = find(c, n)
+ if (e && (e.doc || Object.keys(e.fields).length)) { docs[`name:${n}`] = { ...e, doc: e.doc, from: `${c}::${n}` } as Entry; byName++; break }
+ }
+}
+console.log(`bevy-docs: ${byName} more by name`)
+writeFileSync(OUT, JSON.stringify(docs, null, 1) + "\n")
+console.log(`bevy-docs: ${Object.keys(docs).length} types documented, ${missing} not found, in ${path.relative(ROOT, OUT)}`)
diff --git a/tools/manual-ref/cli.ts b/tools/manual-ref/cli.ts
new file mode 100644
index 00000000..13585527
--- /dev/null
+++ b/tools/manual-ref/cli.ts
@@ -0,0 +1,142 @@
+// The manual's CLI reference (docs/manual.feature DM3, raea.io/docs/reference/cli/): a page a verb, its usage, where it
+// runs and its flags written from `raea help --json`, so the page says what the binary takes. What the binary can't say
+// is the page's own: its prose above and below the generated block, and each flag's description in the block's table,
+// which a rewrite keeps by the flag's name. `check` fails on a block that's out of date, a flag without a description
+// and a verb missing from GROUPS.
+// bun tools/manual-ref/cli.ts gen [DIR] rewrite the pages in DIR (docs/manual/reference/cli)
+// bun tools/manual-ref/cli.ts check [DIR] the pages as gen would write them, every flag described
+import { readFileSync, writeFileSync, existsSync, mkdirSync } from "node:fs"
+import path from "node:path"
+
+const ROOT = path.resolve(import.meta.dir, "../..")
+const [mode = "check", dirArg] = process.argv.slice(2)
+const DIR = path.resolve(dirArg ?? path.join(ROOT, "docs/manual/reference/cli"))
+const BIN = process.env.RAEA_BIN ?? path.join(ROOT, "target/release/raea")
+if (mode !== "gen" && mode !== "check") throw new Error("usage: cli.ts gen|check [DIR]")
+
+type Flag = { flag: string; values: number }
+type Verb = { verb: string; usage: string[]; flags: Flag[] | null; args: number | null; access: string; own_parser: boolean }
+
+function run(args: string[]): string {
+ const p = Bun.spawnSync([BIN, ...args], { env: { ...process.env, NO_COLOR: "1" } })
+ return (p.stdout.toString() + p.stderr.toString()).trim()
+}
+const verbs: Verb[] = JSON.parse(run(["help", "--json"])).verbs
+
+// the index's groups, in the order a reader meets them; every verb is in one
+const GROUPS: [string, string, string[]][] = [
+ ["Make", "Render, play and package what you wrote.", ["render", "play", "export-game", "bundle", "app", "run"]],
+ ["Projects", "The workspace, its projects and what a project holds.", ["init", "workspace", "project", "controller", "spec", "part", "add", "brand", "library"]],
+ ["Check", "What's wrong before anyone watches it.", ["check", "judge", "scene", "solid", "next", "doctor", "hook", "traces"]],
+ ["Footage", "Takes, cuts and the camera, from your own media.", ["media", "cut", "frame", "track", "splat", "mezz", "neural"]],
+ ["Sound", "Music read, foley and instruments made on this machine.", ["song", "sounds", "sao", "tokensynth", "setup-audio"]],
+ ["Generate and 3D tools", "Generated media, physics bakes and Blender.", ["gen", "physics", "blender"]],
+ ["Agents and setup", "What an agent reads, and the tools raea installs.", ["guide", "context", "skill", "skills", "setup"]],
+]
+const groupOf = new Map(GROUPS.flatMap(([g, , vs]) => vs.map((v, i) => [v, { g, i }] as const)))
+
+// a verb with its own parser lists its forms itself: that list is its usage
+const OWN_HELP: Record<string, string[]> = { media: ["media", "help"], gen: ["gen"], blender: ["blender"], physics: ["physics"] }
+function ownHelp(v: string): string {
+ return run(OWN_HELP[v] ?? [v]).replace(/^REFUSED\s+/, "").replace(/^usage:\s*/, "").split("\n").map((l) => l.replace(/^\s{7}(raea )/, "$1").trimEnd()).join("\n")
+}
+
+// what follows a flag in its usage: `--frame N`, `--quality draft|high|master|0..1`, `--snapshot T FILE`
+function valuesOf(v: Verb, f: Flag): string {
+ if (!f.values) return ""
+ const esc = f.flag.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")
+ for (const line of v.usage) {
+ const m = new RegExp(`(?:^|[\\s\\[|])${esc}(?:\\s+([^\\s\\[\\]]+))${f.values > 1 ? "(?:\\s+([^\\s\\[\\]]+))" : ""}`).exec(line.split(" (")[0])
+ if (m) return [m[1], m[2]].filter(Boolean).map((t) => t.replace(/[\]|,;]+$/, "")).filter((t) => !t.startsWith("-")).join(" ")
+ }
+ return f.values === 1 ? "VALUE" : Array.from({ length: f.values }, (_, i) => `V${i + 1}`).join(" ")
+}
+
+const ACCESS: Record<string, string> = {
+ HEADLESS: "Headless: it needs nothing running and opens no window.",
+ HOST: "Needs the raea app's host running on this machine.",
+ PERSON: "Waits for a person's click in the raea app.",
+}
+const accessLine = (a: string) => ACCESS[a] ?? a.split(/, then /).map((p, i) => (i ? "then " : "") + (i ? (ACCESS[p.split(" ")[0]] ?? p).replace(/^W/, "w") : ACCESS[p.split(" ")[0]] ?? p).replace(/\.$/, "") + (p.includes(" to ") ? ` (${p.slice(p.indexOf(" to ") + 1)})` : "")).join("; ") + "."
+const argsLine = (v: Verb) => (v.own_parser ? "Its arguments go to a parser of its own, whose forms are listed above." : v.args === null ? "Takes any number of arguments besides its flags." : v.args === 0 ? "Takes no arguments besides its flags." : `Takes up to ${v.args} argument${v.args === 1 ? "" : "s"} besides its flags.`)
+
+const BEGIN = "<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->"
+const END = "<!-- generated:end -->"
+const cell = (s: string) => s.replace(/\|/g, "\\|")
+const uncell = (s: string) => s.replace(/\\\|/g, "|").trim()
+
+type Page = { head: string; tail: string; desc: Map<string, string>; summary: string }
+function readPage(file: string): Page | null {
+ if (!existsSync(file)) return null
+ const text = readFileSync(file, "utf8")
+ const b = text.indexOf("<!-- generated:begin"), e = text.indexOf(END)
+ if (b < 0 || e < b) throw new Error(`${path.relative(ROOT, file)}: no generated block (${BEGIN} … ${END})`)
+ const desc = new Map<string, string>()
+ for (const m of text.slice(b, e).matchAll(/^\| `([^`]+)` \|.*\| (.*) \|$/gm)) desc.set(m[1], uncell(m[2]) === "–" ? "" : uncell(m[2]))
+ const summary = /^summary:\s*(.*)$/m.exec(text)?.[1] ?? ""
+ return { head: text.slice(0, b), tail: text.slice(e + END.length), desc, summary: summary ? JSON.parse(summary) : "" }
+}
+
+function block(v: Verb, desc: Map<string, string>): string {
+ const usage = v.own_parser ? ownHelp(v.verb) : v.usage.join("\n")
+ const md = [BEGIN, "", "## Usage", "", "```sh", usage, "```", "", `${accessLine(v.access)} ${argsLine(v)}`, ""]
+ const flags = v.flags ?? []
+ if (flags.length) {
+ md.push("## Flags", "", "| Flag | Takes | What it does |", "| --- | --- | --- |")
+ for (const f of flags) md.push(`| \`${f.flag}\` | ${cell(valuesOf(v, f)) ? "`" + cell(valuesOf(v, f)) + "`" : "–"} | ${cell(desc.get(f.flag) || "–")} |`)
+ md.push("")
+ }
+ md.push(END)
+ return md.join("\n")
+}
+
+const note = (v: Verb) => (v.usage.map((u) => /\s{3}\((.*)\)\s*$/.exec(u)?.[1] ?? "").find((n) => n && !n.startsWith("also:")) ?? "").replace(/;.*$/, "")
+function newHead(v: Verb): string {
+ const s = note(v) || `What raea ${v.verb} does.`
+ const sum = s.charAt(0).toUpperCase() + s.slice(1).replace(/\.?$/, ".")
+ return ["---", `title: ${JSON.stringify("raea " + v.verb)}`, `summary: ${JSON.stringify(sum)}`, `order: 0`, `sources: ${JSON.stringify(["engine/cli/src/cli.rs"])}`, "---", "", sum, "", ""].join("\n")
+}
+
+const problems: string[] = []
+const rows = new Map<string, { verb: string; summary: string }[]>()
+if (mode === "gen") mkdirSync(DIR, { recursive: true })
+for (const v of verbs) {
+ const at = groupOf.get(v.verb)
+ if (!at) { problems.push(`${v.verb}: in no group (GROUPS in tools/manual-ref/cli.ts)`); continue }
+ const file = path.join(DIR, `${v.verb}.md`)
+ const old = readPage(file)
+ const desc = old?.desc ?? new Map()
+ let head = old?.head ?? newHead(v)
+ const order = GROUPS.findIndex(([g]) => g === at.g) * 20 + at.i + 2
+ head = head.replace(/^order: .*$/m, `order: ${order}`)
+ const text = (head.trimEnd() + "\n\n" + block(v, desc) + "\n" + (old?.tail ?? "").replace(/^\n*/, "\n")).replace(/\n{3,}/g, "\n\n").trimEnd() + "\n"
+ for (const f of v.flags ?? []) if (!desc.get(f.flag)) problems.push(`${v.verb}: ${f.flag} has no description`)
+ const now = existsSync(file) ? readFileSync(file, "utf8") : ""
+ if (mode === "gen") writeFileSync(file, text)
+ else if (now !== text) problems.push(`${v.verb}: ${now ? "out of date" : "no page"} (bun tools/manual-ref/cli.ts gen)`)
+ rows.set(at.g, [...(rows.get(at.g) ?? []), { verb: v.verb, summary: readPage(file)?.summary ?? old?.summary ?? "" }])
+}
+for (const [, , vs] of GROUPS) for (const v of vs) if (!verbs.some((x) => x.verb === v)) problems.push(`${v}: in GROUPS but raea help doesn't list it`)
+
+// the index: its own prose above, the verbs by group below
+const indexFile = path.join(DIR, "index.md")
+const idx = existsSync(indexFile) ? readFileSync(indexFile, "utf8") : ["---", 'title: "CLI"', 'summary: "Every raea verb: what it does, its forms and its flags."', "order: 1", "---", "", ""].join("\n")
+const ib = idx.indexOf("<!-- generated:begin"), ie = idx.indexOf(END)
+const ihead = ib < 0 ? idx : idx.slice(0, ib), itail = ib < 0 ? "" : idx.slice(ie + END.length)
+const list = [BEGIN.replace("; edit only the flag descriptions", ""), ""]
+for (const [g, what, vs] of GROUPS) {
+ list.push(`## ${g}`, "", what, "", "| Verb | What it does |", "| --- | --- |")
+ for (const v of vs) { const r = rows.get(g)?.find((x) => x.verb === v); if (r) list.push(`| [\`raea ${v}\`](${v}.md) | ${cell(r.summary)} |`) }
+ list.push("")
+}
+list.push(END)
+const itext = (ihead.trimEnd() + "\n\n" + list.join("\n") + "\n" + itail.replace(/^\n*/, "\n")).replace(/\n{3,}/g, "\n\n").trimEnd() + "\n"
+if (mode === "gen") writeFileSync(indexFile, itext)
+else if (!existsSync(indexFile) || readFileSync(indexFile, "utf8") !== itext) problems.push("index: out of date (bun tools/manual-ref/cli.ts gen)")
+
+const flagCount = verbs.reduce((n, v) => n + (v.flags?.length ?? 0), 0)
+if (problems.length) {
+ console.error(problems.map((p) => "cli-ref: " + p).join("\n"))
+ console.error(`cli-ref: ${problems.length} problem(s), ${verbs.length} verbs, ${flagCount} flags`)
+ if (mode === "check") process.exit(1)
+} else console.log(`cli-ref: ${verbs.length} verbs, ${flagCount} flags, every flag described`)
diff --git a/tools/manual-ref/sdk.ts b/tools/manual-ref/sdk.ts
new file mode 100644
index 00000000..ab57c715
--- /dev/null
+++ b/tools/manual-ref/sdk.ts
@@ -0,0 +1,358 @@
+// The manual's SDK reference (docs/manual.feature DM3, raea.io/docs/reference/sdk/): one page an import path, written
+// from the SDK itself by the TypeScript compiler, so it says what the code says. Each export with its doc comment and
+// its Bevy name (@bevy), a component's props with their types and docs, and the Bevy parity ports and manual examples
+// that use it, which are checked against Bevy and rendered in CI, so they work as examples.
+// A page's prose above and below its generated block is its own, kept by a rewrite as the CLI pages' is (cli.ts).
+// bun tools/manual-ref/sdk.ts gen [DIR] rewrite the pages in DIR (docs/manual/reference/sdk)
+// bun tools/manual-ref/sdk.ts check [DIR] the pages as gen would write them, every import path in GROUPS
+import { readdirSync, readFileSync, writeFileSync, mkdirSync, existsSync } from "node:fs"
+import path from "node:path"
+import { createRequire } from "node:module"
+
+const ROOT = path.resolve(import.meta.dir, "../..")
+const ts = createRequire(path.join(ROOT, "sdk/shell/package.json"))("typescript") as typeof import("typescript")
+const SRC = path.join(ROOT, "sdk/raea/src")
+const REPO = "https://github.com/shinyobjectz/raea/blob/main"
+const SKIP = /(\.gen\.ts|^test\.tsx|^native-calls\.ts|^prelude\.ts|^pure\.ts)$/
+const [mode = "check", dirArg] = process.argv.slice(2)
+if (mode !== "gen" && mode !== "check") throw new Error("usage: sdk.ts gen|check [DIR]")
+const out = path.resolve(dirArg ?? path.join(ROOT, "docs/manual/reference/sdk"))
+const problems: string[] = []
+
+// the index's groups, in the order a reader meets them; every import path is in one
+const GROUPS: [string, string, string[]][] = [
+ ["Start here", "The composition, the app and the specs an agent writes.", ["raea", "app", "brief"]],
+ ["Time and motion", "Frames, animation, springs, states and input.", ["time", "animation", "math", "state", "input"]],
+ ["Video, sound and text", "Footage, pictures, sound, words and colour.", ["video", "audio", "text", "image", "asset", "color"]],
+ ["3D", "Bevy's 3D: cameras, lights, materials, meshes and the frame after it's drawn.", ["3d", "camera", "light", "pbr", "mesh", "transform", "post_process", "picking", "gizmos"]],
+ ["2D and UI", "Sprites and flat shapes, bevy_ui and Bevy's widgets.", ["sprite", "ui", "feathers"]],
+ ["Tools", "Checks, lints and a headless App you can drive.", ["dev_tools", "remote"]],
+]
+const groupAt = new Map(GROUPS.flatMap(([, , ps], g) => ps.map((p, i) => [p, g * 20 + i + 2] as const)))
+const BEGIN = "<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->"
+const END = "<!-- generated:end -->"
+/** a page's own prose: what's above its generated block and below it */
+function own(file: string): { head: string; tail: string } | null {
+ if (!existsSync(file)) return null
+ const t = readFileSync(file, "utf8")
+ const b = t.indexOf("<!-- generated:begin"), e = t.indexOf(END)
+ if (b < 0 || e < b) { problems.push(`${path.relative(ROOT, file)}: no generated block`); return null }
+ return { head: t.slice(0, b), tail: t.slice(e + END.length) }
+}
+function emit(file: string, text: string) {
+ const now = existsSync(file) ? readFileSync(file, "utf8") : ""
+ if (mode === "gen") writeFileSync(file, text)
+ else if (now !== text) problems.push(`${path.relative(ROOT, file)}: ${now ? "out of date" : "missing"} (bun tools/manual-ref/sdk.ts gen)`)
+}
+const summaryOf = (head: string) => { const m = /^summary:\s*(.*)$/m.exec(head); return m ? (JSON.parse(m[1]) as string) : "" }
+const join = (head: string, block: string, tail: string) => (head.trimEnd() + "\n\n" + block + "\n" + tail.replace(/^\n*/, "\n")).replace(/\n{3,}/g, "\n\n").trimEnd() + "\n"
+
+const entries = readdirSync(SRC).filter((f) => /\.tsx?$/.test(f) && !SKIP.test(f)).sort()
+const opts = ts.getParsedCommandLineOfConfigFile(path.join(ROOT, "sdk/raea/tsconfig.json"), {}, { ...ts.sys, onUnRecoverableConfigFileDiagnostic: () => {} })!.options
+const program = ts.createProgram(entries.map((f) => path.join(SRC, f)), { ...opts, noEmit: true })
+const checker = program.getTypeChecker()
+
+const real = (s: import("typescript").Symbol) => (s.flags & ts.SymbolFlags.Alias ? checker.getAliasedSymbol(s) : s)
+const entryName = (f: string) => (f.startsWith("index.") ? "raea" : "raea/" + f.replace(/\.tsx?$/, ""))
+const pageName = (entry: string) => (entry === "raea" ? "raea" : entry.slice(5))
+const oneLine = (s: string) => s.replace(/\s*\n\s*/g, " ").trim()
+const cell = (s: string) => oneLine(s).replace(/\|/g, "\\|")
+// raea's plan ids and feature files mean nothing to a reader of the docs: "(S3c)", "(docs/x.feature B5)", "(M1)"
+const plain = (s: string) => s.replace(/\s*\((?:[^()]*\.feature[^()]*|[A-Z]{1,3}\d+[a-z]?(?:[-, ][A-Z]{0,3}\d+[a-z]?)*)\)/g, "").replace(/\s+([.,;:])/g, "$1")
+const plural = (n: number, one: string, many: string) => `${n} ${n === 1 ? one : many}`
+
+// Bevy's own docs for the types the SDK names (bevy-docs.ts): by @bevy path, or "name:<Name>" for a mirrored name
+type BevyDoc = { doc: string; fields: Record<string, string>; from?: string }
+const BEVY: Record<string, BevyDoc> = JSON.parse(readFileSync(path.join(import.meta.dir, "bevy-docs.json"), "utf8"))
+function bevyOf(name: string, tags: string[]): { path: string; doc: BevyDoc } | null {
+ for (const t of tags) if (BEVY[t]) return { path: t, doc: BEVY[t] }
+ const n = BEVY[`name:${name}`]
+ return n ? { path: n.from ?? name, doc: n } : null
+}
+/** a prop's doc: the SDK's own, else Bevy's field of that name, marked as Bevy's */
+function propDoc(s: import("typescript").Symbol, bevy: BevyDoc | undefined) {
+ const own = docOf(s).text
+ if (own) return own
+ // the field's Bevy doc: from the type it was declared in (NodeProps is bevy_ui's Node), else the component's own
+ const p = s.declarations?.[0]?.parent
+ if (p && (ts.isInterfaceDeclaration(p) || ts.isTypeAliasDeclaration(p)) && p.name) {
+ const sym = checker.getSymbolAtLocation(p.name)
+ const tags = sym ? docOf(sym).bevy : []
+ for (const t of tags) if (BEVY[t]?.fields[s.name]) return `Bevy: ${BEVY[t].fields[s.name]}`
+ const n = BEVY[`name:${p.name.text}`]
+ if (n?.fields[s.name]) return `Bevy: ${n.fields[s.name]}`
+ }
+ return bevy?.fields[s.name] ? `Bevy: ${bevy.fields[s.name]}` : ""
+}
+
+/** the doc comment and @bevy tags of a symbol */
+function docOf(sym: import("typescript").Symbol) {
+ const text = ts.displayPartsToString(sym.getDocumentationComment(checker)).trim()
+ const bevy = sym.getJsDocTags(checker).filter((t) => t.name === "bevy").map((t) => ts.displayPartsToString(t.text).trim())
+ return { text, bevy }
+}
+
+/** a wrapped component's doc (`export const X = memo(XImpl)`, `Object.assign(memo(XImpl), {...})`): the wrapped
+ * function's, when the export has none of its own */
+function wrappedDoc(sym: import("typescript").Symbol): { text: string; bevy: string[] } {
+ const d = sym.valueDeclaration
+ if (!d || !ts.isVariableDeclaration(d)) return { text: "", bevy: [] }
+ let found: { text: string; bevy: string[] } = { text: "", bevy: [] }
+ // `export const rise: typeof riseImpl = ...`: the function it is typed as
+ if (d.type && ts.isTypeQueryNode(d.type)) {
+ const s = checker.getSymbolAtLocation(d.type.exprName)
+ if (s) found = docOf(real(s))
+ }
+ if (found.text || !d.initializer) return found
+ const visit = (n: import("typescript").Node): void => {
+ if (found.text) return
+ if (ts.isIdentifier(n)) {
+ const s = checker.getSymbolAtLocation(n)
+ const r = s ? real(s) : undefined
+ if (r && r !== sym && r.valueDeclaration && (ts.isFunctionDeclaration(r.valueDeclaration) || ts.isVariableDeclaration(r.valueDeclaration))) {
+ const doc = docOf(r)
+ if (doc.text) found = doc
+ }
+ }
+ if (ts.isCallExpression(n)) n.arguments.forEach(visit)
+ }
+ visit(d.initializer)
+ return found
+}
+
+/** a prop's type as written where it's declared (shorter and closer to the docs than the checker's expansion) */
+function typeText(sym: import("typescript").Symbol): string {
+ const d = sym.valueDeclaration ?? sym.declarations?.[0]
+ const written = d && "type" in d && (d as { type?: import("typescript").Node }).type
+ // a method (`build(app: App): void`) shows as its signature, not its return type
+ const method = d && (ts.isMethodSignature(d) || ts.isMethodDeclaration(d))
+ let s = method ? checker.typeToString(checker.getTypeOfSymbolAtLocation(sym, d)) : written ? written.getText() : d ? checker.typeToString(checker.getTypeOfSymbolAtLocation(sym, d)) : "unknown"
+ s = oneLine(s)
+ return s.length > 90 ? s.slice(0, 87) + "…" : s
+}
+
+/** where a declaration's name was declared: an interface or type alias's name */
+const ownerOf = (sym: import("typescript").Symbol) => {
+ const p = sym.declarations?.[0]?.parent
+ return p && (ts.isInterfaceDeclaration(p) || ts.isTypeAliasDeclaration(p) || ts.isClassDeclaration(p)) && p.name ? p.name.text : ""
+}
+
+/** a function component's props type: its first parameter's, when it takes one */
+function propsOf(sym: import("typescript").Symbol) {
+ const d = sym.valueDeclaration
+ if (!d) return null
+ const t = checker.getTypeOfSymbolAtLocation(sym, d)
+ const sig = t.getCallSignatures()[0]
+ const param = sig?.getParameters()[0]
+ if (!param || !param.valueDeclaration) return null
+ const pt = checker.getTypeOfSymbolAtLocation(param, param.valueDeclaration)
+ const name = param.valueDeclaration && ts.isParameter(param.valueDeclaration) && param.valueDeclaration.type ? param.valueDeclaration.type.getText() : ""
+ const props = checker.getPropertiesOfType(pt)
+ return props.length ? { name, props } : null
+}
+
+type Kind = "component" | "hook" | "function" | "class" | "value" | "type"
+function kindOf(name: string, sym: import("typescript").Symbol): Kind {
+ const f = sym.flags
+ if (f & ts.SymbolFlags.Class) return "class"
+ const value = f & (ts.SymbolFlags.Function | ts.SymbolFlags.Variable | ts.SymbolFlags.Enum)
+ if (!value) return "type"
+ const d = sym.valueDeclaration
+ const calls = d ? checker.getTypeOfSymbolAtLocation(sym, d).getCallSignatures().length > 0 : false
+ if (calls && /^use[A-Z]/.test(name)) return "hook"
+ if (calls && /^[A-Z]/.test(name)) return "component"
+ return calls ? "function" : "value"
+}
+
+// the files that show each name in use: Bevy parity ports (checked against Bevy) and the manual's examples (rendered in CI)
+const examples: { file: string; text: string }[] = []
+for (const dir of ["sdk/raea/bench/bevy-parity", "docs/manual/examples"]) {
+ const walk = (d: string): void => {
+ for (const n of readdirSync(path.join(ROOT, d), { withFileTypes: true })) {
+ const p = path.join(d, n.name)
+ if (n.isDirectory()) { if (n.name !== "assets" && n.name !== "helpers") walk(p) }
+ else if (/\.tsx?$/.test(n.name)) examples.push({ file: p, text: readFileSync(path.join(ROOT, p), "utf8") })
+ }
+ }
+ try { walk(dir) } catch { /* a folder this checkout doesn't have */ }
+}
+function usedIn(entry: string, name: string) {
+ const from = new RegExp(`import\\s*(?:type\\s*)?\\{[^}]*\\b${name}\\b[^}]*\\}\\s*from\\s*"${entry.replace("/", "\\/")}"`)
+ return examples.filter((e) => from.test(e.text)).map((e) => e.file)
+}
+const exampleLink = (f: string) => {
+ const label = f.replace(/^sdk\/raea\/bench\/bevy-parity\//, "").replace(/^docs\/manual\/examples\//, "manual: ").replace(/\.tsx?$/, "")
+ return `[${label}](${REPO}/${f})`
+}
+
+/** the entry file's own header: its "raea/x (bevy_x): what" line and the lines after it, as prose */
+function headerOf(file: string, entry: string) {
+ const lines = readFileSync(path.join(SRC, file), "utf8").split("\n")
+ const head: string[] = []
+ for (const l of lines) { if (!l.startsWith("//")) break; head.push(l.replace(/^\/\/\s?/, "")) }
+ const at = head.findIndex((l) => l.startsWith(entry + " ") || l.startsWith(entry + ":"))
+ const text = oneLine((at >= 0 ? head.slice(at) : head.filter((l) => !/^docs\/sdk\.feature/.test(l))).join("\n"))
+ const m = /^raea(?:\/[a-z_0-9]+)?\s*(?:\(([^)]*)\))?:\s*(.*)$/.exec(text)
+ return { bevy: m?.[1] ?? "", what: (m?.[2] ?? text).replace(/^\s+/, "") }
+}
+
+const SECTION: Record<Kind, string> = { component: "Components", hook: "Hooks", function: "Functions", class: "Classes", value: "Values", type: "Types" }
+const ONE: Record<Kind, string> = { component: "component", hook: "hook", function: "function", class: "class", value: "value", type: "type" }
+const ORDER: Kind[] = ["component", "hook", "function", "class", "value", "type"]
+if (mode === "gen") mkdirSync(out, { recursive: true })
+const index: { entry: string; page: string; what: string; counts: string }[] = []
+
+// every exported type's page (an entry of its own before the root "raea", which re-exports), and how many components take
+// each props type: one shared by several (NodeProps) is tabled once, on its type's entry, and linked from each
+const home = new Map<string, string>()
+const uses = new Map<string, number>()
+for (const file of [...entries].sort((a, b) => Number(a.startsWith("index.")) - Number(b.startsWith("index.")))) {
+ const mod = checker.getSymbolAtLocation(program.getSourceFile(path.join(SRC, file))!)
+ if (!mod) continue
+ for (const ex of checker.getExportsOfModule(mod)) {
+ const s = real(ex)
+ const k = kindOf(ex.name, s)
+ if (k === "type" && !home.has(ex.name)) home.set(ex.name, pageName(entryName(file)))
+ if (k === "component" && file.startsWith("index.") === false) { const p = propsOf(s)?.name.replace(/<.*$/, ""); if (p) uses.set(p, (uses.get(p) ?? 0) + 1) }
+ }
+}
+const typeLink = (name: string, from: string) => (home.has(name) ? `[\`${name}\`](${home.get(name) === from ? "" : home.get(name) + ".md"}#${name.toLowerCase()})` : "`" + name + "`")
+const shared = (name: string) => (uses.get(name) ?? 0) > 1 && home.has(name)
+
+entries.forEach((file, i) => {
+ const entry = entryName(file)
+ const sf = program.getSourceFile(path.join(SRC, file))!
+ const mod = checker.getSymbolAtLocation(sf)
+ if (!mod) return
+ const exps = checker.getExportsOfModule(mod).filter((s) => s.name !== "default").sort((a, b) => a.name.localeCompare(b.name))
+ if (!exps.length) return
+ const { bevy, what } = headerOf(file, entry)
+ const groups = new Map<Kind, string[]>()
+ // a component's props type is tabled with the component: the type's own entry just points there
+ const propsFor = new Map<string, string>()
+ for (const ex of exps) { const s = real(ex); if (kindOf(ex.name, s) === "component") { const p = propsOf(s); if (p?.name && !shared(p.name.replace(/<.*$/, ""))) propsFor.set(p.name.replace(/<.*$/, ""), ex.name) } }
+ for (const ex of exps) {
+ const sym = real(ex)
+ const kind = kindOf(ex.name, sym)
+ const doc0 = docOf(sym)
+ const { text, bevy: tags } = doc0.text ? doc0 : wrappedDoc(sym).text ? { text: wrappedDoc(sym).text, bevy: [...doc0.bevy, ...wrappedDoc(sym).bevy] } : doc0
+ const bv = bevyOf(ex.name, tags)
+ const md: string[] = [`### \`${ex.name}\``, ""]
+ if (text) md.push(plain(text), "")
+ else if (bv?.doc.doc) md.push(`*From Bevy's \`${bv.path}\`:* ${bv.doc.doc}`, "")
+ if (tags.length) md.push(`Bevy: ${tags.map((t) => "`" + t + "`").join(", ")}.`, "")
+ else if (bv && text) md.push(`Bevy: \`${bv.path}\`.`, "")
+ // a function's or hook's signatures, as the checker prints them (the first three overloads)
+ if ((kind === "function" || kind === "hook") && sym.valueDeclaration) {
+ const sigs = checker.getTypeOfSymbolAtLocation(sym, sym.valueDeclaration).getCallSignatures().slice(0, 3)
+ const f = ts.TypeFormatFlags.NoTruncation | ts.TypeFormatFlags.WriteArrowStyleSignature
+ const lines = sigs.map((s) => { const t = oneLine(checker.signatureToString(s, undefined, f & ~ts.TypeFormatFlags.WriteArrowStyleSignature)).replace(/(\?: [^;,()]+?) \| undefined/g, "$1"); return `function ${ex.name}${t.length > 400 ? t.slice(0, 397) + "…" : t}` })
+ if (lines.length) md.push("```ts", ...lines, "```", "")
+ }
+ // a class's public members: its statics, then what an instance has, each with its signature or type and its doc
+ if (kind === "class" && sym.valueDeclaration) {
+ const rows: string[] = []
+ const fmt = ts.TypeFormatFlags.NoTruncation
+ const member = (m: import("typescript").Symbol, on: string) => {
+ if (m.name.startsWith("_") || m.name.startsWith("#") || m.name === "prototype") return
+ const d = m.valueDeclaration ?? m.declarations?.[0]
+ if (!d || (ts.getCombinedModifierFlags(d as import("typescript").Declaration) & (ts.ModifierFlags.Private | ts.ModifierFlags.Protected))) return
+ const t = checker.getTypeOfSymbolAtLocation(m, d)
+ const sig = t.getCallSignatures()[0]
+ const shown = sig ? `${on}${m.name}${oneLine(checker.signatureToString(sig, undefined, fmt))}` : `${on}${m.name}: ${oneLine(checker.typeToString(t, undefined, fmt))}`
+ rows.push(`| \`${cell(shown.length > 160 ? shown.slice(0, 157) + "…" : shown)}\` | ${cell(plain(docOf(m).text)) || "–"} |`)
+ }
+ const statics = checker.getTypeOfSymbolAtLocation(sym, sym.valueDeclaration)
+ for (const c of statics.getConstructSignatures().slice(0, 2)) if (c.getParameters().length) rows.push(`| \`${cell(`new ${ex.name}${oneLine(checker.signatureToString(c, undefined, fmt)).replace(/:\s*[^:)]*$/, "")}`)}\` | ${cell(plain(docOf(c.getDeclaration()?.symbol ?? sym).text)) || "–"} |`)
+ for (const m of checker.getPropertiesOfType(statics)) member(m, `${ex.name}.`)
+ for (const m of checker.getPropertiesOfType(checker.getDeclaredTypeOfSymbol(sym))) member(m, ".")
+ if (rows.length) md.push("| Member | What it does |", "| --- | --- |", ...rows.slice(0, 60), "")
+ if (rows.length > 60) md.push(`And ${rows.length - 60} more members; see the source.`, "")
+ }
+ if (kind === "component") {
+ const p = propsOf(sym)
+ if (p) {
+ const pname = p.name.replace(/<.*$/, "")
+ if (shared(pname)) md.push(`Takes ${typeLink(pname, pageName(entry))}'s props.`, "")
+ const own = p.props.filter((s) => !ownerOf(s) || ownerOf(s) === p.name.replace(/<.*$/, ""))
+ const inherited = new Map<string, string[]>()
+ for (const s of p.props) if (!own.includes(s)) inherited.set(ownerOf(s), [...(inherited.get(ownerOf(s)) ?? []), s.name])
+ if (own.length && !shared(pname)) {
+ md.push("| Prop | Type | What it does |", "| --- | --- | --- |")
+ for (const s of own) {
+ const opt = s.flags & ts.SymbolFlags.Optional ? "" : " (required)"
+ md.push(`| \`${s.name}\`${opt} | \`${cell(typeText(s))}\` | ${cell(plain(propDoc(s, bv?.doc))) || "–"} |`)
+ }
+ md.push("")
+ }
+ const named = shared(pname) ? [] : [...inherited].filter(([o]) => o), loose = shared(pname) ? [] : inherited.get("") ?? []
+ if (named.length) md.push(`Also takes the props of ${named.map(([o, n]) => `${typeLink(o, pageName(entry))}${home.has(o) && n.length > 6 ? "" : ` (${n.map((x) => "`" + x + "`").join(", ")})`}`).join("; ")}.`, "")
+ if (loose.length) md.push(`Also takes: ${loose.map((n) => "`" + n + "`").join(", ")}.`, "")
+ }
+ }
+ if (kind === "type" && propsFor.has(ex.name)) md.push(`The props of [\`${propsFor.get(ex.name)}\`](#${propsFor.get(ex.name)!.toLowerCase()}), tabled there.`, "")
+ else if (kind === "type") {
+ const d = sym.declarations?.[0]
+ if (d && (ts.isInterfaceDeclaration(d) || ts.isTypeAliasDeclaration(d))) {
+ const fields = ts.isInterfaceDeclaration(d) ? checker.getPropertiesOfType(checker.getDeclaredTypeOfSymbol(sym)) : []
+ if (fields.length && fields.length <= 40) {
+ md.push("| Field | Type | What it is |", "| --- | --- | --- |")
+ for (const s of fields) md.push(`| \`${s.name}\`${s.flags & ts.SymbolFlags.Optional ? "" : " (required)"} | \`${cell(typeText(s))}\` | ${cell(plain(propDoc(s, bv?.doc))) || "–"} |`)
+ md.push("")
+ } else if (ts.isTypeAliasDeclaration(d)) {
+ const t = oneLine(d.type.getText())
+ md.push("```ts", `type ${ex.name} = ${t.length > 300 ? t.slice(0, 297) + "…" : t}`, "```", "")
+ }
+ }
+ }
+ const uses = kind === "type" ? [] : usedIn(entry, ex.name)
+ if (uses.length) md.push(`Used in: ${uses.slice(0, 8).map(exampleLink).join(", ")}${uses.length > 8 ? `, and ${uses.length - 8} more` : ""}.`, "")
+ groups.set(kind, [...(groups.get(kind) ?? []), md.join("\n")])
+ }
+ const page = pageName(entry)
+ const counts = ORDER.filter((k) => groups.has(k)).map((k) => plural(groups.get(k)!.length, ONE[k], SECTION[k].toLowerCase())).join(", ")
+ const at = groupAt.get(page)
+ if (at === undefined) problems.push(`${entry}: in no group (GROUPS in tools/manual-ref/sdk.ts)`)
+ const pageFile = path.join(out, page + ".md")
+ const kept = own(pageFile)
+ // a new page's head: its title, and the summary its file's header gives, to be rewritten by hand
+ const said = what ? plain(what).replace(/\.$/, "") + "." : `What \`${entry}\` exports.`
+ const head = (kept?.head ?? ["---", `title: ${JSON.stringify(entry)}`, `summary: ${JSON.stringify(oneLine(said))}`, "order: 0", `sources: ${JSON.stringify(["sdk/raea/src/" + file])}`, "---", "", oneLine(said), ""].join("\n")).replace(/^order: .*$/m, `order: ${at ?? 99}`)
+ const values = exps.filter((e) => real(e).flags & ts.SymbolFlags.Value)
+ const block = [
+ BEGIN,
+ "",
+ "```ts",
+ `import { ${values.slice(0, 4).map((e) => e.name).join(", ")} } from "${entry}"`,
+ "```",
+ "",
+ `\`${entry}\` exports ${counts}.${bevy ? ` Bevy's counterpart: \`${bevy}\`.` : ""} Source: [sdk/raea/src/${file}](${REPO}/sdk/raea/src/${file}).`,
+ "",
+ ...ORDER.filter((k) => groups.has(k)).flatMap((k) => [`## ${SECTION[k]}`, "", ...groups.get(k)!]),
+ END,
+ ].join("\n").replace(/\n{3,}/g, "\n\n")
+ emit(pageFile, join(head, block, kept?.tail ?? ""))
+ index.push({ entry, page, what: summaryOf(head), counts })
+})
+
+// the index: its own prose above, the paths by group below
+const indexFile = path.join(out, "index.md")
+const ikept = own(indexFile)
+const ihead = ikept?.head ?? ["---", 'title: "SDK"', 'summary: "Every raea import path and everything it exports, generated from the SDK."', "order: 1", 'sources: ["sdk/raea/src"]', "---", ""].join("\n")
+const list = [BEGIN, ""]
+for (const [g, what, ps] of GROUPS) {
+ list.push(`## ${g}`, "", what, "", "| Import | What it's for | Exports |", "| --- | --- | --- |")
+ for (const p of ps) {
+ const x = index.find((r) => r.page === p)
+ if (x) list.push(`| [\`${x.entry}\`](${x.page}.md) | ${cell(x.what)} | ${x.counts} |`)
+ else problems.push(`${p}: in GROUPS but sdk/raea/src has no such entry`)
+ }
+ list.push("")
+}
+list.push(END)
+emit(indexFile, join(ihead, list.join("\n"), ikept?.tail ?? ""))
+if (problems.length) {
+ console.error(problems.map((p) => "sdk-ref: " + p).join("\n"))
+ if (mode === "check") process.exit(1)
+}
+console.log(`sdk-ref: ${index.length} import paths, ${problems.length} problem(s)`)