Skip to content
Founding Lifetime: every Pro skillfirst 100 members · $169 onceUpgrade
Lookbk
Sign In
Effect guide

Globe animation: a spinning 3D globe for a website or video

A turning globe with arcs flying between cities, behind a headline or in a launch film. How a 3D globe works on a flat screen, a canvas starter you can paste and run, and the skills that build a finished globe hero or globe video.

Free skills to start. Pro is $79 a year for every skill, or $9.99 a month for 10. See pricing

What is a globe animation?

A globe animation is a sphere that turns slowly and shows places on it: a dot globe made of points, a wireframe of latitude and longitude lines, or a textured planet with real continents. Most add arcs that rise from one city and land on another, which is why it is the go-to picture for shipping, travel, payments, networks and anything global.

It works in two places. In a website hero it says “we reach the world” beside the headline. In a video it tells a story with numbers: a hub reaching its destinations, or a trip stop by stop. The hard parts are the same in both: what the land looks like, how the arcs fly and which side of the globe faces the viewer.

How the effect works

Every place on the globe is a latitude and longitude turned into a point on a sphere of radius 1: x = cos(lat) × sin(lon), y = sin(lat), z = cos(lat) × cos(lon). To spin the globe, rotate those points about the vertical axis; to tip the north pole toward you, rotate them a little about the horizontal axis. Then drop z. With an orthographic projection the screen position is just the center plus x and y times the radius, which is how a globe looks from far away.

The z you dropped still says which side a point is on. Points with z below 0 face away, so you skip them: that is back-face culling, and it halves the drawing. Arcs follow the great circle between two cities, the shortest path over a sphere, and are pushed out from the surface in the middle so they read as flights. A lifted arc can rise past the edge of the globe, so a point on it is hidden only when it is behind (z below 0) and inside the globe’s disc.

  1. 01

    Place the points

    Turn each latitude and longitude into x, y and z on a unit sphere. Dots in rings of latitude read as a globe; dots only on land read as Earth.

  2. 02

    Rotate, then project

    Spin about the vertical axis, tilt about the horizontal one, and draw x and y around the center. Keep z for depth.

  3. 03

    Cull the far side

    Skip points with z below 0, and dim the rest toward the edge so the sphere looks round.

  4. 04

    Fly arcs on great circles

    Blend the two cities’ positions along the great circle (spherical interpolation) and lift the middle, more for longer routes. Hide any arc point that is behind the globe’s disc.

HTML

A canvas dot globe with arcs in plain JavaScript

Rings of dots on a tilted sphere that sways slowly, with arcs from London to six cities along great circles, hidden where they pass behind. No land and no library: for continents, keep only the dots that fall on a land mask. Reduced motion shows one still frame with every arc drawn.

<canvas id="globe" style="position:fixed;inset:0;width:100%;height:100%;background:#060b1a"></canvas>
<script>
const canvas = document.getElementById('globe')
const g = canvas.getContext('2d')
const TILT = 0.35, SWAY = 0.12 // tilt in radians, sway speed
const still = matchMedia('(prefers-reduced-motion: reduce)').matches
let w, h, dpr
function size() {
  dpr = Math.min(devicePixelRatio, 2)
  w = canvas.width = innerWidth * dpr
  h = canvas.height = innerHeight * dpr
}
size(); addEventListener('resize', size)
const toXYZ = ([lat, lon]) => {
  const p = lat * Math.PI / 180, l = lon * Math.PI / 180
  return [Math.cos(p) * Math.sin(l), Math.sin(p), Math.cos(p) * Math.cos(l)]
}
// Dots in rings of latitude, about 3 degrees apart along each ring
const dots = []
for (let lat = -84; lat <= 84; lat += 6)
  for (let n = Math.round(120 * Math.cos(lat * Math.PI / 180)), i = 0; i < n; i++)
    dots.push(toXYZ([lat, (i / n) * 360]))
