mkkellogg / GaussianSplats3D

Three.js-based implementation of 3D Gaussian splatting
MIT License
1.53k stars 198 forks source link

Add the possibility to load a scene from file #340

Open d0rianb opened 2 months ago

d0rianb commented 2 months ago

For now, the viewer can handle URL which can be downloaded from with the fetch API. I wanted to add the possibility to load a scene directly from a file, to handle drag & drop for instance.

Some features are still missing, like the progressive loading, or multiple files loading. I plan on integrate these soon.

Moreover, I struggled a bit on the 'abortable' promise that is returned by downloadAndBuildSingleSplatSceneStandardLoad. I couldn't manage to get the differences between the two following lines :

const downloadPromise = this.downloadSplatSceneToSplatBuffer(path, splatAlphaRemovalThreshold, onProgress, false, undefined, format);
const downloadAndBuildPromise = abortablePromiseWithExtractedComponents(downloadPromise.abortHandler);