@@ -204,10 +204,10 @@ Animations
204204 def construct(self):
205205 square = Square(color=BLUE, fill_opacity=1)
206206
207- self.play(square.shift, LEFT)
208- self.play(square.set_fill, ORANGE)
209- self.play(square.scale, 0.3)
210- self.play(square.rotate, 0.4)
207+ self.play(square.animate. shift( LEFT) )
208+ self.play(square.animate. set_fill( ORANGE) )
209+ self.play(square.animate. scale( 0.3) )
210+ self.play(square.animate. rotate( 0.4) )
211211
212212.. manim :: MovingFrameBox
213213 :ref_modules: manim.mobject.svg.tex_mobject
@@ -268,8 +268,8 @@ Animations
268268 self.add(path, dot)
269269 self.play(Rotating(dot, radians=PI, about_point=RIGHT, run_time=2))
270270 self.wait()
271- self.play(dot.shift, UP )
272- self.play(dot.shift, LEFT)
271+ self.play(dot.animate. shift(UP) )
272+ self.play(dot.animate. shift( LEFT) )
273273 self.wait()
274274
275275
@@ -394,9 +394,9 @@ Special Camera Settings
394394 moving_dot = Dot().move_to(graph.points[0]).set_color(ORANGE)
395395
396396 dot_at_start_graph = Dot().move_to(graph.points[0])
397- dot_at_end_grap = Dot().move_to(graph.points[-1])
398- self.add(graph, dot_at_end_grap , dot_at_start_graph, moving_dot)
399- self.play( self.camera_frame.scale, 0.5,self.camera_frame.move_to, moving_dot)
397+ dot_at_end_graph = Dot().move_to(graph.points[-1])
398+ self.add(graph, dot_at_end_graph , dot_at_start_graph, moving_dot)
399+ self.play(self.camera_frame.animate. scale( 0.5) ,self.camera_frame.animate. move_to( moving_dot) )
400400
401401 def update_curve(mob):
402402 mob.move_to(moving_dot.get_center())
@@ -462,15 +462,15 @@ Special Camera Settings
462462 # Scale in x y z
463463 scale_factor = [0.5, 1.5, 0]
464464 self.play(
465- frame.scale, scale_factor,
466- zoomed_display.scale, scale_factor,
465+ frame.animate. scale( scale_factor) ,
466+ zoomed_display.animate. scale( scale_factor) ,
467467 FadeOut(zoomed_camera_text),
468468 FadeOut(frame_text)
469469 )
470470 self.wait()
471471 self.play(ScaleInPlace(zoomed_display, 2))
472472 self.wait()
473- self.play(frame.shift, 2.5 * DOWN)
473+ self.play(frame.animate. shift( 2.5 * DOWN) )
474474 self.wait()
475475 self.play(self.get_zoomed_display_pop_out_animation(), unfold_camera, rate_func=lambda t: smooth(1 - t))
476476 self.play(Uncreate(zoomed_display_frame), FadeOut(frame))
@@ -640,14 +640,15 @@ Advanced Projects
640640 grid_transform_title.move_to(grid_title, UL)
641641 grid.prepare_for_nonlinear_transform()
642642 self.play(
643- grid.apply_function,
644- lambda p: p
645- + np.array(
646- [
647- np.sin(p[1]),
648- np.sin(p[0]),
649- 0,
650- ]
643+ grid.animate.apply_function(
644+ lambda p: p
645+ + np.array(
646+ [
647+ np.sin(p[1]),
648+ np.sin(p[0]),
649+ 0,
650+ ]
651+ )
651652 ),
652653 run_time=3,
653654 )
0 commit comments