Team:Gifu
From 2014.igem.org
(Difference between revisions)
Line 49: | Line 49: | ||
if(rad>=360){rad=0;} | if(rad>=360){rad=0;} | ||
- | else{rad+= | + | else{rad+=2;}; |
x=r*Math.cos(Math.PI/180*rad); | x=r*Math.cos(Math.PI/180*rad); | ||
y=r*Math.sin(Math.PI/180*rad); | y=r*Math.sin(Math.PI/180*rad); | ||
Line 59: | Line 59: | ||
circle.style.transform="rotate("+k+"deg)"; | circle.style.transform="rotate("+k+"deg)"; | ||
- | }, | + | },10); |
}); | }); | ||
Line 65: | Line 65: | ||
clearInterval(AAA); | clearInterval(AAA); | ||
BBB=setInterval(function(){ | BBB=setInterval(function(){ | ||
- | rad+= | + | rad+=2; |
- | if(rad==270){rad-= | + | if(rad==270){rad-=2}; |
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 77: | Line 77: | ||
circle.style.transform="rotate("+k+"deg)"; | circle.style.transform="rotate("+k+"deg)"; | ||
- | }, | + | },10); |
Line 86: | Line 86: | ||
AAA=setInterval(function(){ | AAA=setInterval(function(){ | ||
if(rad>=360){rad=0;} | if(rad>=360){rad=0;} | ||
- | else{rad+= | + | else{rad+=2;}; |
x=r*Math.cos(Math.PI/180*rad); | x=r*Math.cos(Math.PI/180*rad); | ||
y=r*Math.sin(Math.PI/180*rad); | y=r*Math.sin(Math.PI/180*rad); | ||
Line 96: | Line 96: | ||
circle.style.transform="rotate("+k+"deg)"; | circle.style.transform="rotate("+k+"deg)"; | ||
- | }, | + | },10); |
}; | }; | ||
//--> | //--> |
Revision as of 10:14, 1 September 2014