MobjectUpdateUtils

manimlib.mobject.mobject_update_utils.assert_is_mobject_method(method)

判断 method 是否是 Mobject 的方法


manimlib.mobject.mobject_update_utils.always(method, *args, **kwargs)

一直调用 method,传入 *args, **kwargs


manimlib.mobject.mobject_update_utils.f_always(method, *arg_generators, **kwargs)

always 类似,但是传入的多个 arg_generators 是可调用对象,用于生成参数


manimlib.mobject.mobject_update_utils.always_redraw(func: Callable[, Mobject], *args, **kwargs) → Mobject

始终重复调用 func 生成新物体


manimlib.mobject.mobject_update_utils.always_shift(mobject: Mobject, direction: np.ndarray = array([1., 0., 0.]), rate: float = 0.1) → Mobject

mobject 始终向 direction 方向移动,速度为 rate


manimlib.mobject.mobject_update_utils.always_rotate(mobject: manimlib.mobject.mobject.Mobject, rate: float = 0.3490658503988659, **kwargs)manimlib.mobject.mobject.Mobject

mobject 始终旋转


manimlib.mobject.mobject_update_utils.turn_animation_into_updater(animation: Animation, cycle: bool = False, **kwargs) → Mobject

animation 转化为对执行动画对象的 updater

  • cycle 为 True 时循环执行,否则只执行一次


manimlib.mobject.mobject_update_utils.cycle_animation(animation: Animation, **kwargs) → Mobject

默认保持循环的 turn_animation_into_updater