from manim import *
class FadeTransformDemo(Scene):
    def construct(self):
        title = Text("FadeTransform：圆平滑淡入为三角形", font="STLiti", font_size=28).to_edge(UP)
        self.play(FadeIn(title), run_time=0.6)
        circle = Circle(radius=1.1, color=GREEN, stroke_width=9)
        triangle = Triangle(color=YELLOW, stroke_width=9).scale(1.4)
        self.play(FadeIn(circle), run_time=0.8)
        self.play(FadeTransform(circle, triangle), run_time=2.2)
        note = Text("源对象淡出、目标对象淡入，同时带形变", font="STLiti", font_size=21, color=YELLOW).to_edge(DOWN)
        self.play(FadeIn(note), run_time=0.4)
        self.wait(2.0)
