A community-maintained Python framework for creating mathematical animations.
clean_up for AnimationGroup
mirefekedc0fe7589af
diff --git a/animation/simple_animations.py b/animation/simple_animations.pyindex 566cd9f7a..411520c59 100644--- a/animation/simple_animations.py+++ b/animation/simple_animations.py@@ -460,3 +460,9 @@ class AnimationGroup(Animation):def update_mobject(self, alpha):for anim in self.sub_anims:anim.update(alpha)++ def clean_up(self, surrounding_scene = None):+ if surrounding_scene is not None:+ surrounding_scene.mobjects.remove(self.everything)+ for anim in self.sub_anims:+ anim.clean_up(surrounding_scene = surrounding_scene)