Search code examples
react-360

Hiding the virtual reality symbol and disabling controls


Is it possible to hide the vr symbol which appears until your mouse is over the vr view?

vr symbol

It doesn't seem possible to disable all controls. You can disable touch panning with disableTouchPanning on mobile and it still uses the device orientation.

  ReactVR.init(
    './index.bundle.js',
    document.body,
    options = {
        disableTouchPanning: true,
        hideFullscreen: true,
        hideCompass: true, 
    }
  );

(see https://github.com/facebook/react-vr/blob/master/ReactVR/js/VRInstance.js)

Thanks!


Solution

  • I think I found how to hide this icon - maybe a bit cheat way but seems works :D

    In index.html header, I added:

        <style> div > div > div {display: none}</style>
    

    Since it's 'cheat' I'm also not sure if it will work always but it's just idea, you can start from that point and check it ;)