Closed jvandereijk closed 1 week ago
Ah, I didn't even think about setting opacity and/or visibility of splat scenes as part of the addSplatScenes()
function, I'll definitely make sure to add that capability in the next release. In the mean time, I think you could just set the opacity to 0 right before calling viewer.start()
:
.then(() => {
viewer.getSplatScene(<scene index>).opacity = 0.0;
viewer.start();
});
You probably already know this, but you will also need to enable changing the opacity by passing a value of true
for the enableOptionalEffects
parameter for Viewer
.
Thanks! setting the opacity in the callback actually seems to work just fine !
And yes, I did find the enableOptionalEffects flag. I could not see any performance degradation visually yet (even on a 4 year old iphone). So far it works great :)
Glad it worked for you!
Hi Mark,
Thanks for adding the opacity property to the splats, it opens a lot of new possibilities. However, I ran in to the issue that all splats are visible at start when loading with addSplatScenes. In some scenarios I would like to start with most splats hidden, and let splats appear on demand afterwards.
I tried adding the opacity property to the splat array properties like this:
But that seems to be ignored. Do you know of another way to allow with opacity:0 ? or could you perhaps add this property to the addSplatScenes method as in the example above ?