Skip to main content

initializeFromBase64

The most convenient way to initialize geos.js module. The .wasm file is embedded directly into the .js file as a base64 string. Although convenient, this causes a certain penalty during initial initialization due to base64 to binary conversion and ~33% overhead of .wasm file size.

Note that the returned module is just stateless, compiled WebAssembly code. WebAssembly.Module could be shared with another worker or window via postMessage.

Returns

Promise<WebAssembly.Module>

A Promise that resolves with the WebAssembly.Module

See also

  • initialize initializes geos.js module from a fetch request or already compiled module
  • terminate terminates initialized geos.js instance

Examples

in any environment
await initializeFromBase64();