diff --git a/examples/manim/animated_scene.py b/examples/manim/animated_scene.py new file mode 100644 index 0000000000000000000000000000000000000000..0ea9fdc28d11ccb375c7554ef588ae170c5353cb --- /dev/null +++ b/examples/manim/animated_scene.py @@ -0,0 +1,27 @@ +from manim import * + + +class AnimatedScene(Scene): + def construct(self): + self.camera.background_color = WHITE + Text.set_default(color=BLACK) + + rect = Rectangle(color=BLUE) + circle = Circle(color=RED, fill_color=GREEN, fill_opacity=1) + text = Text('Manim') + + rect.shift(DOWN * 1.5) + circle.next_to(rect, UP) + text.move_to(rect.get_center()) + + self.add(circle, text) + + self.play(FadeIn(rect)) + + self.play(circle.animate.shift(LEFT * 2)) + self.play(circle.animate.set_color(GREEN)) + self.play(circle.animate.to_corner(UR)) + + self.play(rect.animate.shift(RIGHT * 2)) + + self.wait(3)