Callback functions for each item of a sequence
dbismut opened this issue · 0 comments
dbismut commented
This lib looks really impressive!
I'm curious if there is a way to execute a callback / step for each item of a sequence. I've tried the following but it didn't work:
const o = { a: 1 }
Fat.animate(
{ obj: o },
[
{
a: { from: 1, to: 0, duration: 2000 },
callback: function () { // <-- this is what I'm interested in
console.log('First animation finished')
},
},
{
a: { to: 1, duration: 2000 },
},
],
{
callback: function () {
console.log('All animations finished')
},
}
)