Team:Gifu
From 2014.igem.org
(Difference between revisions)
Line 105: | Line 105: | ||
function catching(){ | function catching(){ | ||
BBB=setInterval(function(){ | BBB=setInterval(function(){ | ||
- | rad+= | + | rad+=5; |
- | if(rad==m){rad-= | + | if(rad==m){rad-=5,k-=5}; |
if(rad>=360){rad=0}; | if(rad>=360){rad=0}; | ||
x=r*Math.cos(Math.PI/180*rad); | x=r*Math.cos(Math.PI/180*rad); | ||
Line 113: | Line 113: | ||
circle.style.left=x+200+"px"; | circle.style.left=x+200+"px"; | ||
- | if(rad==m){k-= | + | if(rad==m){k-=5;} |
- | else{k+= | + | else{k+=5;}; |
if(k==360){k=0}; | if(k==360){k=0}; | ||
circle.style.transform="rotate("+k+"deg)"; | circle.style.transform="rotate("+k+"deg)"; |
Revision as of 02:11, 2 September 2014