Skip to content

Commit 6365315

Browse files
committed
WebVR: Updated to 1.0.
1 parent cf9998b commit 6365315

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

examples/js/vr/WebVR.js

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,20 @@ var WEBVR = {
77

88
isLatestAvailable: function () {
99

10-
return navigator.getVRDisplays !== undefined;
10+
console.warn( 'WEBVR: isLatestAvailable() is being deprecated. Use .isAvailable() instead.' );
11+
return this.isAvailable();
1112

1213
},
1314

1415
isAvailable: function () {
1516

16-
return navigator.getVRDisplays !== undefined || navigator.getVRDevices !== undefined;
17+
return navigator.getVRDisplays !== undefined;
18+
19+
},
20+
21+
getDisplays: function () {
22+
23+
return navigator.getVRDisplays();
1724

1825
},
1926

@@ -29,10 +36,6 @@ var WEBVR = {
2936

3037
} );
3138

32-
} else if ( navigator.getVRDevices ) {
33-
34-
message = 'Your browser supports WebVR but not the latest version. See <a href="http://webvr.info">webvr.info</a> for more info.';
35-
3639
} else {
3740

3841
message = 'Your browser does not support WebVR. See <a href="http://webvr.info">webvr.info</a> for assistance.';
@@ -100,12 +103,6 @@ var WEBVR = {
100103

101104
return button;
102105

103-
},
104-
105-
getDisplays: function() {
106-
107-
return navigator.getVRDisplays();
108-
109106
}
110107

111108
};

0 commit comments

Comments
 (0)