Play a sequence of Animations | GLTF

Hello
i already search for this and i read a couple of answers but none of them done my require
to put you in the situation , i have a glb file of an Avatar that contains a lot of animations
what i’m looking for is a simple code or function that looks like PlayAnimations([5,88,1]) // the numbers are the animation index , and this function will play all of those animations and in the end play idle (default animation of the avatar)

thanks in advance

This example might help: three.js examples

It shows how to crossfade from one animation to another. If you want to queue up a series of many animations to play one after the other, you will need to listen for the events fired when an animation ends, these are documented in three.js docs.

Thank You so much
+do i need this function GUI() to do this? or it’s just for the example ?

That’s just to display a control panel UI in the example, yeah, it is not necessary.