Do I understand correctly that you show the same image for both eyes? It should be possible to achieve the same with a single plane and a custom shader. Or, alternatively, you could transform it in onBeforeRender for each camera. That way you might not even have to care if you're in vr mode or not.
Coincidentally, for some experiment I also needed to calculate the IPD in A-Frame. I did this through extracting the positions from the left and right eyes' cameras. Here's the approach (slightly adjusted to also trigger on the enter-vr event like in your sample):
Obviously if you use onBeforeRender of the scene for something else, the above won't work. But simply setting a flag and performing this logic on the next render() of the component achieves effectively the same.
Then let me follow !
Hi guys and girls, I am Arthur Mougin 🇫🇷, also seen as slt#2291 on discord (slt is the sms version of Salut, french for an friendly hello/hi).
My first encounter with WebXR was with its predecessor, WebVR, a tad before the transition. I was a web dev student and discovered Aframe and played around with it. I then got my first actual job making a WebVR experience for Oculus Go that is still up today : desbateauxetdeshomes.com.
Community wise, I had the opportunity to join one of the early physical WebXR meetup in SF, and later join M-sub-2 (how do you type it??) 's discord server. Those experiences motivated me to create a discord community for the French-speaking WebXR ecosystem, as such a community did not exist.
If you are a French speaker worldwide and interested in the immersive web, please reach out 💪
Ecosystem wise, When I started creating experiences and played around VR Headsets, it became clear to me that it was extremely difficult to find immersive content on the internet. Outside niche content aggregators and hidden community posts, no search engine could find any immersive content. In addition to that, browsing the web in general was (and is still) a pain compared to our smartphones and laptops.
That's why I am currently working on a search engine for the immersive web, pushing both for a better discoverability of our ecosystem and a better immersive browsing experience overall. If you want to learn more or join the project, please have a look at about.xrsear.ch/en.