Skip to content

Commit

Permalink
Modify dist/aframe-master.js to enable DOM Overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
klausw committed Jan 9, 2020
1 parent 8e42d4d commit 4116d9d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion dist/aframe-master.js
Original file line number Diff line number Diff line change
Expand Up @@ -78884,9 +78884,17 @@ module.exports.AScene = registerElement('a-scene', {
if (this.xrSession) {
this.xrSession.removeEventListener('end', this.exitVRBound);
}
// HACK: ask for DOM Overlay support, and support both the version
// in Chrome 79-current 81 Canary ('dom-overlay-for-handheld-ar',
// document.body is the default fullscreen element), and the pending
// spec ('dom-overlay', need to specify domOverlay.root attribute).
// See https://immersive-web.github.io/dom-overlays/ for details,
// and https://github.com/aframevr/aframe/issues/4315 for more official
// A-Frame integration.
navigator.xr.requestSession(useAR ? 'immersive-ar' : 'immersive-vr', {
requiredFeatures: ['local-floor'],
optionalFeatures: ['bounded-floor']
optionalFeatures: ['bounded-floor', 'dom-overlay', 'dom-overlay-for-handheld-ar'],
domOverlay: {root: document.body}
}).then(function requestSuccess (xrSession) {
self.xrSession = xrSession;
vrManager.setSession(xrSession);
Expand Down

0 comments on commit 4116d9d

Please sign in to comment.