chore(lib): some fixes before new release

This commit is contained in:
Jérome Eertmans
2023-03-09 14:06:02 +01:00
parent 3da8fab145
commit 940916d4aa
5 changed files with 29 additions and 27 deletions

View File

@ -22,14 +22,14 @@ class BasicExample(Slide):
dot = Dot()
self.play(GrowFromCenter(circle))
self.pause() # Waits user to press continue to go to the next slide
self.next_slide() # Waits user to press continue to go to the next slide
self.start_loop() # Start loop
self.play(MoveAlongPath(dot, circle), run_time=2, rate_func=linear)
self.end_loop() # This will loop until user inputs a key
self.play(dot.animate.move_to(ORIGIN))
self.pause() # Waits user to press continue to go to the next slide
self.next_slide() # Waits user to press continue to go to the next slide
class TestFileTooLong(Slide):
@ -47,7 +47,7 @@ class TestFileTooLong(Slide):
self.play(dot.animate.move_to(direction), run_time=0.1)
self.play(dot.animate.move_to(ORIGIN), run_time=0.1)
self.pause()
self.next_slide()
class ConvertExample(Slide):
@ -77,7 +77,7 @@ class ConvertExample(Slide):
self.play(FadeIn(title))
self.pause()
self.next_slide()
code = Code(
code="""from manim import *
@ -146,10 +146,10 @@ class Example(Slide):
self.add(dot)
self.play(Indicate(dot, scale_factor=2))
self.pause()
self.next_slide()
square = Square()
self.play(Transform(dot, square))
self.pause()
self.next_slide()
self.play(Rotate(square, angle=PI/2))
""",
language="python",
@ -168,7 +168,7 @@ class Example(Slide):
self.end_loop()
square = Square()
self.play(Transform(dot, square))
self.pause()
self.next_slide()
self.play(Rotate(square, angle=PI/2))
""",
language="python",
@ -195,38 +195,38 @@ class Example(Slide):
self.play(FadeIn(code))
self.tinywait()
self.pause()
self.next_slide()
self.play(FadeIn(step, shift=RIGHT))
self.play(Transform(code, code_step_1))
self.tinywait()
self.pause()
self.next_slide()
self.play(Transform(step, step_2))
self.play(Transform(code, code_step_2))
self.tinywait()
self.pause()
self.next_slide()
self.play(Transform(step, step_3))
self.play(Transform(code, code_step_3))
self.tinywait()
self.pause()
self.next_slide()
self.play(Transform(step, step_4))
self.play(Transform(code, code_step_4))
self.tinywait()
self.pause()
self.next_slide()
self.play(Transform(step, step_5))
self.play(Transform(code, code_step_5))
self.tinywait()
self.pause()
self.next_slide()
self.play(Transform(step, step_6))
self.play(Transform(code, code_step_6))
self.play(code.animate.shift(UP), FadeIn(code_step_7), FadeIn(or_text))
self.tinywait()
self.pause()
self.next_slide()
watch_text = Text("Watch result on next slides!").shift(2 * DOWN).scale(0.5)
@ -246,10 +246,10 @@ class Example(Slide):
self.remove(dot)
self.add(square)
self.tinywait()
self.pause()
self.next_slide()
self.play(Rotate(square, angle=PI / 4))
self.tinywait()
self.pause()
self.next_slide()
learn_more_text = (
VGroup(
@ -281,7 +281,7 @@ if not MANIMGL:
self.play(GrowFromCenter(circle))
self.begin_ambient_camera_rotation(rate=75 * DEGREES / 4)
self.pause()
self.next_slide()
self.start_loop()
self.play(MoveAlongPath(dot, circle), run_time=4, rate_func=linear)
@ -291,10 +291,10 @@ if not MANIMGL:
self.move_camera(phi=75 * DEGREES, theta=30 * DEGREES)
self.play(dot.animate.move_to(ORIGIN))
self.pause()
self.next_slide()
self.play(dot.animate.move_to(RIGHT * 3))
self.pause()
self.next_slide()
self.start_loop()
self.play(MoveAlongPath(dot, circle), run_time=2, rate_func=linear)
@ -330,7 +330,7 @@ else:
updater = lambda m, dt: m.increment_theta((75 * DEGREES / 4) * dt)
frame.add_updater(updater)
self.pause()
self.next_slide()
self.start_loop()
self.play(MoveAlongPath(dot, circle), run_time=4, rate_func=linear)
@ -339,10 +339,10 @@ else:
frame.remove_updater(updater)
self.play(frame.animate.set_theta(30 * DEGREES))
self.play(dot.animate.move_to(ORIGIN))
self.pause()
self.next_slide()
self.play(dot.animate.move_to(RIGHT * 3))
self.pause()
self.next_slide()
self.start_loop()
self.play(MoveAlongPath(dot, circle), run_time=2, rate_func=linear)