GrowFromEdge

完全限定名: manim.animation.growing.GrowFromEdge

class GrowFromEdge(mobject=None, *args, use_override=True, **kwargs)[source]

基类: GrowFromPoint

通过从其边界框边缘之一生长来引入一个 Mobject

参数:
  • mobject (Mobject) – 要引入的 Mobject 对象。

  • edge (np.ndarray) – 用于查找 `mobject` 边界框边缘的方向。

  • point_color (str) – Mobject 对象在生长到完整大小之前的初始颜色。留空以匹配 Mobject 对象的颜色。

示例

示例: GrowFromEdgeExample

from manim import *

class GrowFromEdgeExample(Scene):
    def construct(self):
        squares = [Square() for _ in range(4)]
        VGroup(*squares).set_x(0).arrange(buff=1)
        self.play(GrowFromEdge(squares[0], DOWN))
        self.play(GrowFromEdge(squares[1], RIGHT))
        self.play(GrowFromEdge(squares[2], UR))
        self.play(GrowFromEdge(squares[3], UP, point_color=RED))
class GrowFromEdgeExample(Scene):
    def construct(self):
        squares = [Square() for _ in range(4)]
        VGroup(*squares).set_x(0).arrange(buff=1)
        self.play(GrowFromEdge(squares[0], DOWN))
        self.play(GrowFromEdge(squares[1], RIGHT))
        self.play(GrowFromEdge(squares[2], UR))
        self.play(GrowFromEdge(squares[3], UP, point_color=RED))

方法

属性

路径弧

路径函数

运行时间

_original__init__(mobject, edge, point_color=None, **kwargs)

初始化自身。有关准确签名,请参阅 help(type(self))。

参数:
  • mobject (Mobject)

  • edge (np.ndarray)

  • point_color (str)

返回类型: