feat: underpass overpasses carry the chapter transitions

This commit is contained in:
2026-10-11 10:48:31 +03:00
parent 7423f5d52e
commit 989928c5bb
19 changed files with 1084 additions and 33 deletions

View File

@@ -44,3 +44,14 @@ npm run test:browser -- tests/browser/visual-regression.spec.ts
- [ ] Review on the physical iPhone 13 and Pixel 6 during `physical-drive.v1`.
No unsupported engine, physical device, or unpublished project-media result is represented as passed.
## Underpass shade (chapter boundaries)
Every chapter boundary is an overpass deck the car drives beneath (`src/scene/world/underpass.ts`, pure rules in `src/journey/underpass.ts`). While the deck is overhead it dims the sky, the fog and the sky-lit road and terrain terms. By construction:
- **One dark-light cycle per boundary.** The shade follows the deck's distance from the camera: it rises once as the deck arrives and falls once as it leaves. Scrolling back reverses the same single cycle.
- **Maximum dip 35%.** The shade multiplier never goes below 0.65 (`SHADE_PEAK = 0.35`). The headlight throw, lamps and HUD are not dimmed.
- **Edges of at least 300 ms.** The shade is slew-limited: 0 to the 35% peak, or back, takes at least 300 ms (`SHADE_EDGE_SECONDS`), however fast the scroll.
- **A latch of at least 1 s.** Whether a pass shades at all is decided once, as the deck enters the band, and a pass starting within 1 s of the last shaded pass gets no shade (`SHADE_SPACING_MS`). Brisk scrolling (drive speed above 0.5, the exit sign's own gate) and explicit navigation never shade: the deck goes by without dimming or sound.
The worst case is therefore one shade cycle per second, at most **1 Hz**, well under the three-per-second limit, and each cycle is a 35% dip with soft edges, below the general-flash luminance pair the automated method counts at large area. The low tier draws the deck without any shade. Static, reduced-motion and data-saver visits get no scene, so nothing is added there.