Comments (5)
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)
from flux.
Have you tried the macro:toggle-record
and macro:play
commands (ctrl+shift+;
and ctrl+;
)?
from flux.
OK so... I'm not sure if that was a joke and I didn't get it but I created a pull request.
from flux.
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 oncomplete
callback to the last tween in the chain if we want to loop it
from flux.
and passing it as the oncomplete callback to the last tween in the chain if we want to loop it
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.
from flux.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flux.