[FEATURE REQUEST] functional API for chaining multiple tweens in one go
HannesGitH opened this issue · comments
HannesH commented
let combinedtween = tween
.chain(tween2)
.chain(tween3)
.chain(tween4)
.chain(tween5);
wouldn't work
instead one needs to apply the chaining 'back to front' à la
let combinedtween = tween
.chain(tween2
.chain(tween3
.chain(tween4
.chain(tween5)
)
)
);
which is kinda cumbersome
see codepen L20 (wont work) vs L22
thednp commented
This "should" work, it did work last time I checked.
let combinedtween = tween
.chain(tween2)
.chain(tween3)
.chain(tween4)
.chain(tween5);
But this "should" also work:
tween.chain(tween2, tween3, tween4, tween5)
We may have to revisit this one, as my test after some time didn't work properly.
HannesH commented
the first one didnt work, but i also didnt know about the second version, which is probably even better in most cases :) thank you