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

Reduce animation lag #1419

Merged
merged 13 commits into from
Nov 13, 2020
Merged

Reduce animation lag #1419

merged 13 commits into from
Nov 13, 2020

Conversation

Szymon20000
Copy link
Contributor

@Szymon20000 Szymon20000 commented Nov 9, 2020

Description

fixes: #1313

Changes

  • pause CADisplayLink instead of invalidating
  • call mappers after frame callbacks (call onFrame instantly if an animation has been started during onRender call)
  • provide a monotonous timer by injecting a new method getTimestamp . It's done by injecting _frameTimestamp
    for the duration of the frame and similarly, we inject _eventTimestamp.

Test code and steps to reproduce

https://github.com/terrysahaidak/react-native-gallery-toolkit/tree/tr-add-pager-example

Checklist

  • Included code example that can be used to test this change
  • Updated TS types
  • Added TS types tests
  • Added unit / integration tests
  • Updated documentation
  • Ensured that CI passes

@Szymon20000 Szymon20000 changed the title @szymon/reduce lag Reduce animation lag Nov 9, 2020
@Szymon20000 Szymon20000 marked this pull request as ready for review November 10, 2020 12:57
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.

Frame drop on spring animation start after releasing a pan gesture
2 participants