Hi,
transistion.to is great and the out of the box easing function are great also…
However, out of the preset ones i can’t quite get the effect I want. After reading the docs here:
http://docs.coronalabs.com/api/library/easing/index.html
it mentions the built in ones are based on Robert Penner’s easing functions.
I had a play on the function generator and came up with a couple that suit my needs better.
http://www.timotheegroleau.com/Flash/experiments/easing_function_generator.htm
I had a play trying to get a custom one working but im not sure what my function needs to accept and return to get it to work.
This is a function as generated from the link above:
function(t, b, c, d) { var ts=(t/=d)\*t; var tc=ts\*t; return b+c\*(tc\*ts + -5\*ts\*ts + 10\*tc + -10\*ts + 5\*t); }
so in corona speak I thought I could just do this:
-- approx conversion local function myEasing(t, b, c, d) local ts=(t/d)\*t local tc=ts\*t return b+c\*(tc\*ts + -5\*ts\*ts + 10\*tc + -10\*ts + 5\*t) end transition.to( target, { transition=myEasing } )
Is there some documentation anywhere that i’ve missed? if not, has anybody got a working example so i can see how custom ones are created?
thanks!