Dot Globe, animated React component
A dotted globe with flight arcs drawing themselves along great circles. Drag to spin it and it coasts to a stop; pick a city and it springs round to face you.
- Pro
- 3D Components
- 3D
- Spring
Play with it
Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| size | number | 340 | Width and height of the globe canvas in px. |
| accent | string | "#0071e3" | Colour of the arcs, pins and the selected city chip. |
| cities | DotGlobeCity[] | DOT_GLOBE_CITIES | Cities to pin and list as chips. Each has id, name, lat and lon. |
| routes | [string, string][] | DOT_GLOBE_ROUTES | Flight arcs as pairs of city ids; pairs with an unknown id are skipped. |
| autoplay | boolean | false | Turns slowly and tours the cities until someone drags or picks one. |