manim animations and pauses
比如:
class WiteText(Scene): def construct(self): text = TextMobject("this is a regular text") self.play(Write(text)) self.wait(3)
这样就会呈现写下"this is a regular text"的效果(如果使用add方法就没有动画效果)
Write方法可以改成其他的产生动画的方法,比如:GrowFromCenter/FadeIn等等
如果没有持续时间,这个场景(Scene)将不会渲染
remove()方法用于移除对象
play()方法有默认的持续时间,但是我们可以加入run_time参数调整持续时间:self.play(Write(text),run_time=3)
在manimlib/animations/creation.py文件中有所有的产生动画的方法
浙公网安备 33010602011771号