Gifu/rensyuu
From 2014.igem.org
(Difference between revisions)
Line 59: | Line 59: | ||
AAA=setInterval(function(){ | AAA=setInterval(function(){ | ||
if(m==1){ | if(m==1){ | ||
- | if(rad==360){rad=0;} | + | if(rad==360){rad=0; m=1;} |
else{rad+=2}; | else{rad+=2}; | ||
x=r*Math.cos(Math.PI/180*rad); | x=r*Math.cos(Math.PI/180*rad); | ||
Line 65: | Line 65: | ||
circle.style.top=y+180+"px"; | circle.style.top=y+180+"px"; | ||
circle.style.left=x+390+"px"; | circle.style.left=x+390+"px"; | ||
- | + | ||
k+=2; | k+=2; | ||
Line 77: | Line 77: | ||
BBB=setInterval(function(){ | BBB=setInterval(function(){ | ||
if(m==0){ | if(m==0){ | ||
- | if(rad==360){rad=0;} | + | if(rad==360){rad=0; m=0;} |
else{rad-=2}; | else{rad-=2}; | ||
x=r*Math.cos(Math.PI/180*rad); | x=r*Math.cos(Math.PI/180*rad); | ||
Line 83: | Line 83: | ||
circle.style.top=y+180+"px"; | circle.style.top=y+180+"px"; | ||
circle.style.left=x+390+"px"; | circle.style.left=x+390+"px"; | ||
- | |||
k-=2; | k-=2; |
Revision as of 02:35, 6 September 2015