Add glow dot to show light in SurfaceExample

This commit is contained in:
Grant Sanderson 2024-08-22 15:31:22 -05:00
parent ada66ee8fb
commit e4007f6915

View file

@ -630,7 +630,9 @@ class SurfaceExample(ThreeDScene):
self.play(FadeTransform(surface_text, light_text)) self.play(FadeTransform(surface_text, light_text))
light = self.camera.light_source light = self.camera.light_source
self.add(light) light_dot = GlowDot(color=WHITE, radius=0.5)
light_dot.always.move_to(light)
self.add(light, light_dot)
light.save_state() light.save_state()
self.play(light.animate.move_to(3 * IN), run_time=5) self.play(light.animate.move_to(3 * IN), run_time=5)
self.play(light.animate.shift(10 * OUT), run_time=5) self.play(light.animate.shift(10 * OUT), run_time=5)