Skip to content

Function: packHeatmapValues() ​

ts
function packHeatmapValues(z, nx, ny, maxWidth?, zOrigin?, out?): HeatmapTextureImage;

Experimental

Pack values into the R32F layout: texel k = j * nx + i at (k % width, floor(k / width)) holds z[k] - zOrigin, or the largest float32 (3.4028235e38, a hole) for non-finite / missing values and padding texels. out is reused when it has the right length.

Parameters ​

ParameterTypeDefault value
zArrayLike<number>undefined
nxnumberundefined
nynumberundefined
maxWidthnumberHEATMAP_TEXTURE_WIDTH
zOriginnumber0
out?Float32Array<ArrayBufferLike>undefined

Returns ​

HeatmapTextureImage

Released under the MIT License.