Design.dev design.dev
3D · Component Template

Dotted Globe

A luminous dotted Earth with shipping routes arcing over it, city lights on the night side, and a live feed that flashes each departure. Drag it, throw it, or send it to a port.

Live demo

Output of this prompt · Claude Fable 5.2 · WebGL

Drag to spin the globe, or pick a port to fly there.

The Prompt 1,077 words

Build a hero for Portside, a freight-tracking API, around a large luminous globe rendered in raw WebGL: continents made of evenly spaced dots, a blue atmosphere glowing at the limb, cities lit amber on the night side, shipping routes arcing above the surface with pulses of light traveling along them, and a live feed whose every new departure flashes its route on the globe. It turns slowly, can be thrown by hand and flies to any port on request. It should pass for a 3D engine. Match my project's existing stack, conventions, and design tokens. If there are none, output a single HTML file with inline CSS and JavaScript and zero dependencies. No Three.js, no map library, no fetched geography, no images.

LOOK
- Page #03050A, text #EEF3FF, secondary text at 61%. Two lights only: sea blue #6EA8FF for glows and warm #FFB45E for anything live (pulses, city lights, the feed).
- ui-sans-serif, system-ui. Headline clamp(40px, 5.2vw, 88px), weight 640, line-height 0.94, letter-spacing -0.048em.
- The globe is large and deliberately cropped: radius min(54% of the height, 34% of the width), centered at 81.5% across and half way down, so its right side runs off the screen. On screens under 860px it sits below the copy with only its top third showing.
- Glass for the nav pill and the feed: a dark blue tint, backdrop blur 22px, a 1px cool edge.

CONTENT
- Top: wordmark "Portside" with a ring mark; a glass pill holding Coverage, API docs, Pricing and a solid pill "Start tracking".
- Left, vertically centered, max 600px: h1 "Know where your freight is, not where it was." Two pills, "Start tracking free" and "Read the docs". Three stats: Containers at sea 12,410 (it climbs), On time this week 91.4%, Median delay 1.8 days.
- Bottom left: a glass "Live" card, three rows, newest on top: "Durban to Santos / Orrin Star has sailed. 20 days to arrival." with the days in warm.
- Bottom right: a row of port buttons (Shanghai, Singapore, Rotterdam, Los Angeles, New York, Santos, Durban, Jebel Ali, Sydney).
- Small glass labels pinned to the eight main ports on the sphere, repositioned by script each frame and faded out as they pass behind it.

GEOGRAPHY
- Write the coastlines by hand as about 35 polygons of "lon,lat" pairs (continents, large islands, Antarctica; cut out the Caspian). Fill them white on black on a 1024 by 512 canvas in plate carree projection and upload it once as a texture. That is the only data.
- 16 ports with latitude and longitude, 18 routes between them.

THE SPHERE (one fragment shader on a fullscreen triangle)
- For each pixel inside the disc: z = sqrt(1 - r²), rotate the point back by the transpose of the view matrix to get its latitude and longitude on the turning Earth.
- Dot lattice: rows of latitude one step apart (step = clamp(10px / radius, 0.021, 0.04) radians). Each row holds floor(2 pi cos(lat) / step) dots, so spacing stays even to the poles. Find the nearest dot center, sample the land texture there, and draw a disc of radius 0.33 step with a soft edge if it is land.
- Light from the upper left. day = smoothstep(-0.3, 0.42, n . L). Sea goes from near black to deep blue with one soft specular highlight. Land dots are pale blue-white by day and dim by night.
- City lights: on the night side, dots whose hash exceeds 0.58 glow amber and flicker slowly.
- A graticule every 30 degrees at 5%. A Fresnel term (1 - z)³ adds blue toward the limb.
- Outside the disc: a halo, exp(-12h) plus a wider exp(-2.6h), brighter on the lit side. Behind everything, sparse hashed stars that twinkle.

ROUTES (ribbons)
- Each route is a triangle strip of 72 segments. Vertices carry both endpoints and a parameter t, and the vertex shader places them itself: spherical interpolation between the ports, lifted off the surface by (0.05 + 0.09 x arc angle) x sin(pi t). Offset each side perpendicular to the on-screen direction of travel to make a ribbon about 5px wide.
- Fragment: discard anything behind the globe (z < 0 and inside the disc); dim what shows beyond the limb to 30%. A cool faint line, plus two warm pulses per route traveling at slightly different speeds, each a narrow Gaussian in t. Additive blending.
- One route at a time can be "hot": it widens and a much brighter pulse runs its length once.

PORTS (points)
- A dot with a ring that expands and fades on a loop, larger for the eight labeled ports, hidden on the far side. The selected port turns warm and grows.

MOTION
- Opening, over 3 seconds: the continents switch on in a sweep around the globe (each dot delayed by its longitude plus a little noise), the halo fades up, routes draw themselves on one after another, then labels appear. The headline rises word by word out of clipping boxes; the rest sharpens from a blur on a CSS spring.
- Idle: 0.05 rad/s rotation. Drag inside the disc to turn it (cursor grab); release throws it, and it coasts down to the idle speed. Arrow keys nudge it.
- Port buttons ease yaw and pitch so that port faces the viewer.
- Every 3.6 seconds a departure is announced: a new row grows open at the top of the feed (grid-template-rows 0fr to 1fr on a spring), the oldest leaves, the counter climbs and that route goes hot.

ACCESSIBILITY
- The canvas and labels are aria-hidden. Everything they show is also in the DOM: the feed is a labeled list and the port buttons are real buttons with aria-pressed.
- Dragging uses pointer capture; touch-action: pan-y keeps the page scrollable on phones.
- prefers-reduced-motion: no opening, no rotation, pulses or flicker; the globe is drawn once and redrawn only while it is being dragged or sent to a port; the feed stays as it loaded.
- Without WebGL, a radial gradient stands in for the globe and all content remains.

NEVER
- No Three.js, D3, topojson or tile maps. No texture files.
- No wireframe sphere, hex grid or network of connected nodes.
- No red or green status colors; warm amber is the only live color.
- No auto-rotation fast enough to notice at a glance.
- No labels that follow ports behind the planet.
  1. CopyThe full prompt, one click.
  2. PasteInto Cursor, Claude Code, or any agent.
  3. CompareAgainst the live demo above.
Dotted Globe
Copied to clipboard