文件名称:Pixi.js动画插件pixi-action.zip
文件大小:66KB
文件格式:NONE
更新时间:2022-08-06 00:15:58
开源项目
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); // 执行动画 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/ 标签:pixiaction
【文件预览】:
pixi-action-master
----.travis.yml(41B)
----.eslintrc(1KB)
----res()
--------css()
--------images()
--------html()
----package.json(1KB)
----index.html(5KB)
----src()
--------ActionSpawn.js(683B)
--------index.js(1KB)
--------ActionRepeat.js(672B)
--------ActionDelay.js(490B)
--------ActionManager.js(3KB)
--------ActionSequence.js(573B)
--------ActionPivot.js(2KB)
--------ActionFade.js(1KB)
--------ActionTint.js(1KB)
--------ActionCallFunc.js(356B)
--------ActionMove.js(2KB)
--------ActionScale.js(2KB)
--------Action.js(266B)
--------ActionSkew.js(2KB)
--------ActionBlink.js(769B)
--------ActionAlpha.js(1KB)
--------ActionRotate.js(1KB)
----LICENSE.md(1KB)
----.gitignore(43B)
----webpack.config.js(649B)
----README.md(5KB)
----build()
--------pixi-action.js.map(120KB)
--------pixi-action.js(27KB)