comparison nodejs/animate.js @ 910:410478ded5d2

Remove debug message
author wycc
date Tue, 19 Oct 2010 04:04:52 +0800
parents 55767e444436
children 85b647f5aeff
comparison
equal deleted inserted replaced
909:45625c200efe 910:410478ded5d2
50 50
51 ang = percent * this._ang; 51 ang = percent * this._ang;
52 sv = Math.sin(ang); 52 sv = Math.sin(ang);
53 cv = Math.cos(ang); 53 cv = Math.cos(ang);
54 mtx = [cv, -sv, 0, sv, cv, 0]; 54 mtx = [cv, -sv, 0, sv, cv, 0];
55 sys.puts('x='+obj.center.x+',y='+obj.center.y);
56 shift = [1, 0, -obj.center.x, 0, 1, -obj.center.y]; 55 shift = [1, 0, -obj.center.x, 0, 1, -obj.center.y];
57 mtx = multiply(mtx, shift); 56 mtx = multiply(mtx, shift);
58 shift = [1, 0, obj.center.x, 0, 1, obj.center.y]; 57 shift = [1, 0, obj.center.x, 0, 1, obj.center.y];
59 mtx = multiply(shift, mtx); 58 mtx = multiply(shift, mtx);
60 mtx = multiply(mtx, this._start_mtx); 59 mtx = multiply(mtx, this._start_mtx);
207 function linear_update() 206 function linear_update()
208 { 207 {
209 var now = Date.now(); 208 var now = Date.now();
210 var i; 209 var i;
211 210
212 sys.puts("real time is "+now);
213 sys.puts("end is "+this.end);
214 if (now >= this.end) { 211 if (now >= this.end) {
215 this.timer.stop(); 212 this.timer.stop();
216 now = this.end; 213 now = this.end;
217 } 214 }
218 if (now < this.startmove) return; 215 if (now < this.startmove) return;
219 sys.puts("now is "+now+" offset is "+(now-this.startmove));
220 var per = (now-this.startmove)/this.duration/1000; 216 var per = (now-this.startmove)/this.duration/1000;
221 if (per > 1) per = 1; 217 if (per > 1) per = 1;
222 this.action.draw(per); 218 this.action.draw(per);
223 } 219 }
224 220
329 } 325 }
330 326
331 exports.run = function(actions,start,duration) { 327 exports.run = function(actions,start,duration) {
332 for(a in actions) { 328 for(a in actions) {
333 var li = new linear(actions[a],start,duration); 329 var li = new linear(actions[a],start,duration);
334 sys.puts(li);
335 li.start(); 330 li.start();
336 } 331 }
337 } 332 }
338 exports.runexp=function(actions,start,exp) { 333 exports.runexp=function(actions,start,exp) {
339 sys.puts("This function is not implemented yet"); 334 sys.puts("This function is not implemented yet");