Synchronization of d3 and tree.js globes with quaternion/versor drag.
An answer to https://github.com/d3/d3-geo/issues/74
This version moves the camera to the right place, and rotates it towards the center. Alas, we have set only 5 of its 6 degrees of freedom (camera.position.x,y,z
; camera.rotation.x,y
); but you still have to figure out its roll rotation.z
(set camera.rotation.z = 2*Math.PI*Math.random()
for some fun).
Forked from mbostock's block: Versor Dragging
forked from Fil's block: Versor Dragging - d3 & three.js running in sync
https://d3js.org/d3.v4.min.js
https://unpkg.com/topojson-client@2
https://cdnjs.cloudflare.com/ajax/libs/three.js/r83/three.min.js