A tool to see easily all the easing functions for transition

hi, 

Here below a snippet that i wrote to see easy all the easing functions with the transition

a small contribution to thank the forum which helped me a lot  :wink:

-- main.lua display.setStatusBar( display.HiddenStatusBar ) local circle = display.newCircle(100,100,20) local myText = display.newText( "transition", 200, 150, 200,200, native.systemFont, 20 ) local timeChoose=1000 --for testing the transition local timeChoose2=100 --for the return local cnt=0 local tr={} tr[1]=easing.inSine tr[2]=easing.outSine tr[3]=easing.inOutSine tr[4]=easing.outInSine tr[5]=easing.inQuad tr[6]=easing.outQuad tr[7]=easing.inOutQuad tr[8]=easing.outInQuad tr[9]=easing.inCubic tr[10]=easing.outCubic tr[11]=easing.inOutCubic tr[12]=easing.outInCubic tr[13]=easing.inQuart tr[14]=easing.outQuart tr[15]=easing.inOutQuart tr[16]=easing.outInQuart tr[17]=easing.inQuint tr[18]=easing.outQuint tr[19]=easing.inOutQuint tr[20]=easing.outInQuint tr[21]=easing.inExpo tr[22]=easing.outExpo tr[23]=easing.inOutExpo tr[24]=easing.outInExpo tr[25]=easing.inCirc tr[26]=easing.outCirc tr[27]=easing.inOutCirc tr[28]=easing.outInCirc tr[29]=easing.inBack tr[30]=easing.outBack tr[31]=easing.inOutBack tr[32]=easing.outInBack tr[33]=easing.inElastic tr[34]=easing.outElastic tr[35]=easing.inOutElastic tr[36]=easing.outInElastic tr[37]=easing.inBounce tr[38]=easing.outBounce tr[39]=easing.inOutBounce tr[40]=easing.outInBounce local trText={} trText[1]="easing.inSine" trText[2]="easing.outSine" trText[3]="easing.inOutSine" trText[4]="easing.outInSine" trText[5]="easing.inQuad" trText[6]="easing.outQuad" trText[7]="easing.inOutQuad" trText[8]="easing.outInQuad" trText[9]="easing.inCubic" trText[10]="easing.outCubic" trText[11]="easing.inOutCubic" trText[12]="easing.outInCubic" trText[13]="easing.inQuart" trText[14]="easing.outQuart" trText[15]="easing.inOutQuart" trText[16]="easing.outInQuart" trText[17]="easing.inQuint" trText[18]="easing.outQuint" trText[19]="easing.inOutQuint" trText[20]="easing.outInQuint" trText[21]="easing.inExpo" trText[22]="easing.outExpo" trText[23]="easing.inOutExpo" trText[24]="easing.outInExpo" trText[25]="easing.inCirc" trText[26]="easing.outCirc" trText[27]="easing.inOutCirc" trText[28]="easing.outInCirc" trText[29]="easing.inBack" trText[30]="easing.outBack" trText[31]="easing.inOutBack" trText[32]="easing.outInBack" trText[33]="easing.inElastic" trText[34]="easing.outElastic" trText[35]="easing.inOutElastic" trText[36]="easing.outInElastic" trText[37]="easing.inBounce" trText[38]="easing.outBounce" trText[39]="easing.inOutBounce" trText[40]="easing.outInBounce" local function testTransition() cnt=cnt+1 local function resetPosition() transition.to(circle,{time=timeChoose2, x=100,y=100, onComplete=testTransition}) end myText.text=trText[cnt] transition.to(circle,{time=timeChoose, x=100,y=400, transition=tr[cnt], onComplete=resetPosition}) if cnt \> #tr then cnt=0 end end testTransition()

Great stuff!

Adding on to this, here’s Robert Penner’s website, with an interactive graphic showing all of his transitions. Just choose the transition, and click on some point within the blue square.

http://robertpenner.com/easing/easing_demo.html

Great stuff!

Adding on to this, here’s Robert Penner’s website, with an interactive graphic showing all of his transitions. Just choose the transition, and click on some point within the blue square.

http://robertpenner.com/easing/easing_demo.html