0

When setting up React VR you get a bundle with already customized full screen button and a button for straightening up camera, which has no name and no customization options:

Camera straightening control

I have changed the camera rotation principle in client.js and now the button is not working correctly.

  1. How is that button called?
  2. Is there an API for it to customize it?
  3. Is there a way to disable it?
Mikayel Saghyan
  • 728
  • 9
  • 23

1 Answers1

1

This is kind of a hack but...

That is injected once the app inits and at this time I know of no API to customize it but the good news is it is DOM. You could add some CSS to your page to disable it or restyle it (assuming you have no other SVGs on your page).

svg { display: none }

cidicles
  • 351
  • 2
  • 8
  • Well, it worked, but I wanted to customize it. If i find no other way, i will hide it, but I don't know what it will be like in VR (not web). – Mikayel Saghyan Apr 04 '18 at 11:30
  • You can work wonders here with CSS hacks like change the fill, maybe even alter the shapes using the :before / :after pseudo selectors. Since this control is dom based it won't appear in your VR scene. If you wanted something like it in your VR scene check out the VR head model: https://facebook.github.io/react-vr/docs/vrheadmodel.html which you can use to build your own. – cidicles Apr 04 '18 at 20:14