class example(Scene):
def construct(self):
text_list=[]
text_group=VGroup()
for i in range(1,13):
t=str(i)
text=TextMobject(t)
text.move_to(UP*2.5)
text.rotate(-PI/6*i,about_point=ORIGIN)
self.play(Write(text),run_time=0.2)
text_list.append(text)
text_group=VGroup(text_group,text_list[i-1])
self.wait()
manim-利用循环创建对象
最新推荐文章于 2024-05-10 10:01:00 发布