从边缘生长¶
限定名称: manim.animation.growing.GrowFromEdge
- class GrowFromEdge(mobject=None, *args, use_override=True, **kwargs)[source]¶
-
通过从其边界框的一个边缘生长来引入一个
Mobject。- Parameters:
mobject (Mobject) – 要引入的mobjects。
edge (np.ndarray) – 寻找mobject边界框边缘的方向。
point_color (str) – 物体在增长到其完整大小之前的初始颜色。留空以匹配物体的颜色。
示例
示例: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))方法
属性
path_arcpath_func