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

Round Animate.to target #169

Closed

Conversation

TheoGil
Copy link

@TheoGil TheoGil commented May 4, 2023

Fix never ending lerping when to is not an integer thus never passing the Math.round(this.value) === this.to check to determine animation completion.

Fix this issue https://github.com/studio-freight/lenis/issues/168

This approach rounds the to value directly when its set from the fromTo method as it should be more efficient than rounding it at every advance call to compare values.

Fixes never ending lerping when to is not an integer thus never passing the Math.round check to determine animation completion. See https://github.com/studio-freight/lenis/issues/168
@TheoGil TheoGil requested a review from a team as a code owner May 4, 2023 15:12
@TheoGil TheoGil requested review from lsoengas and clementroche May 4, 2023 15:12
@vercel
Copy link

vercel bot commented May 4, 2023

Someone is attempting to deploy a commit to the Studio Freight Team on Vercel.

A member of the Team first needs to authorize it.

@TheoGil
Copy link
Author

TheoGil commented May 8, 2023

Fixed by studio-freight/lenis@96989b9

@TheoGil TheoGil closed this May 8, 2023
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.

1 participant