vasturiano / globe.gl

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

Transparent globe #20

Open henrikruscon opened 4 years ago

henrikruscon commented 4 years ago

How to have the globe be transparent so that you see through it? For example if you got hexpolygons, to see their backside through the globe.

Been trying at this for hours with no success.

vasturiano commented 4 years ago

@henrikdahl thanks for reaching out.

You can simply change the globe material properties (using the .globeMaterial() accessor) to your desire. For example, to make it fully transparent:

myWorld.globeMaterial().opacity = 0;

In this case you probably also want to switch off the atmosphere effect, so:

myWorld.showAtmosphere(false);

You can see all the properties of the material you can manipulate from the threeJs docs.