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

Code before:

from typing import TYPE_CHECKING, Any

from ..animation.transform import ApplyMethod
from ..camera.moving_camera import MovingCamera
from ..camera.multi_camera import MultiCamera
from ..constants import *
from ..mobject.types.image_mobject import ImageMobjectFromCamera
from ..scene.moving_camera_scene import MovingCameraScene

if TYPE_CHECKING:
    from manim.typing import Point3DLike, Vector3D

# Note, any scenes from old videos using ZoomedScene will almost certainly
# break, as it was restructured.


class ZoomedScene(MovingCameraScene):
    """This is a Scene with special configurations made for when
    a particular part of the scene must be zoomed in on and displayed
    separately.
    """

    def __init__(
        self,
        camera_class: type[MultiCamera] = MultiCamera,
        zoomed_display_height: float = 3,
        zoomed_display_width: float = 3,
        zoomed_display_center: Point3DLike | None = None,
        zoomed_display_corner: Vector3D = UP + RIGHT,
        zoomed_display_corner_buff: float = DEFAULT_MOBJECT_TO_EDGE_BUFFER,
        zoomed_camera_config: dict[str, Any] = {
            "default_frame_stroke_width": 2,
            "background_opacity": 1,
        },
        zoomed_camera_image_mobject_config: dict[str, Any] = {},
        zoomed_camera_frame_starting_position: Vector3D = ORIGIN,
        zoom_factor: float = 0.15,
        image_frame_stroke_width: float = 3,
        zoom_activated: bool = False,
        **kwargs: Any,
    ) -> None:
        self.zoomed_display_height = zoomed_display_height
        self.zoomed_display_width = zoomed_display_width
        self.zoomed_display_center = zoomed_display_center
        self.zoomed_display_corner = zoomed_display_corner
        self.zoomed_display_corner_buff = zoomed_display_corner_buff
        self.zoomed_camera_config = zoomed_camera_config
        self.zoomed_camera_image_mobject_config = zoomed_camera_image_mobject_config
        self.zoomed_camera_frame_starting_position = (
            zoomed_camera_frame_starting_position

Review comment (suggestion):
Similarly here:
```suggestion
        camera_class: type[Camera] = MultiCamera,
```

Code after:

from typing import TYPE_CHECKING, Any

from ..animation.transform import ApplyMethod
from ..camera.camera import Camera
from ..camera.moving_camera import MovingCamera
from ..camera.multi_camera import MultiCamera
from ..constants import *
from ..mobject.types.image_mobject import ImageMobjectFromCamera
from ..renderer.opengl_renderer import OpenGLCamera
from ..scene.moving_camera_scene import MovingCameraScene

if TYPE_CHECKING:
    from manim.typing import Point3DLike, Vector3D

# Note, any scenes from old videos using ZoomedScene will almost certainly
# break, as it was restructured.


class ZoomedScene(MovingCameraScene):
    """This is a Scene with special configurations made for when
    a particular part of the scene must be zoomed in on and displayed
    separately.
    """

    def __init__(
        self,
        camera_class: type[Camera] = MultiCamera,
        zoomed_display_height: float = 3,
        zoomed_display_width: float = 3,
        zoomed_display_center: Point3DLike | None = None,
        zoomed_display_corner: Vector3D = UP + RIGHT,
        zoomed_display_corner_buff: float = DEFAULT_MOBJECT_TO_EDGE_BUFFER,
        zoomed_camera_config: dict[str, Any] = {
            "default_frame_stroke_width": 2,
            "background_opacity": 1,
        },
        zoomed_camera_image_mobject_config: dict[str, Any] = {},
        zoomed_camera_frame_starting_position: Point3DLike = ORIGIN,
        zoom_factor: float = 0.15,
        image_frame_stroke_width: float = 3,
        zoom_activated: bool = False,
        **kwargs: Any,
    ) -> None:
        self.zoomed_display_height = zoomed_display_height
        self.zoomed_display_width = zoomed_display_width
        self.zoomed_display_center = zoomed_display_center
        self.zoomed_display_corner = zoomed_display_corner
        self.zoomed_display_corner_buff = zoomed_display_corner_buff
        self.zoomed_camera_config = zoomed_camera_config
        self.zoomed_camera_image_mobject_config = zoomed_camera_image_mobject_config