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.
LAS → 3D Tiles · head-to-head
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.
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)
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)
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 +
VectorTileEngineslicing - R-tree (
SpatialIndex) — bbox + kNN queries - Convex/concave hulls, buffer, boolean ops, simplification
- DBSCAN & grid clustering, TIN interpolation, geohash
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
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
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
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.
Point Cloud Workbench
Three.js viewer. Drop LAS/LAZ/PLY/OBJ/E57, build an octree, render with 5 color modes. FPS + level-of-detail.
Cesium 3D Tiles · Offline
Drop LAS → pnts tiles on a Cesium globe. No ion token needed. Compare to the Cesium ion SaaS upload pipeline.
Terrain · GeoTIFF → 3D
Three.js terrain mesh from GeoTIFF heightfields. Height-scale, normals, grayscale modes + terrain deform.
COPC Streaming Pipeline
Step-by-step LAS/COPC → octree → 3D Tiles → Cesium. Range-fetch multi-GB scans by spatial bbox.
WebGL Point Cloud
Zero-dependency WebGL viewer. LAS/PLY drag-drop with height/original color modes.
Multi-thread · Rayon
Single-thread vs multi-thread WASM (SharedArrayBuffer) coordinate-conversion benchmark. Requires COOP/COEP.
Interactive GIS
Chinese city datasets + coordinate transforms + R-tree bbox & kNN queries on a 2D canvas map.
Browser Benchmark
WASM vs JS round-robin with live bar charts. Coordinate transforms, octree build, point spacing.
Full capability map.
Machine-readable format support, API surface, and runtime probes. Also available as llms.txt for AI agents.
| 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