HFIProgramming / mikutap

A Mainland China Friendly and independent version extracted from https://aidn.jp/mikutap
https://hfiprogramming.github.io/mikutap/
1.68k stars 504 forks source link

Migrate to GSAP 3 #20

Closed nkh0472 closed 3 years ago

nkh0472 commented 3 years ago

TweenMax has been deprecated in GSAP 3 in favor of the streamlined gsap object. The last version of TweenMax is released on 19 May 2019. Thus migrate to GSAP 3 is needed for potential vulnerabilities and bug fixes.

In this project, the TweenLite library is called 44 times, and there are 3 functions respectively, namely TweenLite.fromTo(), TweenLite.delayedCall(), and TweenLite.to(). According to GSAP 3 Migration Guide and [GASP 3 Documentation](https://greensock.com/docs/v3/GSAP/gsap.delayedCall()), TweenLite. can be replaced with gasp. for above 3 functions, and the function syntax remains unchanged.

After migrate, the mikutap.js is smaller 0.21kb(-0.8%), the tweenmax.min.js (replaced by gasp.min.js) is smaller 52.42kb(-46.2%).

nkh0472 commented 3 years ago

Commits before https://github.com/HFIProgramming/mikutap/pull/20/commits/887463068006efec5b5e7a03da456cfa23eff725 have already been contained in https://github.com/HFIProgramming/mikutap/pull/17.