atan2(ey-sy,ex-sx)*180/Math.PI;
30 l =createLine(sx,sy,ang,42,1);
31 //правый треугольник
32 var diagAng =300;
33 var cosAng =Math.cos(diagAng*Math.PI/180);
34 var sinAng =Math.sin(diagAng*Math.PI/180);
35 //правый треугольник, внутренняя стена
36 var x =startx+width-diagLength*cosAng-20;
37 var y =starty+height-heightFromBottom-
.diagLength*sinAng-55;
38 l =createLine(x,y,diagAng,diagLength,2,
.right_triangle,"laser");
39 var sx =l.x1;
40 var sy =l.y1;
41 //правый треугольник, правая стена
42 var x =l.x2;
43 var y =l.y2-diagLength*sinAng*.6;
44 l =createLine(x,y,90.1,diagLength*sinAng*.6,1);
45 //правый треугольник, нижняя стена
46 var ex =l.x1;
47 var ey =l.y1;
48 var ang =Math.atan2(ey-sy,ex-sx)*180/Math.PI;
49 l =createLine(ex,ey,ang+180,42,1);
50 //стартовая доска
51 launchBank =createLine(startx+width+20,starty+20,230,
.30,1);
52 //ракетки и рельсы
53 var length =80;
54 var angle =30;
55 var xstep =length*Math.cos(angle*Math.PI/180);
56 var ystep =length*Math.sin(angle*Math.PI/180);
57 l =createLine(startx,starty+height-heightFromBottom,
.angle,length,.5);
58 createFlipper(l.x2,l.y2,"left");
59 var x =startx+width-xstep;
60 var y =starty+height-heightFromBottom+ystep;
61 l =createLine(x,y,360-angle,length,.5);
62 createFlipper(l.x1,l.y1,"right");
63 //аммортизаторы
64 bounciness =10;
65 addBumper(tempB1._x,tempB1._y,tempB1._width/2,
.bounciness,tempB1);
66 addBumper(tempB2._x,tempB2._y,tempB2._width/2,
.bounciness,tempB2);
67 addBumper(tempB3._x,tempB3._y,tempB3._width/2,
.bounciness,tempB3);
68 addBumper(tempB4._x,tempB4._y,tempB4._width/2,2,
.tempB4,true);
69 addBumper(tempB5._x,tempB5._y,tempB5._width/2,2,
.tempB5,true);
70 addBumper(tempB6._x,tempB6._y,tempB6._width/2,2,
.tempB6,true);
71 addBumper(tempB7._x,tempB7._y,tempB7