Hey @trevordev!
I’ve been working for a few days now on trying to get a web xr demo going ,but with no large success.
I’ve been testing on my samsung galaxy s3 tablet which has ARCore support.
I’ve tried with
Chrome 72
Chrome Dev
Chrome Canary
all with the xr flags enabled via chrome://flags
I’ve done some remote debugging via usb cable and have been able to call some of the navigator.xr
functions, but they have changed quite a lot since you last updated the XR stuff.
This is what I get from Chrome Dev now
ondevicechange: (...)
requestSession: ƒ ()
supportsSessionMode: ƒ ()
before when you requested a session you would do so with
{
immersive: true,
environmentIntegration:true
}
But now you pass a {mode: 'immersive-ar' }
type XRSessionMode =
/**
* The default mode when requesting a session, but can be explicitly specified with the 'inline' enum value.
* Inline sessions do not have the ability to display content on the XR device,
* but may be allowed to access device tracking information and use it to render content on the page.
* (This technique, where a scene rendered to the page is responsive to device movement,
* is sometimes referred to as "Magic Window" mode.) UAs implementing the WebXR Device API must guarantee that inline sessions can be created,
* regardless of XR device presence, unless blocked by page feature policy.
*/
'inline' |
/**
* Requested with the mode enum 'immersive-vr'.
* Immersive VR content is presented directly to the XR device (for example: displayed on a VR headset).
* Immersive VR sessions must be requested within a user activation event or within another callback that has been explicitly indicated to allow immersive session requests.
* It should be noted that an immersive VR session may still display the users environment like an immersive AR session, especially on transparent displays
*/
'immersive-vr' |
/**
* Immersive AR content functions largely the same as immersive VR content,
* with the primary difference being that it guarantees that the users environment will be visible and aligned with the rendered content.
* This may be achieved with see-through displays, like HoloLens or Magic Leap, or video passthrough systems like ARCore and ARKit.
* Additionally, access to environmental data (such as hit testing) may be permitted.
* As with immersive VR, immersive AR sessions must be requested within a user activation event or another callback that has been explicitly indicated to allow immersive session requests.
*/
'immersive-ar';
When I try calling the supportsSessionMode('immersive-ar') i get a
DOMException` which isn’t very helpful, so I’m guessing I’m too early and this isn’t supported yet.
I thought an update might be of use to you, so you don’t have to do the same work
Going forward
I’m waiting for my acceptance to the firefox nightly ios program, since firefox has implemented the latest draft.
As soon as I have more info, i’ll post an update.