huggingface / gsplat.js

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

Replacing PLYLoaders with file type checking in the Loaders class #58

Closed TravisThomp closed 4 months ago

TravisThomp commented 5 months ago

Doesn't really seem necessary to have two separate loaders for .splat, and .ply. The Loaders logic could just check the url file extension and perform the necessary actions for the ply data loading. It would make the user experience a little simpler. LMK if you disagree.

dylanebert commented 5 months ago

That makes sense, I can start to migrate it with a deprecation warning in the next update

mateusz-malicki commented 4 months ago

I dont think that relying on URL suffix or file name or MIME type is good idea.

  1. file name can be just some UUID/GUID string or can look like this /files(model.splat) or like this /files(model.splat)/$raw or anything else, why loader should have preferences about URL format?
  2. Same argument for case when we are loading model from file
  3. What about loading model from ReadableStream, Response, ArrayBuffer, Blob, or anything that can store/stream binary data?