I'm new to manim.
as with following example,
class scene_example(Scene):
def construct(self):
txt1 = Text("Text1")
txt2 = Text("Change to this text without animation")
self.play(FadeIn(txt1))
self.play(ReplacementTransform(txt1, txt2))
Is there any convenient function for "Replace" the txt1 to txt2? (i.e., without the "transforming" animation?)
class scene_example(Scene):
def construct(self):
txt1 = Text("Text1")
txt2 = Text("Change to this text without animation")
self.play(FadeIn(txt1))
self.play(FadeOut(txt1), FadeIn(txt2) )
This code will do what I want, but I feel that there might function like ReplacemnetTransform to fulfill the simple "Replacement" animation. I tried to make a function for FadeIn and then FadeOut but, that doesn't work.
class q(Scene):
def construct(self):
def Replace(self, mObj1, mObj2):
self.play(FadeIn(mObj1),FadeOut(mObj2))
txt1 = "HI"
txt2 = "HI2"
self.play(FadeIn(txt1))
Replace(txt1, txt2)