Skip to main content
100%

Globe Rotation

✓ Published1🌍 Public
MMarco Costa
Last edited Aug 25, 2022
Created on Aug 25, 2022
Forked from World Map Rotation

This example uses a D3 orthographic projection to render a rotating globe, showing country boundaries and a semi-transparent graticule over a blue sphere. A user can drag to rotate the globe, with the rotation state updated via a custom `versorDrag` handler that leverages the `versor` library for quaternion-based rotation. Geographic data comes from the world-atlas TopoJSON files (110m and 50m resolution) loaded through `d3.json` and converted to features with `topojson.feature`. The visualization is built as a React component using SVG, with the drag interaction managed through D3’s `drag` and `geoPath` methods.

AI-generated description

Drag rotate a D3 world map with React

MIT Licensed

Similar vizzes