import VoxelVariableStyle from "@arcgis/core/layers/voxel/VoxelVariableStyle.js";const VoxelVariableStyle = await $arcgis.import("@arcgis/core/layers/voxel/VoxelVariableStyle.js");- Inheritance:
- VoxelVariableStyle→
Accessor
- Since
- ArcGIS Maps SDK for JavaScript 4.25
The VoxelVariableStyle allows you to define how an individual variable is rendered. The transferFunction and isosurfaces properties apply to continuous variables, while the uniqueValues property applies to discrete variables.
Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Example
// Typical usagelet vxlVariableStyle = new VoxelVariableStyle({ variableId: 0, transferFunction: { interpolation: "linear", stretchRange: [-803.3854370117188, 804.6875], colorStops: [ { color: [23, 244, 247, 255], position: 0 }, { color: [87, 25, 244, 255], position: 0.5 }, { color: [255, 37, 245, 255], position: 1 } ], rangeFilter: { range: [-1000, 1000] } }, isosurfaces: [ { color: [102, 136, 248, 255], value: -374.6990966796875, label: "f32 data -1000 to 1000" } ], label: "f32 data -1000 to 1000"});Properties
| Property | Type | Class |
|---|---|---|
declaredClass readonly inherited | ||
| | ||
| | ||
| | ||
| | ||
| |
isosurfaces
- Type
- Collection<VoxelIsosurface>
The collection of continuous variable isosurfaces.
transferFunction
The transferFunction describes how to render continuous variable volumes and sections.
uniqueValues
- Type
- Collection<VoxelUniqueValue>
The collection of unique values describes how to render discrete variable volumes and sections.
Methods
fromJSON
- Signature
-
fromJSON (json: any): any
Creates a new instance of this class and initializes it with values from a JSON object
generated from an ArcGIS product. The object passed into the input json
parameter often comes from a response to a query operation in the REST API or a
toJSON()
method from another ArcGIS product. See the Using fromJSON()
topic in the Guide for details and examples of when and how to use this function.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| json | A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects. | |
- Returns
- any
Returns a new instance of this class.
clone
- Signature
-
clone (): VoxelVariableStyle
Creates a deep clone of this object. Any properties that store values by reference will be assigned copies of the referenced values on the cloned instance.
- Returns
- VoxelVariableStyle
A deep clone of the class instance that invoked this method.
toJSON
- Signature
-
toJSON (): any
Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.
- Returns
- any
The ArcGIS portal JSON representation of an instance of this class.