File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,25 @@ def construct(self):
6464 self.play(Restore(self.camera.frame))
6565 self.wait()
6666
67+ .. manim:: SlidingMultipleScenes
68+
69+ class SlidingMultipleScenes(MovingCameraScene):
70+ def construct(self):
71+ def create_scene(number):
72+ frame = Rectangle(width=16,height=9)
73+ circ = Circle().shift(LEFT)
74+ text = Tex(f"This is Scene {str(number)}").next_to(circ, RIGHT)
75+ frame.add(circ,text)
76+ return frame
77+
78+ group = VGroup(*(create_scene(i) for i in range(4))).arrange_in_grid(buff=4)
79+ self.add(group)
80+ self.camera.auto_zoom(group[0], animate=False)
81+ for scene in group:
82+ self.play(self.camera.auto_zoom(scene))
83+ self.wait()
84+
85+ self.play(self.camera.auto_zoom(group, margin=2))
6786"""
6887
6988from __future__ import annotations
@@ -83,8 +102,12 @@ class MovingCameraScene(Scene):
83102 This is a Scene, with special configurations and properties that
84103 make it suitable for cases where the camera must be moved around.
85104
105+ Note: Examples are included in the moving_camera_scene module
106+ documentation, see below in the 'see also' section.
107+
86108 .. SEEALSO::
87109
110+ :mod:`.moving_camera_scene`
88111 :class:`.MovingCamera`
89112 """
90113
You can’t perform that action at this time.
0 commit comments