Example easing function for default animation 'defaultAnimation'
Raf-sns opened this issue · comments
Raphaël Castello commented
Hello and thank you for this excellent js library!
This is not an issue, I just want to expose here how I adjusted the easing because I have searched a bit, maybe this example could be part of the documentation.
This is how to set the 'defaultAnimation' object:
- First define an easing function as found here: easings.net (click on a function to preview the function)
ex. :
var easeOutCubic = (x)=>{
return 1 - Math. pow(1 - x, 3);
}
- Then define the object like this:
defaultAnimation: {
duration: 1200, // animation duration
easing: easeInOutBack, // function that you defined before
},
I hope this helps others like me.
regards !