简体   繁体   中英

CAEmitterLayer VERY SLOW

I am designing a particle system using Apple's CAEmitterLayer and CAEmitterCell and everything is going GREAT on the iPhone5 and simulator. But as soon as I run it on an iPhone4S the particle system kills the FPS. Now I tried decreasing the amount of particles on screen up to the point where only one particle is created per second and the FPS drops the same as when 500 particles are being created per second. The iPhone4S is running iOS 6.1.3 and the iPhone5 is running iOS 6.1.4.

Is there a reason why CAEmitterLayer is slowing down the game THIS much? Even though only a single particle is being created each second?

这帮助我提高了帧率:

emitterLayer.shouldRasterize=YES;

cellLayer.lifetime = 10;

Reducing the lifetime of CAEmitterCell may help you.

Here are some example for CAEmitterLayer https://github.com/JJMM/CUSSender .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM