jeremyckahn / shifty

The fastest TypeScript animation engine on the web
https://jeremyckahn.github.io/shifty/doc/
MIT License
1.54k stars 88 forks source link

adding support for array custom easing #171

Closed hoomanaskari closed 1 year ago

hoomanaskari commented 1 year ago

This PR enables the usage of arrays (bezier curves) to create custom easinging, eliminating the need to generate a named function for the custom easings, which therefore allows the usage of graph/curve editors to customize the easings furthermore. Such arrays must be of length 4 such as the following: [0.755, 0.05, 0.855, 0.06]

Further tests might be needed to make sure the import and export of the timeline works seamlessly, the initial tests from my side has worked so far.

hoomanaskari commented 1 year ago

Do you think you can write the test coverage? I am really not good at unit testing!

jeremyckahn commented 1 year ago

Do you think you can write the test coverage? I am really not good at unit testing!

Sure, I'll try to add that in this weekend.

jeremyckahn commented 1 year ago

@hoomanaskari I wanted to add some testing and documentation before merging, but I couldn't push to your fork. So, I opened #172 which includes your changes here. Thanks for the excellent new functionality!

jeremyckahn commented 1 year ago

This has been released in v2.20.0. Thanks again @hoomanaskari!