huggingface / gsplat.js

JavaScript Gaussian Splatting library.
MIT License
1.26k stars 78 forks source link

feat: add progress bars for the async scene loader #16

Closed jeyemwey closed 7 months ago

jeyemwey commented 7 months ago

First off: This is an amazing project and a great resource for developing and learning gsplat. Thank you so much for sharing.

When checking out the examples, the website is empty/black at first because the async loader is loading the large .splat file in the background, but never communicates this to the user. For the bonsai, its 38MiB, so definitely a meaningful wait time.

My PR adds an extremely barebones <dialog> box with a progress bar, and every time the onProgress function of the loader is run, it will update the position.

image

I've added the code in all examples where the <canvas> element is provided by the HTML file and not by the WebGLRenderer constructor.

Hope it helps!

dylanebert commented 7 months ago

Great idea! I made a PR on your fork that adds a more dark minimalistic style, what do you think?

jeyemwey commented 7 months ago

Looks great, quite technical but good. Let me try to rebase things around so the change happens on my branch as well.

jeyemwey commented 7 months ago

Without objections, this branch can be rebased/squashed on top of main. :)