Swap¶
Qualified name: manim.animation.transform.Swap
- class Swap(mobject=None, *args, use_override=True, **kwargs)[source]¶
Bases:
CyclicReplaceAnother name for
CyclicReplace, which is more understandable for two entries.Examples
Example: SwapExample ¶
from manim import * class SwapExample(Scene): def construct(self): text_a = Text("A").move_to(LEFT) text_b = Text("B").move_to(RIGHT) text_group = Group(text_a, text_b) self.play(FadeIn(text_group)) self.play(Swap(text_group)) self.wait()
class SwapExample(Scene): def construct(self): text_a = Text("A").move_to(LEFT) text_b = Text("B").move_to(RIGHT) text_group = Group(text_a, text_b) self.play(FadeIn(text_group)) self.play(Swap(text_group)) self.wait()Methods
Attributes
path_arcpath_funcrun_time- Parameters:
mobjects (Mobject)
path_arc (float)