Package

purescript-easings

Repository
i-am-tom/purescript-easings
License
MIT
Uploaded by
i-am-tom

The standard set of easing functions implemented in PureScript. Adapted from jQuery Easing, which was most likely stolen from Robert Penner's Programming Macromedia Flash MX. There are no new ideas in programming.

Unlike the jQuery library, only the ease-in functions are explicitly given. To keep things Dynamic™ and Maintanable™, out and inAndOut exist, which transform the other easing functions into out-easing and symmetrically-easing functions, respectively. You want elastic easing on the way out? out elastic is the function for you! Want to bounce off the walls? inAndOut bounce just might make your day.

API

The Easing type is Start -> End -> Progress -> Result, where all four are Numbers.

Function Signature Description
polynomial Number -> Easing Takes the power to which to raise progress.
sine Easing Standard sinusoidal easing.
exponential Easing Exponential easing.
circular Easing Follows a regular arc.
elastic Easing 'Spring' effect around the end.
back Easing Pulls back before transition.
bounce Easing in/out are reversed.

All of these can be seen on easings.net, though do note that bounce has been flipped. You'll see why when you look at the demo; what bounces on the way in? It's pretty weird, friend.

Contributing

Please submit PRs! All are welcome! I'll try to put some issues up to give some ideas.

Modules
Easing
Dependencies