mirror of
https://github.com/3b1b/manim.git
synced 2025-08-31 16:48:31 +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()
|
||||
|
||||
# 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):
|
||||
screen = spotlight.screen
|
||||
update_spotlight_anim = UpdateFromFunc(spotlight, update_spotlight)
|
||||
|
@ -2490,14 +2501,7 @@ class IPTScene(TwoLightSourcesScene, ZoomedScene):
|
|||
Transform(screen, screen.alt_version),
|
||||
update_spotlight_anim,
|
||||
)
|
||||
triangle = get_spotlight_triangle(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))
|
||||
show_beaming_light(spotlight)
|
||||
self.play(screen.restore, update_spotlight_anim)
|
||||
self.wait()
|
||||
self.play(
|
||||
|
@ -2506,6 +2510,7 @@ class IPTScene(TwoLightSourcesScene, ZoomedScene):
|
|||
update_spotlight_anim,
|
||||
run_time = 2
|
||||
)
|
||||
show_beaming_light(spotlight)
|
||||
self.wait()
|
||||
self.play(
|
||||
lsC.move_source_to, H,
|
||||
|
|
Loading…
Add table
Reference in a new issue