I'm making a VR web app with Three.js and WebXR. I'm fetching some data from backend and re-rendering the 3D scene based on that data. But whenever I enter the VR mode and then any changes in main scene does not re-render in the VR scene. It works perfectly If I work in regular 3D mode.
How do I trigger re-render after entering VR mode so that any changes in the scene will also be re-rendered in the VR.
I'm using the VRButton provided by Three.js with React.
I'm changing a react state to rotate a cube. so whenever the react state is changed to true or false, I start rotating the cube. It works in regular 3D mode but when I enter VR mode, no changes is re-rendered. I also tried to re-render the content in mainScene.renderer.setAnimationLoop() function. Nothings seems to be working.
I need help badly.