Hello,
The 3D objects is shown in VR mode but the live video feed from the mobile camera doesn't appear in VR mode. The live video footage is replaced with empty black space.
Any idea to make it work.
Thank you.
yep, one need to put the video in webgl. instead of a dom element.
i dont have time to work on it. this is not a tiny task.
you got part of it there. https://github.com/jeromeetienne/AR.js/blob/master/three.js/examples/webvr-for-ar.html
i hope this help
I will check it out.
Thank you.
Hey @vijayrajasekaran , Did you make any advancements on this issue? I'm interested in joining in.
@shakedlokits I did try, but I was unable to make any advancements. :(
This PR has been closed due to inactivity for over one year. Please open a new, updated issue if the problem or the question is still relevant.
Hello, in case someone still needs to solve it, this is my approach:
It's a bit forced.
it works in landscape (on mobile) but not on portrait, it should be improved for it.
setTimeout(() => {
var vidCam = document.body.lastElementChild;
vidCam.setAttribute('id','arVideo')
var camera = document.querySelector('[camera]')
webCamSource = document.createElement('a-entity')
webCamSource.setAttribute('geometry','primitive: plane;')
webCamSource.setAttribute('material','shader: flat; src: #arVideo')
webCamSource.setAttribute('position','0 0 -50')
webCamSource.setAttribute('scale','54 36 1')
camera.insertBefore(webCamSource, camera.firstChild);
document.querySelector('.a-enter-vr-button').addEventListener('clik',()=>{
camera.object3D.position.set(0,0,0)
})
}, 2000);
Most helpful comment
yep, one need to put the video in webgl. instead of a dom element.
i dont have time to work on it. this is not a tiny task.
you got part of it there. https://github.com/jeromeetienne/AR.js/blob/master/three.js/examples/webvr-for-ar.html
i hope this help