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

Code before:
    """
    This is a Scene, with special configurations and properties that
    make it suitable for Three Dimensional Scenes.
    """

    def __init__(
        self,
        camera_class=ThreeDCamera,
        ambient_camera_rotation=None,
        default_angled_camera_orientation_kwargs=None,
        **kwargs,
    ):
        self.ambient_camera_rotation = ambient_camera_rotation
        if default_angled_camera_orientation_kwargs is None:
            default_angled_camera_orientation_kwargs = {
                "phi": 70 * DEGREES,
                "theta": -135 * DEGREES,
            }
        self.default_angled_camera_orientation_kwargs = (
            default_angled_camera_orientation_kwargs
        )
        super().__init__(camera_class=camera_class, **kwargs)

    def set_camera_orientation(
        self, phi=None, theta=None, distance=None, gamma=None, frame_center=None
    ):
        """
        This method sets the orientation of the camera in the scene.

        Parameters
        ----------
        phi : int or float, optional
            The polar angle i.e the angle between Z_AXIS and Camera through ORIGIN in radians.

        theta : int or float, optional
            The azimuthal angle i.e the angle that spins the camera around the Z_AXIS.

        distance : int or float, optional
            The radial distance between ORIGIN and Camera.

        gamma : int or float, optional
            The rotation of the camera about the vector from the ORIGIN to the Camera.
        """
        if phi is not None:
            self.renderer.camera.set_phi(phi)
        if theta is not None:
            self.renderer.camera.set_theta(theta)
        if distance is not None:
            self.renderer.camera.set_distance(distance)
        if gamma is not None:
            self.renderer.camera.set_gamma(gamma)

Review comment (suggestion):
**(suggestion)**: Since you've added a new a paremeter, it should have some docs explaining its purpose. Also, adding some typings (https://docs.manim.community/en/stable/contributing/typings.html)  + moving the types from the docstring to the definition would be appreciated.

Code after:
from ..utils.config_ops import merge_dicts_recursively


class ThreeDScene(Scene):
    """
    This is a Scene, with special configurations and properties that
    make it suitable for Three Dimensional Scenes.
    """

    def __init__(
        self,
        camera_class=ThreeDCamera,
        ambient_camera_rotation=None,
        default_angled_camera_orientation_kwargs=None,
        **kwargs,
    ):
        self.ambient_camera_rotation = ambient_camera_rotation
        if default_angled_camera_orientation_kwargs is None:
            default_angled_camera_orientation_kwargs = {
                "phi": 70 * DEGREES,
                "theta": -135 * DEGREES,
            }
        self.default_angled_camera_orientation_kwargs = (
            default_angled_camera_orientation_kwargs
        )
        super().__init__(camera_class=camera_class, **kwargs)

    def set_camera_orientation(
        self,
        phi: Optional[float] = None,
        theta: Optional[float] = None,
        gamma: Optional[float] = None,
        distance: Optional[float] = None,
        frame_center: Optional[Union["Mobject", Sequence[float]]] = None,
    ):
        """
        This method sets the orientation of the camera in the scene.

        Parameters
        ----------
        phi : int or float, optional
            The polar angle i.e the angle between Z_AXIS and Camera through ORIGIN in radians.

        theta : int or float, optional
            The azimuthal angle i.e the angle that spins the camera around the Z_AXIS.

        distance : int or float, optional
            The radial distance between ORIGIN and Camera.

        gamma : int or float, optional
            The rotation of the camera about the vector from the ORIGIN to the Camera.