vasturiano / globe.gl

UI component for Globe Data Visualization using ThreeJS/WebGL
https://vasturiano.github.io/globe.gl/example/world-population/
MIT License
1.97k stars 293 forks source link

Starts a FrameTicker when imported #171

Closed grassick closed 10 months ago

grassick commented 10 months ago

When importing the package globe.gl, it immediately starts a timer that can be seen in Chrome debugger, even without instatiating a globe. This is because of:

// Expose config from ThreeGlobe
var bindGlobe = linkKapsule('globe', ThreeGlobe);

To Reproduce

Steps to reproduce the behavior:

  1. Import globe.gl into a esbuild project
  2. Open Chrome debugger and run record in performance
  3. See calls to frame-ticker

Expected behavior

It should not be running a ticker of any kind when the globe is not instantiated

Desktop (please complete the following information):

vasturiano commented 10 months ago

Thanks for your report @grassick! I've just improved the cleanup mechanism, so you should no longer see any rafs from this module prior to instantiation. Please update to the latest version of the module.

grassick commented 10 months ago

I just installed it and confirmed that it works. Thank you for your quick fix and fabulous library! You can see the visualization I made with it at https://solstice.world