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

which npm/yarn lib?

geddski opened this issue · comments

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

@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.

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?

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.

gotcha, thx @andrewstart!