Class: IsosurfaceLayer
Defined in: plot3d/isosurface.ts:57
A marching-cubes isosurface of a 3D scalar volume, lit and solid-colored.
Implements
Constructors
Constructor
ts
new IsosurfaceLayer(gl, opts): IsosurfaceLayer;Defined in: plot3d/isosurface.ts:74
Parameters
| Parameter | Type |
|---|---|
gl | WebGL2RenderingContext |
opts | IsosurfaceOptions |
Returns
IsosurfaceLayer
Properties
colorCss
ts
readonly colorCss: string;Defined in: plot3d/isosurface.ts:60
A solid CSS color for the legend swatch (solid-colored layers only).
Implementation of
id
ts
readonly id: string;Defined in: plot3d/isosurface.ts:58
Implementation of
name?
ts
readonly optional name?: string;Defined in: plot3d/isosurface.ts:59
Series name for the legend (optional).
Implementation of
Methods
bounds3()
ts
bounds3(): Bounds3 | null;Defined in: plot3d/isosurface.ts:134
Returns
Bounds3 | null
Implementation of
dispose()
ts
dispose(): void;Defined in: plot3d/isosurface.ts:155
Returns
void
Implementation of
draw()
ts
draw(gl, mvp): void;Defined in: plot3d/isosurface.ts:142
Parameters
| Parameter | Type |
|---|---|
gl | WebGL2RenderingContext |
mvp | Mat4 |
Returns
void
Implementation of
setData()
ts
setData(
values,
dims,
isoLevel,
extent?): void;Defined in: plot3d/isosurface.ts:125
Stream a new volume + iso level (marching-cubes mesh recomputed). Call plot.refresh() after.
Parameters
| Parameter | Type |
|---|---|
values | ArrayLike<number> |
dims | [number, number, number] |
isoLevel | number |
extent? | { x: Range; y: Range; z: Range; } |
extent.x? | Range |
extent.y? | Range |
extent.z? | Range |
Returns
void
setLight()
ts
setLight(dir, ambient): void;Defined in: plot3d/isosurface.ts:137
Set the light direction (world space) and ambient term (0..1).
Parameters
| Parameter | Type |
|---|---|
dir | [number, number, number] |
ambient | number |
Returns
void