Bläddra i källkod

Make the setImmediate results more obvious on the EventLoop example

Shaddock Heath 10 år sedan
förälder
incheckning
208212fdf7
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      EventLoop/Resources/Scripts/main.js

+ 2 - 2
EventLoop/Resources/Scripts/main.js

@@ -59,12 +59,12 @@ function main() {
                 clearInterval(movementId);
                 // handle at the end of this update cycle
                 setImmediate(function() {
-                    star.speed = 100;
+                    star.speed = 1000;
                 });
                 
                 // set up something that we are going to immediately cancel so it doesn't happen
                 var wonthappen  = setImmediate(function() {
-                    star.speed = 1000;
+                    star.speed = 100;
                 });
                 
                 clearImmediate(wonthappen);