earthjs
Version:
D3 Earth JS using SVG, Canvas & THREE js, build with some plugins.
31 lines (30 loc) • 1.27 kB
HTML
<html>
<head>
<link type="text/css" rel="stylesheet" href="../css/earthjs.css">
<script type='text/javascript' src="../js/d3.min.js"></script>
<script type='text/javascript' src='../js/three.min.js'></script>
<script type='text/javascript' src="../js/topojson.min.js"></script>
<script type='text/javascript' src='../js/earthjs.js'></script>
<style>body {background: #555;}</style>
</head>
<body>
<svg id="earth-js" class="ej-center"></svg>
<canvas id="three-js" class="ej-center"></canvas>
<script type='text/javascript' src='./flightline.js'></script>
<script>
g.register(earthjs.plugins.imageThreejs('../globe/world_texture_1.jpg'))
.register(earthjs.plugins.worldThreejs('../d/world-110m.json'))
.register(earthjs.plugins.world3dThreejs('../d/world.geometry.json','../globe/blue.jpg', 0.95))
.register(earthjs.plugins.flightLineThreejs('../data/flights2.json','../globe/point.png'));
g.flightLineThreejs.ready = function(err, csv) {
g.flightLineThreejs.data(csv, true);
}
g.ready(function(){
g.create();
const t = g.worldThreejs.sphere();
t.scale.set(1.03,1.03,1.03);
});
</script>
</body>
</html>