manim.animation.indication.FocusOn

class FocusOn(focus_point, opacity=0.2, color='#888888', run_time=2, **kwargs)[source]

Bases: manim.animation.transform.Transform

Shrink a spotlight to a position.

Parameters
  • focus_point (Union[numpy.ndarray, manim.mobject.mobject.Mobject]) – The point at which to shrink the spotlight. If it is a Mobject its center will be used.

  • opacity (float) – The opacity of the spotlight.

  • color (str) – The color of the spotlight.

  • run_time (float) – The duration of the animation.

  • kwargs (Any) – Additional arguments to be passed to the Succession constructor

Return type

None

Examples

Example: UsingFocusOn

from manim import *

class UsingFocusOn(Scene):
    def construct(self):
        dot = Dot(color=YELLOW).shift(DOWN)
        self.add(Tex("Focusing on the dot below:"), dot)
        self.play(FocusOn(dot))
        self.wait()

Methods

create_starting_mobject

create_target

Attributes

path_arc

path_func