From 4d052502942f71873688804c4da25e74601f8fcb Mon Sep 17 00:00:00 2001 From: Dejvino Date: Sun, 20 Sep 2026 18:42:53 +0200 Subject: [PATCH] Clickable previews: exact app deep-links everywhere Every rendered still links to the app frame that produced it (song + seed + frame + venue/viz pins + probe warm-up, new window), via shared src/ui/preview.js. Supporting work, each measured: app honors ?frame/?venueSel/?viz/?warm= with pre-build pins (Show.applyPins) and primes deep-link loads; shared pinViz/pinVenueShell paths for gallery, filmstrip and app; probes prime and carry their warm-up; bank probes analyse the bank PCM and file decode is fixed-rate with bit-exact WAV parsing so app and probes see identical samples; materials built mid-update compile synchronously (needsCompile). Round trip verified bit-identical gallery-versus-app. --- flow-state/DESIGN.md | 8 ++ flow-state/filmstrip.html | 3 +- flow-state/src/Show.js | 52 ++++++++++- flow-state/src/audio/decode.js | 91 ++++++++++++++++++- flow-state/src/audio/songbank.js | 57 +++++++++--- flow-state/src/checks/filmstrip.js | 13 ++- flow-state/src/engine/Layer.js | 13 +++ flow-state/src/look/pinViz.js | 47 ++++++++++ flow-state/src/main.js | 38 ++++---- flow-state/src/scenes/stage/assembly.js | 2 + flow-state/src/scenes/stage/pylon-field-3d.js | 1 + .../src/scenes/stage/synthwave-corridor.js | 2 + flow-state/src/ui/preview.js | 36 ++++++-- flow-state/src/venues/chamber.js | 1 + flow-state/src/venues/ride.js | 1 + flow-state/src/venues/stage.js | 1 + flow-state/tools/build-song-bank.js | 31 +++++-- flow-state/venue-gallery.html | 76 ++++++++-------- 18 files changed, 377 insertions(+), 96 deletions(-) create mode 100644 flow-state/src/look/pinViz.js diff --git a/flow-state/DESIGN.md b/flow-state/DESIGN.md index 619b629..32fb25c 100644 --- a/flow-state/DESIGN.md +++ b/flow-state/DESIGN.md @@ -29,6 +29,14 @@ references, `MIGRATION.md` is the shader→stage migration recipe. is on. Section boundaries are NOT exact for free — the compositor's feedback buffer is global and carries across them. Clearing it per boundary would flash every transition; warm-up is the better trade. +- Previews link to their exact app frame (`src/ui/preview.js`: song + seed + + frame + venue/viz pins + the probe's warm-up length, both sides primed). + Exactness takes four agreements: the bank probes analyse the bank PCM + (peak-normalised 16-bit mono — `audio/songbank.js bankPcm`), file decode + is fixed at 44.1 kHz with bit-exact WAV parsing (never the context rate), + pins run before any layer builds (rebuilding mid-context renders + differently), and materials built mid-update compile synchronously + (`needsCompile`) so no warm-up frame draws against an unlinked program. ## 2. Lookahead diff --git a/flow-state/filmstrip.html b/flow-state/filmstrip.html index d783f44..5264133 100644 --- a/flow-state/filmstrip.html +++ b/flow-state/filmstrip.html @@ -105,7 +105,7 @@