Hey Babylon citizens!
Hope you are all doing well!
I have this piece of code:
var animation = cameraAnimation.getAnimations()[0];
var endOfPartialAnimationEvent = new BABYLON.AnimationEvent( myDynamicValueOfTheFrame, function() {
do something
}, true);
animation.addEvent(endOfPartialAnimationEvent);
I need to delete this event from animation at some point of time. And I don't know how to do that. Problem is when I runs this code multiple times, all this events are still on my animation, but I do need only last one. So how can I delete for example all existing events on my animation?
Thanks!