# VRButtonViewModel

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

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 216

Gets the Command to toggle VR mode.

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

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

##### See:

- Fullscreen.enabled

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

Gets whether or not VR mode is active.

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

Gets the tooltip. This property is observable.

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

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

### Methods

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

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 226

##### Returns:

true if the object has been destroyed, false otherwise.