Class: Boxes3DLayer
Defined in: plot3d/boxes3d.ts:106
Independently sized, lit cuboids drawn as one instanced call — voxels, bounding boxes, 3D waterfalls, and the layer blocks of a model diagram. Unlike Bar3DLayer every box carries its own center and 3-axis size.
Implements
Constructors
Constructor
new Boxes3DLayer(gl, opts): Boxes3DLayer;Defined in: plot3d/boxes3d.ts:126
Parameters
| Parameter | Type |
|---|---|
gl | WebGL2RenderingContext |
opts | Boxes3DOptions |
Returns
Boxes3DLayer
Properties
colorCss
readonly colorCss: string;Defined in: plot3d/boxes3d.ts:109
A solid CSS color for the legend swatch (solid-colored layers only).
Implementation of
id
readonly id: string;Defined in: plot3d/boxes3d.ts:107
Implementation of
name?
readonly optional name?: string;Defined in: plot3d/boxes3d.ts:108
Series name for the legend (optional).
Implementation of
Methods
bounds3()
bounds3(): Bounds3 | null;Defined in: plot3d/boxes3d.ts:204
Returns
Bounds3 | null
Implementation of
dispose()
dispose(): void;Defined in: plot3d/boxes3d.ts:235
Returns
void
Implementation of
draw()
draw(gl, mvp): void;Defined in: plot3d/boxes3d.ts:223
Parameters
| Parameter | Type |
|---|---|
gl | WebGL2RenderingContext |
mvp | Mat4 |
Returns
void
Implementation of
pickData()
pickData():
| {
label: (i) => string;
positions: Float32Array<ArrayBuffer>;
}
| {
label?: undefined;
positions: Float32Array<ArrayBuffer>;
}
| null;Defined in: plot3d/boxes3d.ts:208
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; positions: Float32Array<ArrayBuffer>; } | { label?: undefined; positions: Float32Array<ArrayBuffer>; } | null
Implementation of
setData()
setData(boxes): void;Defined in: plot3d/boxes3d.ts:200
Replace every box. Call plot.refresh() afterwards to re-fit + redraw.
Parameters
| Parameter | Type |
|---|---|
boxes | Box3D[] |
Returns
void
setLight()
setLight(dir, ambient): void;Defined in: plot3d/boxes3d.ts:218
Set the light direction (world space) and ambient term (0..1).
Parameters
| Parameter | Type |
|---|---|
dir | [number, number, number] |
ambient | number |
Returns
void