# Globe

A desk globe on a meridian. A satin-metal ball with the land etched into it, held in a machined half-meridian on a turned stand. It spins with inertia, and markers are small domed lamps that glow, light the metal around them and go behind the limb.

Object · With a Pass · https://tactileui.dev/objects/globe

> The code and styling for this object come with the Pass. Sign in if you have one. Sign in: https://tactileui.dev/auth/sign-in The price: https://tactileui.dev/pricing

## Anatomy

Analytic sphere shader, Land mask mip sampling, Engraved coast bevel, Bead lattice, Axle friction inertia, Resisted axle give, Short way seek, Domed lamp markers, Ray cast stand, Unrolled meridian scale, Sleeping loop

## Usage notes

Places and their state, where the picture should be a thing you can hold: an infrastructure map of regions and their health, a fleet or an edge network, a status board of sites, energy and IoT assets by country, an incident view that turns to the region that went red.

## Options

| Option | Type | Description |
| - | - | - |
| markers | text | One lamp each, separated by \|. A label, latitude, longitude, then ok, degraded, down, neutral or off, and a note after a colon. |
| lon | number | The meridian that faces you at the start. Drag the ball in the preview to turn it. |
| land | enum | Dotted: raised beads set in rows, fewer toward the poles, like a lamp array. Engraved: etched into the metal with a bevelled coast. |
| finish | enum | Auto follows the page: aluminium on Aluminium, Porcelain and Daylight, graphite on AMOLED, and on Graphite, Black, Phosphor, Night, Paper and E-paper a globe drawn from that finish’s own tokens (its land lit on Phosphor and Night). The sea is satin and the land frosted in all. |
| tilt | number |  |
| graticule | boolean |  |
| drift | boolean | A slow idle turn that pauses on hover, on focus and while a marker is selected. Off by default; never under reduced motion. |
| light | number | 0 is from above, clockwise. The terminator, the highlight, the desk shadow and every lamp’s glow follow it. |
| size | number | 0 fills its frame; any other value is the ball’s diameter, shrunk only to fit. |
| sound | boolean | A soft bearing hum while it turns and a knock when a lamp is selected. Synthesised, off by default, and only once you have touched the page; never under reduced motion. |
| label | text | Accessible name |

## Methods

- lon
- centre
- state
- renderer
- markers
- selectedId
- focus
- focusMarker
- spin
- select
- deselect
- setState
- update
- toDataURL
- destroy

## States

1. **At rest**: Nothing moves and no frame is requested; the terminator, the highlight and every lamp are still.
2. **Dragging**: The surface under the pointer follows it along its parallel. A vertical drag does not turn it: the ball gives a few degrees on its axle.
3. **Coasting**: After a flick it keeps turning against viscous and dry friction, slows and stops; the loop then sleeps.
4. **Meridian resists**: 
5. **Turning to a place**: focus() and focusMarker() turn it the short way round with a spring that starts quickly and arrives slowly.
6. **Keyboard**: 
7. **Selected**: A small engraved plate with the label and state sits beside the lamp (on the left if it would run out of the box) and select fires.
8. **Lamps**: Green, amber, red or white domes set into the surface; each lights the metal around it, dims and foreshortens toward the limb and is gone behind it, its button hidden.
9. **State change**: A lamp fades to its new colour; setState turns one red.
10. **Engraved**: The land is a shallow frosted recess with a bevelled coast.
11. **Dotted**: The land is raised beads on rows of equal spacing, fewer toward the poles.
12. **Aluminium**: A bead-blasted aluminium ring and stand and a light satin ball.
13. **Graphite**: A graphite ring and stand and a dark satin ball with the land frosted lighter.
14. **Drift**: Optional: a slow idle turn that pauses on hover, on focus and while a marker is selected.
15. **Sound**: Optional: a soft bearing hum while it turns and a knock when a lamp is selected. Off by default and only after the page has been touched.
16. **Off screen or hidden**: The loop pauses and nothing runs.
17. **Reduced motion**: No inertia and no springs; focus() jumps; no drift; no sound.

## How it works

Original. One fragment shader draws the ball, the stand and the desk; the land is a mask rasterised once from baked Natural Earth polygons; the markers are DOM buttons positioned from the same rotation the shader uses.
