ShowPassingFlash#

Qualified name: manim.animation.indication.ShowPassingFlash

class ShowPassingFlash(mobject=None, *args, use_override=True, **kwargs)[source]#

Bases: ShowPartial

Show only a sliver of the VMobject each frame.

Parameters
  • mobject – The mobject whose stroke is animated.

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

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

clean_up_from_scene

Clean up the Scene after finishing the animation.

clean_up_from_scene(scene)[source]#

Clean up the Scene after finishing the animation.

This includes to remove() the Animation’s Mobject if the animation is a remover.

Parameters

scene (Scene) – The scene the animation should be cleaned up from.

Return type

None