提交 645c66d5 编写于 作者: T Takahiro

Updated jsm WebVR.js

上级 63f11a73
......@@ -171,14 +171,26 @@ var WEBVR = {
}
if ( 'xr' in navigator && 'supportsSession' in navigator.xr ) {
if ( 'xr' in navigator && 'isSessionSupported' in navigator.xr ) {
var button = document.createElement( 'button' );
button.style.display = 'none';
stylizeElement( button );
navigator.xr.supportsSession( 'immersive-vr' ).then( showEnterXR ).catch( showXRNotFound );
navigator.xr.isSessionSupported( 'immersive-vr' ).then( funciton ( supported ) {
if ( supported ) {
showEnterXR();
} else {
showXRNotFound();
}
} );
return button;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册