So we would like to test out sound attenuation over time with the potential of other change profiles in the future.
From the bit that I’ve looked at the code and API, it seemed like it wasn’t present in the Animatable class, and so the answer is probably no, but I figured I would check before I build our own system.
Would something like
var soundAnimation = new BABYLON.Animation(“background sounds attenuation”, “_volume”, animFrameRate, BABYLON.Animation.ANIMATIONTYPE_FLOAT, BABYLON.Animation.ANIMATIONLOOPMODE_CONSTANT, false);
scene.beginDirectAnimation(backgroundSound, [soundAnimation], 0, 1*animFrameRate, false, 1, nextAnimation);
Or perhaps something else that would allow altering the volume of a sound over time?
If not I’ll just use setInterval and update it that way