Description
The documentation for the plugin at the official site http://gsgd.co.uk/sandbox/jquery/easing/ needs to be updated to explain and guide other developers around the breaking of the Bonus feature where easing 1.3.x is based on jQuery 1.x and 2.x and easing 1.4.x is based on jQuery 3.x.
It would be nice to also have this documentation in the README.md for https://github.com/gdsmith/jquery.easing
jQuery.easing.method()
's old signature no longer works the same in 1.4.x:
jQuery.easing.method(
null†,
current_time,
start_value,
end_value,
total_time)
Wherever it is used directly in custom animations, the formula needs to be tweaked into this form:
// - x is (current_time / total_time), aka "percentage completed"
// - d is (end_value - start_value), aka "distance"
// - s is (start_value), if not zero
jQuery.easing.method(x) * d + s
One example of using jQuery.easing.method()
directly is when creating window.scrollBy()
smooth scroll animations. jQuery handles CSS animations easily, but doesn't quite fit for controlling window scrolling position, as far as I know.