while implementing xr and running im getting this error in babylon.max.js
Unhandled exception at line 247824, column 9 in app:///Scripts/babylon.max.js
0x800a01b6 - JavaScript runtime error: Object doesn’t support property or method ‘createElement’
exactly here --> this.overlay = document.createElement("div");
this.overlay.classList.add("xr-button-overlay");
is it normal or is there anything im missing here is the code for xr implementation
Was just about to write this
I’ll wait for the @BabylonNative team to answer. This is the webxr button overlay that is trying to add a div element (which is not supported in native).
so how do we access xr capabilities without user authorization in a native windows app so that he can enter into vr and do the stuff…
The thing is I’m building a vr space a windows app, when run user should be able to access the stuff in oculus that’s the whole motive and is there any good approach than this? I want this as an app so that it uses maximum gpu and give a good output rather than a web based app…
please point me in a right direction
XR works for both Android (via ARCore) and iOS (via ARKit) and has been for a while now. HoloLens support is experimental.
It’s mostly the same. The only difference is that the HTML button is not available automatically in the experience helper, so you will need a different UI to start the experience. Babylon Native does not provide the app UI framework by itself (besides UI provided in Babylon.js itself). We do have an integration with React Native that is a more complete package.
Just to set expectations, using Babylon Native is still a web-based app. It probably won’t give you better performance compared to a browser since the engine code still runs in JavaScript. If you are targeting just one platform and you must get all the performance out of it, then it is perhaps better to use the platform APIs directly. This page maybe will help a bit.