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):
64
64
self.play(Restore(self.camera.frame))
65
65
self.wait()
66
66
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))
67
86
"""
68
87
69
88
from __future__ import annotations
@@ -83,8 +102,12 @@ class MovingCameraScene(Scene):
83
102
This is a Scene, with special configurations and properties that
84
103
make it suitable for cases where the camera must be moved around.
85
104
105
+ Note: Examples are included in the moving_camera_scene module
106
+ documentation, see below in the 'see also' section.
107
+
86
108
.. SEEALSO::
87
109
110
+ :mod:`.moving_camera_scene`
88
111
:class:`.MovingCamera`
89
112
"""
90
113
You can’t perform that action at this time.
0 commit comments