Gifu/rensyuu
From 2014.igem.org
(Difference between revisions)
(23 intermediate revisions not shown) | |||
Line 47: | Line 47: | ||
<!-- | <!-- | ||
var r=100; | var r=100; | ||
- | var rad= | + | var rad=180; |
var x; | var x; | ||
var y; | var y; | ||
Line 59: | Line 59: | ||
AAA=setInterval(function(){ | AAA=setInterval(function(){ | ||
if(m==1){ | if(m==1){ | ||
- | r=200 | + | r=200; |
- | if(rad== | + | if(rad==540){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 68: | Line 68: | ||
- | k+= | + | k+=1; |
- | + | ||
circle.style.transform="rotate("+k+"deg)"; | circle.style.transform="rotate("+k+"deg)"; | ||
} | } | ||
Line 78: | Line 78: | ||
BBB=setInterval(function(){ | BBB=setInterval(function(){ | ||
if(m==0){ | if(m==0){ | ||
- | if(rad==360){rad= | + | r=100; |
+ | if(rad==-360){rad=180; m=1;} | ||
else{rad-=2}; | 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); | ||
circle.style.top=y+180+"px"; | circle.style.top=y+180+"px"; | ||
- | circle.style.left=x+ | + | circle.style.left=x+120+"px"; |
+ | |||
k-=2; | k-=2; | ||
Line 93: | Line 95: | ||
}; | }; | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
+ | $(document).ready(function () { | ||
+ | spinright() | ||
+ | }); | ||
$(document).ready(function () { | $(document).ready(function () { | ||
spinleft() | spinleft() |
Latest revision as of 10:39, 9 September 2015