Babylon WebXR in Electron Application

Considering Electron uses Chromium, I’m wondering if anyone on the forum or Babylon team has had success using WebXR in Electron. Enabling VR in my app makes the window go fullscreen, but not in the headset (Rift S). There’s very limited documentation online regarding the two, but Ive seen a workaround where the Electron window is put on a local server and accessed through the VR browser (I’d prefer to avoid something like that if possible).

Thanks :blush:

1 Like

pinging El Maestro @RaananW

Hi,

I have to admit that I’ve never tried XR or VR in electron. Theoretically it should work. But I assume that due to the way XR is using the canvas, it could be a bit off (or even not work at all). I can gladly investigate when u get the chance, but that won’t be in the near future as we are getting ready for the 4.2 release. You can create a github issue which I’ll mark as investigation.

Having said that - have you considered using Babylon native instead of electron? All the benefits minus the overhead? :blush: the team is progressing daily towards the full XR spec, and you can climb aboard.

@RaananW Babylon Native is really interesting to me, however, I know very little about it outside the promo on your website. Does it still use web APIs? If I could include node modules like GeoTiff JS for raster processing, Babylon Native would be a great option!

@bghgary will be able to answer all of your questions.

1 Like

@RaananW Great, thank you. I watched the Babylon Native demo on YouTube, and he mentioned that you wouldn’t be able to access dom elements which might be a deal breaker for me (unless there are other tools-sets provided that could handel file inputs and raster processing). My app hinges on uploading GeoTiffs and deriving heightmaps with a canvas element.

However, I just found Electron flags that might be the key to getting WebXR working with my Rift S. Still very interested in Babylon Native thought! :smiley:

1 Like

Please share here if you managed to get it to work, would be great for anyone else trying xr and electron

2 Likes

@RaananW Absolutely!

1 Like

@RaananW so Chrome is general is throwing errors for WebXR; you guys may be aware of that or not. WebVR still works in the FireFox browser with a Rift S.

Are we talking electron, or the browser itself?

The browser itself is throwing errors.

This very much depends on your dev environment and what device you are using to test. The vive might not work, whereas oculus rift will if you change the runtime correctly. Windows MR devices work out of the box.

Oh, and in firefox you need to enable webxr, which is hidden behind a flag in about:config

1 Like