提交 63653152 编写于 作者: M Mr.doob

WebVR: Updated to 1.0.

上级 cf9998b7
...@@ -7,13 +7,20 @@ var WEBVR = { ...@@ -7,13 +7,20 @@ var WEBVR = {
isLatestAvailable: function () { isLatestAvailable: function () {
return navigator.getVRDisplays !== undefined; console.warn( 'WEBVR: isLatestAvailable() is being deprecated. Use .isAvailable() instead.' );
return this.isAvailable();
}, },
isAvailable: function () { isAvailable: function () {
return navigator.getVRDisplays !== undefined || navigator.getVRDevices !== undefined; return navigator.getVRDisplays !== undefined;
},
getDisplays: function () {
return navigator.getVRDisplays();
}, },
...@@ -29,10 +36,6 @@ var WEBVR = { ...@@ -29,10 +36,6 @@ var WEBVR = {
} ); } );
} else if ( navigator.getVRDevices ) {
message = 'Your browser supports WebVR but not the latest version. See <a href="http://webvr.info">webvr.info</a> for more info.';
} else { } else {
message = 'Your browser does not support WebVR. See <a href="http://webvr.info">webvr.info</a> for assistance.'; message = 'Your browser does not support WebVR. See <a href="http://webvr.info">webvr.info</a> for assistance.';
...@@ -100,12 +103,6 @@ var WEBVR = { ...@@ -100,12 +103,6 @@ var WEBVR = {
return button; return button;
},
getDisplays: function() {
return navigator.getVRDisplays();
} }
}; };
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册