I have to synchronize some sfx’s with a bouncing object. I am using “EASING_OUTBOUCE” as easing function. So I need the math definition of this easing function in order to play the sfx at the right moment… Do you know where to find such definition?
I need to know the times when value == final value. If I understand correctly this is when the number in the list you pointed me at is (about) 1.0. And it seems to me that there are 64 samples for each curves. Is this correct?
They can now be found everywhere and in many engines and frameworks. There are many sites which visualise the easing functions. Example: https://easings.net/
@britzl thank you so much! Following the page of Robert Penner you suggested I found some github code (https://github.com/jesusgollonet/ofpennereasing) with a c++ code that computes the easing functions. Of course the tables @Mathias_Westerdahl suggested is sufficient for my needs, but now I know how to generate these functions and their exact definitions. Very interesting!
thanks @Mathias_Westerdahl but I am not sure I understand your suggestion… Here it is my code for the synchronization. It is quite hardwired but it seems to work:
local T = 1.5
go.animate(".", "position.y", go.PLAYBACK_ONCE_FORWARD, - 100.0, go.EASING_OUTBOUNCE, T)
local DTS = { 23, 46, 57, 63 }
for i = 1, #DTS do
local t = DTS[i] * t / 63.0
timer.delay(t, false, function() print("Boing") end)
end
I have deduced the numbers 23, 46, 57, 63 form the table in the source you pointed me at! I know it is not an example of beautiful code… sorry but it is quite simple…