A frame-rate-independent emission pattern for Three.js particle effects
A small implementation detail made our Three.js particle playback much more predictable across phones and desktop displays: accumulate emission using delta time instead of spawning a fixed number of particles per frame.
The pattern is: add rate × dt to a fractional accumulator, emit floor(accumulator), and carry the remainder forward. Clamp large dt values after tab switches, and keep a hard cap on live particles so the effect stays bounded. This prevents a 120 Hz display from emitting twice as many particles as a 60 Hz display.
We included the complete game-loop context, mobile pixel-ratio limits, object pooling notes, and a portable NixieFX runtime example here: https://nixiefx.com/threejs-game-tutorial/
For teams shipping Three.js games, what has been the bigger source of variance: refresh rate, transparent overdraw, or garbage-collection spikes?

p/lancetta
p/findergit
p/runevr
p/google-cloud-platform
p/producthunt
p/reso
p/many-displays
p/slotify-2
p/airuncode
p/ai-context-flow
p/kodlo
p/aperture-7
p/lasso-11
p/raycast
p/dino-kids
p/jev
p/supabase
p/kuc-kuc
p/murror
p/offiai
Replies
Be the first to reply
Have a question or a thought to share? Add a comment above to start the conversation.