How to use AnimationGroup to show images gradually? #1450
-
Hi, can anyone please advise how to make images show one after another when inside an AnimationGroup? AnimationGroup( Shows at first all the large images, then gradually transforms them to the small images. I would like it to show images only after the previous images started the process of transforming, but it doesn't work for me. Even if I select lag_ratio=1.0, I see all the images in the beginning. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I don't know how you used that. But I used like this and it works: class Code1405(Scene):
def construct(self):
mob = VGroup(*[
Square(2) for i in range(3)
]).arrange(RIGHT)
mob_ = VGroup(*[
a.copy().scale(0.5) for a in mob
])
self.add(mob)
self.wait()
self.play(
AnimationGroup(*[
Transform(a, b)
for a, b in zip(mob, mob_)
], lag_ratio=0.6)
) Code1405.mp4 |
Beta Was this translation helpful? Give feedback.
I don't know how you used that. But I used like this and it works:
Code1405.mp4