3dtiles loading indication

I’d like to know if there’s a way to be notified whenever 3dtiles are loading,
I’ve tried using scene.globe.tileLoadProgressEvent but that seems to not be related?

More specifically, I’m interested in the xhr requests to the b3dm files.

Thank you

@sam.rothstein @sarah maybe you know?

Maybe you want Cesium3dTileset#readyPromise or Cesium3dTileset#tileLoad?
See its doucment here https://cesium.com/learn/cesiumjs/ref-doc/Cesium3DTileset.html?classFilter=tileset.

correct me if I’m wrong please, but aren’t these events fire only after the tile was loaded?
i.e there’s no way to know if there are more tiles, or if they are currently being loaded.

hence there’s no way to actually know when things are loading

You can make sure with specific vision with tilesLoaded property. But if you want to know status of all tiles in tileset, I think the anwser is no.

And could you show me more about what you want? That may be helpful.

Ill try to explain:
every time I Pan/Zoom, there is heavy traffic in the network tab. i.e Cesium is requesting more and more tiles.

I want to give the user a visual feedback, so that he knows that loading isn’t done.

Hope this clarifies things

This example basicly finish what you want. Notice that I use a tiny svg icon rahter than a loading element with full screen mask. Becasue that will interupt users when tileLoad event fired and the loading element may flash sometimes due to a quick load. So I think use a tiny icon like most video games auto-saving style may be better.


Thank you very much, it’s exactly what I needed.

Ill add the relevant code here for future reference:

tileset.tileLoad.addEventListener(() => {
  loading.style.display = ''

tileset.allTilesLoaded.addEventListener(() => {
  loading.style.display = 'none'

1 Like

Hi @Nitsan_Baleli and @Gu-Miao. I am happy to see that this was resolved! :rocket: