Skip to content

Succession() act incorrectly when display Mobjs successively #1256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cckk4467 opened this issue Apr 5, 2021 · 3 comments
Closed

Succession() act incorrectly when display Mobjs successively #1256

cckk4467 opened this issue Apr 5, 2021 · 3 comments
Labels
issue:bug Something isn't working... For use in issues

Comments

@cckk4467
Copy link

cckk4467 commented Apr 5, 2021

Description of bug / unexpected behavior

when more than once Write() or FadeIn() sth within Succession(), it will show the mobjs to be displayed before the animation begin
look at the blue triangle at the very beginning of the video below. It's not supposed to be presented before the white line

Expected behavior

Just to display the mobjs one by one normally

How to reproduce the issue

Code for reproducing the problem
class Test(Scene):
    def construct(self):
        tri=Line(UP)
        a=Succession(
            FadeIn(Line()),
            FadeIn(tri),
        )
        self.play(a)

Additional media files

Images/GIFs
Test.mp4
@cckk4467 cckk4467 added the pr:bugfix Bug fix for use in PRs solving a specific issue:bug label Apr 5, 2021
@AliNear
Copy link

AliNear commented Apr 5, 2021

Yes I have a similar issue with Succession, it displays all the mobjects at fist then runs the animations successively.

@cobordism
Copy link
Member

There is a more general problem with the way AnimationGroup works (Succession inherits from there).

To fix this properly we need to refactor all of that.

The cause of this issue is that an AnimationGroup is not a group of animations, but an animation on a Group mobject. All mobjects are added to the group, and the initialisation call at Animation.begin() happens before the first animation starts.

@jsonvillanueva jsonvillanueva removed the pr:bugfix Bug fix for use in PRs solving a specific issue:bug label Apr 15, 2021
@ad-chaos
Copy link
Collaborator

ad-chaos commented Mar 6, 2022

Fixed via #2396 by the introduction of the introducer keyword argument.

@ad-chaos ad-chaos closed this as completed Mar 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue:bug Something isn't working... For use in issues
Projects
None yet
Development

No branches or pull requests

5 participants