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

Code before:
        """
        if family:
            for submob in self.get_family():
                submob.sheen_direction = rotate_vector(
                    submob.sheen_direction, angle, axis
                )
        else:
            self.sheen_direction = rotate_vector(self.sheen_direction, angle, axis)
        return self

    def set_sheen(self, factor, direction: np.ndarray = None, family=True):
        """Applies a color gradient from a direction.

        Parameters
        ----------
        factor : :class:`float`
            The extent of lustre/gradient to apply. If negative, the gradient
            starts from black, if positive the gradient starts from white and
            changes to the current color.
        direction : :class:`numpy.ndarray`, optional
            Direction from where the gradient is applied.

        Examples
        --------
        .. manim:: SetSheen
            :save_last_frame:
            class SetSheen(Scene):
                def construct(self):
                    circle = Circle(fill_opacity=1).set_sheen(-0.3, DR)
                    self.add(circle)
        """

        if family:
            for submob in self.submobjects:
                submob.set_sheen(factor, direction, family)
        self.sheen_factor = factor
        if direction is not None:
            # family set to false because recursion will
            # already be handled above
            self.set_sheen_direction(direction, family=False)
        # Reset color to put sheen_factor into effect
        if factor != 0:
            self.set_stroke(self.get_stroke_color(), family=family)
            self.set_fill(self.get_fill_color(), family=family)
        return self

    def get_sheen_direction(self):
        return np.array(self.sheen_direction)

    def get_sheen_factor(self):
        return self.sheen_factor

Review comment (suggestion):
The example currently doesn't render correctly due to a missing newline before the code block.

```suggestion
            :save_last_frame:

```

Code after:
        """
        if family:
            for submob in self.get_family():
                submob.sheen_direction = rotate_vector(
                    submob.sheen_direction, angle, axis
                )
        else:
            self.sheen_direction = rotate_vector(self.sheen_direction, angle, axis)
        return self

    def set_sheen(self, factor, direction: np.ndarray = None, family=True):
        """Applies a color gradient from a direction.

        Parameters
        ----------
        factor : :class:`float`
            The extent of lustre/gradient to apply. If negative, the gradient
            starts from black, if positive the gradient starts from white and
            changes to the current color.
        direction : :class:`numpy.ndarray`, optional
            Direction from where the gradient is applied.

        Examples
        --------
        .. manim:: SetSheen
            :save_last_frame:

            class SetSheen(Scene):
                def construct(self):
                    circle = Circle(fill_opacity=1).set_sheen(-0.3, DR)
                    self.add(circle)
        """

        if family:
            for submob in self.submobjects:
                submob.set_sheen(factor, direction, family)
        self.sheen_factor = factor
        if direction is not None:
            # family set to false because recursion will
            # already be handled above
            self.set_sheen_direction(direction, family=False)
        # Reset color to put sheen_factor into effect
        if factor != 0:
            self.set_stroke(self.get_stroke_color(), family=family)
            self.set_fill(self.get_fill_color(), family=family)
        return self

    def get_sheen_direction(self):
        return np.array(self.sheen_direction)

    def get_sheen_factor(self):