Class: VRButtonViewModel

VRButtonViewModel

new VRButtonViewModel(scene, vrElementopt)

The view model for VRButton.
Parameters:
Name Type Attributes Default Description
scene Scene The scene.
vrElement Element | String <optional>
document.body The element or id to be placed into VR mode.
Source:

Members

command :Command

Gets the Command to toggle VR mode.
Type:
Source:

isVREnabled :Boolean

Gets or sets whether or not VR functionality should be enabled.
Type:
  • Boolean
Source:
See:

isVRMode :Boolean

Gets whether or not VR mode is active.
Type:
  • Boolean
Source:

tooltip :String

Gets the tooltip. This property is observable.
Type:
  • String
Source:

vrElement :Element

Gets or sets the HTML element to place into VR mode when the corresponding button is pressed.
Type:
  • Element
Source:

Methods

destroy()

Destroys the view model. Should be called to properly clean up the view model when it is no longer needed.
Source:

isDestroyed() → {Boolean}

Source:
Returns:
true if the object has been destroyed, false otherwise.
Type
Boolean