Starting chapter 2 of eola

This commit is contained in:
Grant Sanderson
2016-07-18 11:50:26 -07:00
parent 573cc73b49
commit a3a066f5a3
9 changed files with 1097 additions and 249 deletions

View File

@ -90,6 +90,7 @@ class Scene(object):
def remove(self, *mobjects):
if not all_elements_are_instances(mobjects, Mobject):
raise Exception("Removing something which is not a mobject")
mobjects = it.chain(*[m.submobject_family() for m in mobjects])
mobjects = filter(lambda m : m in self.mobjects, mobjects)
if len(mobjects) == 0:
return
@ -109,6 +110,12 @@ class Scene(object):
self.mobjects = []
return self
def get_mobjects(self):
return list(self.mobjects)
def get_mobject_copies(self):
return [m.copy() for m in self.mobjects]
def align_run_times(self, *animations, **kwargs):
if "run_time" in kwargs:
run_time = kwargs["run_time"]