Show/Hide imagery layer has the same effect as Add/Remove


As we can see in the _onLayerShownOrHidden method of GlobeSurfaceTileProvider ( ) hidden layers are treated the same way as removed layers which means that the ressources are freed.

I have a use case in my application that consists in hiding/showing layers one after the other to produce an animation.
With the current implementation each layer reloads its tiles when shown after being hidden and my animations do not appear as nice as they could be...

Is there any reason it has been coded like this in Cesium ?
Or should I proceed differently to do what I'm looking for ?

Thanks for your help!


Set the layer’s alpha property to 0 instead of hiding it. That will cause it to be loaded but not displayed.