Create new animation by chaining exported animation ranges

Hi ! I’m not sure if this should be in feature request or not. I’m trying to make a character animate by doing a series of sidesteps and about-turns but I don’t want to export a long animation so as to keep filesize small. I was wondering if I could just export a sidestep + about-turn and then create a new animation tagged to said mesh where I can control the number of sidesteps/about-turns via code.

To assist prototyping, I made a cube that has 2 animation ranges: forward and left. I’m trying to get the cube move forward, then left. If I can do that, then I could programmatically control how many forwards or left in the final animation.

Link: Babylon.js Playground

As you can see in the above PG, erm, not successful…I’m wondering if what I’m doing is supported or am I going about it the wrong way ? Any help appreciated, thanks in advance.

Also, could I chain animations the same way as es6 promise chaining? Not a coder by trade, so just curious and wondering if any examples exists?

Adding @Evgeni_Popov who is amazing with animations (and all the rest actually :-))

I’m going to close this, no need for devs to spend more attention on. For anyone who cares/stumbles upon the same line of thought, my short story: after about half a day of coding/testing, I found that the computation of bone matrices for chaining animations is non-trivial. You’ll get into serious issues about affine transformations per bone per skeleton per frame which consume more time/cpu cycles than simply comboing animations in, say, Blender’s NLA and then exporting it.

Yes, live with a larger filesize, keep the number of combos low and avoid long chain combos (at least as current 3D web development goes). Hope it helps.