Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use timestamp for frame-rate independence #10

Open
GRA0007 opened this issue Aug 5, 2022 · 0 comments
Open

Use timestamp for frame-rate independence #10

GRA0007 opened this issue Aug 5, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@GRA0007
Copy link
Member

GRA0007 commented Aug 5, 2022

Currently the confetti renders based on the frame, instead of keeping track of delta time. This means that the speed of the simulation is dependent on the frame rate of requestAnimationFrame, which is usually 60fps in modern browsers, but can vary between operating systems and is throttled depending on available system resources. The confetti should use the timestamp passed into the requestAnimationFrame function to determine where it should be.

@GRA0007 GRA0007 added the bug Something isn't working label Aug 5, 2022
@giraugh giraugh changed the title Use timestamp for rendering Use timestamp for frame-rate independence Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant