You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is using setTimeout(0) in an infinite loop still the recommended way to draw every frame? I want to do animation and motion using @napi-rs/canvas, and when using this code with setTimeout(0):
the FPS I'm seeing fluctuates a lot around at 60. At times it even goes to 70 or reduces to 30. If I use skia-canvas' own Window, I get a proper 60±1 FPS.
Am I doing something wrong here? Or is this expected?
I can't reproduce that on my system so I'm splitting it into a new issue.
By default the windows created by @kmamal/sdl have vsync enabled so your framerate should match your monitor refresh rate. Can you share more details about your setup?
What OS?
Are you running the example as-is or have you made modifications?
What are the values of window.accelerated and window.vsync?
The text was updated successfully, but these errors were encountered:
Originally posted by @ajitid in #52
I can't reproduce that on my system so I'm splitting it into a new issue.
By default the windows created by
@kmamal/sdl
have vsync enabled so your framerate should match your monitor refresh rate. Can you share more details about your setup?window.accelerated
andwindow.vsync
?The text was updated successfully, but these errors were encountered: