UNPKG

earthjs

Version:

D3 Earth JS using SVG, Canvas & THREE js, build with some plugins.

23 lines (22 loc) 786 B
<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/topojson.min.js"></script> <script type='text/javascript' src='../js/earthjs.js'></script> </head> <body> <svg id="earth-js"/> <script> const {offsetWidth, offsetHeight} = d3.select('body').node(); const g = earthjs({width: offsetWidth, height: offsetHeight, padding:5}) .register(earthjs.plugins.mousePlugin()) .register(earthjs.plugins.worldSvg('../d/world-hi.json')); g._.options.showCountries = true; g._.options.showLakes = false; g.ready(function(){ g.create(); }) </script> </body> </html>