const HUB = toXYZ([51.5, -0.1]) // London, then New York, Lagos, Sao Paulo, Cairo, Moscow, Mumbai
const CITIES = [[40.7, -74], [6.5, 3.4], [-23.5, -46.6], [30, 31.2], [55.8, 37.6], [19.1, 72.9]].map(toXYZ)
// The great circle from a to b, lifted off the surface in the middle
function arc(a, b, steps = 64) {
  const d = Math.acos(a[0] * b[0] + a[1] * b[1] + a[2] * b[2]), lift = 0.04 + 0.3 * d / Math.PI
  return Array.from({ length: steps + 1 }, (_, i) => {
    const t = i / steps, k = (1 + lift * Math.sin(Math.PI * t)) / Math.sin(d)
    const s1 = Math.sin((1 - t) * d) * k, s2 = Math.sin(t * d) * k
    return [0, 1, 2].map(j => s1 * a[j] + s2 * b[j])
  })
}
const ARCS = CITIES.map(c => arc(HUB, c))
// Turn about the axis, then tip the north pole toward the viewer
function view(p, spin) {
  const x = p[0] * Math.cos(spin) + p[2] * Math.sin(spin), z = p[2] * Math.cos(spin) - p[0] * Math.sin(spin)
  return [x, p[1] * Math.cos(TILT) - z * Math.sin(TILT), p[1] * Math.sin(TILT) + z * Math.cos(TILT)]
}
const behind = q => q[2] < 0 && q[0] * q[0] + q[1] * q[1] < 1
function frame(now) {
  const t = now / 1000, spin = still ? -0.5 : -0.5 + Math.sin(t * SWAY) * 0.9
  const R = Math.min(w, h) * 0.36, cx = w / 2, cy = h / 2
  const at = q => [cx + q[0] * R, cy - q[1] * R]
  g.fillStyle = '#060b1a'; g.fillRect(0, 0, w, h)
  const halo = g.createRadialGradient(cx, cy, R * 0.98, cx, cy, R * 1.15)
  halo.addColorStop(0, 'rgba(79,141,255,0.3)'); halo.addColorStop(1, 'rgba(79,141,255,0)')
  g.fillStyle = halo; g.beginPath(); g.arc(cx, cy, R * 1.15, 0, 7); g.fill()
  g.fillStyle = '#0b1430'; g.beginPath(); g.arc(cx, cy, R, 0, 7); g.fill()
  g.fillStyle = '#9fc2ff' // dots on the far side are skipped: back-face culling
  for (const p of dots) {
    const q = view(p, spin)
    if (q[2] <= 0) continue
    const [x, y] = at(q), s = (0.6 + q[2] * 1.4) * dpr
    g.globalAlpha = 0.2 + 0.8 * q[2]; g.fillRect(x - s / 2, y - s / 2, s, s)
  }
  g.globalAlpha = 1; g.lineWidth = 1.6 * dpr; g.strokeStyle = g.fillStyle = '#ffb547'
  g.shadowColor = '#ffb547'; g.shadowBlur = 8 * dpr
  ARCS.forEach((pts, i) => {
    const ph = still ? 0.6 : (t / 4 + i / ARCS.length) % 1 // draw in, then retract
    const head = Math.round(Math.min(1, ph / 0.6) * 64), tail = Math.round(Math.max(0, (ph - 0.6) / 0.4) * 64)
    g.beginPath(); let pen = false
    for (let k = tail; k <= head; k++) {
      const q = view(pts[k], spin)
      if (behind(q)) { pen = false; continue }
      const [x, y] = at(q)
      pen ? g.lineTo(x, y) : g.moveTo(x, y); pen = true
    }
    g.stroke()
  })
  for (const c of [HUB, ...CITIES]) {
    const q = view(c, spin)
    if (q[2] > 0) { const [x, y] = at(q); g.beginPath(); g.arc(x, y, 3 * dpr, 0, 7); g.fill() }
  }
  g.shadowBlur = 0
  if (!still) requestAnimationFrame(frame)
}
requestAnimationFrame(frame)
</script>

A starting point written for this page, free to use in your own projects. The skills below build the finished version with checks, fallbacks and a recorded video.

What to get right on a real page

  1. 01

    Get the land right, and licensed

    Visitors spot a wrong coastline or a missing island fast, and some map data has terms that rule out commercial use. Natural Earth is in the public domain. Sample its land into dots once, at build time, instead of shipping a large map file to the browser, and leave out country borders unless the story needs them.

  2. 02

    Mind the point count

    A few thousand dots on a 2D canvas are fine. Tens of thousands, with labels and glow, need WebGL or a pre-rendered sphere with only the arcs drawn live. Cap the device pixel ratio at 2 and stop the loop when the globe scrolls out of view.

  3. 03

    Keep labels readable

    City names on a turning globe slide, shrink and vanish behind the edge. Show a name only while its city faces the viewer, keep it at 14 px or more, and never let it cross the headline.

  4. 04

    Stop the spin for reduced motion

    Respect prefers-reduced-motion: show one finished frame instead of the loop. A visitor who turned motion off still gets the look.

Skills that build a globe animation

