Leocardoso94 / animated-number-react

Super easy way to animate numbers with React
MIT License
104 stars 13 forks source link

Any non elastic/linear easing's do not work #24

Open michaelketzer opened 3 years ago

michaelketzer commented 3 years ago

Any of the easing functions do not work.

<AnimatedNumber value={20} easing={'easeInQuart'} formatValue={(value) => {
    console.log(value)
    return value;
}}/>

Received value on formatValue is "0", during the animation it is "NaN" and at the complete it is "20".

giveli commented 3 years ago

Does anyone have the answer please ?

StoneMoney commented 2 years ago

This is because the author is using a static version of anime.js which at the time only had 'Quad', 'Cubic', 'Quart', 'Quint', 'Sine', 'Expo', 'Circ', 'Back', 'Elastic' rather than the modern versions that contain much more than that.

nobi1007 commented 9 months ago

Seems like only following works as of now linear, easeInElastic, easeOutElastic, easeInOutElastic.