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

cannot read `length` of `undefined` in `parseArt`

hood opened this issue · comments

I'm setting up an emitter like:

    const e = new Emitter(
      container,
      textures, // <- aray of `PIXI.Texture`s
      config
    );

    e.particleConstructor = AnimatedParticle;

And getting the following runtime exception thrown at me:
Uncaught (in promise) TypeError: Cannot read property 'length' of undefined

Actual example of usage:
here

AnimatedParticle doesn't take an array of textures - see the docs for AnimatedParticle on how the art should be formed.

Oh thanks, I had read that piece of code a trillion times, but I always overlooked the fact that textures was a property of an object.
Better typing should be applied to Emitter tho.