Closed timothyallan closed 4 months ago
The issue is that I attach an object to the Drop in Viewer after onProgress
hits 1, but it seems like there's something else that needs to run internally after that, and my object botches it up.
If I ignore the onProgress
and just us a then()
after viewer.addSplatScene
, my object attaches fine, and the splat renders correctly all the time.
Ah, so onProgress()
will show progress for both downloading the splat scene and then for processing the scene after download. It has 3 parameters: percentComplete
(ranges from 0 to 1), percentCompleteLabel
(text version of percentComplete
) and a parameter that describes the current task. For each of those tasks the percentComplete
value ranges from 0 to 1, so you're probably trying to do something after the scene is downloaded, but before it is processed.
That'd do it! think there's multiple issues actually:
Adding my object after the train .splat was done processing fixed that issue, but the tractor .ply file was only loading portions correctly.
It would have visible seams either right down the middle, or in 4 squares, where 3 squares were not loaded properly... on a guess, I set streamView: false
on the viewer, and magically it now loads fine every time. Will have to do some more investigation it looks like. Thanks for the help.
Sorry in advance, but this is one of those "can't replicate" issues :)
I'm loading the .splat files like this:
Myself and a couple other testers have been running into this issue where the Splat isn't loaded correctly if we've already loaded it multiple times. The only way I've been able to fix it, is to open up dev tools, disable the cache and reload. This is on our staging site where the code hasn't changed in days, so it's not something related to building/compiling other javascript.
Seems to only happen in Chrome, although again that might be because it's the one I primarily use for dev/testing and the issue requires multiple re-loads of the same splat.
Currently using Release v0.4.1, although it was happening with previous versions as well.
Here's a couple before/afters in case it visually shows you anything:
Edit: It seems to be a race condition somewhere, which probably explains why it happens only on the compiled staging site, and not on the slower dev stuff.
If I throttle the network, it still loads from the cache, and the splat appears fine all the time. Changing the network throttle back to none and reloading the page give me the messed up view consistently.