Tween counter: ~0k

What is happening here:
Bellow, 5 scenario are tested over different configuration / libraries:
  • 1. Normal usage : 200 tween over 100 frames x 50 times
  • 2. Long duration usage : 1000 tween over 500 frames x 100 times (to test long term usage and GC)
  • 3. Medium usage : 2k tween over 200 frames x 5 times
  • 4. Heavy usage : 5k tween over 200 frames x 5 times
  • 5. Unrealistic : 10k tween over 500 frames x 5 times (to test many concurrent tween)
Summarize:
  • Scenario 1 & 2: simulate normal game usage
  • Scenario 3 & 4 & 5: are stress test which should almost never happen in real life
Those 3 libraries (Fatina, Tina.js and Tween.js) all perform well under normal usage. This page is creating millions of tweens, this is definitely not a normal usage ...
results are just here to get an estimation.

Results:

Normal tweens

# Fatina TINA.js Tween.js
Scenario 1
Scenario 2
Scenario 3
Scenario 4
Scenario 5
* smaller is better
See Code

Complicated tweens (callback, loop, easing)

# Fatina TINA.js Tween.js
Scenario 1
Scenario 2
Scenario 3
Scenario 4
Scenario 5
* smaller is better
See Code

Sequence / Chains

# Fatina TINA.js Tween.js **
Scenario 1
Scenario 2
Scenario 3
Scenario 4
Scenario 5
* smaller is better
** TweenJS doesn't support sequence or timeline, so using .chain() for this test. Which is lighter but dont provides most of the sequence features
See Code

Fatina

Normal Tween

Complicated Tween

Sequence


TINA

Normal Tween

Complicated Tween

Sequence


Tween.js

Normal Tween

Complicated Tween

Sequence