Skip to content

PointCloud.destroy

Summary

PointCloud.destroy releases GPU resources and clears owned runtime state for this PointCloud. Call it when the object is no longer needed.

Syntax

PointCloud.destroy(): void
pointCloud.destroy();

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

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

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("updated");

See Also