material.data#getColormapKey¶
Summary¶
material.data#getColormapKey returns an opaque string identifying the current colormap selection. Equal keys identify the same selection; do not parse or persist their format.
Syntax¶
Parameters¶
This API does not take parameters.
Returns¶
string - String result produced by this operation.
Example¶
const canvas = document.querySelector("canvas");
const wgpu = await WasmGPU.create(canvas);
const material = wgpu.material.data({ data: new Float32Array([0.2, 0.4, 0.7, 1.0]), scaleTransform: { mode: "linear", domainMin: 0, domainMax: 1 }, colormap: "viridis" });
const result = material.getColormapKey();
console.log(result);
See Also¶
- material.data#colormap
- material.data#createBindGroupLayout
- material.data#destroy
- material.data#dropCPUData
- material.data#getColormapForBinding
- material.data#getScaleSourceDescriptor
- material.data#getShaderCode
- material.data#getUniformBufferSize
- material.data#getUniformData
- material.data#onVisualChange
- material.data#opacity
- material.data#scaleTransform