From c0d8bf9403dd37a56901ae0718c81d4fcba56cf7 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sun, 12 Apr 2026 14:34:47 +0200 Subject: [PATCH] Add night sky asset and update time settings in project document JSON test --- .../project-document-json.test.ts | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/serialization/project-document-json.test.ts b/tests/serialization/project-document-json.test.ts index 7a1d14a3..181f4608 100644 --- a/tests/serialization/project-document-json.test.ts +++ b/tests/serialization/project-document-json.test.ts @@ -109,6 +109,21 @@ describe("project document JSON", () => { } }; document.scenes["scene-cellar"].world.projectTimeLightingEnabled = false; + document.assets["asset-night-sky"] = { + id: "asset-night-sky", + kind: "image", + sourceName: "night-sky.png", + mimeType: "image/png", + storageKey: "project-asset:asset-night-sky", + byteLength: 2048, + metadata: { + kind: "image", + width: 1024, + height: 512, + hasAlpha: false, + warnings: [] + } + }; document.time = { startDayNumber: 3, startTimeOfDayHours: 18.5, @@ -140,6 +155,10 @@ describe("project document JSON", () => { ambientIntensityFactor: 0.22, lightColorHex: "#95b0ff", lightIntensityFactor: 0.19 + }, + nightBackground: { + assetId: "asset-night-sky", + environmentIntensity: 0.42 } }; @@ -214,6 +233,9 @@ describe("project document JSON", () => { expect(migratedDocument.time.night).toEqual( createDefaultProjectTimeSettings().night ); + expect(migratedDocument.time.nightBackground).toEqual( + createDefaultProjectTimeSettings().nightBackground + ); expect( migratedDocument.scenes[migratedDocument.activeSceneId]?.world .projectTimeLightingEnabled