XR not starting on iOS
I was trying out the WebXR part of the viewer, but I ran into a problem wit AR on iOS (IPhone 15 pro)
I am using the WebXR Firefox viewer and examples like these work as they should:
https://threejs.org/examples/webxr_ar_lighting.html https://threejs.org/examples/webxr_ar_cones.html https://threejs.org/examples/webxr_ar_hittest.html
(from this issue: https://github.com/mkkellogg/GaussianSplats3D/issues/127)
But when using this repository (0.4.7), nothing happens when I click the 'Start AR' button. The following example I found online also doesn't work on my phone (not sure if this uses the latest version of GaussianSplats3D):
https://projects.markkellogg.org/threejs/gaussian_splats_3d_demos/vr.html
Everything works as expected on android.
Edit: I added some alerts to try to see what's going wrong:
In ARButton class button.onclick before calling: navigator.xr.requestSession('immersive-ar', sessionInit).then(onSessionStarted)
alert('navigator.xr' + navigator?.xr)
alert('requestSession' + navigator?.xr?.requestSession)
onSessionStarted first line
alert('onSessionStarted ' + session)
the first 2 alerts show expected values ([Object Object] and full requestSession function), but the onSessionStarted alert never shows up
Now when I press the button again, navigator.xr is suddenly undefined
-
I also tested on an ipad, with the same results.
-
When I replace the ARButton class in gaussian-splats-3d-module.js with the original 'three/addons/webxr/ARButton.js' button it also does nothing.
AR support only on Android. webXR you need third party to use that
maybe you can use variant launch i was use that then works
Thank you for the suggestion, it's still weird that the three.js examples above do work on ios using the webXR browser but the splat scenes's do not.
I am trying Variant Launch right now, but the 'Start AR' button still doesn't do anything on my page.
When I generate a QR for: https://projects.markkellogg.org/threejs/gaussian_splats_3d_demos/vr.html or https://threejs.org/examples/webxr_ar_lighting.html
I see: 'WebxXr not available' as the button
But when I goto https://demos.launchar.app/ and scan the QR, the three.js example there does work correctly.
So unfortunatly I am still missing something...
Do I need to add the script to my page ? I tried, but I got the famous cors errors, so I copied the source and added the script locally, but it doesn seem to do anything)