Gifu/rensyuu

From 2014.igem.org

(Difference between revisions)
Line 87: Line 87:
if(rad==360){rad=0;}
if(rad==360){rad=0;}
-
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);
Line 93: Line 93:
circle.style.left=x+390+"px";
circle.style.left=x+390+"px";
-
k-=2;
+
k+=2;
if(rad==360){k=90};
if(rad==360){k=90};
circle.style.transform="rotate("+k+"deg)";
circle.style.transform="rotate("+k+"deg)";
Line 102: Line 102:
BBB=setINterval(function(){
BBB=setINterval(function(){
-
if(rad==0){rad=360;}
+
if(rad==360){rad=0;}
-
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);
Line 110: Line 110:
k-=2;
k-=2;
-
if(rad==0){k=90};
+
if(rad==360){k=90};
circle.style.transform="rotate("+k+"deg)";
circle.style.transform="rotate("+k+"deg)";
},7);
},7);
Line 116: Line 116:
$(document).ready(function () {
$(document).ready(function () {
-
spinright()
+
spinleft()
});
});

Revision as of 07:47, 5 September 2015

factory1