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

Examples page and load times #236

Closed
Weasy666 opened this issue Jan 6, 2022 · 8 comments
Closed

Examples page and load times #236

Weasy666 opened this issue Jan 6, 2022 · 8 comments
Labels
A-Build-System A-Examples C-Feature A new feature, making something new possible

Comments

@Weasy666
Copy link

Weasy666 commented Jan 6, 2022

About the examples on the website (or examples in general)...i think it would be a good idea to add some kind of loading animation to examples which have big assets. Especially load_gltf and update_gltf_scene need to load "big" assets and display only a grey rectangle until everything is loaded....which on the web, depending on the internet connection, can take a while. People could misunderstand that as "It's not working" and try to refresh the page or give up.

I know the example in Bevy need to be changed, but I'm opening the issue here, because i think it does not matter that much when you run the current examples locally, but it matters a lot on the web.

@mockersf
Copy link
Member

mockersf commented Jan 8, 2022

Handling this directly in Bevy would require quite a bit of code added to the examples... I wonder if it would be possible to handle that in javascript?
At least adding a message to the page about load time is an easy win

@Weasy666
Copy link
Author

Weasy666 commented Jan 8, 2022

Hm...dunno if you can use javascript to check if there are still some network requests going on. I don't think that a loading animation would be needed for every example, only the ones with big assets. I have never done that and don't know if it is possible, can you share code between examples? Looks like there is a way to share. Then we could create a loading animation example, make the systems "generic" and use them in examples with big assets.

@superdump
Copy link
Contributor

The wasm is about 13MB. Just noting that.

@rparrett
Copy link
Contributor

rparrett commented Jan 8, 2022

In some of my games I just add a loading indicator behind the canvas.

This is only half the problem with load_gltf etc, and it's arguably more confusing for a loading indicator to go away when everything's not done loading yet, but it's something.

@Weasy666
Copy link
Author

Weasy666 commented Jan 9, 2022

As a starting point, i have added a loading_screen example to Bevy (here). If you think the example is ok, i will make a PR to add it and then make a new PR in which i try to share that code/systems between examples.
Ideally, i find a way to ask the AssetServer if it finished loading/creating all its assets.

@alice-i-cecile alice-i-cecile added C-Bug A problem with the code that runs the site A-Build-System C-Feature A new feature, making something new possible and removed C-Bug A problem with the code that runs the site labels Mar 30, 2022
@alice-i-cecile
Copy link
Member

Migrating to #338 to address the remaining functionality.

@alice-i-cecile
Copy link
Member

@Weasy666 can you PR that loading_screen example to Bevy itself? Seems genuinely useful to show-off.

@Weasy666
Copy link
Author

There is already an open PR since January. You can find it here in the message timeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Build-System A-Examples C-Feature A new feature, making something new possible
Projects
None yet
Development

No branches or pull requests

5 participants