pixijs / particle-emitter

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

Updating for PixiJS 7.0.4 #190

Closed adrian-gray closed 1 year ago

adrian-gray commented 1 year ago

This involves bumping the Pixi version to the latest (7.0.4), and fixing a minor error with LinkedListContainer not passing an updated childCount.

I've got no idea if more should be involved, but this works with PixiJS 7.04 enough for what I need.

adrian-gray commented 1 year ago

Now I'm wondering whether the update to LinkedListContainer is not required, as the child has already removed itself and may update the count?

andrewstart commented 1 year ago

Per PIXI.Container, the last parameter in childRemoved is supposed to be the previous index, so as long as we are getting it wrong I am fine with not providing it at all (not really worth the cpu time to calculate the index).

For the dependencies, I think you could go with >=6.0.4 <8.0.0 - works fine with version 6 and 7, and we'd cover our bases by not automatically supporting the next major release after that.

adrian-gray commented 1 year ago

Cheers Andrew, updated for PIXI version range >=6.0.4 <8.0.0

Also forcing TS to ignore the missing container index for childRemoved.

Additionally, I checked the tests, and the module test was not running in Electron. I've add the contextIsolation: false flag to main.js, resolving the issue.

andrewstart commented 1 year ago

I believe you forgot to push those changes to the correct place.

adrian-gray commented 1 year ago

Oops, didn't push them anywhere 🤦🏼

Pushed now. Sorry.