Mercurial > MadButterfly
comparison nodejs/animate.js @ 805:ae2faf140dc2
Also print # of frames
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Wed, 01 Sep 2010 16:28:09 +0800 |
parents | 55875133fa60 |
children | bf54c0408d35 |
comparison
equal
deleted
inserted
replaced
804:55875133fa60 | 805:ae2faf140dc2 |
---|---|
19 | 19 |
20 this.c++; | 20 this.c++; |
21 if(percent >= 1) { | 21 if(percent >= 1) { |
22 this.obj.timer.stop(); | 22 this.obj.timer.stop(); |
23 delete this.obj.timer; | 23 delete this.obj.timer; |
24 sys.puts(this.c); | |
24 sys.puts(Date.now() - this._start_tm); | 25 sys.puts(Date.now() - this._start_tm); |
25 } | 26 } |
26 | 27 |
27 this.obj[2] = (this.targetx-this.startposx)*percent+this.startposx; | 28 this.obj[2] = (this.targetx-this.startposx)*percent+this.startposx; |
28 this.obj[5] = (this.targety-this.startposy)*percent+this.startposy; | 29 this.obj[5] = (this.targety-this.startposy)*percent+this.startposy; |