VR Button

The VR button allows to display an UI-Element related to entering VR.

Implementation

  1. Import the VRButton component
import VRButton from 'troisjs/src/components/misc/VRButton.vue'
  1. Place the button within your HTML. Be sure to include the ref
<VRButton ref="vrbutton" />
  1. Call init() within mounted() lifecycle hook of your code.
this.$refs.vrbutton.init(this.$refs.renderer.renderer)

Custom Props

NameDescriptionTypeDefault
enterMessageShows up on the button when VR-Mode is not activatedString'ENTER VR'
exitMessageShows up on the button when VR-Mode is activatedString'EXIT VR'