Skip to content

Class: PointCloudLayer

Defined in: plot3d/pointcloud.ts:59

A drawable in the 3D scene. Positions are in world space; Plot3D supplies the MVP.

Implements

Constructors

Constructor

ts
new PointCloudLayer(gl, opts): PointCloudLayer;

Defined in: plot3d/pointcloud.ts:78

Parameters

ParameterType
glWebGL2RenderingContext
optsPointCloudOptions

Returns

PointCloudLayer

Properties

colorCss?

ts
readonly optional colorCss?: string;

Defined in: plot3d/pointcloud.ts:62

A solid CSS color for the legend swatch (solid-colored layers only).

Implementation of

Layer3D.colorCss


id

ts
readonly id: string;

Defined in: plot3d/pointcloud.ts:60

Implementation of

Layer3D.id


name?

ts
readonly optional name?: string;

Defined in: plot3d/pointcloud.ts:61

Series name for the legend (optional).

Implementation of

Layer3D.name

Methods

bounds3()

ts
bounds3(): Bounds3 | null;

Defined in: plot3d/pointcloud.ts:163

Returns

Bounds3 | null

Implementation of

Layer3D.bounds3


colorInfo()

ts
colorInfo(): ColorInfo | null;

Defined in: plot3d/pointcloud.ts:165

Colormap + value range for a colorbar, if this layer is colormapped.

Returns

ColorInfo | null

Implementation of

Layer3D.colorInfo


dispose()

ts
dispose(): void;

Defined in: plot3d/pointcloud.ts:182

Returns

void

Implementation of

Layer3D.dispose


draw()

ts
draw(gl, mvp): void;

Defined in: plot3d/pointcloud.ts:172

Parameters

ParameterType
glWebGL2RenderingContext
mvpMat4

Returns

void

Implementation of

Layer3D.draw


pickData()

ts
pickData(): 
  | {
  label: ((i) => string) | undefined;
  positions: Float32Array<ArrayBufferLike>;
}
  | null;

Defined in: plot3d/pointcloud.ts:167

Data-space points for hover picking (xyz triples), with an optional per-point tooltip label builder. Null if the layer isn't pickable.

Returns

| { label: ((i) => string) | undefined; positions: Float32Array<ArrayBufferLike>; } | null

Implementation of

Layer3D.pickData


setData()

ts
setData(
   x, 
   y, 
   z): void;

Defined in: plot3d/pointcloud.ts:151

Stream new point positions (same count keeps colors/sizes). Call plot.refresh() after.

Parameters

ParameterType
xArrayLike<number>
yArrayLike<number>
zArrayLike<number>

Returns

void

MIT licensed. WebGL2 required.