提交 0ce5b5b1 编写于 作者: T Takahiro

Replace button.textContent from VR NOT FOUND to XR NOT FOUND for WebXR API

上级 6c3d6107
......@@ -93,7 +93,7 @@ var WEBVR = {
}
function showVRNotFound() {
function disableButton() {
button.style.display = '';
......@@ -101,17 +101,31 @@ var WEBVR = {
button.style.left = 'calc(50% - 75px)';
button.style.width = '150px';
button.textContent = 'VR NOT FOUND';
button.onmouseenter = null;
button.onmouseleave = null;
button.onclick = null;
}
function showVRNotFound() {
disableButton();
button.textContent = 'VR NOT FOUND';
renderer.vr.setDevice( null );
}
function showXRNotFound() {
disableButton();
button.textContent = 'XR NOT FOUND';
}
function stylizeElement( element ) {
element.style.position = 'absolute';
......@@ -136,7 +150,7 @@ var WEBVR = {
stylizeElement( button );
navigator.xr.supportsSession( 'immersive-vr' ).then( showEnterXR ).catch( showVRNotFound );
navigator.xr.supportsSession( 'immersive-vr' ).then( showEnterXR ).catch( showXRNotFound );
return button;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册