Permalink
Browse files

fix bug section-8.3

  • Loading branch information...
1 parent 1077f8e commit 26d90fcdd933eb9f10f934398564b1ecc8d69d86 @isoden isoden committed Oct 16, 2015
Showing with 4 additions and 2 deletions.
  1. +4 −2 ch08/section-8.3/example.js
@@ -367,7 +367,9 @@ canvas.onmousemove = function (e) {
// Animation Loop................................................
-function animate(time) {
+function animate() {
+ var time = Date.now();
+
elapsedTime = (time - launchTime) / 1000;
context.clearRect(0,0,canvas.width,canvas.height);
@@ -423,4 +425,4 @@ bucketImage.onload = function (e) {
bucket.height = BUCKET_HEIGHT;
};
-animate(+new Date());
+animate();

0 comments on commit 26d90fc

Please sign in to comment.