from manim import *
class ClockOneDemo(Scene):
    def construct(self):
        title = Text("ClockwiseTransform：三角形顺时针变为正方形", font="STLiti", font_size=28).to_edge(UP)
        self.play(FadeIn(title), run_time=0.6)
        triangle = Triangle(color=BLUE, stroke_width=8).scale(1.25).move_to(DOWN * 0.4 + LEFT * 2)
        square = Square(side_length=2.0, color=YELLOW, stroke_width=8).move_to(DOWN * 0.4 + RIGHT * 2)
        self.play(FadeIn(triangle), run_time=0.8)
        self.play(ClockwiseTransform(triangle, square), run_time=2.4)
        note = Text("源对象沿顺时针弧线移动并渐变为目标对象", font="STLiti", font_size=21, color=YELLOW).to_edge(DOWN)
        self.play(FadeIn(note), run_time=0.4)
        self.wait(1.8)
