shywalla Posted February 27 Share Posted February 27 Hey all, I'm having some issues running a bunch of pixi particle emitters at once. I want about 24 to run in parallel, and I've adjusted the emitters to what seem to be pretty reasonable amounts. However, this crashes my FPS from a clean 60 to almost 20. Calculating the number of objects, it's super low, any ideas why Pixi would have so much trouble? I tried batching my emitters as shown below, but I have a suspicion this does nothing haha. Also, not sure if this is relevant, but I see that my GPU is not being used at all. Texture1 is a texturet that i got from the standard particle.png from PIXI emitter. Any advice would be much appreciated! for(let particleContainer of this.particleContainers) { const emitter = new particles.Emitter(particleContainer, { lifetime: { min: 0.1, max: 0.75 }, frequency: 0.5, addAtBack: false, emitterLifetime: 0, maxParticles: 10, pos: { x: 0, y: 0 }, emit: true, autoUpdate: false, behaviors: [ { type: "scale", config: { scale: { list: [ { time: 0, value: 0.2 }, { time: 1, value: 0.01 } ] }, minMult: 1 } }, { type: 'alpha', config:{ alpha: { list: [ { time: 0, value: 0.62 }, { time: 1, value: 0 } ] } } }, { type: "moveSpeedStatic", config: { min: 200, max: 500 } }, { type: 'spawnPoint', config: {}, }, { type: "rotationStatic", config: { "min": 240, "max": 300, } }, { type: 'textureSingle', config: { texture: texture2 } }, { type: 'moveSpeedStatic', config: { min: 30, max: 200 } }, ], }); this.particleEmitters.push(emitter); } this.app.ticker.add(() => {{ for(let emitter of this.particleEmitters) { emitter.update(this.app.ticker.deltaMS); } }} ) } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.