Difference between revisions of "Team:Gifu/training"
Line 88: | Line 88: | ||
function spinright(){ | function spinright(){ | ||
AAA=setInterval(function(){ | AAA=setInterval(function(){ | ||
− | if(rad | + | if(rad==360){rad=0;} |
− | else{rad | + | 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+330+"px"; | |
− | + | circle.style.left=x+380+"px"; | |
− | + | ||
− | + | ||
+ | k+=2; | ||
+ | if(rad==360){k=90}; | ||
+ | circle.style.transform="rotate("+k+"deg)"; | ||
},7); | },7); | ||
}; | }; |
Revision as of 16:49, 18 September 2015