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

Timing is slightly uneven #2

Open
jminjie opened this issue Sep 26, 2021 · 0 comments
Open

Timing is slightly uneven #2

jminjie opened this issue Sep 26, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@jminjie
Copy link
Owner

jminjie commented Sep 26, 2021

Even when using the default circle, timing is slightly uneven. I think this is probably because we are evaluating actual collisions in requestAnimationFrame, which has an irregular rate.

One possible fix: as soon as we know the radius we can calculate the amount of time until collision and schedule it in advance.

There's also Tone.js #draw, which is supposed to help sync up drawing with Tone.js frames, but I'm not totally sure how it works.

@jminjie jminjie added the bug Something isn't working label Sep 26, 2021
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