Repository: ManimCommunity/manim
File: manim/mobject/opengl_mobject.py (Python)

Code before:
    Attributes
    ----------
    submobjects : List[:class:`OpenGLMobject`]
        The contained objects.
    points : :class:`numpy.ndarray`
        The points of the objects.

        .. seealso::

            :class:`~.OpenGLVMobject`

    """

    shader_dtype = [
        ("point", np.float32, (3,)),
    ]
    shader_folder = ""

    # _Data and _Uniforms are set as class variables to tell manim how to handle setting/getting these attributes later.
    points = _Data()
    bounding_box = _Data()
    rgbas = _Data()

    is_fixed_in_frame = _Uniforms()
    is_fixed_orientation = _Uniforms()
    mob_center = _Uniforms()  # for fixed orientation reference
    gloss = _Uniforms()
    shadow = _Uniforms()

    def __init__(
        self,
        color=WHITE,
        opacity=1,
        dim=3,  # TODO, get rid of this
        # Lighting parameters
        # Positive gloss up to 1 makes it reflect the light.
        gloss=0.0,
        # Positive shadow up to 1 makes a side opposite the light darker
        shadow=0.0,
        # For shaders
        render_primitive=moderngl.TRIANGLES,
        texture_paths=None,
        depth_test=False,
        # If true, the mobject will not get rotated according to camera position
        is_fixed_in_frame=False,
        is_fixed_orientation=False,
        # Must match in attributes of vert shader
        # Event listener
        listen_to_events=False,
        model_matrix=None,
        should_render=True,

Review comment (suggestion):
I think for the sake of clarity it would make sense to rename `mob_center` to something more explicit like `fixed_mobject_center` or `fixed_center`.

Code after:
    Attributes
    ----------
    submobjects : List[:class:`OpenGLMobject`]
        The contained objects.
    points : :class:`numpy.ndarray`
        The points of the objects.

        .. seealso::

            :class:`~.OpenGLVMobject`

    """

    shader_dtype = [
        ("point", np.float32, (3,)),
    ]
    shader_folder = ""

    # _Data and _Uniforms are set as class variables to tell manim how to handle setting/getting these attributes later.
    points = _Data()
    bounding_box = _Data()
    rgbas = _Data()

    is_fixed_in_frame = _Uniforms()
    is_fixed_orientation = _Uniforms()
    fixed_orientation_center = _Uniforms()  # for fixed orientation reference
    gloss = _Uniforms()
    shadow = _Uniforms()

    def __init__(
        self,
        color=WHITE,
        opacity=1,
        dim=3,  # TODO, get rid of this
        # Lighting parameters
        # Positive gloss up to 1 makes it reflect the light.
        gloss=0.0,
        # Positive shadow up to 1 makes a side opposite the light darker
        shadow=0.0,
        # For shaders
        render_primitive=moderngl.TRIANGLES,
        texture_paths=None,
        depth_test=False,
        # If true, the mobject will not get rotated according to camera position
        is_fixed_in_frame=False,
        is_fixed_orientation=False,
        # Must match in attributes of vert shader
        # Event listener
        listen_to_events=False,
        model_matrix=None,
        should_render=True,