pixijs / particle-emitter

A particle system for PixiJS
http://pixijs.io/particle-emitter/docs
MIT License
793 stars 125 forks source link

A bug on ring type emitter #86

Closed cji3bp62000 closed 6 years ago

cji3bp62000 commented 6 years ago

Hey guys! First thanks to your great effort of making this masterpiece, it helped me a lot on creating fantastic effects.

About the issue of the thread title, I found there is a bug of ring type that, it works same as the circle type. You can check it even in the PixiParticlesEditor.

After Searching code, I found the problem is at line 906 of pixi-particle.js: if (spawnCircle.minRadius == spawnCircle.radius) { helperPoint.x = Math.random() * (spawnCircle.radius - spawnCircle.minRadius) + spawnCircle.minRadius; } I think it should be spawnCircle.minRadius !== spawnCircle.radius, to make it work fine as ring. (at least it worked for me if I plused ! into it)

andrewstart commented 6 years ago

Whoops, good catch!

davalapar commented 6 years ago

Nice find.