earthwire is a zero-dependency, single-page WebGL 3D globe of the physical internet: submarine cable corridors, coastal landing stations, simplified world borders, and live BGP routing events from RIPE RIS Live.
The entire runtime artifact is a single self-contained index.html (inline CSS, inline JavaScript, raw WebGL1 shaders, embedded datasets, and offline replay fallback) — no three.js, no npm, no bundler, and no CDN links.
- Raw WebGL 3D globe: An ocean sphere with Fresnel horizon shading, outer atmospheric glow, 15-degree graticule, country outlines, 50 submarine cable corridors, 91 landing points, and animated BGP update pulses (~10,074 static line segments in a handful of static/dynamic VBO draw calls).
- Controls: Drag to rotate, scroll wheel to zoom, hover any submarine cable to inspect its name, documented length, RFS year, and landing points, click any AS badge in the ticker to inspect its recent updates and filter pulses on the globe, and use Pause or Use Replay / Connect Live in the top bar.
- Plain DOM overlays: Cable tooltips and landing-station labels are standard HTML elements positioned each frame by projecting 3D spherical coordinates through the WebGL view-projection matrix (
projectPointToScreen) with horizon occlusion.
| Layer | Mode / Origin | Honesty & precision note |
|---|---|---|
| Country borders | Bundled (data/countries_110m.json) |
Simplified from Natural Earth 1:110m Admin-0 Countries (4,118 points / 3,830 segments). Real geographic outlines at coarse global scale. |
| Landing stations | Bundled (data/cables.json) |
91 real coastal landing cities/towns with public geographic coordinates. |
| Submarine cable geometry | Synthetic (data/cables.json) |
Cable names, RFS years, and documented lengths reflect real systems, but all ocean-span polylines are synthetic great-circle arcs (4,637 segments) generated via slerp between landing cities and maritime channel waypoints (e.g., Gibraltar, Suez, Malacca, Cape of Good Hope). Raw commercial seabed survey routes are not used. |
| BGP routing stream | Live (wss://ris-live.ripe.net/v1/ws/) or Replay (data/ris_replay.json) |
Connects directly to RIPE RIS Live for real-time UPDATE announcements. If offline or unreachable within ~2.2 seconds (or ?mode=replay is set), automatically falls back to 60 real captured RIS Live UPDATE frames and labels the UI REPLAY · BUNDLED. |
| Cable pulse mapping | Illustrative heuristic | This is a visualisation, not a routing table. BGP UPDATE messages report logical AS paths and IP prefixes — they never expose Layer-1 optical fiber routes. Pulses map collector RRC coordinates and known regional AS hubs to nearby cable corridors purely for visual illustration. |
- Country outlines: Natural Earth
ne_110m_admin_0_countries.geojson— Public Domain per the Natural Earth Terms of Use, simplified via Douglas-Peucker (eps = 0.38°). - Live BGP feed & replay fixture: RIPE NCC RIS Live (
wss://ris-live.ripe.net/v1/ws/), free to use without an API key. - Submarine cable geometry: Generated synthetically by
earthwire(scripts/generate_data.mjs) as great-circle arcs between documented landing-station city coordinates, avoiding redistribution of commercially licensed seabed geometry such as TeleGeography's raw dataset.
Serve the directory with any static HTTP server (or open index.html directly):
python3 -m http.server 8080Then open http://localhost:8080/ in a WebGL-capable browser (or http://localhost:8080/?mode=replay to force offline replay mode).
To rebuild index.html after editing src/core.js, src/template.html, or data/*.json:
node scripts/build_html.mjs- Exact seabed bathymetric cable tracks, repeater positions, or terrestrial backhaul fiber maps.
- Real Layer-1 / Layer-3 path correlation, RPKI validation, or full-table BGP state storage.
- Third-party libraries (
three.js,d3,npmdependencies, or external CDNs).
All tests use Node's built-in node:test runner with zero external dependencies and run offline against checked-in fixtures:
test/core.test.js: Great-circle interpolation monotonicity & antimeridian shortest path,latLonToVec3/projectPointToScreen/unprojectScreenToRaySphereroundtrip and horizon occlusion, RIS Live frame & AS-path /AS_SETparsing against 60 real captured frames, GeoJSON polygon/line segment conversion & simplification, andindex.htmlself-containment checks.test/cdp_smoke.test.js: Starts a local HTTP server, launches headless Chromium with WebGL (SwiftShader), drives it over the Chrome DevTools Protocol (WebSocketfrom Node 24), waits 4 seconds after loadingindex.html, and asserts non-empty WebGL canvas pixels, populated BGP ticker entries, AS inspector & pause interactions, zero JS console errors, zero horizontal overflow, and?mode=replayfallback.
Actual run output (node --test):
✔ CDP smoke: renders WebGL globe, populates ticker, zero console errors, no overflow (6956.171357ms)
✔ great-circle interpolation preserves endpoints and distance monotonicity (2.633699ms)
✔ great-circle interpolation crosses the antimeridian along the short Pacific arc (0.310575ms)
✔ latLonToVec3 and vec3ToLatLon roundtrip across hemispheres (0.179816ms)
✔ projection maths roundtrip screen <-> sphere and occlude back hemisphere (0.804861ms)
✔ parseAsPath handles prepends, AS_SETs, and string paths (0.550571ms)
✔ parseRisFrame parses real captured RIS Live fixture frames cleanly (2.445962ms)
✔ geojsonToSegments converts polygons, skips antimeridian wraps, and simplifies rings (12.733209ms)
✔ index.html is self-contained, has no CDN links, and matches src/core.js (3.263674ms)
ℹ tests 9
ℹ suites 0
ℹ pass 9
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 7219.318033
Built by Srinikhil Chakilam. Licensed under the MIT License.
