ngx-three
ngx-three copied to clipboard
feat: webxr support
I'm experimenting with integrating augmented / virtual reality experiences to my app and have managed to add basic support for it to ngx-three, but very likely not in a way that's very useful for others.
I'm leaving this here as a draft PR to see if there's interest in this feature. To actually integrate it upstream, I would require some guidance from you @demike on what is a suitable approach for it.
For now, the integration happens in ThEngineService
and ThView
, the effect feature of the library is circumvented when in XR mode. It also doesn't use the requestAnimationFrame
logic as that's not compatible with WebXR.
I've added an example for testing this feature as WebXR example
.
AR is best be tested on an up to date Chrome Browser on Android, for VR there's a browser extension to emulate it.
@NewYearNewPhil I think it could/should be part or handled within ThEngine. But ultimately I would refactor ThEngine to make more modular by composing it of different 'Renderer' services. Because when I think about the upcomming WebGPU Renderer this would also be added here. And this class is already a little bit crowded.
Just took a short look. I am quite busy at the moment but will investigate further in ~10 days