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

Animation first frame glitch #1636

Closed
eonarheim opened this issue Sep 5, 2020 · 1 comment · Fixed by #1637
Closed

Animation first frame glitch #1636

eonarheim opened this issue Sep 5, 2020 · 1 comment · Fixed by #1637

Comments

@eonarheim
Copy link
Member

anim-glitch

Steps to Reproduce

If the animation is using scaling, anchors, or rotation the first frame does not get the updated values until after the first draw causing an odd flicker.

Expected Result

Animations should play without flickering

Actual Result

First frame incorrect

Environment

  • browsers and versions: Chrome 84
  • operating system: Windows
  • Excalibur versions: latest 0.24.4

Current Workaround

None

@eonarheim
Copy link
Member Author

GH must do some gif optimization :( the frame with the flicker is missing in the preview

eonarheim added a commit that referenced this issue Sep 5, 2020
Closes #1636

## Changes:

- Update animations in separate tick from draw()
- Add idempotency token to prevent the same animation from being updated multiple times per frame
- Added new tests
eonarheim added a commit that referenced this issue Sep 11, 2020
Fixes additional issue with #1636 the problem is that if an animation switches inside of an action or another process in the main before animations have a time to be processed the same flicker will happen again.

## Changes:

- Calls an empty tick when switching to a new animation to ensure animation is ready
- Adds tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant