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

Fix double onFrameChange events with AnimatedSprite #6274

Merged

Conversation

TotooriaHyperion
Copy link
Contributor

Description of change

if it's stoped naturally, then reset frame to the last frame and don't trigger one more onFrameChange

Pre-Merge Checklist
  • Tests and/or benchmarks are included
  • Documentation is changed or added
  • Lint process passed (npm run lint)
  • Tests passed (npm run test)

@TotooriaHyperion TotooriaHyperion changed the title fix https://github.com/pixijs/pixi.js/issues/6271 fix #6271 Dec 10, 2019
@codecov-io
Copy link

codecov-io commented Dec 10, 2019

Codecov Report

Merging #6274 into dev will increase coverage by 0.23%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #6274      +/-   ##
==========================================
+ Coverage   76.75%   76.99%   +0.23%     
==========================================
  Files         202      202              
  Lines       10245    10247       +2     
==========================================
+ Hits         7864     7890      +26     
+ Misses       2381     2357      -24
Impacted Files Coverage Δ
packages/sprite-animated/src/AnimatedSprite.js 73.72% <100%> (+21.14%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7a00b08...5b96eeb. Read the comment docs.

Copy link
Member

@bigtimebuddy bigtimebuddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent fix. Thanks for the tests.

@bigtimebuddy bigtimebuddy changed the title fix #6271 Fix double onFrameChange events with AnimatedSprite Dec 10, 2019
@bigtimebuddy bigtimebuddy added this to the v5.2.1 milestone Dec 10, 2019
@bigtimebuddy bigtimebuddy merged commit 30d06f7 into pixijs:dev Dec 12, 2019
@bigtimebuddy
Copy link
Member

Thank you!

@TotooriaHyperion TotooriaHyperion deleted the fix/last_frame_trigger_twice branch December 19, 2019 04:58
@ivanpopelyshev
Copy link
Collaborator

Guys, this thing fails on windows :(

@bigtimebuddy
Copy link
Member

Tests or runtime fails @ivanpopelyshev? Can you be more specific?

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 this pull request may close these issues.

None yet

5 participants