mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 11:03:03 +08:00
Starting chapter 2 of eola
This commit is contained in:
@ -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"]
|
||||
|
Reference in New Issue
Block a user