# Fourteen Seconds of Bronze — Public Source & Verification Bundle

A single self-contained HTML WebGL 2 presentation (`1,005 KB`, `0` network requests, `0` external image files) built from modular ES sources following the patterns documented in [`DontFretBrett/cinematic-deck-playbook`](https://github.com/DontFretBrett/cinematic-deck-playbook), applied to verified Big Ben and Westminster Abbey acoustic measurements.

## Bundle Layout

- `code/build.mjs` — `esbuild` single-file bundler inlining Three.js (`MIT`), 10 scenes, 10 GLSL transitions, Web Audio synthesizer, presenter UI, and base64 `.woff2` fonts (`Source Serif 4` variable normal/italic + `Courier Prime` 400/700, SIL OFL).
- `code/src/facts.js` — Single source of truth for every frequency, `T60`, diffraction loss, seasonal delay, 1890–2024 archive ratio, and street-OSINT metric, verified at boot by `checkFacts()`.
- `code/src/engine/` — WebGL 2 renderer (`gfx.js`), linear-HDR bloom/ACES/AgX finishing pass (`post.js`), per-glyph canvas-atlas typography (`type.js`), deck controller with warm-up/parking/governor/`?headless` hooks (`deck.js`), presenter chrome (`ui.js`), and procedural Web Audio modal synthesizer (`audio.js`).
- `code/src/transitions/` — Nine custom reversible GLSL transitions (`portal-in`, `portal-out`, `tear`, `fold`, `wash`, `flaps`, `slam`, `daybreak`, `line`) plus built-in linear `fade`.
- `code/src/scenes/` — Ten deterministic scenes (`01-ledger.js` through `10-coda.js`), every frame a pure function of beat state `s`.
- `code/tools/` — Headless Chrome verification harness: `shoot.mjs` (`39` deterministic shots + contact sheet), `motion.mjs` (`30 fps` flash, pop, jump, hold-motion, and determinism audit), and `smoke.mjs` (live 30-beat forward/backward walk, UI overlays, overview thumbnails, zero external requests).
- `TREATMENT.md` — Pre-code scene-by-scene treatment and hand-off plan.
- `NOTES.md` — Final audit numbers, jump verdict table, and honest weak spots.
- `out/motion-report.json` — Raw per-scene, per-transition, and determinism numbers from the verified Metal GPU run.

## Reproduce Locally

```bash
cd code
mkdir -p assets/fonts
# Copy SIL OFL .woff2 fonts into assets/fonts/ as:
#   SourceSerif4-400.woff2, SourceSerif4-400-italic.woff2,
#   CourierPrime-400.woff2, CourierPrime-700.woff2
npm install
npm run build        # -> dist/deck.html (~1.0 MB standalone HTML)
npm run check        # build + shoot --trans + motion + smoke
```

## Four Easy Ways to Extend

1. **Swap in a new topic without touching the engine:** Replace `src/facts.js` and `src/scenes/*.js`, keeping all 10 GLSL transitions, per-glyph WebGL type, presenter chrome, and headless motion audits intact.
2. **Add offline sub-frame video export:** `deck.frame(dt, { sub: 8, shutter: 0.5 })` is already implemented in `src/engine/deck.js`; pipe canvas frames into `ffmpeg` to render motion-blurred 60 fps MP4 cuts.
3. **Measure low-end mobile GPU frame pacing:** Add a frame-time telemetry probe to `tools/smoke.mjs` under Chrome CPU/GPU throttling or Android USB debugging to tune the `s.q` quality governor thresholds.
4. **Upgrade Scene 4 (`abbey`) geometry or audio:** Replace the low-poly `InstancedMesh` ashlar volumes with measured elevation profiles or swap the synthetic hall impulse in `src/engine/audio.js` for a measured cloister impulse response.
