VoxelLayer variable and render mode

Explore in the sandboxView live

This sample shows how to change several of the most important aspects of how a VoxelLayer displays.

The currentVariableId property determines which of the variables is being displayed. Note that currentVariableId corresponds to the id property of a particular variable. It is not an index.

The renderMode property can take the value volume or surfaces. When set to surfaces only isosurfaces and dynamic (also known as unlocked) sections are displayed, whereas the setting "volume" draws the full volume instead.

The verticalExaggeration property of a VoxelVolumeStyle controls the amount of exaggeration to apply. The layer has a collection of volumeStyles but since only a single volume is currently supported there should only be 1 VoxelVolumeStyle in the collection with a volumeId of 0. Although it is not shown in the sample the verticalOffset property allows you to offset the volume in the Z dimension by specifying an offset in meters.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.