Closed EliCDavis closed 3 months ago
This is an interesting use case that I was unaware of. As part of adding progressive loading functionality, I moved construction of the splat tree to a worker thread so that users could start interacting with the scene before the splat tree is built (because it can sometimes take multiple seconds to construct). Currently there's no built in way to be notified when it is ready, but it sounds like I need to add a mechanism to do that. Are you using the NPM library or building from source? If you're building from source I could show you a temporary work around (or maybe I can just make the change and push to my dev
branch).
Building from source atm, also down for just pulling from the dev branch, this is all hobby stuff for polyform.
Ok I just pushed the update to dev
, you should now be able to do something like:
viewer.addSplatScene(path)
.then(() => {
viewer.start();
viewer.splatMesh.onSplatTreeReady((splatTree) => {
console.log(splatTree);
});
});
Ayy that did the trick! thanks!
great! I'll make sure the update gets added to the next release.
In a previous version, when the splat is loaded, I accessed
guassianSplatViewer.splatMesh.splatTree.subTrees[0]
and grabbed it'ssceneMin
andsceneMax
to build an AABB.I've recently updated to the latest, and have noticed on load,
guassianSplatViewer.splatMesh.splatTree
isn't set immediately.Is there something I should subscribe to be notified when the splat tree is set? Is there a better way to get the bounds of the splat?