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

Load cesium ion tileset right when available #596

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

jailln
Copy link
Contributor

@jailln jailln commented Jul 2, 2024

Load cesium ion tilesets directly after getting the url from the api instead of waiting for the next animation frame.

This is particularly useful in cases where render is triggered asynchronously (and not at each frame) in which case we ask for TilesRenderer update at init and then when load-tile-set and load-model are triggered.

@gkjohnson
Copy link
Contributor

Is there a reason you can't just call update immediately after instantiating the tiles renderer?

tiles = new CesiumIonTilesRenderer( ... );
tiles.update();

@jailln
Copy link
Contributor Author

jailln commented Jul 3, 2024

It's already what I'm doing but then I'm expecting for the tileset to load and wait for load-tile-set event to execute another tiles.update(). However load-tile-set is never raised since tiles.update() triggers the first call to the cesium ion API which gets resolved with the tileset url but doesn't load the tileset until there is a new tiles.update().

I figured that would make sense that the first call to tiles.update() loads the tileset like for other TilesRenderer.

@gkjohnson
Copy link
Contributor

Oh I see, now - thank you. I think this a fine change to make. Do you mind adding a comment describing why we need to call "update" again here?

@jailln
Copy link
Contributor Author

jailln commented Jul 3, 2024

Yes of course, it's done

@gkjohnson
Copy link
Contributor

Great, thank you!

@gkjohnson gkjohnson merged commit f7f94e7 into NASA-AMMOS:master Jul 3, 2024
2 checks passed
@gkjohnson gkjohnson added this to the v0.3.36 milestone Jul 3, 2024
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

Successfully merging this pull request may close these issues.

None yet

2 participants