{"action":"created","issue":{"url":"https://api.github.com/repos/Ezelia/EPSy/issues/4","labels_url":"https://api.github.com/repos/Ezelia/EPSy/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/Ezelia/EPSy/issues/4/comments","events_url":"https://api.github.com/repos/Ezelia/EPSy/issues/4/events","html_url":"https://github.com/Ezelia/EPSy/issues/4","id":63530162,"number":4,"title":"Some particles won't die ","user":{"login":"Tumetsu","id":3398165,"avatar_url":"https://avatars.githubusercontent.com/u/3398165?v=3","gravatar_id":"","url":"https://api.github.com/users/Tumetsu","html_url":"https://github.com/Tumetsu","followers_url":"https://api.github.com/users/Tumetsu/followers","following_url":"https://api.github.com/users/Tumetsu/following{/other_user}","gists_url":"https://api.github.com/users/Tumetsu/gists{/gist_id}","starred_url":"https://api.github.com/users/Tumetsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tumetsu/subscriptions","organizations_url":"https://api.github.com/users/Tumetsu/orgs","repos_url":"https://api.github.com/users/Tumetsu/repos","events_url":"https://api.github.com/users/Tumetsu/events{/privacy}","received_events_url":"https://api.github.com/users/Tumetsu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-03-22T13:02:38Z","updated_at":"2015-03-29T13:06:34Z","closed_at":null,"body":"I'm having a problem with your particlesystem on Phaser.js. I created a flame particle much like yours example on and added it to my game. I'm adjusting its emissionRate on runtime depending on player interaction. It works fine, however occasionally particles get \"stuck\" and don't move anymore and won't disappear:\r\n![example](http://imgur.com/kuNLlMv.png)\r\n\r\nEmitter's particleCount is showing 0 and those leftover particles only disappear after they get recycled I guess. Any idea of the solution? Is there a way to \"force clear\" particles?"},"comment":{"url":"https://api.github.com/repos/Ezelia/EPSy/issues/comments/87411042","html_url":"https://github.com/Ezelia/EPSy/issues/4#issuecomment-87411042","issue_url":"https://api.github.com/repos/Ezelia/EPSy/issues/4","id":87411042,"user":{"login":"Tumetsu","id":3398165,"avatar_url":"https://avatars.githubusercontent.com/u/3398165?v=3","gravatar_id":"","url":"https://api.github.com/users/Tumetsu","html_url":"https://github.com/Tumetsu","followers_url":"https://api.github.com/users/Tumetsu/followers","following_url":"https://api.github.com/users/Tumetsu/following{/other_user}","gists_url":"https://api.github.com/users/Tumetsu/gists{/gist_id}","starred_url":"https://api.github.com/users/Tumetsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tumetsu/subscriptions","organizations_url":"https://api.github.com/users/Tumetsu/orgs","repos_url":"https://api.github.com/users/Tumetsu/repos","events_url":"https://api.github.com/users/Tumetsu/events{/privacy}","received_events_url":"https://api.github.com/users/Tumetsu/received_events","type":"User","site_admin":false},"created_at":"2015-03-29T13:06:34Z","updated_at":"2015-03-29T13:06:34Z","body":"Yeah, the totalParticles doesn't work for me since restart deletes existing particles. \r\n\r\nWhat I want to achieve is to have the particles represent the clickrate of the user. So if user clicks 10 times/s there is larger exhaust fume than when user clicks only 2 times/s. This is why I need to be able to add new particles to the existing ones, otherwise the long trail of the fume disappears. In past I have used particle systems which had concepts of burst and stream. In your system I suppose this is analog to changing emission rate on runtime?\r\n\r\nThanks for answers really. I'll try to look into emitter and try to figure out how to solve this. I haven't looked into your code yet but I think that like you said there is something with recycle condition which basically deletes particle references from array but doesn't remove them from canvas. For example if you resize the particle array when emission rate changes and won't recycle particles which get cropped out they might stay on canvas. "}}