init
ts
Initialize the ImFusion Web SDK.
Parameters
| Parameter | Type | Description |
|---|---|---|
canvas | HTMLCanvasElement | The canvas element to render into |
options? | InitOptions | Optional initialization options |
Returns
Promise resolving to the ImFusion instance
Example
ts
You can call preloadWasm ahead of init() to initiate the wasm
fetch and compilation if canvas is not yet available.