From 0ce2bca392439bdc327c184df537bfd33e0781b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=89=BD=E8=89=BD=E5=8F=AA?= Date: Sat, 24 Oct 2026 10:54:25 -0700 Subject: [PATCH] fix(liminal-drift): keep restart controls stationary --- apps/landing/src/config/projects/featured.ts | 2 +- apps/liminal-drift/README.md | 2 +- apps/liminal-drift/scripts/checkInteraction.mjs | 17 +++++++++++++++++ .../src/styles/components/display-texture.css | 5 +++++ 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/apps/landing/src/config/projects/featured.ts b/apps/landing/src/config/projects/featured.ts index a2b6ffa..7c0f93c 100644 --- a/apps/landing/src/config/projects/featured.ts +++ b/apps/landing/src/config/projects/featured.ts @@ -33,7 +33,7 @@ export const featuredProjectEntries = [ kind: "live", url: "https://4po7.test.i0c.cc/", }, - updatedAt: "2026-10-24T17:14:25Z", + updatedAt: "2026-10-24T17:51:49Z", summary: "A dreamcore driving game with an endless curving highway, momentum-based drifting, and half-remembered exits.", kind: "app", diff --git a/apps/liminal-drift/README.md b/apps/liminal-drift/README.md index bc710d0..daa679b 100644 --- a/apps/liminal-drift/README.md +++ b/apps/liminal-drift/README.md @@ -76,7 +76,7 @@ The menu overlays the live 3D scene with low-resolution textures from ROHHSA's P A display layer covers the scene and interface with fine scanlines, a faint RGB phosphor grid, monochrome grain, and shaded glass edges. A very light tracking disturbance affects the whole image, including menus. Lower integrity progressively adds stronger interference, separated color channels, negative-image pulses, and flickering rectangular color dropouts; checkpoint repairs ease them again. Damaging impacts add a 480 ms negative/color burst, including the final hit of a run. Guardrail impacts only strengthen tracking for 360 ms and never trigger that damage burst. -Approaching the rear road boundary continuously strengthens the interference and color dropouts with the closing vignette. Full-image inversion fades out as the opening closes, keeping the black field black while localized colored blocks remain visible. These effects persist through the end dialog until restarting restores the normal low intensity. The effects do not intercept input or request external artwork. Reduced-motion mode uses subdued static color and blocks instead of negative flashes, image displacement, or moving interference. Backgrounding pauses the run and clears driving input, including the moving interference; the pause menu appears immediately even when the browser suspends animation clocks. +Approaching the rear road boundary continuously strengthens the interference and color dropouts with the closing vignette. Full-image inversion fades out as the opening closes, keeping the black field black while localized colored blocks remain visible. Interference and color dropouts persist through the end dialog, while positional screen drift stops so restart controls remain stationary. Restarting restores the normal low intensity and screen drift. The effects do not intercept input or request external artwork. Reduced-motion mode uses subdued static color and blocks instead of negative flashes, image displacement, or moving interference. Backgrounding pauses the run and clears driving input, including the moving interference; the pause menu appears immediately even when the browser suspends animation clocks. ## Project Structure diff --git a/apps/liminal-drift/scripts/checkInteraction.mjs b/apps/liminal-drift/scripts/checkInteraction.mjs index 16265fa..8a6a2e0 100644 --- a/apps/liminal-drift/scripts/checkInteraction.mjs +++ b/apps/liminal-drift/scripts/checkInteraction.mjs @@ -1,3 +1,6 @@ +import { mkdir } from "node:fs/promises" +import { fileURLToPath } from "node:url" + import { chromium, devices } from "playwright" import { browserLaunchOptions } from "./browserLaunchOptions.mjs" @@ -5,6 +8,9 @@ import { measureSceneDifference, screenshotCanvas } from "./browserVisualChecks. import { checkBackgroundPause } from "./checkBackgroundPause.mjs" const url = process.argv.find((value) => value.startsWith("http")) ?? "http://localhost:5173/" +const outputDir = new URL("../artifacts/", import.meta.url) + +await mkdir(outputDir, { recursive: true }) /** * @param {string} baseUrl @@ -284,6 +290,9 @@ try { `Expected colored dropouts to persist without whitening the black field: ${JSON.stringify(endedColors)}`, ) } + await page.screenshot({ + path: fileURLToPath(new URL("desktop-road-end.png", outputDir)), + }) await page.getByRole("button", { name: "Drive again", exact: true }).click() await page.waitForTimeout(800) if ((await page.locator('[role="dialog"]').count()) !== 0) { @@ -303,6 +312,14 @@ try { await page.keyboard.down("w") await waitForSpeedAbove(page, 5) await page.keyboard.up("w") + const hasRunningTracking = await page + .locator(".screen-tracking") + .evaluate((element) => + element.getAnimations().some((animation) => animation.playState === "running"), + ) + if (!hasRunningTracking) { + throw new Error("Expected normal screen drift to resume after restarting the run") + } console.log("road-end restart ok", { singleClick: true, resetIntensity: "0.060" }) await context.close() } diff --git a/apps/liminal-drift/src/styles/components/display-texture.css b/apps/liminal-drift/src/styles/components/display-texture.css index 3459344..7f794a8 100644 --- a/apps/liminal-drift/src/styles/components/display-texture.css +++ b/apps/liminal-drift/src/styles/components/display-texture.css @@ -63,6 +63,11 @@ animation: signal-drift var(--signal-duration) steps(1, end) infinite; } +/* Keep restart controls stationary while the end-screen interference continues. */ +.game-shell[data-status="ended"] .screen-tracking { + animation: none; +} + .signal-interference, .signal-burst { position: absolute;