Closed reececomo closed 10 months ago
For reference, just increasing emission rate results in patchy trails like this:
(While also adding some performance overhead on mobile)
Update: I think the gaps was caused by using a third-party interpolation renderer library (for smoothing 30Hz/120Hz/144Hz/etc.). I've wrapped Emitter so that Emitter.setOwnerPos()
is triggered on the corresponding draw frames to the interpolated location and it looks considerably better now.
Still not great, a little patchy, looks ok when playing realtime, but still noticable in stills/screenshots:
Another quick update: Performance is pretty horrendous on lower and middle-end devices, its only about ~2000 particles. Still investigating.
You can reduce the impact of this library on performance by using a LinkedListContainer (from this library) as the parent to your emitted particles. Basic particle emission will never get you a true trail, though, as that is typically a different mesh-based effect.
Tinkering around with thicker particles and not changing the scale, just the alpha - got the number of particles down from ~2300 to around 500 which has improved performance for now.
as that is typically a different mesh-based effect.
Ah thank you, that's probably a good place for me to look.
You can reduce the impact of this library on performance by using a LinkedListContainer
Nice, will have a look at that too.
Hey there 👋
-I've got a fast-moving object (a ball)
particle-emitter
? Attaching a standard emitter doesn't look great.Is there a way to emit based on distance traveled, instead of once-per-draw-at-the-current-position?
Would the best alternative be drawing it manually using
PIXI.Graphics
?Example
(Excuse the bad MS Paint.)
The top image is roughly