mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 02:35:22 +08:00
Fixed bugs in Succession and AnimationGroup, and also created purely virtual Container class from which both Scene and MObject derive (conceptually unifying their remove/add methods)
This commit is contained in:
@ -20,8 +20,9 @@ from animation import Animation
|
||||
from animation.animation import sync_animation_run_times_and_rate_funcs
|
||||
from animation.transform import MoveToTarget
|
||||
from animation.continual_animation import ContinualAnimation
|
||||
from container import *
|
||||
|
||||
class Scene(object):
|
||||
class Scene(Container):
|
||||
CONFIG = {
|
||||
"camera_class" : Camera,
|
||||
"camera_config" : {},
|
||||
@ -40,9 +41,9 @@ class Scene(object):
|
||||
"skip_to_animation_number" : None,
|
||||
}
|
||||
def __init__(self, **kwargs):
|
||||
digest_config(self, kwargs)
|
||||
Container.__init__(self, **kwargs) # Perhaps allow passing in a non-empty *mobjects parameter?
|
||||
self.camera = self.camera_class(**self.camera_config)
|
||||
self.mobjects = []
|
||||
self.mobjects = [] #TODO: fiddle with this line... to match name used in Container
|
||||
self.continual_animations = []
|
||||
self.foreground_mobjects = []
|
||||
self.num_plays = 0
|
||||
|
Reference in New Issue
Block a user