chrisrzhou / react-globe

Create beautiful and interactive React + ThreeJS globe visualizations with ease.
https://react-globe.netlify.app/
MIT License
306 stars 54 forks source link

Updating GlobeTexture on runtime #50

Open birdm4n opened 3 years ago

birdm4n commented 3 years ago

Hey! I was wondering if it's in any way possible to update the globe's texture on runtime. I've been digging a bit through the source but wasn't able to do this. Whenever I change the texture in the prop or through other means, the globe disappears completely. Is there no way to do that? Or is that behavior a bug? Thanks for the help!

tgmof commented 3 years ago

At least with the black texture globe_dark he provides, it works, isn't it?

birdm4n commented 3 years ago

Not really. At least not the way I tried it. Made a small example based on on of the examples: https://codesandbox.io/s/react-globe-change-globe-texture-h1vjx

The globe completely goes away when you click the button to change the texture. And I am just using those provided textures there. How did you do it to make it work?