浏览代码

WEBVR.getButton(): Better check.

Mr.doob 8 年之前
父节点
当前提交
94372af5ba
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      examples/js/vr/WebVR.js

+ 1 - 1
examples/js/vr/WebVR.js

@@ -80,7 +80,7 @@ var WEBVR = {
 
 	getButton: function ( display, canvas ) {
 
-		if ( display instanceof VRDisplay === false ) {
+		if ( 'VREffect' in THREE && display instanceof THREE.VREffect ) {
 
 			console.error( 'WebVR.getButton() now expects a VRDisplay.' );
 			return document.createElement( 'button' );