Skip to content

Commit

Permalink
Merge branch 'main' into 3948-update-documentation-for-Sphere
Browse files Browse the repository at this point in the history
  • Loading branch information
TahitiX authored Oct 26, 2024
2 parents 8552af9 + a395ffd commit 1afca16
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions manim/scene/moving_camera_scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,25 @@ def construct(self):
self.play(Restore(self.camera.frame))
self.wait()
.. manim:: SlidingMultipleScenes
class SlidingMultipleScenes(MovingCameraScene):
def construct(self):
def create_scene(number):
frame = Rectangle(width=16,height=9)
circ = Circle().shift(LEFT)
text = Tex(f"This is Scene {str(number)}").next_to(circ, RIGHT)
frame.add(circ,text)
return frame
group = VGroup(*(create_scene(i) for i in range(4))).arrange_in_grid(buff=4)
self.add(group)
self.camera.auto_zoom(group[0], animate=False)
for scene in group:
self.play(self.camera.auto_zoom(scene))
self.wait()
self.play(self.camera.auto_zoom(group, margin=2))
"""

from __future__ import annotations
Expand All @@ -83,8 +102,12 @@ class MovingCameraScene(Scene):
This is a Scene, with special configurations and properties that
make it suitable for cases where the camera must be moved around.
Note: Examples are included in the moving_camera_scene module
documentation, see below in the 'see also' section.
.. SEEALSO::
:mod:`.moving_camera_scene`
:class:`.MovingCamera`
"""

Expand Down
2 changes: 1 addition & 1 deletion manim/utils/ipython_magic.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def construct(self):

file_type = mimetypes.guess_type(config["output_file"])[0]
embed = config["media_embed"]
if embed is None:
if not embed:
# videos need to be embedded when running in google colab.
# do this automatically in case config.media_embed has not been
# set explicitly.
Expand Down

0 comments on commit 1afca16

Please sign in to comment.