pixijs / particle-emitter

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

which npm/yarn lib? #135

Closed geddski closed 4 years ago

geddski commented 4 years ago

what's the difference between pixi-particles and @pixi/particles? Which should one use when using pixi 5.2.4?

andrewstart commented 4 years ago

@pixi/particles is the ParticleContainer class and corresponding rendering support, and comes from the relatively recent effort to split up the large pixi.js lib into smaller packages to allow for more precise feature inclusion (and smaller lib sizes) when building projects over the complete pixi.js package. Its source code lives inside the pixi.js repo. pixi-particles is this project, and does not depend on you using @pixi/particles, although you can.

geddski commented 4 years ago

Cool thx. I'm guessing that question will come up a lot, might be good to put in the docs somewhere.

I'm using this one (pixi-particles). Seeing a package for @pixi/particles made me think that was this one's replacement. What does the ParticleContainer etc do for you?

andrewstart commented 4 years ago

ParticleContainer is a specialized container that gains rendering speed by not uploading as much data to the GPU. You have to tell it what is allowed to change between frames (position, tint, etc). Other caveats to it: I believe all Sprites inside it musy share the same base texture, and adding/removing children may require it to recalculate a bunch of data. I think I last gave it a serious test two major versions of pixi.js ago, so I don't know how easy to use/performant it is now relative to the normal Container.

geddski commented 4 years ago

gotcha, thx @andrewstart!