From 7f6b59285204fe691f88ab558ef990fa4e8a4d09 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sun, 12 Apr 2026 14:57:20 +0200 Subject: [PATCH] Update CSS for runner canvas and add new test cases --- src/app/app.css | 9 +++++++-- tests/domain/runtime-project-time.test.ts | 9 +++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/app/app.css b/src/app/app.css index d6d53b9c..c67f54b3 100644 --- a/src/app/app.css +++ b/src/app/app.css @@ -1081,6 +1081,7 @@ button:disabled { .runner-canvas { flex: 1 1 auto; cursor: grab; + overflow: hidden; } .viewport-canvas canvas, @@ -1090,6 +1091,11 @@ button:disabled { height: 100%; } +.runner-canvas canvas { + position: relative; + z-index: 1; +} + .viewport-canvas__overlay { position: absolute; bottom: 10px; @@ -1255,9 +1261,8 @@ button:disabled { .runner-canvas__background-overlay { position: absolute; inset: 0; - z-index: 1; + z-index: 0; pointer-events: none; - transition: opacity 180ms linear; } .runner-canvas__loading-overlay--hidden { diff --git a/tests/domain/runtime-project-time.test.ts b/tests/domain/runtime-project-time.test.ts index eea74485..3b2bc856 100644 --- a/tests/domain/runtime-project-time.test.ts +++ b/tests/domain/runtime-project-time.test.ts @@ -52,6 +52,11 @@ describe("runtime project time", () => { dayCount: 0, dayLengthMinutes: 24 }); + const lateDawn = resolveRuntimeDayNightWorldState(world, time, { + timeOfDayHours: 7.9, + dayCount: 0, + dayLengthMinutes: 24 + }); const postSunset = resolveRuntimeDayNightWorldState(world, time, { timeOfDayHours: 20.5, dayCount: 0, @@ -85,6 +90,10 @@ describe("runtime project time", () => { ); expect(midnight.moonLight?.intensity ?? 0).toBeGreaterThan(0); expect(preSunrise.moonLight?.intensity ?? 0).toBeGreaterThan(0); + expect(dawn.moonLight?.intensity ?? 0).toBeGreaterThan(0); + expect(lateDawn.moonLight?.intensity ?? 0).toBeLessThan( + dawn.moonLight?.intensity ?? 0 + ); expect(postSunset.moonLight?.intensity ?? 0).toBeGreaterThan(0); expect(noon.moonLight).toBeNull(); expect(preSunrise.nightBackgroundOverlay?.assetId).toBe("asset-night-sky");