VR Button
The VR button allows to display an UI-Element related to entering VR.
Implementation
- Import the
VRButtoncomponent
import VRButton from 'troisjs/src/components/misc/VRButton.vue'
- Place the button within your HTML. Be sure to include the
ref
<VRButton ref="vrbutton" />
- Call
init()withinmounted()lifecycle hook of your code.
this.$refs.vrbutton.init(this.$refs.renderer.renderer)
Custom Props
| Name | Description | Type | Default |
|---|---|---|---|
enterMessage | Shows up on the button when VR-Mode is not activated | String | 'ENTER VR' |
exitMessage | Shows up on the button when VR-Mode is activated | String | 'EXIT VR' |