Gifu/rensyuu
From 2014.igem.org
(Difference between revisions)
Line 74: | Line 74: | ||
function spinleft(){ | function spinleft(){ | ||
BBB=setInterval(function(){ | BBB=setInterval(function(){ | ||
- | + | ||
- | if(rad== | + | if(rad==360){rad=0;} |
else{rad-=2}; | else{rad-=2}; | ||
x=r*Math.cos(Math.PI/180*rad); | x=r*Math.cos(Math.PI/180*rad); | ||
Line 82: | Line 82: | ||
circle.style.left=x+390+"px"; | circle.style.left=x+390+"px"; | ||
- | k-= | + | k-=2; |
- | if(rad== | + | if(rad==360){k=90}; |
circle.style.transform="rotate("+k+"deg)"; | circle.style.transform="rotate("+k+"deg)"; | ||
- | |||
- | |||
},7); | },7); | ||
}; | }; |
Revision as of 02:31, 6 September 2015