From 48a3413ebc4c638764c94f40ed696825a334270e Mon Sep 17 00:00:00 2001 From: LucaP Date: Sat, 10 Oct 2026 21:05:00 +0300 Subject: [PATCH] fix(scene): drop the first-frame precompile; record round 4 test evidence --- docs/redesign/round4.md | 21 +++++++++++++++++++-- src/scene/world/environment.ts | 4 ---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/docs/redesign/round4.md b/docs/redesign/round4.md index b324ce9..64d4493 100644 --- a/docs/redesign/round4.md +++ b/docs/redesign/round4.md @@ -28,9 +28,14 @@ The site now plays like the opening of a film: crane shot, title card, then a dr - Three instanced draws; vehicle count is 14, 10 or 7 depending on tier. 4. **Wet road.** The asphalt now picks up a sun glare column, headlight throw from the car, and pylon reflections that travel with the drive. 5. **The sun.** A saturated vermilion-to-gold disc, held below the ACES shoulder so it no longer washes out to cream. -6. **Opening crane.** On a fresh load at the top of the page, the camera starts high and looking at the sun, then cranes down to the car over 4.2 s with letterbox bars. Scrolling speeds it up five times. +6. **Opening crane.** On a fresh load at the top of the page, the camera starts high and looking at the sun, then cranes down to the car over 4.2 s with letterbox bars. The shot cuts straight to the chase framing in four cases: + - the visitor scrolls; + - the visitor navigates; + - a sign starts to arrive (signs latch their placement against the chase camera); + - three frames take longer than 100 ms. 7. **Exit gates (the chapter cut).** - - On every chapter change, nine light gates in the next chapter's accent colour rush past in about two seconds. The frame flashes slightly and the field of view opens. + - On every chapter change, nine light gates in the next chapter's accent colour rush past in about two seconds. The frame flashes slightly and bloom lifts. + - The field of view stays fixed, so sign placement does not move. The gate shader warms up during the first frames. - The audio answers with a pass-by: a band-passed air sweep that pans left to right. Its nodes are allocated in advance, so a chapter change only schedules automation. 8. **Title card and night plates.** - The hero name is a large Outrun chrome title with a clip-path reveal that runs only under `prefers-reduced-motion: no-preference`. @@ -62,11 +67,23 @@ The site now plays like the opening of a film: crane shot, title card, then a dr | contact | 200 | 184 | p95 frame time is 8.4 ms everywhere. +- Browser suite (`npm run test:browser`, 65 or 64 failures against the 63-entry baseline). Compared with the baseline: + - **Fixed:** two desktop keyboard-focus tests. + - **Pass alone, fail sometimes under 4 workers on SwiftShader:** + - `journey-integration:473` (sign bounds about 16–36 px past the limit); + - `journey-integration:508`; + - `arrival-finale`; + - `contact-refinements:22`; + - mobile `bfcache:50`; + - the known `:391` flake. + - **Why:** these assertions are timing- and geometry-sensitive, and the margin shrank because the scene costs more per frame. + - No test was edited. - After shots: `round4/after-*.webp`, `round4/after-sheet.webp`, `round4/after-mobile-sheet.webp`. ## Honest regressions and open items - FPS is about 6–9% lower, mainly from the lens pass and the traffic. +- Several browser tests (listed above) are now load-sensitive. They need either a cheaper path for software GL or wider timing margins in the tests, and I did neither. - The first frame at `start` has one worst-case spike of about 196 ms from shader compiles. - The letterbox and lens effects appear only on post-processing tiers. The low tier gets the grade, the skyline, the gates and reduced traffic. - The hero copy at 390 px still overlaps the car once the crane settles. This was true before this round too. diff --git a/src/scene/world/environment.ts b/src/scene/world/environment.ts index a7b5304..078aeab 100644 --- a/src/scene/world/environment.ts +++ b/src/scene/world/environment.ts @@ -514,10 +514,6 @@ export async function createProceduralSceneGeneration( if (introProgress === null) { introProgress = snapshot.activeSectionId === 'start' && snapshot.scrollY < 40 ? 0 : 1; - // The crane opens on the sky, so the road, car and roadside would - // otherwise compile their shaders mid-drive when they first enter the - // frame. Compile every visible object now, as the chase framing would. - if (introProgress === 0) renderer.compile(scene, camera); } if (introProgress < 1) { // The shot belongs to a visitor who waits at the top. Scrolling,