Skip to content

Colormap.width

Summary

Colormap.width reads the current width value from this Colormap instance. Use it to inspect runtime state without mutating resources.

Syntax

Colormap.width: number
const value = colormap.width;

Parameters

This API does not take parameters.

Returns

number - Numeric scalar result produced by this operation.

Type Details

// No additional descriptor expansion is required for this signature.

Example

const canvas = document.querySelector("canvas");
const wgpu = await WasmGPU.create(canvas);

const colormap = wgpu.colormap.viridis();
const value = colormap.width;
console.log(value);

See Also