小锤子

1 function clickHandler(event) {
2     createjs.Tween.get(sprite, { loop: false }).to({ rotation: 20 }, 80).to({ rotation: 0 }, 80)
3                     .to({ rotation: -20 }, 80).to({ rotation: 0 }, 80)
4                     .to({ rotation: 20 }, 80).to({ rotation: 0 }, 80).to({ rotation: -10 }, 80)
5                     .call(tweenCompleteHandler);
6             }

有了createjs就这么一句话。

原文地址:https://www.cnblogs.com/haimingpro/p/6126146.html