Manim:创建后更改文本大小

Manim: Change size of text after creation

class Bla(Scene):
  def construct(self):
    t = Text("Hello world")
    self.add(t)
    self.wait()
    t.size = 100
    self.wait(2)

我知道 color 是构造函数的参数,但是在创建文本后如何更改此属性?

对我来说,运行 这个 class 让文本保持不变。

创建后可以使用scale函数调整大小:

class Blah(Scene):
    def construct(self):
        t = Text("Hello world")
        self.add(t)
        self.wait()
        self.play(t.animate.scale(2))
        self.wait(2)