mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Tweaks to IPTScene
This commit is contained in:
parent
004d3603f2
commit
7e4bd54da7
1 changed files with 13 additions and 8 deletions
|
@ -2483,6 +2483,17 @@ class IPTScene(TwoLightSourcesScene, ZoomedScene):
|
||||||
self.wait()
|
self.wait()
|
||||||
|
|
||||||
# Show spotlight a key point
|
# Show spotlight a key point
|
||||||
|
def show_beaming_light(spotlight):
|
||||||
|
triangle = get_spotlight_triangle(spotlight)
|
||||||
|
for x in range(3):
|
||||||
|
anims = []
|
||||||
|
if x > 0:
|
||||||
|
anims.append(FadeOut(triangle.copy()))
|
||||||
|
anims.append(GrowFromPoint(triangle, triangle.points[0]))
|
||||||
|
self.play(*anims)
|
||||||
|
self.play(FadeOut(triangle))
|
||||||
|
pass
|
||||||
|
|
||||||
def show_key_point(spotlight, new_point):
|
def show_key_point(spotlight, new_point):
|
||||||
screen = spotlight.screen
|
screen = spotlight.screen
|
||||||
update_spotlight_anim = UpdateFromFunc(spotlight, update_spotlight)
|
update_spotlight_anim = UpdateFromFunc(spotlight, update_spotlight)
|
||||||
|
@ -2490,14 +2501,7 @@ class IPTScene(TwoLightSourcesScene, ZoomedScene):
|
||||||
Transform(screen, screen.alt_version),
|
Transform(screen, screen.alt_version),
|
||||||
update_spotlight_anim,
|
update_spotlight_anim,
|
||||||
)
|
)
|
||||||
triangle = get_spotlight_triangle(spotlight)
|
show_beaming_light(spotlight)
|
||||||
for x in range(3):
|
|
||||||
anims = []
|
|
||||||
if x > 0:
|
|
||||||
anims.append(FadeOut(triangle.copy()))
|
|
||||||
anims.append(GrowFromPoint(triangle, H))
|
|
||||||
self.play(*anims)
|
|
||||||
self.play(FadeOut(triangle))
|
|
||||||
self.play(screen.restore, update_spotlight_anim)
|
self.play(screen.restore, update_spotlight_anim)
|
||||||
self.wait()
|
self.wait()
|
||||||
self.play(
|
self.play(
|
||||||
|
@ -2506,6 +2510,7 @@ class IPTScene(TwoLightSourcesScene, ZoomedScene):
|
||||||
update_spotlight_anim,
|
update_spotlight_anim,
|
||||||
run_time = 2
|
run_time = 2
|
||||||
)
|
)
|
||||||
|
show_beaming_light(spotlight)
|
||||||
self.wait()
|
self.wait()
|
||||||
self.play(
|
self.play(
|
||||||
lsC.move_source_to, H,
|
lsC.move_source_to, H,
|
||||||
|
|
Loading…
Add table
Reference in a new issue