Color.prototype.colorDodge = function(r, g, b) { var trans = new Object(); trans.ra = 100/((258-r)/256); trans.ga = 100/((258-g)/256); trans.ba = 100/((258-b)/256); this.setTransform(trans); }; Color.prototype.linearDodge = function(r, g, b) { var trans = new Object(); trans.rb = r; trans.gb = g; trans.bb = b; this.setTransform(trans); }; Color.prototype.linearBurn = function(r, g, b) { var trans = new Object(); trans.rb = r-255; trans.gb = g-255; trans.bb = b-255; this.setTransform(trans); }; Color.prototype.screen = function(r, g, b) { var trans = new Object(); trans.rb = r; trans.ra = 100*(255-r)/255; trans.gb = g; trans.ga = 100*(255-g)/255; trans.bb = b; trans.ba = 100*(255-b)/255; this.setTransform(trans); }; Color.prototype.invertRGB = function() { this.setRGB(0xffffff-this.getRGB()); }; Color.prototype.setBrightness = function(bright) { var percent = 100-Math.abs(bright); var offset = 0; if (bright>0) { offset = 256*(bright/100); } var trans = new Object(); trans.ra = trans.ga=trans.ba=percent; trans.rb = trans.gb=trans.bb=offset; this.setTransform(trans); };
Archive for May, 2005
Transition 需要的参数:
direction // 0 or 1:产生或消失
duration // 秒
easing // 一个缓动函数
其他的一些继承类需要的附加参数
Blinds // 拉窗帘的效果
dimension // 过渡的方向 0 or 1:横竖
numStrips // 栅格的个数
Fade
不需要
Fly
startPoint // 飞入的位置:1~9九宫格
Iris // 按指定的形状出现或消失
startPoint // 奇数偶数
shape // "SQUARE" or "CIRCLE"
Photo // 设置了亮度和alpha值的变化
PixelDissolve
xSections // 横向分块,默认为10
ySections // 竖向分块,默认为10
Rotation
degrees // 旋转的度数
ccw // 旋转的方向,与direction值取反后的值为MC旋转的方向
Squeeze // 压缩
dimension // 0 or 1,横竖
Wipe
startPoint // 1~9九宫格
Zoom
不需要











