auto-git:

[change] src/document/migrate-scene-document.ts
This commit is contained in:
2026-04-22 15:14:27 +02:00
parent f2f7a52574
commit 78f465f28e

View File

@@ -2508,6 +2508,7 @@ function readWorldBackgroundSettings(
label: string, label: string,
options: { options: {
allowMissing?: boolean; allowMissing?: boolean;
allowShader?: boolean;
defaultValue?: WorldBackgroundSettings; defaultValue?: WorldBackgroundSettings;
} = {} } = {}
): WorldBackgroundSettings { ): WorldBackgroundSettings {
@@ -2529,6 +2530,10 @@ function readWorldBackgroundSettings(
throw new Error(`${label}.mode must be a supported background mode.`); throw new Error(`${label}.mode must be a supported background mode.`);
} }
if (backgroundMode === "shader" && options.allowShader === false) {
throw new Error(`${label}.mode must not use a shader background here.`);
}
if (backgroundMode === "solid") { if (backgroundMode === "solid") {
return { return {
mode: "solid", mode: "solid",
@@ -2729,6 +2734,7 @@ function readWorldTimePhaseProfile(
return { return {
background: readWorldBackgroundSettings(value.background, `${label}.background`, { background: readWorldBackgroundSettings(value.background, `${label}.background`, {
allowMissing: true, allowMissing: true,
allowShader: false,
defaultValue: fallbackBackground defaultValue: fallbackBackground
}), }),
skyTopColorHex, skyTopColorHex,
@@ -2852,6 +2858,7 @@ function readWorldTimeOfDaySettings(
`${label}.night.background`, `${label}.night.background`,
{ {
allowMissing: true, allowMissing: true,
allowShader: false,
defaultValue: nightDefaults.background defaultValue: nightDefaults.background
} }
), ),