Explorar o código

WebVR: Make XR test more robust.

Mugen87 %!s(int64=6) %!d(string=hai) anos
pai
achega
6b37efa1ab
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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';