@@ -1029,7 +1029,7 @@ cc.ParticleSystem = cc.Node.extend(/** @lends cc.ParticleSystem# */{
10291029 } ,
10301030
10311031 /** conforms to CocosNodeTexture protocol */
1032- _blendFunc :new cc . BlendFunc ( 0 , 0 ) ,
1032+ _blendFunc : { src : gl . ONE , dst : gl . ONE } ,
10331033 /**
10341034 * get BlendFunc of Particle System
10351035 * @return {cc.BlendFunc }
@@ -1040,11 +1040,12 @@ cc.ParticleSystem = cc.Node.extend(/** @lends cc.ParticleSystem# */{
10401040
10411041 /**
10421042 * set BlendFunc of Particle System
1043- * @param {cc.BlendFunc } blendFunc
1043+ * @param {Number } src
1044+ * @param {Number } dst
10441045 */
1045- setBlendFunc :function ( blendFunc ) {
1046- if ( this . _blendFunc . src != blendFunc . src || this . _blendFunc . dst != blendFunc . dst ) {
1047- this . _blendFunc = blendFunc ;
1046+ setBlendFunc :function ( src , dst ) {
1047+ if ( this . _blendFunc . src != src || this . _blendFunc . dst != dst ) {
1048+ this . _blendFunc = { src : src , dst : dst } ;
10481049 this . _updateBlendFunc ( ) ;
10491050 }
10501051 } ,
@@ -1078,7 +1079,7 @@ cc.ParticleSystem = cc.Node.extend(/** @lends cc.ParticleSystem# */{
10781079 */
10791080 isBlendAdditive :function ( ) {
10801081 //return this._isBlendAdditive;
1081- return ( this . _blendFunc . src == cc . GL_SRC_ALPHA && this . _blendFunc . dst == cc . GL_ONE ) ;
1082+ return ( this . _blendFunc . src == gl . SRC_ALPHA && this . _blendFunc . dst == gl . ONE ) ;
10821083 } ,
10831084
10841085 /**
@@ -1091,14 +1092,14 @@ cc.ParticleSystem = cc.Node.extend(/** @lends cc.ParticleSystem# */{
10911092 //TODO
10921093 this . _isBlendAdditive = isBlendAdditive ;
10931094 if ( isBlendAdditive ) {
1094- this . _blendFunc . src = cc . GL_SRC_ALPHA ;
1095- this . _blendFunc . dst = cc . GL_ONE ;
1095+ this . _blendFunc . src = gl . SRC_ALPHA ;
1096+ this . _blendFunc . dst = gl . ONE ;
10961097 } else {
10971098 this . _blendFunc . src = cc . BLEND_SRC ;
10981099 this . _blendFunc . dst = cc . BLEND_DST ;
10991100 /*if (this._texture && !this._texture.hasPremultipliedAlpha()) {
1100- this._blendFunc.src = GL_SRC_ALPHA ;
1101- this._blendFunc.dst = GL_ONE_MINUS_SRC_ALPHA ;
1101+ this._blendFunc.src = gl.SRC_ALPHA ;
1102+ this._blendFunc.dst = gl.ONE_MINUS_SRC_ALPHA ;
11021103 } else {
11031104 this._blendFunc.src = cc.BLEND_SRC;
11041105 this._blendFunc.dst = cc.BLEND_DST;
@@ -1173,7 +1174,7 @@ cc.ParticleSystem = cc.Node.extend(/** @lends cc.ParticleSystem# */{
11731174 this . _emitterMode = cc . PARTICLE_MODE_GRAVITY ;
11741175 this . modeA = new cc . ParticleSystem . ModeA ( ) ;
11751176 this . modeB = new cc . ParticleSystem . ModeB ( ) ;
1176- this . _blendFunc = new cc . BlendFunc ( cc . BLEND_SRC , cc . BLEND_DST ) ;
1177+ this . _blendFunc = { src : cc . BLEND_SRC , dst : cc . BLEND_DST } ;
11771178 } ,
11781179
11791180 /**
@@ -1764,8 +1765,8 @@ cc.ParticleSystem = cc.Node.extend(/** @lends cc.ParticleSystem# */{
17641765 if ( premultiplied ) {
17651766 this . _opacityModifyRGB = true ;
17661767 } else {
1767- this . _blendFunc . src = cc . GL_SRC_ALPHA ;
1768- this . _blendFunc . dst = cc . GL_ONE_MINUS_SRC_ALPHA ;
1768+ this . _blendFunc . src = gl . SRC_ALPHA ;
1769+ this . _blendFunc . dst = gl . ONE_MINUS_SRC_ALPHA ;
17691770 }
17701771 }
17711772 }
0 commit comments