pixijs / particle-emitter

A particle system for PixiJS

Home Page:http://pixijs.io/particle-emitter/docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Need to interact with particular particle on mouse touch and destroy it

DeepBhas opened this issue · comments

Hi,

I'm new to pixi-particles library, I'm using pixi-particles v4:3:0 and pixi-js-legacy 5:3:7

I creating a scenario using pixi-particles where I integrated a rain effect. I need to destroy particular particle emit from emitter on mouse interact. How can we achieve this. I'm facing difficulty to get particular particle object on mouse interact.

Much needed help ASAP.

Thanks

I would advise against this, as hit testing against hundreds/thousands of particles each mouse down/up will not be good for performance. If you still want to do it, then I would write your own behavior implementation that adds the mouse event listeners and reports the results.

commented

Maybe look into ParticleContainer

https://pixijs.download/dev/docs/PIXI.ParticleContainer.html

And simply search trough them on mouse click