Skip to content

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

ParameterType
glWebGL2RenderingContext
optsIsosurfaceOptions

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

Layer3D.colorCss


id

ts
readonly id: string;

Defined in: plot3d/isosurface.ts:58

Implementation of

Layer3D.id


name?

ts
readonly optional name?: string;

Defined in: plot3d/isosurface.ts:59

Series name for the legend (optional).

Implementation of

Layer3D.name

Methods

bounds3()

ts
bounds3(): Bounds3 | null;

Defined in: plot3d/isosurface.ts:134

Returns

Bounds3 | null

Implementation of

Layer3D.bounds3


dispose()

ts
dispose(): void;

Defined in: plot3d/isosurface.ts:155

Returns

void

Implementation of

Layer3D.dispose


draw()

ts
draw(gl, mvp): void;

Defined in: plot3d/isosurface.ts:142

Parameters

ParameterType
glWebGL2RenderingContext
mvpMat4

Returns

void

Implementation of

Layer3D.draw


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

ParameterType
valuesArrayLike<number>
dims[number, number, number]
isoLevelnumber
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

ParameterType
dir[number, number, number]
ambientnumber

Returns

void

MIT licensed. WebGL2 required.