scene.apply method, which required switching order or ApplyFunction arguments

This commit is contained in:
Grant Sanderson
2015-10-05 17:45:13 -07:00
parent 441c8969ef
commit c99a1dfd6a
2 changed files with 10 additions and 11 deletions

View File

@ -154,6 +154,12 @@ class Scene(object):
animation.clean_up()
return self
def apply(self, AnimationClass, *args, **kwargs):
self.play(*[
AnimationClass(mobject, *args, **kwargs)
for mobject in self.mobjects
])
def get_frame(self):
return disp.paint_mobject(
CompoundMobject(*self.mobjects), self.background