PointCloud.mapLinearIndexToNd¶
Summary¶
PointCloud.mapLinearIndexToNd maps values between indexing/representation schemes used by this PointCloud.
Syntax¶
PointCloud.mapLinearIndexToNd(index: number): number[] | null
const result = pointCloud.mapLinearIndexToNd(index);
Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
index |
number |
Yes | Linear element index into CPU-backed arrays. |
Returns¶
number[] | null - Result produced by this API call as number[] | null.
Type Details¶
Example¶
const canvas = document.querySelector("canvas");
const wgpu = await WasmGPU.create(canvas);
const pointCloud = wgpu.createPointCloud({ data: new Float32Array([0, 0, 0, 0.1, 1, 0, 0, 0.8]), scaleTransform: { mode: "linear", domainMin: 0, domainMax: 1 } });
const index = 0;
const result = pointCloud.mapLinearIndexToNd(index);
console.log(result);
See Also¶
- PointCloud.applyScaleStats
- PointCloud.basePointSize
- PointCloud.colormap
- PointCloud.colormapStops
- PointCloud.computeBoundsFromCPUData
- PointCloud.destroy
- PointCloud.dirtyUniforms
- PointCloud.dropCPUData
- PointCloud.getBounds
- PointCloud.getColormapForBinding
- PointCloud.getColormapKey
- PointCloud.getLocalBounds