WebXR is there any example running?

Hello, a bit of frustrating, I’m looking to find a way to run at least one of the examples described in " Use WebXR (WebVR, WebAR, Magic Window, Etc.)" but with no luck.
What I want: using a desktop with webxr-polyfill to see how a pure VR-scene looks like, using a mobile to see it in real (no hardware VR-devices attached).

I used this method to develop content with the “old” WebVR API but it doesn’t work with the new API anymore. I’ve tried all kind of browsers, Canary, beta, nightly builds etc, but mostly the error messages are like “XR-session not supported” or so.
So my question: is there any example running Babylon-WebXR on a mobile or on a desktop with polyfill? And if so, what are the preconditions, browser version etc.
Thanks in advance

1 Like

Pinging @trevordev (but be patient as he is on holidays. He will answer early January)

He told me that as the spec is moving there is no easy way to test for now but he will give you more details

@Deltakosh thx, I’m patient :slight_smile:

@javalang “is there any example running Babylon-WebXR on a mobile or on a desktop with polyfill?”

Not yet :frowning: . I have been syncing with the spec every so often but I’ve found that polyfill vs chrome canary implementations are not always equal especially due to changes in the way controllers are exposed and so far I’ve coded against the chrome canary version (to ensure ar features are working with babylon). I will try to sync again with the spec this in February and am hoping the webXR spec will be more stable by then. You can see the webXR milestone target dates here: Milestones - immersive-web/webxr · GitHub which is currently targeting CR for 1.0 in june :crossed_fingers: . Unfortunately, at the moment I’d recommend continuing to use Babylon webVRExperienceHelper for targeting HMDs and I will provide transitioning guidance to moving to webXR (Trying to make this as minimal as possible).

1 Like

looking forward for a first example, I was trying to make one based on this scene but when I tried the polyfill, by adding to the index.html in the tag:

<script src='https://cdn.jsdelivr.net/npm/webxr-polyfill@latest/build/webxr-polyfill.js'></script>
  window.polyfill = new WebXRPolyfill();

So then in firefox I got the alert supported (meaning the polyfill somehow is active), but then I got the following error:

TypeError: scene.render is not a function
TypeError: scene.render is not a function192.168.1.77:8081:200:23
    _renderFrame https://preview.babylonjs.com/babylon.js:16
    _renderLoop https://preview.babylonjs.com/babylon.js:16
    <anonymous> self-hosted:876

Let’s keep the questions in one thread, there is no need to wake up a 1 year old thread