@ortho-earth/globe
v1.14.0
Published
A 3D globe for the web: createGlobe() draws the whole Earth with WebGPU (WebGL2 fallback) and takes your data through a MapLibre-style API. No API key, no server of your own.
Maintainers
Readme
@ortho-earth/globe
A 3D globe for the browser: real terrain at true scale, vector basemaps (MVT, and MLT with @ortho-earth/tile-formats), 3D buildings, 3D Tiles / I3S,
rasters (XYZ · WMS · WMTS · PMTiles), labels, and a MapLibre-shaped API — with no map server of your
own. It reads public data directly and keeps what it decoded in the browser.
npm i @ortho-earth/globeimport { createGlobe } from "@ortho-earth/globe";
const map = await createGlobe({ target: "#map", view: "#3/20/140" });
map.flyTo({ center: [139.767, 35.681], zoom: 14, pitch: 60 });What you get
- Camera:
jumpTo/easeTo/flyTo/fitBounds/cameraForBounds/ padding /setMaxBounds - Layers: external MapLibre
style.json(setStyle),setPaintProperty/setLayoutProperty/setFilter/moveLayer/ per-layer events,queryRenderedFeatures-equivalent - Vectors: Gint layers (
map.addGint: topology, GPU picking, draping) and, for big GeoPBF / GeoParquet files you only look at, column chunks (map.addColumnar: no topology pass, first frame after read + pack) - 3D: extrusions, glTF/GLB models, any 3D Tiles tileset (
map.add3DTiles), I3S (map.addI3S) - Terrain: built-in elevation, or your own
raster-demsource (map.setTerrain) - Analysis: sun shadow / shadow-hours, viewshed, line of sight, profiles, measurement
- DOM:
new Marker().setLngLat([lon, lat]).addTo(map),Popup,addProtocol,transformRequest - Regions: pass
opts.regionto add a country pack (basemap, elevation, buildings, search…). Without it you get the world: Natural Earth 10m, global hypsometry, lakes, rivers, maritime boundaries, stars — honest up to about z8, which is what world data can carry.
Verification
The gates live with the code: npm run verify:ui (18 pages), npm run verify:webgpu (10 pages, real GPU; a page that
boots on WebGL2 or skips for lack of WebGPU fails),
npm run verify:nocoi (the no-crossOriginIsolated world), and npm run verify:net (3 pages that depend on outside servers — NASA GIBS and ArcGIS — kept out of the standing gates). They boot pages through this package's own
public face, so what is tested is what you install.
License
GPL-3.0-or-later (LICENSE). A commercial license — without GPL obligations such as disclosing your site's source — is available: contact [email protected].
