manim.animation.indication.ShowPassingFlash

class ShowPassingFlash(mobject, time_width=0.1, **kwargs)[source]

Bases: manim.animation.creation.ShowPartial

Show only a sliver of the VMobject each frame.

Parameters
  • mobject (VMobject) – The mobject whose stroke is animated.

  • time_width (float) – The length of the sliver relative to the length of the stroke.

Return type

None

Examples

Example: 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
            ))

See also

Create

Methods

finish