def __init__(self, mobject, **kwargs):
        self.mobject_color = YELLOW
        self.total_run_time = 4
        self.total_lag_ratio = 1
        kwargs = merge_config_kwargs(self, kwargs)

        super().__init__(
            ShowPassingFlash(mobject.set_color(
                self.mobject_color), **kwargs),
            IndicateThenFadeOut(mobject.copy(), **kwargs),
            run_time=self.total_run_time, lag_ratio=self.total_lag_ratio)
Example #2
0
 def __init__(self, vmobject, **kwargs):
     digest_config(self, kwargs)
     max_stroke_width = vmobject.get_stroke_width()
     max_time_width = kwargs.pop("time_width", self.time_width)
     AnimationGroup.__init__(
         self, *[
             ShowPassingFlash(
                 vmobject.deepcopy().set_stroke(width=stroke_width),
                 time_width=time_width,
                 **kwargs) for stroke_width, time_width in zip(
                     np.linspace(0, max_stroke_width, self.n_segments),
                     np.linspace(max_time_width, 0, self.n_segments))
         ])
Example #3
0
 def __init__(self, vmobject, **kwargs):
     if not hasattr(self, "args"):
         self.args = serialize_args([vmobject])
     if not hasattr(self, "config"):
         self.config = serialize_config({
             **kwargs,
         })
     digest_config(self, kwargs)
     max_stroke_width = vmobject.get_stroke_width()
     max_time_width = kwargs.pop("time_width", self.time_width)
     AnimationGroup.__init__(
         self, *[
             ShowPassingFlash(
                 vmobject.deepcopy().set_stroke(width=stroke_width),
                 time_width=time_width,
                 **kwargs) for stroke_width, time_width in zip(
                     np.linspace(0, max_stroke_width, self.n_segments),
                     np.linspace(max_time_width, 0, self.n_segments))
         ])