Explorar o código

WebGLBackground: More robust getSession() code.

Mr.doob %!s(int64=6) %!d(string=hai) anos
pai
achega
dba5c97b8b
Modificáronse 1 ficheiros con 2 adicións e 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' ) {