v0.9.0 Rust + WebAssembly 1.2 MB · zero deps MIT

The fastest spatial engine
in the browser.

Generate Cesium 3D Tiles, parse point clouds, terrain & vector data — entirely in the browser. No backend. No upload. 78.7× faster than py3dtiles.

Try the playground

LAS → 3D Tiles · head-to-head

Apple M4 · single-thread WASM · 500K pts
wasm-spatial-core
36 ms
py3dtiles 12.1.1
2.86 s
wasm-spatial-core is 78.7× faster · loaders.gl: capability gap (no pnts writer). Full methodology ↗
Capabilities

One engine. Five spatial domains.

Point clouds, terrain, vector, coordinate systems, and GPU compute — unified in a single WebAssembly module that runs anywhere a browser does.

01 / Point Cloud → 3D Tiles

Drop a LAS file. Get Cesium tiles.

Parse LAS/LAZ/COPC/PLY/OBJ/PCD/E57, build an octree, and emit pnts tiles — all in the browser. No server round-trip, no ion quota.

  • Auto-format detection via parsePointCloudAuto
  • COPC range-fetch streaming — view multi-GB scans by spatial bbox
  • Cancellable long jobs (...WithAbort)
  • Incremental tile patching — edit one tile, ship the diff
  • Optional Draco compression (~5× smaller)
Open full point-cloud demos →
loading point cloud…
02 / Terrain · GeoTIFF → quantized-mesh

GeoTIFF in. Cesium terrain out.

Decode GeoTIFF heightfields, encode Cesium-compatible quantized-mesh tiles and TMS pyramids, and edit terrain by cut / flatten / fill — replacing desktop GIS for common tasks.

  • GeoTIFF reader (Float32/16/8, DEFLATE/LZW, up to 64 MP)
  • quantized-mesh + TMS pyramid + layer.json
  • Terrain editing: excavate / flatten / fill / feather
  • Hillshade, contour lines, color ramps
  • Proven against real Cesium 1.119 (headless test)
Open terrain demo →
generating terrain mesh…
03 / Vector · GeoJSON / MVT / WKT

Streaming vector at scale.

A lazy, streaming GeoJSON parser, MVT decode/slice, WKT/WKB round-trip — backed by an R-tree for bbox and kNN queries across millions of features.

  • Streaming GeoJSON — lazy per-feature iterator, no full buffer
  • MVT decode + VectorTileEngine slicing
  • R-tree (SpatialIndex) — bbox + kNN queries
  • Convex/concave hulls, buffer, boolean ops, simplification
  • DBSCAN & grid clustering, TIN interpolation, geohash
Open GIS demo →
indexing points…
04 / Coordinate Transforms · CRS

27–67× faster than JavaScript.

Batch WGS-84 ↔ GCJ-02 / BD-09 / Web Mercator / CGCS2000 / UTM with zero-copy in-place variants. Honest scope: a fast transform toolkit, not a PROJ replacement.

  • WGS84→GCJ-02 ~27×, →Mercator ~67× vs JS libs
  • Full UTM forward + inverse
  • Zero-copy in-place variants for every transform
  • ENU local frame for site-scale precision
  • Capability introspection: crsInfo, getSupportedCrs
05 / WebGPU Compute

GPU kernels. Automatic WASM fallback.

WGSL shaders for point transform, heightfield flatten, and mesh quadric accumulation — with automatic degradation to WASM when no GPU is available.

  • Point transform — Mat4 × vec3 on GPU
  • Heightfield flatten — 2048² in ~29 ms (GPU) vs 48 ms (WASM)
  • Mesh quadric accumulation + edge costs
  • supportsWebGpu() runtime probe, zero-config fallback
  • Honest benchmarks — WASM wins on integrated GPU
probing GPU…

Quick start

3D Tiles in 4 lines.

One npm install, one init(), and you're generating Cesium tiles in the browser.

// 1. install:  npm i wasm-spatial-core   (or pnpm / yarn / bun)
import init, { parsePointCloudAuto, generateTileset } from 'wasm-spatial-core';

await init();                              // load the WASM module
const cloud = parsePointCloudAuto(lasBytes);  // auto-detect LAS/LAZ/PLY/OBJ/PCD
const result = generateTileset(cloud.positions, 10000, 8); // octree → pnts tiles
// → result.tilesetJson + result.tile(i) feed into Cesium3DTileset

Live demos

See it run. In your browser.

Every demo below runs entirely client-side — drop your own files and watch the engine work. No data leaves your machine.


For developers & AI agents

Full capability map.

Machine-readable format support, API surface, and runtime probes. Also available as llms.txt for AI agents.

Supported spatial formats
Category Format Read Write Feature flag

Runtime control

Cancellable jobs
...WithAbort, SpatialError::Cancelled
Incremental tiles
TilesetPatch / applyTilesetPatch
Memory budget
setInputSizeLimit, estimateJobBytes
Web Workers
WorkerHandle, processChunked

Capability probes

supportsLaz()
LAZ/COPC decompression
supportsE57()
E57 industrial scans
supportsWebGpu()
GPU compute availability
getInputLimits()
Honest preflight JSON

Spatial IR & mesh

Unified IR
SpatialChunk (point / mesh / heightfield)
Mesh edit
OBB split, plane clip + cap, QEM decimation
Registration
SVD / Umeyama / RANSAC alignment
GLB I/O
parseGlb → edit → toGlb