# 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 794

Compiles the shader in the shader editor.

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

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

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

##### Returns:

true if the object has been destroyed, false otherwise.

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

Handles key press events on the shader editor.

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

Toggles the visibility of the bounds section

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

Toggles the visibility of the clipping section

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

Toggles the visibility of the display section

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

Toggles the inspector visibility

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

Toggles the visibility of the shader section

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

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.