Update background environment intensity effect in App.tsx

This commit is contained in:
2026-03-31 23:15:17 +02:00
parent 10c2615d83
commit 752fe84f63

View File

@@ -844,6 +844,12 @@ export function App({ store, initialStatusMessage }: AppProps) {
setAmbientLightIntensityDraft(String(editorState.document.world.ambientLight.intensity));
}, [editorState.document.world.ambientLight.intensity]);
useEffect(() => {
if (editorState.document.world.background.mode === "image") {
setBackgroundEnvironmentIntensityDraft(String(editorState.document.world.background.environmentIntensity));
}
}, [editorState.document.world.background]);
useEffect(() => {
setSunLightIntensityDraft(String(editorState.document.world.sunLight.intensity));
}, [editorState.document.world.sunLight.intensity]);