diff --git a/cocos2d/core/components/CCAnimation.js b/cocos2d/core/components/CCAnimation.js index 0d1ea13a926..650d4ecdeed 100644 --- a/cocos2d/core/components/CCAnimation.js +++ b/cocos2d/core/components/CCAnimation.js @@ -34,11 +34,11 @@ function equalClips (clip1, clip2) { } /** - * @class AnimationComponent + * @class Animation * @extends CCComponent */ -var AnimationComponent = cc.Class({ - name: 'cc.AnimationComponent', +var Animation = cc.Class({ + name: 'cc.Animation', extends: require('./CCComponent'), editor: CC_EDITOR && { @@ -439,4 +439,4 @@ var AnimationComponent = cc.Class({ }); -cc.AnimationComponent = module.exports = AnimationComponent; +cc.Animation = module.exports = Animation; diff --git a/jsb_polyfill.js b/jsb_polyfill.js index f6ec83772ba..eed02179a09 100644 --- a/jsb_polyfill.js +++ b/jsb_polyfill.js @@ -378,6 +378,8 @@ cc.Label.Overflow = cc.Enum({ RESIZE: 2 }); +cc.spriteFrameAnimationCache = cc.animationCache; +cc.SpriteFrameAnimation = cc.Animation; // Assets cc.js.setClassName('cc.SpriteFrame', cc.SpriteFrame); diff --git a/test/qunit/unit/test-animation.js b/test/qunit/unit/test-animation.js index 2631165fb1a..ff218b9a621 100644 --- a/test/qunit/unit/test-animation.js +++ b/test/qunit/unit/test-animation.js @@ -459,7 +459,7 @@ test('initClipData', function () { test('Animation Component', function () { var entity = new cc.Node(); - var animation = entity.addComponent(cc.AnimationComponent); + var animation = entity.addComponent(cc.Animation); entity.x = 400; @@ -503,7 +503,7 @@ test('Animation Component', function () { test('CCAnimation._updateClip', function () { var entity = new cc.Node(); - var animation = entity.addComponent(cc.AnimationComponent); + var animation = entity.addComponent(cc.Animation); entity.x = 400;