The first builds a globe hero for your website; the other two render a globe video with an original soundtrack. All three draw their land from Natural Earth, which is in the public domain.

  1. Data Globe: an example of what it makes
    web
    Data GlobeClaude CodeCodexCursor+3 more agents

    Motion Heroes · Pro

    Data Globe

    Paper or brass desk globe with your routes as threads · page + embed · 1080p loop

    A desk globe, not a dark sphere of dots: a varnished paper globe on light pages or the same map cut in brass on dark ones, held in a brass meridian ring. Your own 2 to 10 routes travel over it as twisted threads along great circles, each landing with a stamp and drying into a dashed printed route. Visitors drag to turn it; otherwise it sways on a loop that it records as a 1080p MP4.

    Worth knowing: The routes are fixed in the page, not a live feed, and the live globe needs WebGL; without it a still picture shows.

    Needs: Node.js 18+, Chrome (or Chromium/Edge), and ffmpeg for the video

    See what Data Globe makes
  2. Globe Arcs Film: an example of what it makes
    video
    Globe Arcs FilmClaude CodeCodexCursor+3 more agents

    Data Stories · Pro

    Globe Arcs Film

    MP4 · 25–40 s · 1080p · with music

    The classic dot globe as a data film: arcs fly from your hub to 6 to 10 destinations along great circles, each as thick and bright as its value, and fade behind the horizon at the edge. The camera pushes in on 3 to 5 routes for big stat callouts, pulls back while the total counts up and ends on a planet-rise card with your brand. 25 to 40 seconds at 1080p, in a night or paper look.

    Worth knowing: One hub, every destination within about 7,000 km of the middle of the network, and 16:9 only.

    Needs: Node.js 22+, FFmpeg and Chrome

    See what Globe Arcs Film makes
  3. Route Map Reel: an example of what it makes
    video
    Route Map ReelClaude CodeCodexCursor+3 more agents

    Social Shorts · Pro

    Route Map Reel

    MP4 · 15–25 s · 1920×1080, 1080×1920 or 1080×1080

    A journey on a globe: a tour, a sourcing trip or a road trip with 3 to 7 stops. The camera flies from stop to stop as the route draws itself behind a plane, a van or a dot, each stop lands on the beat with a label card, and a distance and day counter ticks up. Atlas paper, night globe or flat poster, in 9:16, 16:9 or square.

    Worth knowing: Countries and coastlines, not street maps, and the whole route has to fit on one side of the globe.

    Needs: Node.js 22+, FFmpeg on the PATH and Chrome (HyperFrames downloads its own headless Chrome on first render); network access to cdn.jsdelivr.net (GSAP). The map data, map libraries and fonts ship with the package.

    See what Route Map Reel makes

Install

Build a globe animation with your agent

Each skill is a SKILL.md folder, so it installs the same way in Claude Code, Codex, Cursor and other agents. The example below uses Data Globe; each skill page has its own prompt.

1. Paste the install prompt

Your agent runs the installer. The first time, it shows a sign-in link so you can approve it in the browser.

Install the "Data Globe" skill from Lookbk (https://lookbk.dev/skills/data-globe-hero).
1. Run: curl -fsSL https://lookbk.dev/cli.js | node - add data-globe-hero
2. If it prints a sign-in link, show it to me. When I say I approved it, run the same command again.
3. When the install finishes, read the SKILL.md it installed and tell me what you need from me to make the first result.

Or run it in a terminal

curl -fsSL https://lookbk.dev/cli.js | node - add data-globe-hero

2. Start a new session

Agents load skills when a session starts. The installer writes the folder where your agent looks:

Claude Code
~/.claude/skills/data-globe-hero
Codex
~/.agents/skills/data-globe-hero
Cursor
~/.agents/skills/data-globe-hero

3. Ask for the result

Describe it in plain words, for example:

Use the data-globe-hero skill to build a hero for my translation press Lund & Okafor: a varnished paper globe facing the Atlantic with 10 threads, one per book, from the city it was written in to its translator's city, the headline "Carried across." on the globe's limb, the call to action "Browse the catalogue", and an 18 second loop video.

Another agent? Install a skill in any agent

FAQ

Questions

Still stuck? The guides cover installing, agents and licensing in more detail.

Read the guides
How do I make a 3D globe without a library?

Turn each latitude and longitude into a point on a sphere, rotate the points every frame and draw only the ones on the near side, using x and y as screen positions. A 2D canvas handles a dot globe with a few thousand points and some arcs, as the starter on this page shows. Shaded or textured globes with lighting are easier in WebGL.

How do I draw arcs between cities on a globe?

Treat both cities as points on the unit sphere and interpolate between them along the great circle, then scale each point by 1 plus a lift that peaks in the middle, higher for longer routes. Hide the parts that pass behind the globe, and animate the arc by drawing more of its points each frame.

Where do I get land shapes for a dot globe?

Natural Earth publishes land and country outlines in the public domain at several scales. Sample the land at a fixed spacing once, keep the points that fall on land and ship that list of points instead of the map file. Check the terms of any other map data before you use it commercially.

Should the globe spin all the way round?

Not always. A full spin hides your routes half the time. A slow sway around the side that holds the story keeps the arcs in view: Data Globe Hero sways a few degrees around the longitude you set, and Globe Arcs Film picks a view with every route on the near side.

Can I get the globe animation as a video?

Yes. Globe Arcs Film and Route Map Reel render an MP4 with an original soundtrack, and Data Globe Hero records a seamless 1080p loop of the live hero for posts and places where scripts are not allowed.