pixijs / particle-emitter

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

Uncaught TypeError: PIXI.particles.Emitter is not a constructor #104

Closed N0mIs95 closed 5 years ago

N0mIs95 commented 5 years ago

Hey,

I've installed pixi-particles via NPM. I imported it to my project like that: import * as PIXIParticles from 'pixi-particles';

Then I created my emitter like that: let emitter = new PIXI.particles.Emitter(...)

However I get an error console: "Uncaught TypeError: PIXI.particles.Emitter is not a constructor" It's like I can't use the lib and I don't know why ? I'm a bit new with NPM things and I struggle with this problem.

I'm using pixi.js 4.8.7

Thanks in advance for your help

andrewstart commented 5 years ago

If you are requiring/importing then you should be using new PIXIParticles.Emitter(). (I should add a note to the readme).

N0mIs95 commented 5 years ago

Thanks a lot man, it works ! And thanks for this amazing lib, what a nice work from you !