DanielMartinus / Konfetti

Celebrate more with this lightweight confetti particle system 🎊
ISC License
3.13k stars 299 forks source link

Use dynamic frameRate instead of locking to 60fps #319

Closed DanielMartinus closed 9 months ago

DanielMartinus commented 9 months ago

Updated the variable speedF to frameRate to better reflect what it does.

Before this variable was locked to 60fps. This variable is used to scale the particles movements (and other properties) based on the frame rate, this explains why it's moving two times slower on 120fps and probably two times faster on 30fps.

This value is now updated based on the deltaTime (time between frames) to account for different frame rates.

Fixes #314