-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
161 lines (115 loc) · 4.29 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<!DOCTYPE html>
<head>
<title>Pong</title>
<!-- <link rel="manifest" href="manifest.json">-->
<!-- <meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="msapplication-starturl" content="/"> -->
<!-- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> -->
<!-- <meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="msapplication-config" content="browserconfig.xml">
<link rel="icon" type="image/png" sizes="192x192" href="android-chrome-192x192.png">
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png"> -->
<!-- <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1"> -->
<!-- <meta name="viewport" content="width=device-width/2, initial-scale=1.0"> -->
<!-- <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, shrink-to-fit=no"> -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<style>/* Removes Mobile Highlight */ *{-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}</style>
<script src="easel.js"></script>
<script src="Tween.js"></script>
<script src="sound.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!-- <script type="text/javascript">
function resize_canvas(){
canvas = document.getElementById("Pong");
if (canvas.width < window.innerWidth)
{
canvas.width = window.innerWidth;
console.log(window.innerWidth);
}
if (canvas.height < window.innerHeight)
{
canvas.height = window.innerHeight;
console.log(window.innerHeight);
}
} onresize="resize_canvas()"
</script> -->
<script src="https://code.createjs.com/1.0.0/easeljs.min.js"></script>
<!-- <script>jQuery.noConflict();</script> -->
<script src="Main.js"></script>
</head>
<body onload="Main();" >
<!-- style = "text-align:center; background-color: red ;
width: 100%;
height: 100%;
margin: 0;
position:fixed;
line-height: 0;
overflow: hidden;
"> -->
<!-- width: 150vh; height:80vh; -->
<!-- <div id="gameArea" style="
position: absolute;
left: 0%;
top: 0%;
background-color: yellow;
text-align:center;
"
> -->
<!--
style=" text-align:center;
width: 100%; height:100%;
background-color: yellow;
line-height: 0;
overflow: hidden; "> -->
<canvas id="Pong" width="480" height="320" style=" width: 100%;
height: 100vh;">
<!-- style="
background-color: green;
display: block;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;" -->
</canvas>
<!-- </div> -->
</body>
<script>
$("#Pong").bind("wheel mousewheel", function(e) {e.preventDefault()});
// document.getElementById( "Pong" ).onwheel = function(event){
// event.preventDefault();
// };
// document.getElementById( "Pong" ).onmousewheel = function(event){
// event.preventDefault();
// };
// function resizeGame() {
// var gameArea = document.getElementById('gameArea');
// var widthToHeight = 3 / 2;
// var newWidth = window.innerWidth;
// var newHeight = window.innerHeight;
// var newWidthToHeight = newWidth / newHeight;
// if (newWidthToHeight > widthToHeight) {
// newWidth = newHeight * widthToHeight;
// gameArea.style.height = newHeight + 'px';
// gameArea.style.width = newWidth + 'px';
// } else {
// newHeight = newWidth / widthToHeight;
// gameArea.style.width = (newWidth )+ 'px';
// gameArea.style.height = (newHeight )+ 'px';
// }
// gameArea.style.marginTop = (newHeight / 8) + 'px';
// gameArea.style.marginLeft = (newWidth / 8) + 'px';
// var gameCanvas = document.getElementById('Pong');
// gameCanvas.width = newWidth;
// gameCanvas.height = newHeight;
// }
// window.addEventListener('resize', resizeGame, false);
// window.addEventListener('orientationchange', resizeGame, false);
</script>
</html>