Skip to content

Commit

Permalink
Merge remote-tracking branch 'fireball/v2.2.0' into v2.3.0-merge22
Browse files Browse the repository at this point in the history
  • Loading branch information
2youyou2 committed Jul 15, 2019
2 parents 039ed38 + c52cd92 commit db2b00b
Show file tree
Hide file tree
Showing 122 changed files with 2,756 additions and 5,595 deletions.
17 changes: 10 additions & 7 deletions EngineErrorMap.md
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,10 @@ contentSize parameter is deprecated and ignored for cc.Texture2D initWithData fu

Lazy init texture with image element failed due to image loading failure: %s

### 3120

Loading texture from '%s' with unsupported type: '%s'. Add '%s' into 'cc.macro.SUPPORT_TEXTURE_FORMATS' please.

### 3200

<!-- DEPRECATED -->
Expand Down Expand Up @@ -1355,24 +1359,24 @@ Default value must be initialized at their declaration:
type: cc.Integer
default: 0 // <--
})
value;
myProp;
// After:
@property({
type: cc.Integer
})
value = 0; // <--
myProp = 0; // <--
```

### 3654

Please specifiy a default value for "%s" property at its declaration:
Please specifiy a default value for "%s.%s" at its declaration:
```
// Before:
@property(...)
value;
myProp;
// After:
@property(...)
value = 0
myProp = 0;
```

### 3655
Expand Down Expand Up @@ -1907,12 +1911,11 @@ Invalid type of %s.%s

### 5509

<!-- DEPRECATED -->
The 'type' attribute of '%s.%s' must be child class of cc.Asset, otherwise you should use 'url: %s' instead

### 5510

The 'type' attribute of '%s.%s' can not be 'Number', use 'Float' or 'Integer' instead please.
The 'type' attribute of '%s.%s' can not be 'Number', use cc.Float or cc.Integer instead please.

### 5511

Expand Down
13 changes: 9 additions & 4 deletions cocos2d/actions/CCActionInterval.js
Original file line number Diff line number Diff line change
Expand Up @@ -911,11 +911,14 @@ cc.RotateTo = cc.Class({
startWithTarget:function (target) {
cc.ActionInterval.prototype.startWithTarget.call(this, target);

this._startAngle = target.angle % 360;
let angle = this._dstAngle - this._startAngle;
let startAngle = target.angle % 360;

let angle = cc.macro.ROTATE_ACTION_CCW ? (this._dstAngle - startAngle) : (this._dstAngle + startAngle);
if (angle > 180) angle -= 360;
if (angle < -180) angle += 360;
this._angle = angle;

this._startAngle = startAngle;
this._angle = cc.macro.ROTATE_ACTION_CCW ? angle : -angle;
},

reverse:function () {
Expand Down Expand Up @@ -963,7 +966,9 @@ cc.RotateBy = cc.Class({
extends: cc.ActionInterval,

ctor: function (duration, deltaAngle) {
this._deltaAngle = cc.v3();
deltaAngle *= cc.macro.ROTATE_ACTION_CCW ? 1 : -1;

this._deltaAngle = 0;
this._startAngle = 0;
deltaAngle !== undefined && this.initWithDuration(duration, deltaAngle);
},
Expand Down
2 changes: 1 addition & 1 deletion cocos2d/actions/tween.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ let TweenAction = cc.Class({

// property may have custom easing or progress function
let easing, progress;
if (value.value && (value.easing || value.progress)) {
if (value.value !== undefined && (value.easing || value.progress)) {
if (typeof value.easing === 'string') {
easing = cc.easing[value.easing];
!easing && cc.warnID(1031, value.easing);
Expand Down
2 changes: 1 addition & 1 deletion cocos2d/animation/animation-clip.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var AnimationClip = cc.Class({
properties: {
_duration: {
default: 0,
type: 'Float',
type: cc.Float,
},

/**
Expand Down
2 changes: 1 addition & 1 deletion cocos2d/animation/easing.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ easing.bounceOutIn = _makeOutIn(easing.bounceIn, easing.bounceOut);
/**
* !#en This is a Easing instance.
* !#zh 这是一个 Easing 类实例。
* @method easing
* @property easing
* @type Easing
*/

Expand Down
Loading

0 comments on commit db2b00b

Please sign in to comment.