I have been experimenting with mapping arcs around a three.js globe, following some examples. I am close to getting it to work but I am struggling with the calculations and the resulting projection appears to be incorrect. If anyone could review my code and point out where I might be going wrong, that would be really helpful. Thank you.
import oHoverable from 'o-hoverable';
import d3 from 'd3';
import oHeader from 'o-header';
import THREE from 'three.js';
// var OrbitControls = require('three-orbit-controls')(THREE);
// console.log("orbitControls=",OrbitControls);
oHoverable.init(); // makes hover effects work on touch devices
document.addEventListener('DOMContentLoaded', function () {
oHoverable.init(); // makes hover effects work on touch devices
var dataset = spreadsheet.data;
console.log(dataset);
...
The data sample being used is as follows and is loaded elsewhere: ftlabel,imfcode,lat,lng Afghanistan,512,33,66 Albania,914,41,20 Algeria,612,28,3 Angola,614,-12.5,18.5 Argentina,213,-34,-64 Armenia,911,40,45 Aruba,314,12.5,-69.97 Australia,193,-25,135 Austria,122,47.33,13.33 Azerbaijan,912,40.5,47.5 Bahamas,313,24,-76 Bahrain,419,26,50.5 Bangladesh,513,24,90 Barbados,316,13.17,-59.53 Belarus,913,53,28 Belgium,124,50.83,4 Belize,339,17.25,-88.75 Benin,638,9.5,2.25 Bermuda,319,32.33,-64.75 Bolivia,218,-17,-65 Bosnia and Herzegovina,963,44.25,17.83 Brazil,223,-10,-55 Brunei,516,4.5,114.67 Bulgaria,918,43,25 Burkina Faso,748,13,-2 ... Cote d'Ivoire,662,8,-5 Croatia,960,45.17,15.5 Cuba,928,22,-79.5