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

Ensure that springs reach their goals #242

Merged
merged 2 commits into from
Jul 24, 2023
Merged

Conversation

boatbomber
Copy link
Contributor

@boatbomber boatbomber commented Mar 1, 2023

Mathematically, springs only approach their goals infinitely. In order for Fusion animation to be a reliable tool, it needs to ensure that goals are actually reached.

When a spring is marked as completed/sleeping (via epsilon threshold), we simply set the value to the goal. This guarantees that it will eventually be the exact goal value.

@boatbomber
Copy link
Contributor Author

This is not just some math theory- this impacts the real world. I have a spring that always falls 1px short of its goal, leaving an aggravating gap.

@dphfox dphfox merged commit 68dfdf9 into dphfox:main Jul 24, 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.

2 participants