Skip to content

Commit

Permalink
Merge v1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
jareguo committed Apr 26, 2018
2 parents aa5c9bb + 013f155 commit 26b50de
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 23 deletions.
19 changes: 6 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,17 @@
version: 2
jobs:
test:
steps:
- run:
command: npm test
setup:
docker:
- image: circleci/node:latest
steps:
- checkout
- run:
command: npm install -g gulp
- run:
command: npm install gulp-qunit

- run: sudo npm install -g gulp
- run: npm install gulp-qunit
- run: npm install
- run: npm test

workflows:
version: 2
build-test:
test:
jobs:
- test:
requires:
- setup
- test
2 changes: 1 addition & 1 deletion cocos2d/audio/CCAudio.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ Audio.State = {

proto.destroy = function () {
if (CC_WECHATGAME) {
this._element.destroy();
this._element && this._element.destroy();
}
};

Expand Down
8 changes: 4 additions & 4 deletions cocos2d/core/sprites/CCScale9Sprite.js
Original file line number Diff line number Diff line change
Expand Up @@ -1215,12 +1215,12 @@ cc.Scale9Sprite = _ccsg.Node.extend({
*/
setBlendFunc: function (blendFunc, dst) {
if (dst === undefined) {
this._blendFunc.src = blendFunc.src || cc.macro.BLEND_SRC;
this._blendFunc.dst = blendFunc.dst || cc.macro.BLEND_DST;
this._blendFunc.src = blendFunc.src;
this._blendFunc.dst = blendFunc.dst;
}
else {
this._blendFunc.src = blendFunc || cc.macro.BLEND_SRC;
this._blendFunc.dst = dst || cc.macro.BLEND_DST;
this._blendFunc.src = blendFunc;
this._blendFunc.dst = dst;
}
this._renderCmd.setDirtyFlag(_ccsg.Node._dirtyFlags.contentDirty);
},
Expand Down
4 changes: 2 additions & 2 deletions cocos2d/core/textures/CCTexture2D.js
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ game.once(game.EVENT_RENDERER_INITED, function () {
mipmap: undefined,
image: undefined,
premultiplyAlpha: undefined
}
};
function _getSharedOptions () {
for (var key in _sharedOpts) {
_sharedOpts[key] = undefined;
Expand Down Expand Up @@ -803,7 +803,7 @@ game.once(game.EVENT_RENDERER_INITED, function () {
var gl = this._gl;
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, premultiplyAlpha);
if (
sys.platform === sys.WECHAT_GAME ||
(sys.platform === sys.WECHAT_GAME && !(img instanceof Uint8Array)) ||
sys.platform === sys.QQ_PLAY ||
img instanceof HTMLCanvasElement ||
img instanceof HTMLImageElement ||
Expand Down
4 changes: 2 additions & 2 deletions cocos2d/motion-streak/CCMotionStreak.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ var MotionStreak = cc.Class({
* !#zh 删除当前所有的拖尾片段。
* @method reset
* @example
* // stop particle system.
* myParticleSystem.stopSystem();
* // Remove all living segments of the ribbon.
* myMotionStreak.reset();
*/
reset: function () {
this._motionStreak.reset();
Expand Down
2 changes: 1 addition & 1 deletion jsb/jsb-action.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ for (var key in actionUpdate) {
var prototype = action.prototype;
prototype.update = actionUpdate[key];

// polyfill to preserve chainable binding object
// polyfill to preserve chainable binding object (no need to polyfill easing)
prototype.speed = function (speed) {
return new cc.Speed(this, speed);
};
Expand Down
4 changes: 4 additions & 0 deletions jsb/jsb-audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ cc.Audio.Type = {
audioEngine.stop(this.id);
};

proto.destroy = function () {

};

proto.setLoop = function (loop) {
this.loop = loop;
audioEngine.setLoop(this.id, loop)
Expand Down

0 comments on commit 26b50de

Please sign in to comment.