pixijs / particle-emitter

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

Classes not invoked with new? #196

Closed Ragers closed 1 year ago

Ragers commented 1 year ago

Hi,

I am new to pixi.js and I am running through the tutorials to see the capabilities of pixi.js. In the tutorial this library gets mentioned. But when I try to use (even your get started example) I get the following error: Class constructor Sprite cannot be invoked without 'new'

It is being pointed to line 424 in pixi-particles.es.js.

Any feedback would be cool, as I would love to see this in action.

andrewstart commented 1 year ago

What version of PixiJS and this library are you using? Given that partial stack trace, I would assume a recent version of PixiJS and an older version of this library, and they are incompatible.

Ragers commented 1 year ago

Hi,

I am using:

pixi-particles: 4.3.1
pixi.js: 7.2.4

ps. this is the full stack trace also:

core.mjs:10132 ERROR TypeError: Class constructor Sprite cannot be invoked without 'new'
    at new Particle (pixi-particles.es.js:424:16)
    at Emitter.update (pixi-particles.es.js:1356:33)
    at TickerListener.emit (TickerListener.mjs:17:17)
    at _Ticker.update (Ticker.mjs:144:29)
    at _tick (Ticker.mjs:22:14)
    at timer (zone.js:2355:41)
    at _ZoneDelegate.invokeTask (zone.js:402:31)
    at core.mjs:25794:55
    at AsyncStackTaggingZoneSpec.onInvokeTask (core.mjs:25794:36)
    at _ZoneDelegate.invokeTask (zone.js:401:60)
andrewstart commented 1 year ago

The library had a name change to @pixi/particle-emitter, so change to the latest release of that.