• Derma Animations.
    0 replies, posted
Hello there, Im trying to use some animations from these two sites, and this is what I got. [url]http://easings.net/da#easeOutBounce[/url] - Animation im trying to implement. [url]https://www.assembla.com/code/sleepsheepdash/subversion/nodes/56/trunk/easingx.lua[/url] - The Lua snips im using for the animation to calc. These are the functions I use from the animation libary. [LUA] easeOutBounce = function(ratio) local s = 7.5625 local p = 2.75 local l if ratio < (1.0 / p) then l = s * pow(ratio, 2.0) else if ratio < (2.0 / p) then ratio = ratio - (1.5 / p) l = s * pow(ratio, 2.0) + 0.75 else if ratio < (2.5 / p) then ratio = ratio - (2.25 / p) l = s * pow(ratio, 2.0) + 0.9375 else ratio = ratio - (2.65 / p) l = s * pow(ratio, 2.0) + 0.984375 end end end return l end [/LUA] [LUA] function M.easeOutBounce(t, tMax, start, delta) return start + (delta * easeOutBounce(t / tMax)) end [/LUA] Here is where I call it: [LUA] for i = 0, 100, 1 do scroller:SetPos( jobshopx, M.easeOutBounce(i, 100, 50, 50) ) print(M.easeOutBounce(i, 100, 50, 50)) end [/LUA] I dont know how else I would use the functions, got a small amount of help and he told me to loop it, but the SetPos dosent seem to work with this please help. the print I got is to see if it runs fine without the visuals, Instead I spam the outcome here I link a Pastebin. [url]http://pastebin.com/GwCuxexh[/url] And as you can see, it starts on 50 makes a little bounce then end on 100.
Sorry, you need to Log In to post a reply to this thread.