javascript animation lib greensock gsap介紹

來源:互聯網
上載者:User

標籤:ast   包含   介紹   最大   animation   核心   html5   erp   ansi   

一般前台做動畫有以下幾種方式:

1. 簡單的css transition動畫;

2. css animation動畫

3. javascript庫動畫

一般來說css html5動畫只適用於簡單的形變動畫,動畫操作的是css某個屬性。

但是對於更加複雜的動畫,我們可能必須通過javascript來做,其中greensock的gsap就是一個讓你發揮無限想象的強大工具

gsap還支援模組化使用,這一點對於es6愛好者模組化編程的工程師來說是一個福音,支援下面的應用模式

npm install gsap --saveimport {TweenLite, Elastic, TimelineMax} from "gsap"

gsap動畫原理是:

他有一個核心庫,可以對任何對象value值做tween過度,如果需要支援特殊的css屬性,則可能需要CSSPlugin,最大的TweenMax包含以下內容(好在我們可以通過上面的import命令選擇性地匯入對應模組!):

TweenLite, TimelineLite, TimelineMax, CSSPlugin, RoundPropsPlugin, BezierPlugin, AttrPlugin, DirectionalRotationPlugin, and all of the eases like Power1, Power2, Power3, Power4, Back, Bounce, Circ, Cubic, Elastic, Expo, Linear, Sine, RoughEase, SlowMo, SteppedEase,

 

javascript animation lib greensock gsap介紹

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.