Difference between revisions of "Team:Gifu/training"

Line 42: Line 42:
 
<script type="text/javascript">
 
<script type="text/javascript">
 
<!--
 
<!--
var r=200;
+
var r=100;
var l=100;
+
 
var rad=180;
 
var rad=180;
 
var x;
 
var x;
Line 49: Line 48:
 
var circle =document.getElementById("point") ;
 
var circle =document.getElementById("point") ;
 
var k=90;
 
var k=90;
 +
var l;
 
var m=1;
 
var m=1;
 
var n=2;
 
var n=2;
Line 54: Line 54:
 
function spinright(){
 
function spinright(){
 
AAA=setInterval(function(){
 
AAA=setInterval(function(){
if(rad==540){rad=0;}
+
if(m==1){
 +
r=200;
 +
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 65: Line 67:
  
 
circle.style.transform="rotate("+k+"deg)";
 
circle.style.transform="rotate("+k+"deg)";
 
+
}
 
},7);
 
},7);
 
};
 
};
Line 71: Line 73:
 
function spinleft(){
 
function spinleft(){
 
BBB=setInterval(function(){
 
BBB=setInterval(function(){
if(rad==-360){rad=180;}
+
if(m==0){
 +
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);
Line 83: Line 87:
 
circle.style.transform="rotate("+k+"deg)";
 
circle.style.transform="rotate("+k+"deg)";
  
 
+
}
 
},7);
 
},7);
 
};
 
};

Revision as of 05:32, 13 September 2015