WebGPU · WGSL · Rust / WASM

Maps at GPU
speed.

A WebGPU‑native GIS engine with a dual‑projection 3D globe, OGC adapters, and a Rust/WASM spatial core. Vector tiles, rasters, terrain, 3D tiles, custom WGSL layers — rendered on the same pipeline, picked on the same buffer.

Subpaths
12 modules
Classes
260+
Target frame
16.6 ms
License
PolyForm NC‑1.0
N 90°S 90°WE39.925°N, 32.866°EAnkara ╱ init
MapGPU·capability tourscene 01 / 06
lat39.925°N
lon32.866°E
altitude12,000 km
projectionmercator
layerRasterTileLayer
tiles0 / 0
frame16.6 ms
camera · heading 0° · pitch 0°
01 · originAnkara

Five lines, one GPU‑native map.

A typed MapView boots straight onto a WebGPU swapchain. Any XYZ / TMS tile service plugs into a RasterTileLayer — satellite, dark, terrain, custom — one frame, no WebGL fallback.

mapgpu/coreMapViewRasterTileLayerXYZ / TMS
02 · globe viewvertical‑perspective

Full globe, same pipeline.

Mode3D renders the earth as a vertical‑perspective sphere with transparent space — the DOM’s background shows through. One draw graph covers zoom 2 (continent) through zoom 18 (sokak), no scene rebuild per LOD.

Mode3Dvertical‑perspectivetransparent spacetile LOD
03 · vector tilesMVT · fill‑extrusion

Manhattan in real 3D.

OpenFreeMap MVT tiles streamed, decoded and extruded on the GPU. ClassBreaksRenderer picks the color by render_height — every building gets its real OSM shape and height.

VectorTileLayerMVT / pbfExtrudedPolygonSymbolClassBreaksRenderer
04 · 3D primitiveshybrid pipelines

Four shapes, two pipelines.

Box + cylinder become real polygon footprints via makeRectFootprint / makeCircleFootprint + fill‑extrusion. Sphere + cone ride the dedicated Mesh3DSymbol pipeline. Blinn‑Phong shading, per‑feature color, all on one GraphicsLayer per shape.

Mesh3DSymbolExtrudedPolygonSymbolmakeRect / makeCircle FootprintBlinn‑Phong
05 · glTF modelsModelSymbol · glTF 2.0

Ship on the water, helicopter in the sky.

view.loadModelV2(id, url) parses glTF/GLB; a ModelSymbol places each one with heading, pitch and anchorZ. Full PBR on the same draw graph as the basemap.

ModelSymbolglTF 2.0 / GLBPBRanchorZ altitude
06 · measurementMeasureLineTool · haversine

Measure by click.

A MeasureLineTool walks a five‑point polyline across Anıtkabir with a UnitManager feeding geodesic distances. Per‑segment + running total chips land via MeasureLabelManager, reprojected every frame as the camera orbits.

mapgpu/toolsMeasureLineToolUnitManagerMeasureLabelManagerhaversine · geodesic
Tweaks
Scroll behavior
Accent
Toggle the toolbar "Tweaks" button or press T.
§02 · architecture

One package, twelve subpaths. Tree‑shakeable.

[email protected] · 12 subpath modules · TS strict
engine
mapgpu/core
MapView, ViewCore, typed EventBus, coordinates & projections, renderer + symbol contracts, tool context, UnitManager.
01
render pipeline
mapgpu/render
RenderEngine facade, WebGPU swapchain, WGSL pipelines, draw delegates (raster · vector · model · mesh3d · particle · globe · picking · cluster).
02
data layers
mapgpu/layers
GeoJSON · RasterTile · VectorTile (MVT) · Graphics · WGSL · WMS · Heatmap · Cluster · Animated · Particle · Wall.
03
OGC & providers
mapgpu/adapters
WMS · WFS · OGC API Features/Maps · XYZ · KML · GPX · CZML · Bing/Mapbox/ArcGIS/WMTS.
04
widgets
mapgpu/widgets
LayerList · Legend · Popup · ScaleBar · Coordinates · Search · BasemapGallery · Measurement · TimeSlider · LOS · DockPanel.
05
spatial
mapgpu/analysis
LOS · buffer · route sampling · elevation queries · great-circle interpolation.
06
tools
mapgpu/tools
Draw point/line/polygon · MeasureLineTool · MeasurePolygonTool · PlaceGeometryTool · SnapEngine · AngleGuideManager.
07
elevation
mapgpu/terrain
DTED · TerrainRGB · hillshade · heightmap providers.
08
3D Tiles
mapgpu/tiles3d
Cesium 3D Tiles spec · B3DM · I3DM · PNTS · CMPT · SSE traversal · glTF inside tiles.
09
native compute
mapgpu/wasm
Rust + wasm-bindgen — projection, earcut triangulation, clustering, MVT (prost) parse, terrain mesh, hillshade.
10
react bindings
mapgpu/react
Typed components & hooks — MapView, layer mounts, selection, popup. React 18/19 peer.
11
military symbology
mapgpu/milsymbol
MIL-STD-2525D/E symbol rendering as SIDC → sprite/SVG — drop into any point layer.
12
§03 · benchmarks

Rendered on the GPU. Measured on the frame.

loading latest run…
Loading benchmark artifact…

One pipeline, every frame.

Raster tiles, vector fills, extrusions, icons and custom WGSL all target the same encoder. The WASM core parses MVT, triangulates polygons, clusters points — off the main thread.

Start building. Your GPU is waiting.

$npm install mapgpu
Read the docsStar on GitHub