Fix Globe appearing when changing page?!

Apparently the globe was running too early and would not show up from a page to another
Waiting for the page transition is helping
Thanks Baptiste!
This commit is contained in:
2022-07-10 12:51:19 +02:00
parent 895b30e527
commit 18c2b1b16d
3 changed files with 33 additions and 16 deletions

View File

@@ -81,6 +81,7 @@ class WebglGlobe {
// we put the canvas at the end of body tag as 'position:fixed'
// this is to avoid having a too big canvas if the globe needs to be very large:
// so instead we move the globe as we scroll
this.renderer.canvas.classList.add('globe-canvas')
this.renderer.canvas.style.position = 'fixed'
this.renderer.canvas.style.top = 0
this.renderer.canvas.style.left = 0