Swap
Animation Parameters#
Paremeters - as mentioned in Azarzadvillas Documentation - are:
-
Constructor : -
self.play()
-self.add()
-
Parameters :
-
run_time
: The duration of the animation- float (ex:
3
) - Optional
- Default:
DEFAULT_ANIMATION_RUN_TIME
- float (ex:
Cyclic Replace#
from manimlib import *
class AnimationCyclicReplace(Scene):
def construct(self):
square = Square(color=GREEN)
circle = Circle(color=RED)
circle.shift(2 * UP + 2 * RIGHT)
triangle = Triangle(color=YELLOW)
triangle.shift(2 * UP + 2 * LEFT)
self.add(square)
self.add(circle)
self.add(triangle)
self.play(CyclicReplace(square, circle, triangle))
from manim import *
class AnimationCyclicReplace(Scene):
def construct(self):
square = Square(color=GREEN)
circle = Circle(color=RED)
circle.shift(2 * UP + 2 * RIGHT)
triangle = Triangle(color=YELLOW)
triangle.shift(2 * UP + 2 * LEFT)
self.add(square)
self.add(circle)
self.add(triangle)
self.play(CyclicReplace(square, circle, triangle))