Team:Grenoble/script
From 2012.igem.org
(Difference between revisions)
Line 75: | Line 75: | ||
function z(c,a,b,d){ | function z(c,a,b,d){ | ||
- | + | this.elem=c||o.body; | |
- | + | this.to=a!==undefined?a:1; | |
- | + | var e=this.elem.style; | |
- | + | this.from=(b===undefined?(!e.opacity&&e.opacity!==0?(this.to>0?0:1):parseFloat(e.opacity)):b); | |
- | + | d=d||{}; | |
- | + | this.duration=d.duration||500; | |
- | + | this.frameRate=d.frameRate||30; | |
- | + | this.onFinish=d.onFinish; | |
- | + | this.totalFrames=Math.ceil(this.duration/1000*this.frameRate); | |
- | + | this.perFrame=(this.to-this.from)/this.totalFrames; | |
- | + | this.frameNb=0;var f=this; | |
} | } | ||
Revision as of 15:37, 11 July 2012