Giter Club home page Giter Club logo

Comments (3)

andrewstart avatar andrewstart commented on September 13, 2024

So it isn't particle that is null, but particle.transform (inside the particle.scale getter), due to the particle having been destroyed (normally inside destroying the emitter). Because Emitter.destroy() pretty thoroughly clears both the particle references and the behaviors that would allow Emitter.update() to do anything when it runs, it seems that somehow a particle that belongs to a running emitter is getting destroyed rather than a destroyed emitter continuing to run. The other possibility of a destroyed particle finding its way to a new emitter seems less likely, as Emitters do not pool particles at all.

I hope this gives you enough direction to look for a cause within your code. I'm not completely ruling out a bug in the library in some rare condition, but if that is the case it isn't something that I can suss out without a running example.

from particle-emitter.

aaclayton avatar aaclayton commented on September 13, 2024

Thanks @andrewstart - I'll look into it and see if I can figure out some sort of repro case. I am certainly not doing anything to call destroy on individual particles, I only ever destroy the emitter itself.

from particle-emitter.

aaclayton avatar aaclayton commented on September 13, 2024

Hi @andrewstart I was able to identify the problem and resolve it. I was toggling off the emit property for each emitter and later destroying them - but there was a timing issue where I was calling ParticleEmitter#destroy after a parent PIXI container was called with destroy({children: true}). Sorry for the false alarm.

from particle-emitter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.