Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to tell if tile loading has finished? #13

Closed
cxcxcxcx opened this issue Aug 4, 2024 · 3 comments
Closed

How to tell if tile loading has finished? #13

cxcxcxcx opened this issue Aug 4, 2024 · 3 comments

Comments

@cxcxcxcx
Copy link

cxcxcxcx commented Aug 4, 2024

From https://www.npmjs.com/package/@jdultra/threedtiles , I see there is callback onLoadCallback after the first tile is loaded. Is there a way to tell if everything in the view has finished loading?

@ebeaufay
Copy link
Owner

ebeaufay commented Aug 4, 2024

No, but that's actually planned for the coming weeks together with an alternate strategy for loading tiles (skipping intermediate LODs).

I'll notify and close this issue when it's done.

@ebeaufay
Copy link
Owner

hi, I've already added the functionality to the "threedtiles" library, I hadn't noticed you were using "ultraglobe".
If you're interested, you can check that lib for a preview.

Nevertheless, it's coming.. so there will be a callback telling you things like how many tiles are loaded and the percentage of load.
You'll also have a choice in loading strategy for 3DTiles and google. "incremental" is as it is now while "immediate" skips all the intermediate LODs which is faster, uses less memory but holes can appear when the camera changes.

@ebeaufay
Copy link
Owner

Ok it's added in v4.4.0

details are in the doc but basically when you instantiate a OGC3DTilesLayer, you can do this:

var ogc3dTiles = new OGC3DTilesLayer({
...,
loadingStrategy: "IMMEDIATE",
updateCallback: (stats)=>console.log(stats)
});

the "stats" object will contain a few properties including percentage loaded.
"loadingStrategy" is optional and if set to "IMMEDIATE" will skip intermediate LODs and be generally lighter on memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants