<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          pixi-actionPixi.js 動畫插件

          聯(lián)合創(chuàng)作 · 2023-09-22 04:20

          pixi-action,一個類似 cocos2d-x 使用方法的 Pixi.js 動畫插件。

          var renderer = new PIXI.autoDetectRenderer(800,600);
          document.body.appendChild(renderer.view);
          var stage = new PIXI.Container();
          
          var sprite1 = new Sprite(resources['res/img/animal.png'].texture);
          
          var action_move = PIXI.action.MoveTo(500, 400, 2); // 移動動畫
          
          var animation = PIXI.actionManager.runAction(cat, action_moveto); // 執(zhí)行動畫
          animation.on('end', function(elapsed) {
            console.log('action end.');
          });
          
          function animate() {
            window.requestAnimationFrame(animate);
            renderer.render(stage);
            PIXI.actionManager.update(); // update actions,這句必須加上
          }
          animate();

          使用非常簡單,目前支持以下動畫:

          1. Action Move:Include: MoveTo , MoveBy

          2. Action Scale:Include: ScaleTo , ScaleBy

          3. Action Rotate:Include: RotateTo , RotateBy

          4. Action Fade:Include: FadeIn , FadeOut

          5. Action Blink:Include: Blink

          6. Action Tint:Include: TintTo , TintBy

          7. Action Skew:Include: SkewTo , SkewBy

          8. Action Pivot:Include: PivotTo , PivotBy

          9. Action Repeat:Include: Repeat and cancelAction

          10. Action Sequence: Include: Sequence

          11. Action Delay:Include: DelayTime

          12. Action CallFunc:Include: CallFunc

          DEMO 地址:http://git.hust.cc/pixi-action/ 

          瀏覽 31
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  大粗鸡巴久久久久 | 亚洲国产免费视频 | 豆花天天吃最新视频 | 亚洲短视频 | 豆花视频成人版网站入口 |