# VoxelInspectorViewModel

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

The view model for `VoxelInspector`.

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

### Members

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

Gets the scene

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

Gets or sets the primitive of the view model.

### Methods

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

Compiles the shader in the shader editor.

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

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

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

##### Returns:

true if the object has been destroyed, false otherwise.

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

Handles key press events on the shader editor.

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

Toggles the visibility of the bounds section

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

Toggles the visibility of the clipping section

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

Toggles the visibility of the display section

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

Toggles the inspector visibility

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

Toggles the visibility of the shader section

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

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.