auto-git:

[change] src/app/App.tsx
 [change] src/assets/starter-environment-assets.ts
 [change] src/document/migrate-scene-document.ts
 [change] src/document/scene-document-validation.ts
 [change] src/document/scene-document.ts
 [change] src/document/world-settings.ts
 [change] src/rendering/world-background-renderer.ts
 [change] src/rendering/world-shader-sky.ts
 [change] src/runtime-three/runtime-host.ts
 [change] src/runtime-three/runtime-project-time.ts
 [change] src/shared-ui/world-background-style.ts
 [change] src/viewport-three/ViewportCanvas.tsx
 [change] src/viewport-three/viewport-host.ts
 [change] tests/domain/runtime-project-time.test.ts
 [change] tests/domain/scene-document-validation.test.ts
 [change] tests/domain/world-settings.test.ts
 [change] tests/serialization/project-document-json.test.ts
 [change] tests/serialization/scene-document-json.test.ts
 [change] tests/unit/world-shader-sky.test.ts
This commit is contained in:
2026-04-22 15:30:37 +02:00
parent a0f8f72c62
commit b2a4e1da7b
19 changed files with 1332 additions and 817 deletions

View File

@@ -159,7 +159,9 @@ function isDefaultDayBackground(background: WorldBackgroundSettings): boolean {
);
}
function isDefaultNightBackground(background: WorldBackgroundSettings): boolean {
function isDefaultNightBackground(
background: WorldBackgroundSettings
): boolean {
return areWorldBackgroundSettingsEqual(
background,
createDefaultWorldTimeOfDaySettings().night.background
@@ -189,8 +191,9 @@ export function isStarterEnvironmentImageAsset(
function getStarterEnvironmentDefinitionById(assetId: string) {
return (
STARTER_ENVIRONMENT_LIBRARY.find((definition) => definition.asset.id === assetId) ??
null
STARTER_ENVIRONMENT_LIBRARY.find(
(definition) => definition.asset.id === assetId
) ?? null
);
}
@@ -228,7 +231,8 @@ export function mergeStarterEnvironmentAssets(
const mergedAssets: Record<string, ProjectAssetRecord> = {};
for (const definition of STARTER_ENVIRONMENT_LIBRARY) {
mergedAssets[definition.asset.id] = cloneStarterEnvironmentAsset(definition);
mergedAssets[definition.asset.id] =
cloneStarterEnvironmentAsset(definition);
}
for (const [assetId, asset] of Object.entries(assets)) {
@@ -257,10 +261,11 @@ export function applyStarterEnvironmentAssetsToProjectDocument(
}
if (isDefaultNightBackground(nextWorld.timeOfDay.night.background)) {
nextWorld.timeOfDay.night.background = createStarterEnvironmentBackground(
STARTER_NIGHT_ENVIRONMENT_ASSET_ID,
DEFAULT_NIGHT_IMAGE_ENVIRONMENT_INTENSITY
);
nextWorld.timeOfDay.night.background =
createStarterEnvironmentBackground(
STARTER_NIGHT_ENVIRONMENT_ASSET_ID,
DEFAULT_NIGHT_IMAGE_ENVIRONMENT_INTENSITY
);
} else {
nextWorld.timeOfDay.night.background = cloneWorldBackground(
nextWorld.timeOfDay.night.background