ShowPassingFlash¶
限定名称: manim.animation.indication.ShowPassingFlash
- class ShowPassingFlash(mobject=None, *args, use_override=True, **kwargs)[source]¶
基类:
ShowPartial
每帧仅显示 VMobject 的一小部分。
- 参数:
mobject (VMobject) – 描边被动画化的 mobject。
time_width (float) – 描边长度中显示部分的相对长度。
示例
示例: TimeWidthValues ¶
from manim import * class TimeWidthValues(Scene): def construct(self): p = RegularPolygon(5, color=DARK_GRAY, stroke_width=6).scale(3) lbl = VMobject() self.add(p, lbl) p = p.copy().set_color(BLUE) for time_width in [0.2, 0.5, 1, 2]: lbl.become(Tex(r"\texttt{time\_width={{%.1f}}}"%time_width)) self.play(ShowPassingFlash( p.copy().set_color(BLUE), run_time=2, time_width=time_width ))
class TimeWidthValues(Scene): def construct(self): p = RegularPolygon(5, color=DARK_GRAY, stroke_width=6).scale(3) lbl = VMobject() self.add(p, lbl) p = p.copy().set_color(BLUE) for time_width in [0.2, 0.5, 1, 2]: lbl.become(Tex(r"\texttt{time\_width={{%.1f}}}"%time_width)) self.play(ShowPassingFlash( p.copy().set_color(BLUE), run_time=2, time_width=time_width ))
另请参阅
方法
属性
run_time