Adding Multiple Animations
// Create and add rotation animation
const rotationAnimation = new BABYLON.Animation(
"rotationAnimation",
"rotation.y",
30,
BABYLON.Animation.ANIMATIONTYPE_FLOAT,
BABYLON.Animation.ANIMATIONLOOPMODE_CYCLE
);
const rotationKeys = [];
rotationKeys.push({ frame: 0, value: 0 });
rotationKeys.push({ frame: 60, value: Math.PI * 2 });
rotationAnimation.setKeys(rotationKeys);
animationGroup.addTargetedAnimation(rotationAnimation, box);