Skip to content

Commit

Permalink
Add offersession example
Browse files Browse the repository at this point in the history
  • Loading branch information
cabanier committed Apr 3, 2023
1 parent b03fd78 commit 262f8b8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions input-selection-2.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@
});

navigator.xr.requestSession('inline').then(onSessionStarted);
if (navigator.xr.offerSession !== undefined) {
navigator.xr.offerSession('immersive-vr', {
requiredFeatures: ['local-floor']
}).then((session) => {
xrButton.setSession(session);
session.isImmersive = true;
onSessionStarted(session);
});
}
}
}

Expand Down

0 comments on commit 262f8b8

Please sign in to comment.