-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repeat #9
Comments
Have you tried the |
OK so... I'm not sure if that was a joke and I didn't get it but I created a pull request. |
Sorry about that! The question made some sense in the context of another one of my projects, it's surprisingly easy to miss the repository title if you aren't looking for it. Repeating a tween in flux is typically done by creating a local function that starts a tween (or sequence of tweens) and passing it as the |
that actually makes sense, I don't know why but I thought this was going to create a stack overflow error, but now that I think about it a little more, that's not the case, I was just confused. I guess we can close this MR since it's not really that necessary, as you pointed. |
And it looks like you can do a delay before your repeat with an empty tween: S.tween = flux.group()
-- Declare variable before assigning so function can capture this local reference.
-- Alternative is to make the function global.
-- Prevents "expected function or callable")
local loop_heartbeat
loop_heartbeat = function()
local time = 0.5
S.tween:to(S.heart, 0.5, { scale = 1.2, })
:ease("backout")
:after(time, { scale = 1.0, })
:ease("backin")
:oncomplete(loop_heartbeat)
end
S.tween:to(S.heart, 2, {
scale = 1,
})
:delay(2)
:ease("elasticout")
:after(5, {}) -- delay before loop
:oncomplete(loop_heartbeat) |
It would be nice to have a repeat functionality. Something to repeat the whole transformation with options to reverse it "in time" as well.
The text was updated successfully, but these errors were encountered: