mirror of
https://github.com/3b1b/manim.git
synced 2025-08-29 20:42:02 +00:00
Remove MovingCameraScene
This commit is contained in:
parent
7c8162a6f7
commit
4abf93e2aa
2 changed files with 0 additions and 32 deletions
|
@ -67,7 +67,6 @@ from manimlib.once_useful_constructs.graph_theory import *
|
|||
from manimlib.once_useful_constructs.light import *
|
||||
|
||||
from manimlib.scene.graph_scene import *
|
||||
from manimlib.scene.moving_camera_scene import *
|
||||
from manimlib.scene.reconfigurable_scene import *
|
||||
from manimlib.scene.scene import *
|
||||
from manimlib.scene.sample_space_scene import *
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
from manimlib.camera.moving_camera import MovingCamera
|
||||
from manimlib.scene.scene import Scene
|
||||
from manimlib.utils.iterables import list_update
|
||||
from manimlib.utils.family_ops import extract_mobject_family_members
|
||||
|
||||
|
||||
class MovingCameraScene(Scene):
|
||||
CONFIG = {
|
||||
"camera_class": MovingCamera
|
||||
}
|
||||
|
||||
def setup(self):
|
||||
Scene.setup(self)
|
||||
assert(isinstance(self.camera, MovingCamera))
|
||||
self.camera_frame = self.camera.frame
|
||||
# Hmm, this currently relies on the fact that MovingCamera
|
||||
# willd default to a full-sized frame. Is that okay?
|
||||
return self
|
||||
|
||||
def get_moving_mobjects(self, *animations):
|
||||
moving_mobjects = Scene.get_moving_mobjects(self, *animations)
|
||||
all_moving_mobjects = extract_mobject_family_members(
|
||||
moving_mobjects
|
||||
)
|
||||
movement_indicators = self.camera.get_mobjects_indicating_movement()
|
||||
for movement_indicator in movement_indicators:
|
||||
if movement_indicator in all_moving_mobjects:
|
||||
# When one of these is moving, the camera should
|
||||
# consider all mobjects to be moving
|
||||
return list_update(self.mobjects, moving_mobjects)
|
||||
return moving_mobjects
|
Loading…
Add table
Reference in a new issue