Repository: ManimCommunity/manim
File: manim/scene/moving_camera_scene.py (Python)

Code before:
            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

__all__ = ["MovingCameraScene"]

from typing import Any

from manim.animation.animation import Animation
from manim.mobject.mobject import Mobject

from ..camera.moving_camera import MovingCamera
from ..scene.scene import Scene
from ..utils.family import extract_mobject_family_members
from ..utils.iterables import list_update


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`
    """

Review comment (suggestion):
In this file, for more compatibility with the parent class `Scene`, please change the `camera_class` parameter of `MovingCameraScene.__init__()` from `MovingCamera` to just `Camera`.

Code after:
            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

__all__ = ["MovingCameraScene"]

from typing import Any

from manim.animation.animation import Animation
from manim.mobject.mobject import Mobject

from ..camera.camera import Camera
from ..camera.moving_camera import MovingCamera
from ..scene.scene import Scene
from ..utils.family import extract_mobject_family_members
from ..utils.iterables import list_update


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`