diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-02-05 12:41:52 -0500 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-02-05 12:41:52 -0500 |
commit | 9532e3875c691cc50efbee95475243eeb46e2552 (patch) | |
tree | 80391bccaad63ce3623c8ca0140529ba6795872a | |
parent | db8a8a991adc6057bf78f8d0cae4d6c7dfaa4bca (diff) |
comment on emscripten_set_main_loop fps setting
-rw-r--r-- | system/include/emscripten/emscripten.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/system/include/emscripten/emscripten.h b/system/include/emscripten/emscripten.h index 2fc82f50..eb5ded91 100644 --- a/system/include/emscripten/emscripten.h +++ b/system/include/emscripten/emscripten.h @@ -100,7 +100,13 @@ extern void emscripten_async_load_script(const char *script, void (*onload)(), v * Set a C function as the main event loop. The JS environment * will call that function at a specified number of frames per * second. Setting 0 or a negative value as the fps will use - * the browser's requestAnimationFrame mechanism. + * the browser's requestAnimationFrame mechanism. This is + * *HIGHLY* recommended if you are doing rendering, as + * the browser's requestAnimationFrame will make sure you + * render at a proper smooth rate that lines up with the + * the browser and monitor in a proper way. (If you do not + * render at all in your application, then you should pick a + * specific frame rate that makes sense for your code.) * * Pausing and resuming the main loop is useful if your app * needs to perform some synchronous operation, for example |