Skip to content

How to use AnimationGroup to show images gradually? #1450

Answered by TonyCrane
manimnewbee asked this question in Q&A
Discussion options

You must be logged in to vote

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

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by TonyCrane
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants