comparison nodejs/mbapp.js @ 1382:7ee0658025f3

Support opacity tween for the primitives.
author wycc
date Wed, 23 Mar 2011 23:08:53 +0800
parents 76d2aad5da35
children bdacbdeb4447
comparison
equal deleted inserted replaced
1381:9a585df24e52 1382:7ee0658025f3
196 var sy = src.sy*p+dest.sy*p1; 196 var sy = src.sy*p+dest.sy*p1;
197 var r = src.r*p+dest.r*p1; 197 var r = src.r*p+dest.r*p1;
198 var tx = src.tx*p+dest.tx*p1; 198 var tx = src.tx*p+dest.tx*p1;
199 var ty = src.ty*p+dest.ty*p1; 199 var ty = src.ty*p+dest.ty*p1;
200 var mt = [1, 0, -src.tx, 0, 1, -src.ty]; 200 var mt = [1, 0, -src.tx, 0, 1, -src.ty];
201 var opacity;
201 var ms; 202 var ms;
203
204 opacity = src.opacity*p + src.opacity*p1;
205 coord.opacity = opacity;
206
202 if (r == 0) { 207 if (r == 0) {
203 m = mt; 208 m = mt;
204 } else { 209 } else {
205 ms= [Math.cos(r), Math.sin(r),0,-Math.sin(r), Math.cos(r),0]; 210 ms= [Math.cos(r), Math.sin(r),0,-Math.sin(r), Math.cos(r),0];
206 m = mul(ms,mt); 211 m = mul(ms,mt);