Help Imperative -> Functional

Hello all, I am learning about functional programming style with Javascript and as an exercise I am trying to convert a function that is written in a more imperative style, to a more functional approach. I have a pretty good understanding of the concepts (currying, partial application, fn purity, side-effect minimization), however i am having a tough time applying them. I know I should be taking in more values as inputs instead of using vals outside the functions scope, as I said just having a hard time seeing how to do this and make them more composable. The animation function in particular calls ease with vals generated outside its scope. I know this is not advisable in the functional world. Been at it for hours with little progress, so any help would be hugely appreciated.

Would need to see the code

sorry, it is now updated with a link