From 2dbc70a4acbbaf0c07be1ddf118c1ac589b517c3 Mon Sep 17 00:00:00 2001 From: 2youyouo2 <501251991@qq.com> Date: Thu, 28 Sep 2017 15:48:46 +0800 Subject: [PATCH 1/2] fixed init animation curve --- cocos2d/animation/animation-animator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos2d/animation/animation-animator.js b/cocos2d/animation/animation-animator.js index 74a99979b4..a2489497ed 100644 --- a/cocos2d/animation/animation-animator.js +++ b/cocos2d/animation/animation-animator.js @@ -324,7 +324,7 @@ function initClipData (root, state) { if (i === 1) { lastRatioDif = currRatioDif; } - else if (Math.abs(currRatioDif - lastRatioDif) > Math.EPSILON) { + else if (Math.abs(currRatioDif - lastRatioDif) > EPSILON) { canOptimize = false; break; } From 8c9896c01b1b2a801db5216315947665b73d7dee Mon Sep 17 00:00:00 2001 From: 2youyouo2 <501251991@qq.com> Date: Thu, 28 Sep 2017 15:49:32 +0800 Subject: [PATCH 2/2] fixed animation pause --- cocos2d/animation/playable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos2d/animation/playable.js b/cocos2d/animation/playable.js index 6e62a183a3..648e8680a3 100644 --- a/cocos2d/animation/playable.js +++ b/cocos2d/animation/playable.js @@ -110,7 +110,7 @@ prototype.stop = function () { * @method pause */ prototype.pause = function () { - if (this._isPlaying) { + if (this._isPlaying && !this._isPaused) { this._isPaused = true; this.onPause(); }