소스 검색

WebGLBackground: More robust getSession() code.

Mr.doob 6 년 전
부모
커밋
dba5c97b8b
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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' ) {