From Hong Kong to Brussels
✓ Published0🌍 Public
LLuisSevillano
Last edited Dec 4, 2017
Created on Dec 4, 2017
An animated globe highlights the journey from Hong Kong to Belgium, tracing a flight path between the two countries. It uses D3.js v4 and topojson to render land masses, graticule grids, and political borders on a canvas. The animation rotates the globe to a custom viewpoint and then simulates the plane’s travel along a great-circle arc, after which users can drag to spin the view, using `d3.geoOrthographic`, `d3.geoPath`, and a custom great-arc interpolator.
AI-generated descriptionForked from Wendy Mak's block in reference to this tweet.
Sample code to make an animated globe with d3 on canvas. Borrowing heavily from http://bl.ocks.org/mbostock/4183330
The plane flies from startCountry to endCountry, and you can rotate the globe around once the animation is done