This is a variation of van Wijk and Nuij’s Smooth and efficient zooming and panning. The origin of the projection moves along a geodesic (the shortest path on a sphere) between the two points.
You can also interact with the globe using a mouse or touch, as described in Rotate the World. The transition to a random country happens when a zoom gesture finishes.
Data: Natural Earth 1:110m Cultural Vectors