Commits

Cat's Eye Technologies committed 0c67541

Use yoob.Animation from yoob.js 0.6 where applicable.

Comments (0)

Files changed (14)

a-non-random-walk/a-non-random-walk.js

         manager.addSprite(indicator);
 
         this.reset();
-        yoob.setUpQuantumAnimationFrame(this);
+        this.animation = (new yoob.Animation()).init({
+            object: this
+        });
+        this.animation.start();
     };
 }

a-non-random-walk/index.html

 </canvas>
 <button id="reset" onclick="t.reset();">Reset</button>
 </body>
-<script src="../common-yoob.js-0.5/animation-frame.js"></script>
+<script src="../common-yoob.js-0.6/animation.js"></script>
 <script src="../common-yoob.js-0.6/sprite-manager.js"></script>
 <script src="a-non-random-walk.js"></script>
 <script>
         info = document.getElementById('info');
         pctToHoldFixedCtrl = document.getElementById('hold_fixed');
         this.restart();
-        yoob.setUpQuantumAnimationFrame(this);
+        this.animation = (new yoob.Animation()).init({
+            object: this
+        });
+        this.animation.start();
     };
 
     this.restart = function() {

chzrxl/index.html

 <div id="info"></div>
 
 </body>
-<script src="../common-yoob.js-0.5/animation-frame.js"></script>
+<script src="../common-yoob.js-0.6/animation.js"></script>
 <script src="chzrxl.js"></script>
 <script>
   var t = new Chzrxl();

fibonacci-spiral/fibonacci-spiral.js

         canvas = c;
         ctx = canvas.getContext("2d");
         info = document.getElementById('info');
-        yoob.setUpQuantumAnimationFrame(this);
+        this.animation = (new yoob.Animation()).init({
+            object: this
+        });
+        this.animation.start();
     };
 
     this.draw = function() {

fibonacci-spiral/index.html

 <div id="info"></div>
 
 </body>
-<script src="../common-yoob.js-0.5/animation-frame.js"></script>
+<script src="../common-yoob.js-0.6/animation.js"></script>
 <script src="fibonacci-spiral.js"></script>
 <script>
   var t = new FibonacciSpiral();

heronsis-hermnonicii/heronsis-hermnonicii.js

 
         // TODO might be better with a ProportionalAnimationFrame,
         // but yoob.Sprite needs to support that better first
-        yoob.setUpQuantumAnimationFrame(this);
+        this.animation = (new yoob.Animation()).init({
+            object: this
+        });
+        this.animation.start();
     };
 }

heronsis-hermnonicii/index.html

 </div>
 
 </body>
-<script src="../common-yoob.js-0.5/animation-frame.js"></script>
+<script src="../common-yoob.js-0.6/animation.js"></script>
 <script src="../common-yoob.js-0.6/sprite-manager.js"></script>
 <script src="heronsis-hermnonicii.js"></script>
 <script>

hypongtrochoid/hypongtrochoid.js

         yellowRectangle.scrawlOn = overlayCtx;
         manager.addSprite(yellowRectangle);
 
-        yoob.setUpQuantumAnimationFrame(this);
+        this.animation = (new yoob.Animation()).init({
+            object: this
+        });
+        this.animation.start();
     };
 }

hypongtrochoid/index.html

 </div>
 
 </body>
-<script src="../common-yoob.js-0.5/animation-frame.js"></script>
+<script src="../common-yoob.js-0.6/animation.js"></script>
 <script src="../common-yoob.js-0.6/sprite-manager.js"></script>
 <script src="hypongtrochoid.js"></script>
 <script>

multicolouralism/index.html

   <input type="checkbox" name="as_circles" id="as_circles">circles</label>
 
 </body>
-<script src="../common-yoob.js-0.5/animation-frame.js"></script>
+<script src="../common-yoob.js-0.6/animation.js"></script>
 <script src="../common-yoob.js-0.5/splash-screen.js"></script>
 <script src="multicolouralism.js"></script>
 <script>

multicolouralism/multicolouralism.js

 
         radius = (canvas.height / rows) / 2;
 
+        // we request each successive animation frame AS FAST AS POSSIBLE
         var animFrame = function(time) {
             $this.draw();
             request = requestAnimationFrame(animFrame);
         };
-
         request = requestAnimationFrame(animFrame);
     };
 }

the-frame/index.html

 Please wait, loading...
 </div>
 
-<script src="../common-yoob.js-0.5/animation-frame.js"></script>
+<script src="../common-yoob.js-0.6/animation.js"></script>
 <script src="../common-yoob.js-0.6/sprite-manager.js"></script>
 <script src="the-frame.js"></script>
 <script>

the-frame/the-frame.js

       }
     };
 
+    this.update = function() {
+    };
+
     this.init = function(c, imgUrl, callback) {
       canvas = c;
       ctx = canvas.getContext("2d");
           mkHandle(30, canvas.height - 60, 30, 30);
           getFontHeight();
           $this.draw();
-          var animFrame = function(time) {
-              $this.draw();
-              request = requestAnimationFrame(animFrame);
-          };
-          request = requestAnimationFrame(animFrame);
+          $this.animation = (new yoob.Animation()).init({
+              object: $this
+          });
+          $this.animation.start();
       }
       img.src = imgUrl;
     };