beginAnimation method

void beginAnimation(
  1. Animation animation
)

Implementation

void beginAnimation(Animation animation) {
  var currentMobjects = getMobjectsFamilies();

  animation.begin();
  var mob = animation.mobject;
  if (!currentMobjects.contains(mob)) {
    add([mob]);
    currentMobjects.addAll(mob.getFamily());
  }
}