Przeglądaj źródła

RendererUtils: Honor fog. (#30178)

Co-authored-by: sunag <sunagbrasil@gmail.com>
Michael Herzog 1 rok temu
rodzic
commit
284c5fee2b
1 zmienionych plików z 6 dodań i 0 usunięć
  1. 6 0
      src/renderers/common/RendererUtils.js

+ 6 - 0
src/renderers/common/RendererUtils.js

@@ -56,6 +56,8 @@ export function saveSceneState( scene, state = {} ) {
 
 	state.background = scene.background;
 	state.backgroundNode = scene.backgroundNode;
+	state.fog = scene.fog;
+	state.fogNode = scene.fogNode;
 	state.overrideMaterial = scene.overrideMaterial;
 
 	return state;
@@ -68,6 +70,8 @@ export function resetSceneState( scene, state ) {
 
 	scene.background = null;
 	scene.backgroundNode = null;
+	scene.fog = null;
+	scene.fogNode = null;
 	scene.overrideMaterial = null;
 
 	return state;
@@ -78,6 +82,8 @@ export function restoreSceneState( scene, state ) {
 
 	scene.background = state.background;
 	scene.backgroundNode = state.backgroundNode;
+	scene.fog = state.fog;
+	scene.fogNode = state.fogNode;
 	scene.overrideMaterial = state.overrideMaterial;
 
 }

粤ICP备19079148号