I’m completely new to Babylonjs. I’m looking to use it on a new project where there is a requirement to apply easing functions to each keyframe of an animation, rather than the entire animation. You may view my query relating to this on StackOverflow here
In any event it looks as though there is no easy way to accomplish this and thus I began exploring other options, one of which was to break the full animation into several sub animations, which should then, theoretically enable me to apply easing functions to each sub animation. I then attempted to combine these sub animations into a single group for playback. The trouble is this does not work as expected; the AnimationGroup appears to add an addition 0 frame key with a value of 0. This is, of course, fine for the first animation but screws up subsequent animations as they will incorrectly contain a zero frame key too! As you’ll see in the playground, I’ve tried manually removing the added 0 key, post assignment to the animation group, but it seems to be automatically re-added. Here is the playground: https://playground.babylonjs.com/#YZ26ZJ#6 Based on the animation keys the cube should move up the y axis, back down and then up again, this is not happening.
Thanks @sebavan great to be here!! BabylonJS is a very power tool and seemingly has a large and engaged community!!
I’ll look into your suggestion, is there an idiomatic way of combining multiple animations, upwards of 5 dynamically i.e. without statically defining functions and passing the resulting pointers to these functions to the scene.beginDirectAnimation function.
I did note that the beginDirectAnimation accepts an array of animations. Will these animations play in the sequence they appear in the provided array. If so this should sufficiently address the issue.
Ok @sebavan thank you very much indeed for the clarification and the link to a possible workaround. As this query now essentially falls into the realm of a feature request would you recommend that I mark the question as solved for now?