Beispiel #1
0
 def __init__(self, light, **kwargs):
     if (not isinstance(light, AmbientLight) and not isinstance(light, Spotlight)):
         raise Exception(
             "Only AmbientLights and Spotlights can be switched on")
     LaggedStart.__init__(
         self, FadeIn, light, **kwargs
     )
Beispiel #2
0
 def __init__(self, light, **kwargs):
     if (not isinstance(light, AmbientLight) and not isinstance(light, Spotlight)):
         raise Exception(
             "Only AmbientLights and Spotlights can be switched off")
     light.submobjects = light.submobjects[::-1]
     LaggedStart.__init__(self,
                          FadeOut, light, **kwargs)
     light.submobjects = light.submobjects[::-1]
Beispiel #3
0
 def __init__(self, light, **kwargs):
     if (not isinstance(light, AmbientLight)
             and not isinstance(light, Spotlight)):
         raise Exception(
             "Only AmbientLights and Spotlights can be switched off")
     light.submobjects = light.submobjects[::-1]
     LaggedStart.__init__(self, FadeOut, light, **kwargs)
     light.submobjects = light.submobjects[::-1]
Beispiel #4
0
 def __init__(self, focal_point, **kwargs):
     digest_config(self, kwargs)
     circles = VGroup()
     for x in range(self.n_circles):
         circle = Circle(
             radius=self.big_radius,
             stroke_color=BLACK,
             stroke_width=0,
         )
         circle.move_to(focal_point)
         circle.save_state()
         circle.set_width(self.small_radius * 2)
         circle.set_stroke(self.color, self.start_stroke_width)
         circles.add(circle)
     LaggedStart.__init__(self, ApplyMethod, circles, lambda c:
                          (c.restore, ), **kwargs)
 def __init__(self, focal_point, **kwargs):
     digest_config(self, kwargs)
     circles = VGroup()
     for x in range(self.n_circles):
         circle = Circle(
             radius=self.big_radius,
             stroke_color=BLACK,
             stroke_width=0,
         )
         circle.move_to(focal_point)
         circle.save_state()
         circle.scale_to_fit_width(self.small_radius * 2)
         circle.set_stroke(self.color, self.start_stroke_width)
         circles.add(circle)
     LaggedStart.__init__(
         self, ApplyMethod, circles,
         lambda c: (c.restore,),
         **kwargs
     )
Beispiel #6
0
 def __init__(self, light, **kwargs):
     if (not isinstance(light, AmbientLight)
             and not isinstance(light, Spotlight)):
         raise Exception(
             "Only AmbientLights and Spotlights can be switched on")
     LaggedStart.__init__(self, FadeIn, light, **kwargs)