rikulo/ui — pull request #22 by blommestein (2013-04-29 02:27:05+00:00)
Title: Rough proposal for different linear path motion

Hi Rikulo Team,
I was coming off of jQuery's animate() which had slightly different easing definitions (exposes 4 params instead of the 1), so I redid the LinearPathMotion to implement this.

I've added a few sample functions such as easing in and out in different manners (cubic, quad, quartic, etc) and more could be added if the idea appeals to you. If it does, I wouldn't know how you'd wish to implement this alongside the current ease(t) style, so I left a silly name. File description below:

Create LinearPathMotion2
This is a rough and poorly named proposition file to add a different functionality to LinearPathMotion. It is nearly identical except it is defined with an easing function that takes the duration and positional changes in addition to simply the current time, which then gives back an updated position rather than a multiplier. This follows the format set by easing functions used in jQuery's animate.

This allows slightly more control on easing both internally and externally, and as example some in/out easing functions are included as static finals. Further implementations of exponential, circular, and sinusoidal easing could be added as well as the individual ease ins and ease outs.