Tween Demo - A box animated over time. The library features two motion-related classes:
  • Tween - Contains motion primitives, lerps and easing functions.
  • Tweenetik - A shorcut class that leverates Tween to interpolate object properties over time
  • Tweenetik.to(
      mySprite,                         // an object or sprite
      { scaleX: scale, scaleY: scale},  // the properties & end-values
      2.0,                              // duration in seconds
      Easing.easeOutBounce,             // easing function
      {
        delay: 0.5,                     // optional 0.5s delay
        onStart: () => console.log("Tween started!"),
        onComplete: () => console.log("Tween done!"),
        onUpdate: () => console.log("Updated frame"),
      }
    );