From 8ebe5ed30abb30400a867caeca14942135916786 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Tue, 31 Mar 2026 23:14:23 +0200 Subject: [PATCH] Add validation for non-negative finite number in world background environment intensity --- src/document/scene-document-validation.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/document/scene-document-validation.ts b/src/document/scene-document-validation.ts index 8642cb96..9b7359ca 100644 --- a/src/document/scene-document-validation.ts +++ b/src/document/scene-document-validation.ts @@ -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)) {