# VRButtonViewModel

#### new Cesium.VRButtonViewModel(scene, vrElement)
widgets/Source/VRButton/VRButtonViewModel.js 81

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/Source/VRButton/VRButtonViewModel.js 204

Gets the Command to toggle VR mode.

#### isVREnabled : boolean
widgets/Source/VRButton/VRButtonViewModel.js 111

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

##### See:

- Fullscreen.enabled

#### isVRMode : boolean
widgets/Source/VRButton/VRButtonViewModel.js 98

Gets whether or not VR mode is active.

#### tooltip : string
widgets/Source/VRButton/VRButtonViewModel.js 126

Gets the tooltip. This property is observable.

#### vrElement : Element
widgets/Source/VRButton/VRButtonViewModel.js 182

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

### Methods

#### destroy()
widgets/Source/VRButton/VRButtonViewModel.js 222

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

#### isDestroyed() → boolean
widgets/Source/VRButton/VRButtonViewModel.js 214

##### Returns:

true if the object has been destroyed, false otherwise.

Need help? The fastest way to get answers is from the community and team on the Cesium Forum.