mmartis
October 27, 2014, 7:59pm
#1
Hi,
I’m using cocos2d-js 3.0 and I have a problem with particles in canvas render mode.
Particle using WebGL:
Particle using Canvas:
This happen even if I set the drawMode of the emitter to cc.ParticleSystem.TEXTURE_MODE
I’ve attached the particles used for this test. Both are the same, but one has the texture embed in the .plist. And the particles are generated with Particle Designer 2.0.
Particles.zip (131.2 KB)
Thanks in advance.
I have the same issue.
Works well on desktop web and native but on native web particle replaced with default one (white circle).
Hi,
This bug has been fixed at cocos2d/cocos2d-html5#2427
It’s our mistake, sorry.
David
Sorry, I am new to cocos and do not understand where I can look at this fix.
cocos2d/cocos2d-html5#2427
Can you help me with this?
Hmm …I do not test this fix on mobile but after it now I have the same problem on desctop in canvas mode.
mmartis
Do you test this fix on desctop on canvas? Does it work ?
Fix is working, but you need to set SHAPE and MODE directly.
var effect = cc.ParticleSystem.create(plist); effect.setDrawMode(cc.ParticleSystem.TEXTURE_MODE);
effect.setShapeType(cc.ParticleSystem.STAR_SHAPE);
this.addChild(effect);
…or replace default values in CCParticleSystem.js file.
replace this lines:
this.drawMode = cc.ParticleSystem.SHAPE_MODE;
this.shapeType = cc.ParticleSystem.BALL_SHAPE;
with these ones:
this.drawMode = cc.ParticleSystem.TEXTURE_MODE;
this.shapeType = cc.ParticleSystem.STAR_SHAPE;
This will help to fix this issue in all project in 5 minutes