Skip to content
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

[FEATURE REQUEST] functional API for chaining multiple tweens in one go #114

Open
HannesGitH opened this issue Sep 30, 2022 · 2 comments
Open

Comments

@HannesGitH
Copy link

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
Copy link
Owner

thednp commented Oct 1, 2022

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.

@HannesGitH
Copy link
Author

the first one didnt work, but i also didnt know about the second version, which is probably even better in most cases :) thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants