本文整理汇总了Python中mobject.vectorized_mobject.VMobject.remove方法的典型用法代码示例。如果您正苦于以下问题:Python VMobject.remove方法的具体用法?Python VMobject.remove怎么用?Python VMobject.remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mobject.vectorized_mobject.VMobject
的用法示例。
在下文中一共展示了VMobject.remove方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: construct
# 需要导入模块: from mobject.vectorized_mobject import VMobject [as 别名]
# 或者: from mobject.vectorized_mobject.VMobject import remove [as 别名]
def construct(self):
v_sum = VMobject(
Vector([1, 1], color = YELLOW),
Vector([3, 1], color = BLUE).shift(RIGHT+UP),
Vector([4, 2], color = GREEN),
)
scalar_multiplication = VMobject(
TexMobject("2 \\cdot "),
Vector([1, 1]),
TexMobject("="),
Vector([2, 2], color = WHITE)
)
scalar_multiplication.arrange_submobjects(RIGHT)
both = VMobject(v_sum, scalar_multiplication)
both.arrange_submobjects(RIGHT, buff = 1)
both.shift(2*DOWN)
self.add(both)
UpcomingSeriesOfVidoes.construct(self)
last_video = self.mobjects[-1]
self.play(ApplyMethod(last_video.highlight, YELLOW))
self.dither()
everything = VMobject(*self.mobjects)
everything.remove(last_video)
big_last_video = last_video.copy()
big_last_video.center()
big_last_video.scale_to_fit_height(2.5*SPACE_HEIGHT)
big_last_video.set_fill(opacity = 0)
self.play(
ApplyMethod(everything.shift, 2*SPACE_WIDTH*LEFT),
Transform(last_video, big_last_video),
run_time = 2
)