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

fix: prevent main loop from running more than once #75

Merged
merged 3 commits into from
Jul 4, 2024

Conversation

fand
Copy link
Owner

@fand fand commented Jul 4, 2024

Previously, if VFX.play() is called more than once, the main loop runs more than once in a frame.
This PR fixes this by managing the running state using the frame ID returned from requestAnimationFrame.

Copy link

vercel bot commented Jul 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-vfx-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 4, 2024 6:54pm

@fand fand merged commit 7e92e1a into main Jul 4, 2024
3 checks passed
@fand fand deleted the fix/avoid-double-play branch July 4, 2024 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant