Hello,
i’m working with an AnimationGroup and i was wondering if there’s a way to associate an animation to more than one element, cause it seems redundant.
Probably i’m not using babylon functionalities at its fullest, cause this is the verbose result:
this.animGroupMesh.addTargetedAnimation(animColor, scene.meshes[1]);
this.animGroupMesh.addTargetedAnimation(animColor, scene.meshes[2]);
this.animGroupMesh.addTargetedAnimation(animColor, scene.meshes[3]);
this.animGroupMesh.addTargetedAnimation(animColor, scene.meshes[4]);
this.animGroupMesh.addTargetedAnimation(animColor, scene.meshes[6]);
this.animGroupMesh.addTargetedAnimation(animColor, scene.meshes[7]);
this.animGroupMesh.addTargetedAnimation(animColor, scene.meshes[8]);
this.animGroupMesh.addTargetedAnimation(animColor, scene.meshes[10]);
this.animGroupMesh.addTargetedAnimation(animColor, scene.meshes[11]);
this.animGroupMesh.addTargetedAnimation(animColor, scene.meshes[13]);
this.animGroupMesh.addTargetedAnimation(animColor, scene.meshes[14]);
this.animGroupMesh.addTargetedAnimation(animColor, scene.meshes[15]);
this.animGroupMesh.addTargetedAnimation(animColor, scene.meshes[16]);
this.animGroupMesh.addTargetedAnimation(animColor, scene.meshes[17]);
this.animGroupMesh.addTargetedAnimation(animColor, scene.meshes[18]);
this.animGroupMesh.addTargetedAnimation(animColor, scene.meshes[19]);
Do you know if there’s a way to avoid this repetition and to do something like:
this.animGroupMesh.addTargetedAnimation(animColor, [scene.meshes[1], scene.meshes[2], scene.meshes[3], scene.meshes[4]]);
?
Or to prevent this situation in any ways?
Thank you