From 4f40ba1635a6f18e823543c5313f4b97ce0db94b Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Mon, 13 Apr 2026 14:59:41 +0200 Subject: [PATCH] Update types and functions for world background settings --- src/app/App.tsx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/app/App.tsx b/src/app/App.tsx index 557efb9a..808bd162 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -145,6 +145,7 @@ import { changeWorldBackgroundMode, cloneWorldSettings, type WorldBackgroundMode, + type WorldBackgroundSettings, type AdvancedRenderingSettings, type BoxVolumeRenderPath, type AdvancedRenderingWaterReflectionMode, @@ -355,13 +356,17 @@ interface PlayerStartMovementTemplateNumberDraft { crouchSpeedMultiplier: string; } -type ProjectTimePhaseKey = "dawn" | "dusk" | "night"; -type ProjectTimePhaseColorField = +type WorldTimePhaseKey = "dawn" | "dusk"; +type WorldTimePhaseColorField = | "skyTopColorHex" | "skyBottomColorHex" | "ambientColorHex" | "lightColorHex"; -type ProjectTimePhaseNumericField = +type WorldTimePhaseNumericField = + | "ambientIntensityFactor" + | "lightIntensityFactor"; +type WorldNightEnvironmentColorField = "ambientColorHex" | "lightColorHex"; +type WorldNightEnvironmentNumericField = | "ambientIntensityFactor" | "lightIntensityFactor"; @@ -1445,12 +1450,12 @@ function formatRunnerAnimationHook( : "idle"; } -function formatWorldBackgroundLabel(world: WorldSettings): string { - if (world.background.mode === "solid") { +function formatWorldBackgroundLabel(background: WorldBackgroundSettings): string { + if (background.mode === "solid") { return "Solid"; } - if (world.background.mode === "verticalGradient") { + if (background.mode === "verticalGradient") { return "Vertical Gradient"; }