Add a way to play an array of animation frames

The current mySprite.playAnimation(start cell, end cell, loop, delay); only allows for a start cell and end cell. I have a sprite sheet where I need to play cell 1,2,3,2 in a loop. Could you add something like
mySprite.playAnimation(array of cell indices, loop, delay); ?

let animation = new BABYLON.Animation(name, property);
let keys = [];
let indices = array_of_indices;
for (let i = 0; i < indices.length; i++) keys[i] = original_animation._keys[indices[i]];
animation.setKeys(keys);
scene.beginDirectAnimation(target, [animation]);
1 Like

Could you explain how this works?

Iā€™m just doing it myself and setting cellIndex manually.