geometryKernel.loadGeometryKernel
Load, initialise and register the kernel3d and kernel2d WASM modules once, or register ones the host already loaded.
Usage
loadGeometryKernel(k3d?: Kernel3dModule, k2d?: Kernel2dModule, options?: LoadGeometryKernelOptions): Promise<void>Parameters
k3dKernel3dModuleAn initialised kernel3d module to register instead of loading one. Default
undefined.k2dKernel2dModuleAn initialised kernel2d module to register instead of loading one (since 0.4.0). Default
undefined.optionsLoadGeometryKernelOptionsthreads: "auto" loads the threaded kernel3d when threadsPossible() and the build is present, "off" never does; threadedModule: how to import that build, e.g. () => import("@havn-earth/kernel/wasm3d-threaded") in a bundled host (since 0.10.0). Both builds give the same results bit for bit. Default
{ threads: "auto" }.
Returns
A promise that settles when the modelling operations can run.
Guarantees
- geometryKernelReady() is true afterwards
Example
typeof loadGeometryKernel // → "function"