geoffreydhuyvetters / animate-value

🏃 animates a numeric value
MIT License
12 stars 2 forks source link

Add new easings #5

Open geoffreydhuyvetters opened 7 years ago

geoffreydhuyvetters commented 7 years ago

Feature:

kavsingh commented 7 years ago

Hey! Thanks for the handy lib. Perhaps have the option of passing in a function to the easing prop? One could then import default easing functions (say an easeInOut / spring fn exported by animate-value) and apply it as needed, or be able to pass in a user defined fn.

geoffreydhuyvetters commented 7 years ago

I like this idea, not a difficult thing to implement I guess.

It would have to be an easing functions that returns a value between 0 - 1

kavsingh commented 7 years ago

For sure. I guess it would just receive current time as an argument?

geoffreydhuyvetters commented 7 years ago

value between 0-1 which recalculates it via easing to 0-1

geoffreydhuyvetters commented 7 years ago

PR always welcome btw :)

kavsingh commented 7 years ago

Of course, pull request opened 😄