I recently updated Babylonjs from version 7.2 to 8.33 and everything worked fine until I made a production build. Then my animations seems to have stopped working, but there are no errors at neither build nor runtime.
I suspected (and still do to some extent) that it had to do with tree shaking, but I have tried anything I can come up with efter reading the docs on ES6 support. I’m not sure I did everything right though.
But since the dev version works and the build version does not I don’t know what else it could be? And it feels rather pointless to do a playground considering that it would most likely work there.
I both have an animated texture triggered with Animation.CreateAndStartAnimation(“u”, mesh.material.bumpTexture, “uOffset”, 30, 300, 0, 1, 1)
And some camera animations triggered with this.scene.beginAnimation(camera,0,60,false,1.0,callbackDone?callbackDone:null)
ANd looking in inspector it looks fine, the animations are attached to the camera and I can open the animation graph and move the slider, which will change the properties as expected. But pressing play does nothing. Not even a warning or error message.
I also tried to disable any tree shaking, but still had the same result.
I am running in a react project created with vite.
If anyone has any suggestions on what to try next, I would be grateful for any help.