-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Implement Matrix4Tween.lerp() #10829
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
Conversation
|
This is fantastic. Any chance you could add a test? Just verifying that this works roughly as we'd expect is sufficient. Something like the last test in https://github.com/flutter/flutter/blob/master/packages/flutter/test/animation/tween_test.dart would be fine. |
|
Will do. |
80f199a to
ff42f0e
Compare
|
I noticed my dart formatter changed the formatting of the test file, what style guide do you use? |
|
Also, I attempted to do a slerp implementation so we would have constant speed rotation, and the results were always off from my expectations by a couple percent. After trying for a bit yesterday I just gave up and went back to direct linear interpolation and left a TODO. I have a CL if you want to take a look. |
|
Prefer longer lines over line breaks after operators, but in general it's a judgement call. Optimize for readability. I'll trust your judgement on what the best algorithm is here; it looks like what you have is better than what we had before, so it's an improvement either way! It's not ideal that the test is in the animation/ directory but the code in widgets/ but don't worry about it, we have more work to clean up there already anyway. |
|
Sounds good. Let me know if there is anything else I should change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't wrap these
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flutter style is that if you have a newline after the (, you should have one before the matching ), and the contents should be indented by 2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
|
Just some stylistics nits. |
ff42f0e to
718ef5c
Compare
|
How do we get this check to re-run when the build is not broken anymore? |
|
It does so automatically. |
|
Thanks for the contribution! I will land your patch! |
|
Awesome, thanks for the help! |
Just an implementation of what this already claims to do.