Explorar el Código

WebGLBackground: Documented new logic.

Mr.doob hace 6 años
padre
commit
30b37e7b3b
Se han modificado 1 ficheros con 9 adiciones y 1 borrados
  1. 9 1
      src/renderers/webgl/WebGLBackground.js

+ 9 - 1
src/renderers/webgl/WebGLBackground.js

@@ -27,8 +27,16 @@ function WebGLBackground( renderer, state, objects, premultipliedAlpha ) {
 
 		var background = scene.background;
 
+		// Ignore background in AR
+		// TODO: Reconsider this.
+
 		var session = renderer.vr.getSession();
-		if ( session && session.environmentBlendMode === 'additive' ) background = null;
+
+		if ( session && session.environmentBlendMode === 'additive' ) {
+
+			background = null;
+
+		}
 
 		if ( background === null ) {