本文整理汇总了Python中mobject.tex_mobject.TextMobject.ingest_sub_mobjects方法的典型用法代码示例。如果您正苦于以下问题:Python TextMobject.ingest_sub_mobjects方法的具体用法?Python TextMobject.ingest_sub_mobjects怎么用?Python TextMobject.ingest_sub_mobjects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mobject.tex_mobject.TextMobject
的用法示例。
在下文中一共展示了TextMobject.ingest_sub_mobjects方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: construct
# 需要导入模块: from mobject.tex_mobject import TextMobject [as 别名]
# 或者: from mobject.tex_mobject.TextMobject import ingest_sub_mobjects [as 别名]
def construct(self):
words = TextMobject(
["One does not simply define the limit \\\\ \
of a sequence of","curves","\\dots"]
)
top_words = TextMobject([
"curves", "are functions"
]).to_edge(UP)
curves1 = words.split()[1]
curves2 = top_words.split()[0]
words.ingest_sub_mobjects()
number = TexMobject("0.27")
pair = TexMobject("(0.53, 0.02)")
pair.next_to(number, buff = 2)
arrow = Arrow(number, pair)
Mobject(number, arrow, pair).center().shift(UP)
number_line = UnitInterval()
number_line.stretch_to_fit_width(5)
number_line.to_edge(LEFT).shift(DOWN)
grid = Grid(4, 4).scale(0.4)
grid.next_to(number_line, buff = 2)
low_arrow = Arrow(number_line, grid)
self.play(ShimmerIn(words))
self.dither()
self.play(
FadeOut(words),
ApplyMethod(curves1.replace, curves2),
ShimmerIn(top_words.split()[1])
)
self.dither()
self.play(FadeIn(number))
self.play(ShowCreation(arrow))
self.play(FadeIn(pair))
self.dither()
self.play(ShowCreation(number_line))
self.play(ShowCreation(low_arrow))
self.play(ShowCreation(grid))
self.dither()