feat: refine nightdrive world and authored car

Integrate the Blender grand tourer with a cohesive shader-driven road, terrain, atmosphere, lighting, and post-processing pass. Refine responsive drive dynamics and sign lifecycle behavior, and add durable visual, accessibility, and performance verification evidence.
This commit is contained in:
2026-09-02 23:16:25 +03:00
parent 7dae835ac5
commit bc18bc2043
73 changed files with 1555 additions and 293 deletions

View File

@@ -27,7 +27,7 @@ Each default viewport asserts:
- no horizontal overflow and all primary surfaces inside the viewport;
- dark professional composition with restrained chromatic accent coverage;
- no panel background imagery, filters, glowing text, or content scanlines;
- intentional widths for each desktop layout family (42–92%, with the destination capped at 62%) and readable mobile single-column widths;
- intentional widths for each desktop layout family, including 68% diagram/toolkit corridors and a 46% destination capped at 42rem, plus readable mobile single-column widths;
- zero public project image/video elements while the approval-bound manifest is empty.
Static receives a two-capture perceptual-stability assertion. Contact arrival must resolve the Contact heading, route HUD, `ARRIVED` state, identity, and visible email action together.
@@ -51,7 +51,7 @@ Focused evidence is generated by:
npm run test:browser -- tests/browser/visual-regression.spec.ts
```
The final 2026-09-02 complete browser run passed 169 checks with 43 deliberate project/capability skips and no failures. The 16 visual checks ran once in the available current Chromium project; the duplicate mobile-project visual cases were skipped intentionally.
The final 2026-09-02 complete browser run passed 167 checks with 43 deliberate project/capability skips. Two desktop heading-focus geometry checks reached the correct target but timed out under the four-worker run; both files then passed 9/9 unchanged with one worker, including the two affected checks. The 16 visual checks ran once in the available current Chromium project; the duplicate mobile-project visual cases were skipped intentionally.
The compact 320×568 capture initially revealed that the fixed drive controls occupied 43.5% of the viewport and obscured the opening content. The mobile-only control grid reduced that surface to 24.0%; a regression guard now caps it at 34%. After the trace-driven fixed section navigation landed, the captures exposed the decorative HUD intersecting the navigation at phone widths and the controls at 768×1024. A shared exact navigation-height variable now keeps the fixed navigation and visible compact HUD edge-adjacent, reserves their space in the header, and leaves the controls independent. The final measured bounds were 0–93px navigation and 93–125px HUD at 320×568, and 0–45px navigation and 45–77px HUD at 768×1024. Fixed-navigation focus now uses an inward standards outline so the indicator remains visible inside the viewport. Passive-section coverage now positions the target safely beyond the actual 35% activation line rather than relying on a relative `offsetTop` or exact fractional equality.
@@ -61,14 +61,37 @@ The final integrated review identified two high-confidence gaps. The GPU ledger
The post-review resize pass now synchronizes the native navigation disclosure whenever the compact breakpoint changes: shrinking closes the overlay before it can cover the identity card, while widening restores the complete desktop navigator. The soundtrack's required user gesture is labeled `PLAY SOUNDTRACK` because the visual drive is already running and browser audio cannot begin before an explicit action.
## Nightdrive reconstruction evidence
The September Nightdrive convergence pass replaced the shallow procedural composition with a unified shader world and an original Blender-authored grand tourer. Exact opening captures are retained at 1440×900, 1280×720, 768×1024, and 390×844 under `docs/reviews/evidence/nightdrive-iteration/final/`, together with Infrastructure, Selected builds, Contact, acceleration, and Static states. The matching pre-change and reference captures remain in the adjacent `baseline/` directory.
The continuity refinement is retained separately under `docs/reviews/evidence/nightdrive-iteration/refinement/`. It includes opening frames at 390×844, 844×390, 768×1024, 1440×900, and 2560×1440; acceleration and 700ms coast frames; a readable Profile sign; the same sign reconciled after a skipped target; an empty browser-error log; and the authenticated High-tier allocation trace. These captures specifically cover the portrait, short-landscape, tablet, standard desktop, and ultrawide cases that exposed finite haze/sky edges.
The final live composition uses a 66° cruise FOV, a 79° maximum acceleration FOV, a 438-unit road/terrain depth, a 20.4-unit road-and-shoulder width, a 34-unit maximum side-ridge relief, and a 44-unit shader-sun radius. The atmosphere's base gradient and two horizon banks are now clip-space layers, so they cover every aspect ratio and every point in the camera's FOV range without exposing rectangular geometry. Three low-frequency silhouette bands bridge the sun into the procedural terrain, while one deterministic instanced roadside-anchor batch adds parallax without per-frame instance allocation.
Terrain and road still share one wrapped world-distance state, but visible response no longer fans out from one undifferentiated acceleration value. Scroll velocity is normalized to viewport height, filtered with a 180ms attack and 1050ms release, and protected from delayed-frame spikes. A persistent render-dynamics owner applies separate attack/release curves to road flow, chase-camera response, streaks, bloom, and suspension. The camera position, look target, roll, and 66–79° FOV are damped; the car now has a dark contact shadow, road-level underglow, lower self-emission, and chapter-coupled key/fill lighting. The content layer and its approved geometry were not changed in this refinement.
The sign controller still latches only one canonical next target and keeps its minimum readable dwell clock-driven. It now owns a transition generation, retargets only while concealed, starts a clean departure when the authoritative section has passed a readable sign, coalesces multi-section jumps without queueing, and preserves explicit-navigation, history-restoration, initial-positioning, reverse, reduced-motion, and Static suppression semantics.
The original vehicle source is `assets/blender/nightdrive-grand-tourer.blend`. The optimized `src/assets/nightdrive-grand-tourer.glb` is 410,408 bytes, with 8 mesh/material groups, 11,560 triangles, no textures, and no animations. Its metadata records original authorship and no third-party providers or assets. The runtime hierarchy preserves the requested `chase-car`, `car-body`, `rear-glass`, `rear-light-bar`, and underglow names without per-frame traversal or hierarchy mutation.
The pre-refinement Three.js DevTools profile measured 19 draw calls, 15,658 triangles, 4,490 lines, 160 points, 12 programs, 22 geometries, 22 materials, 2 textures, and approximately 1.5 MB of directly inspected scene memory. A five-second inspection recorded 8.1 ms average and 12.4 ms p95 frame time with no spikes or jank. That durable profile remains `docs/reviews/evidence/nightdrive-iteration/final/devtools-profile.json`; it is retained as the measured baseline rather than mislabeled as a new inspector capture. The refinement adds five deliberately bounded draw submissions by construction—three silhouette bands, one instanced anchor batch, and one car contact shadow—and the current automated browser/error and allocation checks pass.
The refreshed authenticated 1440×900 High-tier allocation trace passed at device DPR 2 and renderer pixel ratio 1.5. It recorded 844,340 geometry bytes, 1,064,960 texture bytes, and 161,344,784 render-target bytes; the budget evaluator passed with no violations under its 32 MiB runtime allowance. Transfer checks also passed with a 221,206-byte first-live-scene payload after Brotli accounting. The focused 25-check scene, sign, responsive-visual, fallback, and flash-safety run passed completely. The longer scripted interaction trace was updated to the current icon-only controls and authenticated tier ledger, but this host's headless High/DPR path exceeded its 75-second harness timeout during CDP wheel dispatch, so no valid long-trace result is claimed from that run.
The final ownership split remains deliberate. Blender should continue to own only the finite car because silhouette, bevels, clean normals, wheel forms, material groups, and LOD/export discipline justify authored geometry. Terrain, road, sky, horizon banks, distant silhouettes, roadside anchors, sun, stars, streaks, signs, camera, palette, and scroll response should stay in Three.js because they depend on infinite wrapping, dynamic text, responsive framing, reversible route state, and performance-tier control. The added depth layers strengthen that conclusion: their deterministic instancing, chapter coupling, and FOV-safe screen/world-space behavior would become less flexible as baked GLB scenery, while the measured geometry increase is only 2,996 bytes. No additional Blender export is justified.
## Direction review checklist
- [x] Information uses near-black opaque panels rather than neon glass.
- [x] Cyan and amber remain accents; content does not use glow or scanlines.
- [x] Scene stays decorative and excluded from the accessibility tree.
- [x] Clip-space sky and horizon banks cover portrait through ultrawide at both 66° and 79° FOV without a finite-plane seam.
- [x] Road flow, camera, streaks, bloom, and suspension use independent persistent response curves and settle through a visible coast.
- [x] Readable stale signs depart cleanly; concealed candidates may retarget; multi-section jumps do not queue stale labels.
- [x] The desktop road corridor and alternating panels preserve the chase composition.
- [x] Mobile becomes a readable single column and keeps the world subordinate.
- [x] The car/road/world are procedural code, not AI-generated project artwork.
- [x] The original car is Blender-authored; the infinite road/world remain procedural Three.js and are not AI-generated project artwork.
- [x] Systems and software each receive primary evidence sections.
- [x] The infrastructure flow exposes a visible legend and a complete text equivalent.
- [x] The GPU budget accounts for composer and bloom render targets without changing ownership or disposal.