PointCloud3DRenderer
Massively parallel renderer for high-density 3D points.
Constructor
typescript
const renderer = new PointCloud3DRenderer(options: PointCloud3DRendererOptions);Options
| Property | Type | Default | Description |
|---|---|---|---|
canvas | HTMLCanvasElement | Required | The target canvas element. |
globalPointSize | number | 1.0 | Base size of all points in pixels. |
circular | boolean | true | If true, renders points as smooth circles. |
opacity | number | 1.0 | Global transparency. |
Methods
setData(data: PointCloudData): void
Uploads point coordinates and attributes to the GPU. Supports millions of points.
updatePointSize(size: number): void
Dynamically changes the particle size.
Interfaces
PointCloudData
typescript
interface PointCloudData {
positions: Float32Array; // Flattened [x, y, z]
colors?: Float32Array; // Flattened [r, g, b] or [r, g, b, a]
sizes?: Float32Array; // Per-point scaling factor
}Performance Note
Optimized for Zero Latency interaction. It includes a custom shader that performs depth attenuation (points appear smaller when farther away) to enhance the sense of perspective.
Known limitations
- Bundle entry — pick
velo-plot,velo-plot/trading,velo-plot/scientific, orvelo-plot/full. See Bundle Architecture. - WebGPU renderer (
renderer: 'webgpu') requires an extended bundle entry and is experimental — use WebGL (default) for production. - SVG —
exportSVG()andrenderer: 'svg'require an extended bundle. LaTeX labels and contour overlays are partial; 3D is not supported in SVG. See SVG examples. - See Plugin status registry for plugin maturity (
complete,partial,experimental).