From 1923b720495b6533b34d1672987e7d0987d60c6c Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Wed, 22 Apr 2026 15:28:27 +0200 Subject: [PATCH] auto-git: [change] tests/domain/runtime-project-time.test.ts --- tests/domain/runtime-project-time.test.ts | 32 +++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tests/domain/runtime-project-time.test.ts b/tests/domain/runtime-project-time.test.ts index 3e1cee9e..47175ec6 100644 --- a/tests/domain/runtime-project-time.test.ts +++ b/tests/domain/runtime-project-time.test.ts @@ -315,4 +315,36 @@ describe("runtime project time", () => { expect(resolved.background).toEqual(world.background); expect(resolved.moonLight).toBeNull(); }); + + it("keeps shader sky mode active across time phases without reusing image overlays", () => { + const world = createDefaultWorldSettings(); + const time = createDefaultProjectTimeSettings(); + world.background = { + mode: "shader" + }; + time.sunriseTimeOfDayHours = 7; + time.sunsetTimeOfDayHours = 20; + time.dawnDurationHours = 2; + time.duskDurationHours = 2; + + const dusk = resolveRuntimeDayNightWorldState(world, time, { + timeOfDayHours: 20.5, + dayCount: 0, + dayLengthMinutes: 24 + }); + const midnight = resolveRuntimeDayNightWorldState(world, time, { + timeOfDayHours: 0, + dayCount: 0, + dayLengthMinutes: 24 + }); + + expect(dusk.background).toEqual({ + mode: "shader" + }); + expect(midnight.background).toEqual({ + mode: "shader" + }); + expect(dusk.nightBackgroundOverlay).toBeNull(); + expect(midnight.nightBackgroundOverlay).toBeNull(); + }); });