Open Noitidart opened 7 years ago
Actually I already added the ease . Could you check that with the latest demo page?
@Noitidart Thanks for your advices. I will try to imeplement it later but let's make sure the function is simple and easy to use. I will backlog this issue now.
Thanks @flyingant ! The equations above allow us to use it just like we use CSS transitions. So it offers not only ease, but familiarity. We can specify: linear
, ease
, ease-in
, ease-out
, ease-in-out
. Or supply an array, this is the same way you provide a CSS cubic-bezier. So we can use regular CSS tools in the browser to get a easing function like http://cubic-bezier.com/#.17,.67,.83,.67 - and I can plug this (.17,.67,.83,.67
) straight into the function as an array.
Please allow easing functions. For instance I use this set:
Then I calculate timing and values. I actually had my own scroll function, but came to yours and loved it. Just missing these easing functions.
This was my scroll to function:
Other features in my function that might be cool here are:
ref
. if ref is null then wait till it becomes non-null.