# VoxelInspectorViewModel

#### new Cesium.VoxelInspectorViewModel(scene)
widgets/Source/VoxelInspector/VoxelInspectorViewModel.js 54

The view model for `VoxelInspector`.

Name | Type | Description
--- | --- | ---
`scene` | Scene | The scene instance to use.

### Members

#### readonly scene : Scene
widgets/Source/VoxelInspector/VoxelInspectorViewModel.js 698

Gets the scene

#### voxelPrimitive : VoxelPrimitive
widgets/Source/VoxelInspector/VoxelInspectorViewModel.js 709

Gets or sets the primitive of the view model.

### Methods

#### compileShader()
widgets/Source/VoxelInspector/VoxelInspectorViewModel.js 796

Compiles the shader in the shader editor.

#### destroy()
widgets/Source/VoxelInspector/VoxelInspectorViewModel.js 865

Destroys the widget. Should be called if permanently removing the widget from layout.

#### isDestroyed() → boolean
widgets/Source/VoxelInspector/VoxelInspectorViewModel.js 857

##### Returns:

true if the object has been destroyed, false otherwise.

#### shaderEditorKeyPress()
widgets/Source/VoxelInspector/VoxelInspectorViewModel.js 809

Handles key press events on the shader editor.

#### toggleBounds()
widgets/Source/VoxelInspector/VoxelInspectorViewModel.js 775

Toggles the visibility of the bounds section

#### toggleClipping()
widgets/Source/VoxelInspector/VoxelInspectorViewModel.js 782

Toggles the visibility of the clipping section

#### toggleDisplay()
widgets/Source/VoxelInspector/VoxelInspectorViewModel.js 761

Toggles the visibility of the display section

#### toggleInspector()
widgets/Source/VoxelInspector/VoxelInspectorViewModel.js 754

Toggles the inspector visibility

#### toggleShader()
widgets/Source/VoxelInspector/VoxelInspectorViewModel.js 789

Toggles the visibility of the shader section

#### toggleTransform()
widgets/Source/VoxelInspector/VoxelInspectorViewModel.js 768

Toggles the visibility of the transform section

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