PointCloud.upload¶
Summary¶
PointCloud.upload uploads pending CPU/wasm data into GPU buffers so this PointCloud is render-ready.
Syntax¶
Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
device |
GPUDevice |
Yes | GPUDevice used to allocate pipelines, buffers, layouts, or textures. |
queue |
GPUQueue |
Yes | GPUQueue used for data uploads and command submissions. |
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 } });
const device = wgpu.gpu.device;
const queue = wgpu.gpu.queue;
pointCloud.upload(device, queue);
console.log("updated");
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