Difference between revisions of "Team:Gifu/training"
Line 61: | Line 61: | ||
<div id="point1"><p id="rib"></p> | <div id="point1"><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 id="point2"><p id="rib"></p> | ||
+ | <img id="ribosome" src="https://static.igem.org/mediawiki/2014/5/5f/Gifu_ribosome_renew.png"></img> | ||
+ | |||
</div> | </div> | ||
</div> | </div> | ||
Line 68: | Line 71: | ||
var r=160; | var r=160; | ||
var l=80; | var l=80; | ||
− | var rad= | + | var rad=0; |
var radl=360; | var radl=360; | ||
var x; | var x; | ||
Line 87: | Line 90: | ||
function spinright(){ | function spinright(){ | ||
AAA=setInterval(function(){ | AAA=setInterval(function(){ | ||
− | + | if(rad>360){rad=0; k=0;} | |
− | + | else{rad+=2; k+=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); | ||
document.getElementById("point1").style.top=y+300+"px"; | document.getElementById("point1").style.top=y+300+"px"; | ||
document.getElementById("point1").style.left=x+480+"px"; | document.getElementById("point1").style.left=x+480+"px"; | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
document.getElementById("point1").style.transform="rotate("+k+"deg)"; | document.getElementById("point1").style.transform="rotate("+k+"deg)"; | ||
Line 123: | Line 105: | ||
function spinleft(){ | function spinleft(){ | ||
BBB=setInterval(function(){ | BBB=setInterval(function(){ | ||
+ | if(radl==0){radl=360;} | ||
+ | else{radl-=2}; | ||
− | + | xl=l*Math.cos(Math.PI/180*radl); | |
− | + | yl=l*Math.sin(Math.PI/180*radl); | |
− | + | document.getElementById("point2").style.top=yl+300+"px"; | |
− | + | document.getElementById("point2").style.left=xl+240+"px"; | |
+ | document.getElementById("point2").style.transform="rotate("+kl+"deg)"; | ||
},7); | },7); |
Revision as of 16:10, 18 September 2015