# VRButtonViewModel

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

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 200

Gets the Command to toggle VR mode.

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

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

##### See:

- Fullscreen.enabled

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

Gets whether or not VR mode is active.

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

Gets the tooltip. This property is observable.

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

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

### Methods

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

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 210

##### Returns:

true if the object has been destroyed, false otherwise.