Skip to content
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

Interrupted sequence behaving differently first time #77

Open
samselikoff opened this issue Mar 11, 2019 · 3 comments
Open

Interrupted sequence behaving differently first time #77

samselikoff opened this issue Mar 11, 2019 · 3 comments

Comments

@samselikoff
Copy link
Contributor

I'm running into an issue that might be a bug, or a misunderstanding on my part:

image

The console is a result of me doing the following sequence twice:

  1. From rest, click the button (toggling isShowing)
  2. Click the button again in the middle of the animation, interrupting it

The first two console.tables show this:

  1. Blue box is inserted, Red is removed
  2. Red is inserted, Blue is removed

I would have expected (2) to be, Red is kept and Blue is removed.

The second time the sequence is run, that's exactly what I see.

Any idea what's causing this?

@ef4
Copy link
Contributor

ef4 commented Mar 11, 2019

Hmm, I agree that is unexpected.

Removed sprites only survive interruption if there is at least one motion using them when the interruption happens. That seems to be the case here, but maybe that's an area to investigate. If something is interfering with the motion or making it stop early, that could cause this.

@samselikoff
Copy link
Contributor Author

samselikoff commented Mar 11, 2019

To clarify:

Step 1       🔺----------------------------
             ----------------------------🔷

         
                👇 removed
Step 2       ---🔺-------------------------
(begin)      -----------------------🔷-----
                                    👆 inserted

                            
                    👇 ?
Step 3       -------🔺---------------------
(interrupt)  -------------------🔷---------
                                👆 ?

if in Step 2, 🔺 is a removedSprite and 🔷 is an insertedSprite, and that animation is interrupted while both sprites are still being animated, what should the categories of 🔺 and 🔷 be in Step 3?

@ef4
Copy link
Contributor

ef4 commented Mar 13, 2019

Red goes from removed to kept, blue goes from inserted to removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants