From 07947487fa25dddcd7ab2693bb23f3977ffe45ad Mon Sep 17 00:00:00 2001 From: pengchengZenjoy Date: Tue, 7 Aug 2018 18:55:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=B2=92=E5=AD=90?= =?UTF-8?q?=E7=89=B9=E6=95=88=E9=87=8D=E5=8A=9B=E8=A2=AB=E6=94=B9=E5=8F=98?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cocos2d/particle/CCParticleSystem.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cocos2d/particle/CCParticleSystem.js b/cocos2d/particle/CCParticleSystem.js index 7a18fa4f32..0072ed9b02 100644 --- a/cocos2d/particle/CCParticleSystem.js +++ b/cocos2d/particle/CCParticleSystem.js @@ -595,7 +595,8 @@ cc.ParticleSystem = cc.Node.extend(/** @lends cc.ParticleSystem# */{ setGravity: function (gravity) { if (this.emitterMode !== cc.ParticleSystem.MODE_GRAVITY) cc.log("cc.ParticleBatchNode.setGravity() : Particle Mode should be Gravity"); - this.modeA.gravity = gravity; + this.modeA.gravity.x = gravity.x; + this.modeA.gravity.y = gravity.y; }, /** From a1779d4cfc44720cf0b32151f5affc5be16b92e1 Mon Sep 17 00:00:00 2001 From: pengchengZenjoy Date: Tue, 7 Aug 2018 18:58:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=B2=92=E5=AD=90?= =?UTF-8?q?=E7=89=B9=E6=95=88=E9=94=99=E8=AF=AF=E5=BD=B1=E5=93=8D=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E6=B7=B7=E5=90=88=E6=96=B9=E6=B3=95=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cocos2d/particle/CCParticleBatchNodeWebGLRenderCmd.js | 1 + cocos2d/particle/CCParticleSystemWebGLRenderCmd.js | 1 + 2 files changed, 2 insertions(+) diff --git a/cocos2d/particle/CCParticleBatchNodeWebGLRenderCmd.js b/cocos2d/particle/CCParticleBatchNodeWebGLRenderCmd.js index 765e7553ad..c96a0717ce 100644 --- a/cocos2d/particle/CCParticleBatchNodeWebGLRenderCmd.js +++ b/cocos2d/particle/CCParticleBatchNodeWebGLRenderCmd.js @@ -52,6 +52,7 @@ this._glProgramState.apply(this._matrix); cc.glBlendFuncForParticle(_t._blendFunc.src, _t._blendFunc.dst); _t.textureAtlas.drawQuads(); + cc.glBlendResetToCache(); }; proto._initWithTexture = function () { diff --git a/cocos2d/particle/CCParticleSystemWebGLRenderCmd.js b/cocos2d/particle/CCParticleSystemWebGLRenderCmd.js index 54b1236119..4c468ee58d 100644 --- a/cocos2d/particle/CCParticleSystemWebGLRenderCmd.js +++ b/cocos2d/particle/CCParticleSystemWebGLRenderCmd.js @@ -223,6 +223,7 @@ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this._buffersVBO[1]); gl.drawElements(gl.TRIANGLES, node._particleIdx * 6, gl.UNSIGNED_SHORT, 0); + cc.glBlendResetToCache(); }; proto.initTexCoordsWithRect = function (pointRect) {