xpenatan / gdx-teavm

Run Libgdx in a webbrowser with teavm
Apache License 2.0
107 stars 16 forks source link

Loading indicator in CSS #78

Closed noblemaster closed 1 year ago

noblemaster commented 1 year ago

This is a simple loading indicator using a CSS-spinner.

noblemaster commented 1 year ago

I put together an idea for the loading bar: https://codepen.io/noblemaster/pen/qBMORQO

noblemaster commented 1 year ago

I updated it with a progress bar. The progress bar goes to 25% when loading the app.js and then shows the correct progress till 100% when loading the assets.

Although it's just a simple progress bar at the moment, we could add configuration options for the CSS part in TeaBuildConfiguration as follows:

noblemaster commented 1 year ago

I added the libGDX logo to the loading bar.

I wasn't so sure where to add it during the build. It's now copied with the scripts, but that should probably be changed. Also, it could be made customizable, so someone could have the logo disabled or supply their own in the build configuration file.

image