pixijs / particle-emitter

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

particles.Emitter is not a constructor - TypeScript #87

Closed benwager closed 6 years ago

benwager commented 6 years ago

I have a typescript Pixi project, I've installed pixi-particles via npm. I import in to my project using:

import particles = require("pixi-particles");

and then try to create an emitter with:

private emitter:particles.Emitter; this.emitter = new particles.Emitter(...);

it builds ok, but then gives this error in console

Uncaught TypeError: particles.Emitter is not a constructor

andrewstart commented 6 years ago

I had actually removed Node exports (and forgot to remove the TS info for it) in v3.0.0 because Typescript was giving me trouble when building, but it should be back in v3.1.0 - give that a try.

benwager commented 6 years ago

Works a treat. Thanks!