Gifu/rensyuu2

From 2014.igem.org

(Difference between revisions)
 
(7 intermediate revisions not shown)
Line 41: Line 41:
<div id="point"><p id="rib"></p>
<div id="point"><p id="rib"></p>
-
<img id="ribosome" src="https://static.igem.org/mediawiki/2014/5/5f/Gifu_ribosome_renew.png"></img>
 
-
</div>
 
-
<div id="point2"><p id="rib"></p>
 
<img id="ribosome" src="https://static.igem.org/mediawiki/2014/5/5f/Gifu_ribosome_renew.png"></img>
<img id="ribosome" src="https://static.igem.org/mediawiki/2014/5/5f/Gifu_ribosome_renew.png"></img>
</div>
</div>
Line 61: Line 58:
function spinright(){
function spinright(){
AAA=setInterval(function(){
AAA=setInterval(function(){
-
if(rad==540){rad=0; m=0;}
+
if(rad==540){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 72: Line 69:
circle.style.transform="rotate("+k+"deg)";
circle.style.transform="rotate("+k+"deg)";
-
}
+
 
},7);
},7);
};
};
Line 78: Line 75:
function spinleft(){
function spinleft(){
BBB=setInterval(function(){
BBB=setInterval(function(){
-
if(rad==-360){rad=180; m=1;}
+
if(rad==-360){rad=180;}
else{rad-=2};
else{rad-=2};
-
x=l*Math.cos(Math.PI/180*rad);
+
x=r*Math.cos(Math.PI/180*rad);
-
y=l*Math.sin(Math.PI/180*rad);
+
y=r*Math.sin(Math.PI/180*rad);
-
circle2.style.top=y+180+"px";
+
circle.style.top=y+180+"px";
-
circle2.style.left=x+120+"px";
+
circle.style.left=x+120+"px";
k-=2;
k-=2;
if(rad==360){k=90};
if(rad==360){k=90};
-
circle2.style.transform="rotate("+k+"deg)";
+
circle.style.transform="rotate("+k+"deg)";
 +
 
-
}
 
},7);
},7);
};
};
Line 98: Line 95:
$(document).ready(function () {
$(document).ready(function () {
spinright()
spinright()
 +
});
 +
$(document).ready(function () {
 +
spinleft()
});
});

Latest revision as of 11:04, 9 September 2015

factory1