摆动¶
限定名称: manim.animation.indication.Wiggle
- class Wiggle(mobject=None, *args, use_override=True, **kwargs)[source]¶
基础:
Animation
摆动一个Mobject。
- 参数:
mobject (Mobject) – 要摆动的mobject。
scale_value (float) – mobject将暂时缩放的因子。
rotation_angle (float) – 摆动角度。
n_wiggles (int) – 摆动次数。
scale_about_point (np.ndarray | None) – mobject缩放的中心点。
rotate_about_point (np.ndarray | None) – mobject旋转的中心点。
run_time (float) – 动画持续时间
示例
示例: 应用波浪 ¶
from manim import * class ApplyingWaves(Scene): def construct(self): tex = Tex("Wiggle").scale(3) self.play(Wiggle(tex)) self.wait()
class ApplyingWaves(Scene): def construct(self): tex = Tex("Wiggle").scale(3) self.play(Wiggle(tex)) self.wait()
方法
获取旋转中心点
获取缩放中心点
插值子对象
属性
运行时间
- _original__init__(mobject, scale_value=1.1, rotation_angle=0.06283185307179587, n_wiggles=6, scale_about_point=None, rotate_about_point=None, run_time=2, **kwargs)¶
初始化自身。有关准确签名,请参阅 help(type(self))。
- 参数:
mobject (Mobject)
scale_value (float)
rotation_angle (float)
n_wiggles (int)
scale_about_point (ndarray | None)
rotate_about_point (ndarray | None)
run_time (float)
- 返回类型:
无