Add validation for non-negative finite number in world background environment intensity

This commit is contained in:
2026-03-31 23:14:23 +02:00
parent 850836f599
commit 8ebe5ed30a

View File

@@ -148,6 +148,17 @@ function validateWorldSettings(world: WorldSettings, document: SceneDocument, di
);
}
}
if (!isNonNegativeFiniteNumber(world.background.environmentIntensity)) {
diagnostics.push(
createDiagnostic(
"error",
"invalid-world-background-environment-intensity",
"World background environment intensity must be a non-negative finite number.",
"world.background.environmentIntensity"
)
);
}
}
if (!isHexColorString(world.ambientLight.colorHex)) {