Commits

Anonymous committed 94f4a3c

Use the quantum animation thing in Chzrxl, too.

Comments (0)

Files changed (1)

         ctx = canvas.getContext("2d");
         info = document.getElementById('info');
         pctToHoldFixedCtrl = document.getElementById('hold_fixed');
-        var $this = this;
         this.restart();
-        var animFrame = function(time) {
-            $this.draw();
-            requestAnimationFrame(animFrame);
-        };
-        requestAnimationFrame(animFrame);
+        yoob.setUpQuantumAnimationFrame(this);
     };
 
     this.restart = function() {
         for (var i = 0; i < balls.length; i++) {
             balls[i].draw(ctx, t);
         }
+    };
 
+    this.update = function() {
         var p = percentToHoldFixed;
         if (pctToHoldFixedCtrl) {
             p = pctToHoldFixedCtrl.value;