fand / vfx-js

WebGL effects made easy.
https://amagi.dev/vfx-js
626 stars 19 forks source link

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

Closed fand closed 2 months ago

fand commented 2 months ago

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.

vercel[bot] commented 2 months ago

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