Skip to content

sandbox-core · TypeScript

The WebAssembly binding of the sandbox-core kernel, published as @infrared-city/sandbox-core (built with wasm-pack --target web). The API reference is generated from the .d.ts by typedoc and rendered here in Material, so it always matches the shipped package.

Install

npm install @infrared-city/sandbox-core

Quick start

import init, { greet, Tile, stats } from "@infrared-city/sandbox-core";

await init(); // load the wasm module

console.log(greet("world"));

const t = Tile.fromQuadkey("213");
console.log(t.quadkey(), t.bbox().area());

const s = stats(new Float64Array([1, 2, 3]));
console.log(s.count, s.mean); // count is a bigint

Browse the API by symbol in the sidebar.