# HG changeset patch # User wycc # Date 1290527724 -28800 # Node ID f26c4b621ec0cbac5947e5cb8801976a966523de # Parent 4072a302b207334d07b5a649ade0dbea921a77db# Parent bf5adf1e275e773c7d046f3a8d96c1220b58e5e0 MErge head diff -r bf5adf1e275e -r f26c4b621ec0 nodejs/animate.js --- a/nodejs/animate.js Tue Nov 23 13:13:48 2010 +0800 +++ b/nodejs/animate.js Tue Nov 23 23:55:24 2010 +0800 @@ -84,11 +84,14 @@ function scale_draw(percent) { - if (this.end==1) return; + if (this.end==1) { + percent = 1; + } var sx = 1 + (this.totalsx - 1) * percent; var sy = 1 + (this.totalsy - 1) * percent; var sh1 = [1, 0, -this.center_x, 0, 1, -this.center_y]; var sh2 = [1, 0, this.center_x, 0, 1, this.center_y]; + sys.puts("sc="+sx+" sy="+sy); var scale = [sx, 0, 0, 0, sy, 0]; var obj = this.obj; var mtx; diff -r bf5adf1e275e -r f26c4b621ec0 nodejs/examples/mce/main.svg --- a/nodejs/examples/mce/main.svg Tue Nov 23 13:13:48 2010 +0800 +++ b/nodejs/examples/mce/main.svg Tue Nov 23 23:55:24 2010 +0800 @@ -2,6 +2,7 @@ + sodipodi:docname="main.svg"> diff -r bf5adf1e275e -r f26c4b621ec0 nodejs/examples/mce/mainmenu.js --- a/nodejs/examples/mce/mainmenu.js Tue Nov 23 13:13:48 2010 +0800 +++ b/nodejs/examples/mce/mainmenu.js Tue Nov 23 23:55:24 2010 +0800 @@ -64,9 +64,9 @@ old.bbox.update(); target.bbox.update(); - var an = new animate.scale(this.app, old, 1, 1); + var an = new animate.scale(this.app, old, 1/1.1, 1/1.5); animate.run([an], 0, 0.1); - an = new animate.scale(this.app, target, 1, 1.5); + an = new animate.scale(this.app, target, 1.1, 1.5); animate.run([an], 0, 0.3); var sx = target.center.x - this.lightbar.center.x; var an = new animate.shift(this.app, this.lightbar, sx, 0); @@ -87,9 +87,9 @@ old.bbox.update(); target.bbox.update(); - var an = new animate.scale(this.app, old, 1, 1); + var an = new animate.scale(this.app, old, 1/1.1, 1/1.5); animate.run([an], 0, 0.1); - an = new animate.scale(this.app, target, 1, 1.5); + an = new animate.scale(this.app, target, 1.1, 1.5); animate.run([an], 0, 0.3); var sx = target.center.x - this.lightbar.center.x; var an = new animate.shift(this.app, this.lightbar, sx, 0); @@ -132,21 +132,20 @@ var sy = 220 - target.center.y; var an = new animate.shift(this.app,target,sx,sy); var self = this; - animate.run([an],0,1,function() {self.changePage();}); + animate.run([an],0,2.5,function() {self.changePage();}); for(i=0;i 0.5) x = 900; - else x = -500; - if (y > 0.5) y = 900; - else y = -500; - sx = x - this.items[i].center.x; - sy = y - this.items[i].center.y; + if (i > this.item) { + sx = 1920*2 - this.items[i].center.x; + sy = 0; + } else { + sx = -this.items[i].center.x*2; + sy = 0; + } an = new animate.shift(this.app,this.items[i], sx, sy); animate.run([an], 0, 2); alpha = new animate.alpha(this.app,this.items[i], 0); - animate.run([an], 0, 1); + animate.run([an], 0, 2); } }