FocusOn

限定名称: manim.animation.indication.FocusOn

FocusOn(mobject=None, *args, use_override=True, **kwargs)[源文件]

基类: Transform

将聚光灯缩小到一个位置。

参数:
  • focus_point (np.ndarray | Mobject) – 聚光灯缩小的目标点。如果它是一个 Mobject,将使用其中心点。

  • opacity (float) – 聚光灯的不透明度。

  • color (str) – 聚光灯的颜色。

  • run_time (float) – 动画的持续时间。

示例

示例: 使用FocusOn

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()
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()

方法

创建目标

属性

路径弧

路径函数

运行时间

_original__init__(focus_point, opacity=0.2, color=ManimColor('#888888'), run_time=2, **kwargs)

初始化自身。有关准确签名,请参阅 help(type(self))。

参数:
  • focus_point (ndarray | Mobject)

  • opacity (float)

  • color (str)

  • run_time (float)

返回类型: