fix: harden editor scene loading

This commit is contained in:
Aymeric Rabot
2026-06-09 19:54:42 -04:00
parent e81dc63b28
commit eb00f9f477
3 changed files with 99 additions and 1 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ export function resolveSurfaceColor(
// The active scene theme may tint individual roles (e.g. Mediterranean's blue
// roof); fall back to the chosen colour preset's palette when it doesn't.
const tints = sceneThemeId ? getSceneTheme(sceneThemeId).clayTints : undefined
return tints?.[role] ?? PRESET_PALETTES[preset][role]
return tints?.[role] ?? (PRESET_PALETTES[preset] ?? CLAY_PALETTE)[role]
}
// DoubleSide on any NodeMaterial inside the MRT scenePass (SSGI's output /