@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
new VtkWasmRuntime(): VtkWasmRuntime;Returns
VtkWasmRuntime
Properties
disposed
readonly disposed: boolean;Defined in: base.d.ts:544
Whether VtkWasmRuntime.dispose has already run.
heapInterface
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
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
readonly module: object;Defined in: base.d.ts:551
The underlying Emscripten module. Escape hatch; prefer the session API.
Methods
[dispose]()
dispose: void;Defined in: base.d.ts:571
Returns
void
createRemoteSession()
createRemoteSession(): RemoteSession;Defined in: base.d.ts:564
Create a server-driven remote session.
Returns
createStandaloneSession()
createStandaloneSession(): StandaloneSession;Defined in: base.d.ts:562
Create an in-browser standalone session.
Returns
dispose()
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()
isAsync(): boolean;Defined in: base.d.ts:560
Whether this runtime executes methods asynchronously (JSPI).
Returns
boolean