Explorar el Código

WebGLBackground: More robust getSession() code.

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

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

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