Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

195
Views
How to chain multiple tweens in Tween.js?

I'm using tween.js to chain things.

https://github.com/tweenjs/tween.js/blob/master/docs/user_guide.md

If I want to tween A, then B, then C, I could do it like this:

var tweenA = [...];
var tweenB = [...];
var tweenC = [...];

tweenA.chain(tweenB.chain(tweenC));

But what if I have A, B, C, D, and want to make B and C run at same time after A, and then make D run after B and C finishes.

I can make B and C run together after A like this

A.chain(B, C)

But how do I then chain D?

Note I want to avoid .onComplete calls, because in reality I have an array like this

[A, [A1,A2], B, [B1, B2], C, [C1, C2], ...]

and then A runs, then A1/A2 runs at same time, then B runs, then B1/B2 runs at same time, etc....

So I am looking for a way to make it work for arrays really.

Thanks

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!