Explorar o código

use requestAnimationFrame on desktop

Evan Almloff hai 1 ano
pai
achega
71f7481ded
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      packages/desktop/build.rs

+ 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();
                   }});
           }})