particle-emitter
particle-emitter copied to clipboard
`update(delta)` doesn't respect Ticker speed
Hey there 👋
When autoUpdate = true
, we would expect the emitter to respect the speed
property of the shared ticker (like other related concepts such as AnimatedSprite
). ~It's almost like delta
is ignored completely.~ Update: It is!
It's probably due to Emitter.ts#L563?
/**
* Updates all particles spawned by this emitter and emits new ones.
* @param delta Time elapsed since the previous frame, in __seconds__.
*/
public update(delta: number): void
{
if (this._autoUpdate)
{
delta = ticker.elapsedMS * 0.001;
// ^ 💥 delta param is discarded
}
Do you think it might be unexpected that the delta parameter is discarded and the global const ticker
's elapsedMS
is used instead?