From 4fc3256680cfb03b9a947f156d1578bf64cdefd9 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sat, 25 Apr 2026 01:31:20 +0200 Subject: [PATCH] auto-git: [change] src/document/scene-document-validation.ts --- src/document/scene-document-validation.ts | 77 +++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/src/document/scene-document-validation.ts b/src/document/scene-document-validation.ts index 24e16fad..acf17001 100644 --- a/src/document/scene-document-validation.ts +++ b/src/document/scene-document-validation.ts @@ -544,6 +544,83 @@ function validateWorldShaderSkySettings( ) ); } + + if (typeof settings.aurora.enabled !== "boolean") { + diagnostics.push( + createDiagnostic( + "error", + "invalid-world-shader-sky-aurora-enabled", + "World shader sky aurora toggle must be true or false.", + `${path}.aurora.enabled` + ) + ); + } + + if (!isNonNegativeFiniteNumber(settings.aurora.intensity)) { + diagnostics.push( + createDiagnostic( + "error", + "invalid-world-shader-sky-aurora-intensity", + "World shader sky aurora intensity must be a non-negative finite number.", + `${path}.aurora.intensity` + ) + ); + } + + if (!isFiniteNumberInRange(settings.aurora.height, 0, 1)) { + diagnostics.push( + createDiagnostic( + "error", + "invalid-world-shader-sky-aurora-height", + "World shader sky aurora height must stay between 0 and 1.", + `${path}.aurora.height` + ) + ); + } + + if (!isFiniteNumberInRange(settings.aurora.thickness, 0, 1)) { + diagnostics.push( + createDiagnostic( + "error", + "invalid-world-shader-sky-aurora-thickness", + "World shader sky aurora thickness must stay between 0 and 1.", + `${path}.aurora.thickness` + ) + ); + } + + if (!isNonNegativeFiniteNumber(settings.aurora.speed)) { + diagnostics.push( + createDiagnostic( + "error", + "invalid-world-shader-sky-aurora-speed", + "World shader sky aurora speed must be a non-negative finite number.", + `${path}.aurora.speed` + ) + ); + } + + if (!isHexColorString(settings.aurora.primaryColorHex)) { + diagnostics.push( + createDiagnostic( + "error", + "invalid-world-shader-sky-aurora-primary-color", + "World shader sky aurora primary color must use a #RRGGBB color.", + `${path}.aurora.primaryColorHex` + ) + ); + } + + if (!isHexColorString(settings.aurora.secondaryColorHex)) { + diagnostics.push( + createDiagnostic( + "error", + "invalid-world-shader-sky-aurora-secondary-color", + "World shader sky aurora secondary color must use a #RRGGBB color.", + `${path}.aurora.secondaryColorHex` + ) + ); + } } function validateWorldCelestialOrbitSettings(