WIP Interactive globe from Nico's sources

- The globe is a bit small? Ability to control the max-min size potentially
- Is there a reason why `globe.update()` runs every second? Sounds like a lot of resources?
- Have the ability to control the `addEventListener` of the markers to do whatever (in this case, going to a route by clicking on a link with a sapper-noscroll attribute + changing the href attribute on click - the method `goto` from Sapper scrolls back to top / maybe something to fix with the current transition issues?)
- Edited in `./index.js`:
    1. Using the class as `export default WebglGlobe` instead of Window (as Svelte or Sapper doesn't likayt)
- Edited in `Camera.js`:
    1. Commented line 218: `e.preventDefault();` would cause this error: `[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See <URL>`
This commit is contained in:
2020-04-02 20:55:20 +02:00
parent 730eb75457
commit 2064885997
73 changed files with 15339 additions and 137 deletions

BIN
static/img/globe/map-4k.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

View File

@@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="19" height="18" viewBox="0 0 19 18">
<path fill="#FFF" fill-rule="evenodd" d="M11.7513577,4 C16.0254733,4 19.5027154,7.47729421 19.5027154,11.751474 C19.5027154,13.5971916 18.8532809,15.2935776 17.7720604,16.6264908 L17.7720604,16.6264908 L21.7626391,20.6171295 C22.0791203,20.9333453 22.0791203,21.4464197 21.7626391,21.7626356 C21.6043986,21.9208785 21.3972816,22 21.1898947,22 C20.9827778,22 20.7753908,21.9208785 20.6171502,21.7626356 L20.6171502,21.7626356 L16.6265715,17.7719969 C15.2936782,18.8532337 13.5973177,19.5029479 11.7513577,19.5029479 C7.47724204,19.5029479 4,16.0256537 4,11.751474 C4,7.47729421 7.47724204,4 11.7513577,4 Z M11.7513577,5.62023493 C8.3707882,5.62023493 5.62021063,8.37058373 5.62021063,11.751474 C5.62021063,15.1323642 8.3707882,17.882713 11.7513577,17.882713 C15.1321972,17.882713 17.8825047,15.1323642 17.8825047,11.751474 C17.8825047,8.37058373 15.1321972,5.62023493 11.7513577,5.62023493 Z M14.1318521,10.9413565 C14.5793003,10.9413565 14.9419575,11.3040191 14.9419575,11.751474 C14.9419575,12.1989288 14.5793003,12.5615914 14.1318521,12.5615914 L14.1318521,12.5615914 L9.37086321,12.5615914 C8.92341504,12.5615914 8.5607579,12.1989288 8.5607579,11.751474 C8.5607579,11.3040191 8.92341504,10.9413565 9.37086321,10.9413565 L9.37086321,10.9413565 Z" transform="translate(-3.394 -4)"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB