Skip to content

No.441 · Maps & Globes

Route Globe

A dotted globe with flight arcs from one hub: comets run each great circle and the destinations pulse as they land. Drag to spin it.

The prompt

Copy this text

Automatic copying is unavailable. Copy the selected text using your device’s copy command.

Written for the variant you picked above: Night

Build a dotted globe in Canvas 2D (no map libraries) with flight routes from one hub. Land comes from a 1° land mask of Natural Earth 1:110m countries (public domain), stored run-length encoded in a small module; sample about 30,000 points on a Fibonacci sphere (18,000 on phones) so dots are evenly spaced everywhere, and keep the ones on land (Antarctica left out). Each frame rotate the points by yaw (around the vertical axis) then tilt, and draw them in orthographic projection: dots on the far side tiny at 9% opacity, dots on the near side in four depth bands brightening toward the middle and slightly larger, plus a soft atmosphere ring outside the limb. Routes go from the hub (Muscat) to ten cities: each is a great circle (slerp) lifted off the surface by sin(πu) × (0.06 + 0.12 × angular distance), drawn as a faint 1px line (almost invisible where it passes behind the globe). A comet — a bright head with a ten-segment fading tail — runs along each route in 70% of a 3.6s cycle, each route with its own offset, and the destination dot sends out a pulse ring as it lands. The hub is a pulsing dot. Drag spins the globe (yaw and tilt, tilt clamped) with inertia that decays; after 2.5s idle it turns slowly on its own and the tilt eases back. Hovering near a destination shows a small frosted tooltip with the city and flight time. The route list is also in the DOM for screen readers. Selected variant — Night (night): Night: blue-grey land dots (#9fb4d6) on #06080d with a blue atmosphere glow, amber routes and comets (#ffb547), white hub. This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. Interaction: Drag to spin the globe with inertia; hover a destination for its flight time. Motion: Comets loop every 3.6s with staggered offsets; arrival pulses; idle spin 0.08 rad/s after 2.5s; drag inertia decays to 5% per second. Accessibility: The canvas is role="img" with a summary, and every route (with its flight time) is in a visually hidden list. Reduced motion draws one still frame with comets at their destinations; drag still turns it. Responsive behavior: The globe is 80% of the smaller side and recentres on resize; fewer land dots on phones. Touch: Drag to spin on touch (vertical swipes still scroll the page); tooltips are mouse-only, the list covers the rest. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.

Notes

Interaction
Drag to spin the globe with inertia; hover a destination for its flight time.
Motion
Comets loop every 3.6s with staggered offsets; arrival pulses; idle spin 0.08 rad/s after 2.5s; drag inertia decays to 5% per second.
Accessibility
The canvas is role="img" with a summary, and every route (with its flight time) is in a visually hidden list. Reduced motion draws one still frame with comets at their destinations; drag still turns it.
Responsive
The globe is 80% of the smaller side and recentres on resize; fewer land dots on phones.
On touch
Drag to spin on touch (vertical swipes still scroll the page); tooltips are mouse-only, the list covers the rest.