浏览代码

WebVR: Make XR test more robust.

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

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

@@ -131,7 +131,7 @@ var WEBVR = {
 
 		}
 
-		if ( 'xr' in navigator ) {
+		if ( 'xr' in navigator && 'requestDevice' in navigator.xr ) {
 
 			var button = document.createElement( 'button' );
 			button.style.display = 'none';