1
0
Эх сурвалжийг харах

use requestAnimationFrame on desktop

Evan Almloff 1 жил өмнө
parent
commit
71f7481ded

+ 3 - 1
packages/desktop/build.rs

@@ -44,7 +44,9 @@ fn main() {
           .then(response => {{
               response.arrayBuffer()
                   .then(bytes => {{
-                      run_from_bytes(bytes);
+                      requestAnimationFrame(() => {{
+                        run_from_bytes(bytes);
+                      }});
                       window.interpreter.wait_for_request();
                   }});
           }})