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

@@ -52,6 +52,7 @@ describe('release budgets', () => {
expect(classifyArtifact('assets/index-a.css', '')).toBe('critical-css');
expect(classifyArtifact('assets/index-a.js', 'import("./environment-b.js")')).toBe('initial-application-js');
expect(classifyArtifact('assets/environment-b.js', 'three scene')).toBe('first-live-scene');
expect(classifyArtifact('assets/nightdrive-grand-tourer-a.glb', '')).toBe('first-live-scene');
expect(classifyArtifact('assets/high-tier-b.js', 'optional bloom')).toBe('high-tier-extras');
expect(() => classifyArtifact('assets/mystery.bin', '')).toThrow(/unclassified/u);
});

View File

@@ -179,9 +179,15 @@ test("drive-trace.v1 runs on current Chromium with fail-closed reference authent
"running",
{ timeout: 5_000 },
);
await expect(page.locator(".journey-hud__quality")).toHaveText(
profile.tier === "high" ? "High" : "Low",
);
await expect
.poll(() =>
page.evaluate(
() =>
window.__PORTFOLIO_PERFORMANCE__?.snapshot().runtimeAllocation
?.tier ?? null,
),
)
.toBe(profile.tier);
if (referenceRun !== null) {
const observed = await page.evaluate(() => ({
viewport: { width: innerWidth, height: innerHeight },
@@ -243,27 +249,16 @@ test("drive-trace.v1 runs on current Chromium with fail-closed reference authent
);
await dispatchWheelBurst(page, cdp, at, 1_500, 100);
await at(2_350);
await cdp.send("Input.dispatchKeyEvent", {
type: "keyDown",
key: "Tab",
code: "Tab",
windowsVirtualKeyCode: 9,
});
await at(2_370);
await cdp.send("Input.dispatchKeyEvent", {
type: "keyUp",
key: "Tab",
code: "Tab",
windowsVirtualKeyCode: 9,
});
await expect(
page.getByRole("slider", { name: "Sound volume" }),
).toBeFocused();
await page.getByRole("button", { name: "Sound volume" }).click();
await at(2_400);
const volumeSlider = page.getByRole("slider", { name: "Sound volume" });
await expect(volumeSlider).toBeVisible();
await volumeSlider.focus();
await expect(volumeSlider).toBeFocused();
await page.evaluate(() =>
window.__PORTFOLIO_PERFORMANCE__?.beginAction(
"volume",
'input[aria-label="Sound volume"]',
'input[aria-label="Sound volume level"]',
),
);
await cdp.send("Input.dispatchKeyEvent", {
@@ -289,7 +284,7 @@ test("drive-trace.v1 runs on current Chromium with fail-closed reference authent
at,
3_700,
"mute",
'button:has-text("Mute sound")',
'button[aria-label="Mute sound"]',
);
await expect(
page.getByRole("button", { name: "Unmute sound" }),
@@ -301,7 +296,7 @@ test("drive-trace.v1 runs on current Chromium with fail-closed reference authent
at,
5_000,
"unmute",
'button:has-text("Unmute sound")',
'button[aria-label="Unmute sound"]',
);
await dispatchWheelBurst(page, cdp, at, 5_400, 100);
await dispatchPointerAction(
@@ -310,7 +305,7 @@ test("drive-trace.v1 runs on current Chromium with fail-closed reference authent
at,
6_300,
"pause",
'button:has-text("Pause motion")',
'button[aria-label="Pause motion"]',
);
await dispatchWheelBurst(page, cdp, at, 6_700, 100);
await dispatchPointerAction(
@@ -319,7 +314,7 @@ test("drive-trace.v1 runs on current Chromium with fail-closed reference authent
at,
7_600,
"resume",
'button:has-text("Resume motion")',
'button[aria-label="Resume motion"]',
);
await dispatchWheelBurst(page, cdp, at, 8_000, 100);
await at(8_800);
@@ -351,9 +346,6 @@ test("drive-trace.v1 runs on current Chromium with fail-closed reference authent
await expect(page).toHaveURL(/#contact$/u);
await expect(page.locator("#contact > h2")).toBeFocused();
await expect(page.locator(".journey-hud__quality")).toHaveText(
profile.tier === "high" ? "High" : "Low",
);
const snapshot = await page.evaluate(() =>
window.__PORTFOLIO_PERFORMANCE__?.snapshot(),
);
@@ -369,6 +361,7 @@ test("drive-trace.v1 runs on current Chromium with fail-closed reference authent
throw new Error(
"The production scene did not emit an actual allocation ledger.",
);
expect(snapshot.runtimeAllocation.tier).toBe(profile.tier);
const expectedPeriod = warmupMedian;
const fcp = await page.evaluate(
() =>