Class: SurfaceLayer
Defined in: plot3d/surface.ts:77
A drawable in the 3D scene. Positions are in world space; Plot3D supplies the MVP.
Implements
Constructors
Constructor
ts
new SurfaceLayer(gl, opts): SurfaceLayer;Defined in: plot3d/surface.ts:98
Parameters
| Parameter | Type |
|---|---|
gl | WebGL2RenderingContext |
opts | SurfaceOptions |
Returns
SurfaceLayer
Properties
id
ts
readonly id: string;Defined in: plot3d/surface.ts:78
Implementation of
name?
ts
readonly optional name?: string;Defined in: plot3d/surface.ts:79
Series name for the legend (optional).
Implementation of
Methods
bounds3()
ts
bounds3(): Bounds3;Defined in: plot3d/surface.ts:200
Returns
Implementation of
colorInfo()
ts
colorInfo(): ColorInfo;Defined in: plot3d/surface.ts:202
Colormap + value range for a colorbar, if this layer is colormapped.
Returns
Implementation of
dispose()
ts
dispose(): void;Defined in: plot3d/surface.ts:225
Returns
void
Implementation of
draw()
ts
draw(gl, mvp): void;Defined in: plot3d/surface.ts:210
Parameters
| Parameter | Type |
|---|---|
gl | WebGL2RenderingContext |
mvp | Mat4 |
Returns
void
Implementation of
setData()
ts
setData(values, opts?): void;Defined in: plot3d/surface.ts:190
Stream a new height grid (mesh/normals/wireframe rebuilt). Call plot.refresh() after.
Parameters
| Parameter | Type |
|---|---|
values | ArrayLike<number> |
opts? | { cols?: number; extentX?: Range; extentZ?: Range; rows?: number; } |
opts.cols? | number |
opts.extentX? | Range |
opts.extentZ? | Range |
opts.rows? | number |
Returns
void
setLight()
ts
setLight(dir, ambient): void;Defined in: plot3d/surface.ts:205
Set the light direction (world space) and ambient term (0..1).
Parameters
| Parameter | Type |
|---|---|
dir | [number, number, number] |
ambient | number |
Returns
void