metafizzy / zdog

Flat, round, designer-friendly pseudo-3D engine for canvas & SVG
https://zzz.dog
10.37k stars 394 forks source link

Add more easing options like elastic & bounce #50

Closed charlesr1971 closed 5 years ago

charlesr1971 commented 5 years ago

Currently, there is only one easing option:

easeInOut()

It would be nice to offer some more options, like:

Bounce Quad Elastic Custom Bezier

Maybe you could just attach a library to zDog like easing.js:

https://github.com/rdy/easing-js/blob/master/src/easing.js

desandro commented 5 years ago

I'd prefer to keep Zdog lean. I added in easeInOut as its a good all purpose easing. If you want to use other easings, you have your choice of animation library to build on top of: anime.js, GSAP, velocity.js, or even jQuery. My recommendation is to use another easing library rather than building it into Zdog. Thanks for this feature request, but I'll have to pass.

charlesr1971 commented 5 years ago

No worries. I can see your point here. I'll see if I can integrate easing.js...