首页 > 其他分享 >manim 动态改变

manim 动态改变

时间:2022-10-14 19:57:39浏览次数:45  
标签:set Text value 改变 add updater 动态 manim

常常通过ValueTracker和updater实现

比如:

        def playscene0():
            v = ValueTracker(0)
            a = Text("A").add_updater(lambda x : x.set_x(v.get_value()))
            b = Text("B").add_updater(lambda x : x.next_to(a,DOWN))
            sa(a,b)
            sp(v.animate.set_value(4))

除此之外,还可以通过always_redraw()实现

标签:set,Text,value,改变,add,updater,动态,manim
From: https://www.cnblogs.com/daxiangcai/p/16792798.html

相关文章