Skip to content

Class: Bar3DLayer ​

Defined in: plot3d/bar3d.ts:91

3D bars (columns) on an x/z grid, lit like the surface and optionally colormapped.

Implements ​

Constructors ​

Constructor ​

ts
new Bar3DLayer(gl, opts): Bar3DLayer;

Defined in: plot3d/bar3d.ts:113

Parameters ​

ParameterType
glWebGL2RenderingContext
optsBar3DOptions

Returns ​

Bar3DLayer

Properties ​

colorCss? ​

ts
readonly optional colorCss?: string;

Defined in: plot3d/bar3d.ts:94

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

Implementation of ​

Layer3D.colorCss


id ​

ts
readonly id: string;

Defined in: plot3d/bar3d.ts:92

Implementation of ​

Layer3D.id


name? ​

ts
readonly optional name?: string;

Defined in: plot3d/bar3d.ts:93

Series name for the legend (optional).

Implementation of ​

Layer3D.name

Methods ​

bounds3() ​

ts
bounds3(): Bounds3 | null;

Defined in: plot3d/bar3d.ts:202

Returns ​

Bounds3 | null

Implementation of ​

Layer3D.bounds3


colorInfo() ​

ts
colorInfo(): ColorInfo | null;

Defined in: plot3d/bar3d.ts:204

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/bar3d.ts:226

Returns ​

void

Implementation of ​

Layer3D.dispose


draw() ​

ts
draw(gl, mvp): void;

Defined in: plot3d/bar3d.ts:214

Parameters ​

ParameterType
glWebGL2RenderingContext
mvpMat4

Returns ​

void

Implementation of ​

Layer3D.draw


pickData() ​

ts
pickData(): 
  | {
  positions: Float32Array<ArrayBufferLike>;
}
  | null;

Defined in: plot3d/bar3d.ts:206

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

Returns ​

| { positions: Float32Array<ArrayBufferLike>; } | null

Implementation of ​

Layer3D.pickData


setData() ​

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

Defined in: plot3d/bar3d.ts:198

Stream new bar positions/heights (instances rebuilt). Call plot.refresh() after.

Parameters ​

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

Returns ​

void


setLight() ​

ts
setLight(dir, ambient): void;

Defined in: plot3d/bar3d.ts:209

Set the light direction (world space) and ambient term (0..1).

Parameters ​

ParameterType
dir[number, number, number]
ambientnumber

Returns ​

void

MIT licensed. WebGL2 required.