PointCloud.destroy¶
Summary¶
PointCloud.destroy releases its transform, uniform buffer, retained records, Wasm-source references, and point/color buffers it owns. Caller-supplied buffers are destroyed only when ownership was transferred with descriptor ownBuffers: true or setter option ownBuffer: true; borrowed buffers are detached.
Syntax¶
Parameters¶
This API does not take parameters.
Returns¶
void - No return value. The call applies side effects to runtime state and/or GPU resources.
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 } });
pointCloud.destroy();
console.log(pointCloud.pointsBuffer, pointCloud.colorsBuffer); // null, null
See Also¶
- PointCloud.applyScaleStats
- PointCloud.basePointSize
- PointCloud.colormap
- PointCloud.colormapStops
- PointCloud.computeBoundsFromCPUData
- PointCloud.dirtyUniforms
- PointCloud.dropCPUData
- PointCloud.getBounds
- PointCloud.getColormapForBinding
- PointCloud.getColormapKey
- PointCloud.getLocalBounds
- PointCloud.getPointRecord