Versor Dragging
✓ Published0🌍 Public
Mmbostock
Last edited Feb 26, 2019
Created on Jan 18, 2017
This example demonstrates an orthographic globe rendered on Canvas that users can rotate by dragging with the mouse. Using a versor-based rotation technique, the globe’s orientation updates smoothly in response to drag gestures, avoiding the gimbal-lock issues of standard Euler angles. The code employs `d3.geoOrthographic` and `d3.geoPath` to project and draw the world, loading land polygons from the World Atlas TopoJSON dataset. The interaction is handled through `d3.drag`, while the custom `versor.js` library computes quaternion rotations for seamless, intuitive navigation.
AI-generated descriptionInspired by ivyywang and Jason Davies. See the Mercator version.
gpl-3.0 Licensed