从无到有旋转进入¶
限定名称: manim.animation.growing.SpinInFromNothing
- class SpinInFromNothing(mobject=None, *args, use_override=True, **kwargs)[source]¶
-
介绍一个
Mobject从中心旋转并增长。- Parameters:
mobject (Mobject) – 要引入的mobjects。
angle (float) – 物体在达到其完整大小之前的旋转量。例如,2*PI 表示物体在被完全引入之前会进行一次完整的旋转。
point_color (str) – 物体在增长到其完整大小之前的初始颜色。留空以匹配物体的颜色。
示例
示例:SpinInFromNothingExample ¶
from manim import * class SpinInFromNothingExample(Scene): def construct(self): squares = [Square() for _ in range(3)] VGroup(*squares).set_x(0).arrange(buff=2) self.play(SpinInFromNothing(squares[0])) self.play(SpinInFromNothing(squares[1], angle=2 * PI)) self.play(SpinInFromNothing(squares[2], point_color=RED))
class SpinInFromNothingExample(Scene): def construct(self): squares = [Square() for _ in range(3)] VGroup(*squares).set_x(0).arrange(buff=2) self.play(SpinInFromNothing(squares[0])) self.play(SpinInFromNothing(squares[1], angle=2 * PI)) self.play(SpinInFromNothing(squares[2], point_color=RED))方法
属性
path_arcpath_func