Alchemist0823 / three.quarks

Three.quarks is a general purpose particle system / VFX engine for three.js

Home Page:https://quarks.art

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Particle died event

marwie opened this issue · comments

Hello,

is there a good way to get the died state of a particle from a behaviour? How should events be implemented that happen on particle death?

My workaround for now is adding the current delta time and checking if it is above the life.
But that is quite hacky and unstable I would say :)

const willDie = particle.age + delta >= particle.life

Hi marwie, thanks for the suggestion. This is something we definitely want to consider. we could implement an event callback for that. I will keep you updated.

implemented "particleDied" event with b12ce57
use addEventListener to listen.