VRDisplay.isPresenting
Deprecated
Avoid using this feature in new projects. Development of the WebVR API halted in favor of WebXR. This feature may be a candidate for removal from web standards or browsers. >
Consider using the following features instead: WebXR. >
isPresenting 㯠VRDisplay ã¤ã³ã¿ã¼ãã§ã¤ã¹ã®èªã¿åãå°ç¨ããããã£ã§ã VRDisplay ãç¾å¨ã³ã³ãã³ãã表示ä¸ãã©ããã示ãè«çå¤ãè¿ãã¾ãã
ã¡ã¢: ãã®ããããã£ã¯ãå¤ã WebVR API ã®ä¸é¨ã§ããã WebXR Device APIã«ç½®ãæãããã¾ããã
å¤
è«çå¤ã§ãã true ã®å ´åã¯ãã®ãã£ã¹ãã¬ã¤ã表示ä¸ã§ãããã¨ãæå³ãã¾ãã false ã¯ããã§ã¯ãªããã¨ã示ãã¾ãã
ä¾
function onVRExitPresent() {
// No sense in exiting presentation if we're not actually presenting.
// (This may happen if we get an event like vrdisplaydeactivate when
// we weren't presenting.)
if (!vrDisplay.isPresenting) return;
vrDisplay.exitPresent().then(
function () {
// Nothing to do because we're handling things in onVRPresentChange.
},
function (err) {
var errMsg = "exitPresent failed.";
if (err && err.message) {
errMsg += "<br/>" + err.message;
}
VRSamplesUtil.addError(errMsg, 2000);
},
);
}
ã¡ã¢: ãã®ã³ã¼ãã¹ãããã㯠Google's VR Presentation demo ããåã£ããã®ã§ãã
仿§æ¸
ãã®ã¤ã³ã¿ã¼ãã§ã¤ã¹ã¯ãå¤ã WebVR API ã®ä¸é¨ã§ãããã WebXR Device API ã«ç½®ãæãããã¾ãããæ¨æºåãããäºå®ã¯ããã¾ããã
ãã¹ã¦ã®ãã©ã¦ã¶ã¼ãæ°ãã WebXR API ãå®è£ ããã¾ã§ããã¹ã¦ã®ãã©ã¦ã¶ã¼ã§åä½ãã WebXR ã¢ããªã±ã¼ã·ã§ã³ãéçºããã«ã¯ãA-Frame ã Babylon.js ã Three.js ãªã©ã®ãã¬ã¼ã ã¯ã¼ã¯ãå©ç¨ããããããªãã£ã«ãå©ç¨ãããããã¨è¯ãã§ããã [1]ã