粒子效果在ios上的效率及展示效果异常的问题(抱歉用中文提问)


#1

很抱歉我使用中文来提问,因为我写英文的能力实在是差劲。
我向请问下,我使用了相同代码加载了图片在页面上做粒子效果,但是在safari(以及ios自带浏览器)和chrome(以及android自带浏览器)上对比,safari(以及ios自带浏览器)展现出得效果以及效率差了许多,所以想请教下,应当如何做?
我使用的代码为:

var texture = cc.TextureCache.getInstance().addImage(s_star2);
var emitter = cc.ParticleExplosion.create(); 
emitter.initWithTotalParticles(20);
emitter.setTexture(texture);
emitter.setPosition(this.winSize.width / 2, this.winSize.height / 2); 
emitter.setSpeed(150);
this.layer.addChild(emitter);

另外,当我使用particles designer做粒子效果导出为plist(内含小图片)的时候,js库会报

TypeError: 'undefined' is not an object (evaluating 'gzip.gunzip()[0][0]')


safari.png (15.7 KB)


chrome.png (15.7 KB)


starnew.plist.zip (2.0 KB)


#2

Hi,
I think chrome maybe runs on WebGL mode, and safari runs on Canvas mode. Because ParticleSystem’s performance running on WebGL mode better than running on Canvas mode more.

About the parsing plist error, we will fix it soon.

Thank you for feedback
David


#3

Hi,
I spent a long time to try to parsing your plist file, but our PNGReadder can’t parse your png file. We should update the PNGReader library, we will send a message to you if it is updated.


#4

@dingping.lv@cocos2d-x.org
感谢您的答复,还没出正月十五,在这里祝您新年快乐