color.map.hsv¶
Summary¶
color.map.hsv cycles through saturated hues, starting and ending at red. Use it for periodic values such as complex phase. To repeat the hue cycle, wrap the input to a fraction of a turn before sampling.
Syntax¶
Returns¶
Colormap - Shared 256-texel, linearly filtered map with CPU and GPU sampling. Equivalent to WasmGPU.color.map.builtin("hsv").
Example¶
import WasmGPU from "@zushah/wasmgpu";
const map = WasmGPU.color.map.hsv();
const halfway = map.sampleCPU(0.5); // Cyan, in linear RGBA