Closed grevius5 closed 2 years ago
Is that the only error that appears? Your pasted code has trailing commas in the texture array. I don't recall how Javascript handles that, but if it puts an undefined value in the array the AnimatedParticle code would throw an error when setting up the emitter. You also need to ensure you are setting the particleConstructor
property on the emitter.
O thanks, I was missing the particleConstructor
settings! There is some documentation to follow?
There's no step by step guide, but the documentation is located here: http://pixijs.github.io/pixi-particles/docs/
I use Pixijs V5.2.4 I'm trying to follow the tutorial of the flipping coins here but I'm not able to get it working in my game. I'm using this:
this._emitterCoins = new particles.Emitter( container, [ { framerate: 30, loop: true, textures: [ "coin_01", "coin_02", "coin_03", ] }, ], ...
When I try to start the emitter I have the following error:Uncaught TypeError: Cannot read property 'valid' of undefined Sprite.js:657
The textures are corrects, and it works if I use this as textures array:
this._emitterCoins = new particles.Emitter( container, [ "coin_01", "coin_02", "coin_03", ], ...
What i'm doing wrong?