Update background environment intensity effect in App.tsx
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user