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 #21

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, TweenLite. can be replaced with gsap. 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%).

Commits before https://github.com/HFIProgramming/mikutap/commit/1656919ae67a68751acf3e81ce10cd37d2b476ca have already been contained in #17.