Reputation: 1470
class Bla(Scene):
def construct(self):
t = Text("Hello world")
self.add(t)
self.wait()
t.size = 100
self.wait(2)
I know that color
is a parameter for the constructor, but how can I change this attribute after the text is already created?
For me, running this class leaves the text fixed.
Upvotes: 2
Views: 944
Reputation: 33036
You can use the scale
function to resize it after creation:
class Blah(Scene):
def construct(self):
t = Text("Hello world")
self.add(t)
self.wait()
self.play(t.animate.scale(2))
self.wait(2)
Upvotes: 3