Skip to content

Commit

Permalink
Corrected changed layout code
Browse files Browse the repository at this point in the history
  • Loading branch information
judenaveenraj committed Aug 31, 2011
1 parent 2237d97 commit dc3c460
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
Binary file added 4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 11 additions & 12 deletions myscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ stroke: " 10px #239 "
});

var indi=canvas.display.arc({
x:250,
y:canvas.height/2,
x:185,
y:315,
origin:{x:"center",y:"center"},
radius:90,
stroke:"100px #fff",
Expand All @@ -67,12 +67,12 @@ stroke: "5px #0f881e"
});

var wheel=canvas.display.image({
x:250,
y:canvas.height/2,
x:185,
y:315,
width:350,
height:350,
origin: {x:"center",y:"center"},
image: "2.png",
image: "5.png",
rotation:0
});

Expand All @@ -82,7 +82,6 @@ y:canvas.height/2-50,
width:700,
height:300,
origin:{x:"top", y:"left"},
stroke: "2px #a24"
});

var ball= canvas.display.arc({
Expand Down Expand Up @@ -438,16 +437,16 @@ posangle+=ballspdinc;
posangrad=posangle*(Math.PI/180);
posx=posrad*Math.cos(posangrad);
posy=posrad*Math.sin(posangrad);
ball.x=posx+250;
ball.y=posy+250;
ball.x=posx+185;
ball.y=posy+315;
}
else{
posangle-=ballspdinc;
posangrad=posangle*(Math.PI/180);
posx=posrad*Math.cos(posangrad);
posy=posrad*Math.sin(posangrad);
ball.x=(1*posx)+250;
ball.y=(-1*posy)+250;
ball.x=(1*posx)+185;
ball.y=(-1*posy)+315;
}

if (ballspdinc==0)
Expand Down Expand Up @@ -501,8 +500,8 @@ setTimeout(function(){ ballAccelrt();},600);


function getBallPos(){
posx=ball.x-250;
posy=ball.y-250;
posx=ball.x-185;
posy=ball.y-315;
if (posy<0)
upperhalf=1;
posrad=Math.sqrt(Math.pow(posx,2)+Math.pow(posy,2));
Expand Down

0 comments on commit dc3c460

Please sign in to comment.