Update scene document version and add project time lighting to world settings

This commit is contained in:
2026-04-12 14:07:32 +02:00
parent b54f688406
commit 5cb979f93d
2 changed files with 6 additions and 1 deletions

View File

@@ -19,7 +19,8 @@ import {
type ProjectTimeSettings
} from "./project-time-settings";
export const SCENE_DOCUMENT_VERSION = 37 as const;
export const SCENE_DOCUMENT_VERSION = 38 as const;
export const PROJECT_TIME_DAY_NIGHT_PROFILE_SCENE_DOCUMENT_VERSION = 38 as const;
export const PROJECT_TIME_SYSTEM_SCENE_DOCUMENT_VERSION = 37 as const;
export const AUTHORED_OBJECT_STATE_SCENE_DOCUMENT_VERSION = 36 as const;
export const PLAYER_START_AIR_DIRECTION_CONTROL_SCENE_DOCUMENT_VERSION =

View File

@@ -100,6 +100,7 @@ export interface AdvancedRenderingSettings {
}
export interface WorldSettings {
projectTimeLightingEnabled: boolean;
background: WorldBackgroundSettings;
ambientLight: WorldAmbientLightSettings;
sunLight: WorldSunLightSettings;
@@ -192,6 +193,7 @@ export function createDefaultAdvancedRenderingSettings(): AdvancedRenderingSetti
export function createDefaultWorldSettings(): WorldSettings {
return {
projectTimeLightingEnabled: true,
background: {
mode: "solid",
colorHex: DEFAULT_SOLID_BACKGROUND_COLOR
@@ -244,6 +246,7 @@ export function cloneWorldBackgroundSettings(background: WorldBackgroundSettings
export function cloneWorldSettings(world: WorldSettings): WorldSettings {
return {
projectTimeLightingEnabled: world.projectTimeLightingEnabled,
background: cloneWorldBackgroundSettings(world.background),
ambientLight: {
...world.ambientLight
@@ -303,6 +306,7 @@ export function areWorldBackgroundSettingsEqual(left: WorldBackgroundSettings, r
export function areWorldSettingsEqual(left: WorldSettings, right: WorldSettings): boolean {
return (
left.projectTimeLightingEnabled === right.projectTimeLightingEnabled &&
areWorldBackgroundSettingsEqual(left.background, right.background) &&
left.ambientLight.colorHex === right.ambientLight.colorHex &&
left.ambientLight.intensity === right.ambientLight.intensity &&