Skip to content

@kitware/vtk-wasm / @kitware/vtk-wasm / VtkWasmRuntime

Class: VtkWasmRuntime

Defined in: base.d.ts:542

A loaded VTK.wasm WebAssembly module. Acts as the single factory for sessions.

Constructors

Constructor

ts
new VtkWasmRuntime(): VtkWasmRuntime;

Returns

VtkWasmRuntime

Properties

disposed

ts
readonly disposed: boolean;

Defined in: base.d.ts:544

Whether VtkWasmRuntime.dispose has already run.


heapInterface

ts
readonly heapInterface: HeapInterface;

Defined in: base.d.ts:558

Pointer-level marshalling between JavaScript TypedArrays and the wasm heap: alloc, free, copyToHeap, copyFromHeap, viewAt. Creating VTK data arrays needs a session, so toVTKAoSArray lives on StandaloneSession.typedArrayInterface instead.


id

ts
readonly id: string;

Defined in: base.d.ts:549

The unique identifier for the wasm module this runtime was created from. Looks like url::wasmBaseName::config.rendering::config.exec.


module

ts
readonly module: object;

Defined in: base.d.ts:551

The underlying Emscripten module. Escape hatch; prefer the session API.

Methods

[dispose]()

ts
dispose: void;

Defined in: base.d.ts:571

Returns

void


createRemoteSession()

ts
createRemoteSession(): RemoteSession;

Defined in: base.d.ts:564

Create a server-driven remote session.

Returns

RemoteSession


createStandaloneSession()

ts
createStandaloneSession(): StandaloneSession;

Defined in: base.d.ts:562

Create an in-browser standalone session.

Returns

StandaloneSession


dispose()

ts
dispose(): void;

Defined in: base.d.ts:570

Drop this runtime from the shared cache and release the module reference. Note: Emscripten cannot reclaim a runtime's heap before page reload; disposing individual sessions is what actually frees C++ memory.

Returns

void


isAsync()

ts
isAsync(): boolean;

Defined in: base.d.ts:560

Whether this runtime executes methods asynchronously (JSPI).

Returns

boolean