-
Notifications
You must be signed in to change notification settings - Fork 42
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
easeBezier #29
base: main
Are you sure you want to change the base?
easeBezier #29
Conversation
with In, Out and InOut for symmetry with the others closes #3
I'd love a review @enjalot ; in particular I'm making grandiose claims about having a shorter and more accurate code than the reference implementation so I must be wrong somehow :) |
I took a look and compared the reference implementation. It seems they do extra work to a) provide an initial guess and b) switch to binary subdivision if the derivative is too close to 0. I'll admit that I can't remember enough numerical analysis to determine if you COULD have an input that would diverge, especially in the bounds of whats considered a "reasonable" easing function. I found your implementation to be easier to read than the reference as well. |
I also have a trick to avoid divergence in I've used this trick a lot in the 2D Newton-Raphson solver in d3-geo. |
Ah I see, yes that makes sense and looks good to me
…On Sun, Aug 9, 2020 at 3:41 PM Philippe Rivière ***@***.***> wrote:
I also have a trick to avoid divergence in
https://github.com/d3/d3-ease/pull/29/files#diff-98bd2b6dedcb4fda72304031dbf8d928R24
"when we're moving too fast, slow down".
I've used this trick a lot in the 2D Newton-Raphson solver in d3-geo.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#29 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAXPPLX3JRDPEDAMXC2LF3R74Q2JANCNFSM4PE45GXQ>
.
--
Ian Johnson - 周彦
http://enjalot.github.io/ <http://enja.org>
|
Hi there, this is very cool – I've been looking for an implementation for a Bézier-based easing function! Any news as to when this will be merged into master? :) |
Thanks! Yes, we should make a new push for all the outstanding features that have been waiting in pull-requests—some of them might be merged, others made available as notebooks or independent libraries. In the meantime it helps if someone plays with them, finds bugs, gives them real-world use cases, etc. In the case of this particular PR, I still need to complete it with documentation and unit tests. |
todo:
closes #3
demo: https://observablehq.com/d/51cd89b1a3f17913
speed/accuracy tests https://observablehq.com/d/e7d4fef33e304f2b