2
0
Эх сурвалжийг харах

WebVR.js: isAvailable to isLatestAvailable.

Mr.doob 9 жил өмнө
parent
commit
88ae45d47e
1 өөрчлөгдсөн 8 нэмэгдсэн , 2 устгасан
  1. 8 2
      examples/js/WebVR.js

+ 8 - 2
examples/js/WebVR.js

@@ -5,12 +5,18 @@
 
 var WEBVR = {
 
-	isAvailable: function () {
+	isLatestAvailable: function () {
 
 		return navigator.getVRDisplays !== undefined;
 
 	},
 
+	isAvailable: function () {
+
+		return navigator.getVRDisplays !== undefined || navigator.getVRDevices !== undefined;
+
+	},
+
 	getMessage: function () {
 
 		var message;
@@ -51,7 +57,7 @@ var WEBVR = {
 			error.style.backgroundColor = '#fff';
 			error.style.color = '#000';
 			error.style.padding = '10px 20px';
-			error.style.margin = '40px';
+			error.style.margin = '50px';
 			error.style.display = 'inline-block';
 			error.innerHTML = message;
 			container.appendChild( error );