# VRButtonViewModel

#### new Cesium.VRButtonViewModel(scene, vrElement)
Widgets/VRButton/VRButtonViewModel.js 89

  The view model for `VRButton`.

  Name | Type | Default | Description
  --- | --- | --- | ---
  `scene` | Scene |  | The scene.
  `vrElement` | Element | String | `document.body` | optional The element or id to be placed into VR mode.

### Members

#### command : Command
Widgets/VRButton/VRButtonViewModel.js 195

  Gets the Command to toggle VR mode.

#### isVREnabled : Boolean
Widgets/VRButton/VRButtonViewModel.js 119

  Gets or sets whether or not VR functionality should be enabled.

  ##### See:

  - Fullscreen.enabled

#### isVRMode : Boolean
Widgets/VRButton/VRButtonViewModel.js 106

  Gets whether or not VR mode is active.

#### tooltip : String
Widgets/VRButton/VRButtonViewModel.js 134

  Gets the tooltip. This property is observable.

#### vrElement : Element
Widgets/VRButton/VRButtonViewModel.js 173

  Gets or sets the HTML element to place into VR mode when the corresponding button is pressed.

### Methods

#### destroy()
Widgets/VRButton/VRButtonViewModel.js 213

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

#### isDestroyed() → Boolean
Widgets/VRButton/VRButtonViewModel.js 205

  ##### Returns:

  true if the object has been destroyed, false otherwise.