Skip to content

Interface: Layer3D

Defined in: plot3d/layer3d.ts:15

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

Properties

colorCss?

ts
readonly optional colorCss?: string;

Defined in: plot3d/layer3d.ts:20

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


id

ts
readonly id: string;

Defined in: plot3d/layer3d.ts:16


name?

ts
readonly optional name?: string;

Defined in: plot3d/layer3d.ts:18

Series name for the legend (optional).

Methods

bounds3()

ts
bounds3(): Bounds3 | null;

Defined in: plot3d/layer3d.ts:21

Returns

Bounds3 | null


colorInfo()?

ts
optional colorInfo(): ColorInfo | null;

Defined in: plot3d/layer3d.ts:23

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

Returns

ColorInfo | null


dispose()

ts
dispose(): void;

Defined in: plot3d/layer3d.ts:30

Returns

void


draw()

ts
draw(gl, mvp): void;

Defined in: plot3d/layer3d.ts:29

Parameters

ParameterType
glWebGL2RenderingContext
mvpMat4

Returns

void


pickData()?

ts
optional pickData(): 
  | {
  label?: (i) => string;
  positions: Float32Array;
}
  | null;

Defined in: plot3d/layer3d.ts:28

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; } | null

MIT licensed. WebGL2 required.