diff --git a/explainer.md b/explainer.md index 42316795..2a9cbb4b 100644 --- a/explainer.md +++ b/explainer.md @@ -514,27 +514,6 @@ vrSession.addEventListener('resetpose', vrSessionEvent => { }); ``` -### Page navigation - -WebVR applications can, like any web page, link to other pages. In the context of a VR scene this is handled by setting `window.location` to the desired URL when the user performs some action. If the page being linked to is not VR-capable the user will either have to remove the VR device to view it (which the UA should explicitly instruct them to do) or the page could be shown as a 2D page in a VR browser. - -If the page being navigated to is VR capable, however, it's frequently desirable to allow the user to immediately begin using a VR session for that page as well, so that the user feels as though they are navigating through a single continuous VR experience. To achieve this the page can handle the `navigate` event, fired on the `navigator.vr` object. This event provides a `VRSession` for the `VRDevice` that the previous page was presenting to. - -The `VRDevice` and `VRSession` must not retain any state set by the previous page, and need not make any guarantees about consistency of pose data between pages. They should maintain the same general implementation between pages for basic usage consistency. For example: The user agent should not switch users from the Oculus SDK to OpenVR between pages, or from Daydream to Cardboard, even though in both cases the users device could technically be used with either. - -To indicate to indicate that you wish to continue presenting VR content on this page the handler must call `event.preventDefault()`. - -```js -navigator.vr.addEventListener('navigate', vrSessionEvent => { - vrSessionEvent.preventDefault(); - vrSession = vrSessionEvent.session; - vrDevice = vrSession.device; - - // Ensure content is loaded and begin drawing. - onDrawFrame(); -}); -``` - ## Appendix A: I don’t understand why this is a new API. Why can’t we use… ### `DeviceOrientation` Events @@ -577,7 +556,6 @@ partial interface Navigator { interface VR : EventTarget { attribute EventHandler ondeviceconnect; attribute EventHandler ondevicedisconnect; - attribute EventHandler onnavigate; Promise> getDevices(); };