local function play_anim(self)
go.animate(".", "scale", go.PLAYBACK_ONCE_PINGPONG, 1.2, go.EASING_OUTINSINE, 0.3, 0.1, play_anim)
end
function init(self)
play_anim(self)
end
left animation code:
local function play_anim(self)
gui.animate(self.node, gui.PROP_SCALE, vmath.vector3(1.1, 1.1, 1.1), gui.EASING_OUTSINE, 0.3, 0.1,
play_anim, gui.PLAYBACK_ONCE_PINGPONG)
end
function init(self)
self.node = gui.get_node("box")
play_anim(self)
end
As you can see left animation has accumulated error.
I don’t know why, but it’s looks like some calculation after end callback.
I think this is a previously reported issue (don’t know the ticket number right now), where the callback is called after the first component (.x) is finished animating, and subsequently stopping the .y and .z animations. And since they never reach the end values, the error accumulates.
Knowing this, a workaround could be to set the correct exit value in the play_anim.