Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Removed use of deprecated classes in the examples

MysaaJava133a0323568f
diff --git a/docs/source/examples/advanced_projects.rst b/docs/source/examples/advanced_projects.rst
index bde794257..283c119f7 100644
--- a/docs/source/examples/advanced_projects.rst
+++ b/docs/source/examples/advanced_projects.rst
@@ -19,7 +19,7 @@ Advanced Projects
transform_title.to_corner(UP + LEFT)
self.play(
Transform(title, transform_title),
- LaggedStart(*map(FadeOutAndShiftDown, basel)),
+ LaggedStart(*map(lambda obj: FadeOutAndShift(obj,direction=DOWN), basel)),
)
self.wait()
@@ -31,7 +31,7 @@ Advanced Projects
self.add(grid, grid_title) # Make sure title is on top of grid
self.play(
FadeOut(title),
- FadeInFromDown(grid_title),
+ FadeInFrom(grid_title,direction=DOWN),
ShowCreation(grid, run_time=3, lag_ratio=0.1),
)
self.wait()
diff --git a/docs/source/examples/annotations.rst b/docs/source/examples/annotations.rst
index 33a331bd9..89dd0ad60 100644
--- a/docs/source/examples/annotations.rst
+++ b/docs/source/examples/annotations.rst
@@ -24,8 +24,8 @@ Annotations
dot = Dot(ORIGIN)
arrow = Arrow(ORIGIN, [2, 2, 0], buff=0)
numberplane = NumberPlane()
- origin_text = TextMobject('(0, 0)').next_to(dot, DOWN)
- tip_text = TextMobject('(2, 2)').next_to(arrow.get_end(), RIGHT)
+ origin_text = Text('(0, 0)').next_to(dot, DOWN)
+ tip_text = Text('(2, 2)').next_to(arrow.get_end(), RIGHT)
self.add(numberplane, dot, arrow, origin_text, tip_text)
.. manim:: ExampleArrowTips
diff --git a/docs/source/examples/camera_settings.rst b/docs/source/examples/camera_settings.rst
index 5b28addf0..86a92bd98 100644
--- a/docs/source/examples/camera_settings.rst
+++ b/docs/source/examples/camera_settings.rst
@@ -170,8 +170,8 @@ so one can use all functionality that were used before in the MovingCameraScene
image = ImageMobject(np.uint8([[0, 100, 30, 200],
[255, 0, 5, 33]]))
image.set_height(7)
- frame_text = TextMobject("Frame", color=PURPLE).scale(1.4)
- zoomed_camera_text = TextMobject("Zoomed camera", color=RED).scale(1.4)
+ frame_text = Text("Frame", color=PURPLE).scale(1.4)
+ zoomed_camera_text = Text("Zoomed camera", color=RED).scale(1.4)
self.add(image, dot)
zoomed_camera = self.zoomed_camera