from manim import *
FONT = "STLiti"
class Demo(Scene):
    def construct(self):
        head = Text("逐层叠加后的效果", font=FONT, font_size=36, color=YELLOW).to_edge(UP, buff=0.5)
        bar = Line(LEFT * 6.6, RIGHT * 6.6, color=BLUE).next_to(head, DOWN, buff=0.12)
        self.play(FadeIn(head), Create(bar), run_time=0.6)
        sq = Square(side_length=1.5, color=YELLOW, fill_opacity=1, stroke_width=0).shift(UP * 0.6 + RIGHT * 0.3)
        tri = Triangle(color=PURPLE, fill_opacity=1, stroke_width=0).shift(RIGHT * 1.1 + DOWN * 0.5)
        cir = Circle(radius=0.75, color=GREEN, stroke_width=12).shift(LEFT * 1.0 + DOWN * 0.2)
        self.play(FadeIn(sq), FadeIn(tri), run_time=0.8)
        self.play(FadeIn(cir), run_time=0.8)
        self.wait(3.4)
