change Scene.apply to take in mob_to_anim function instead of Animation class

This commit is contained in:
Grant Sanderson
2015-10-06 15:35:34 -07:00
parent 5d3a109140
commit c95f31385e
2 changed files with 6 additions and 6 deletions

View File

@ -163,9 +163,9 @@ class Scene(object):
animation.clean_up()
return self
def apply(self, AnimationClass, *args, **kwargs):
def apply(self, mob_to_anim_func, **kwargs):
self.play(*[
AnimationClass(mobject, *args, **kwargs)
mob_to_anim_func(mobject)
for mobject in self.mobjects
])