-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
109 lines (87 loc) · 3.5 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=2.0">
<meta name="description" content="A cat-adjudicated Pong clone made with HTML canvas, vanilla JavaScript and Howler.js">
<meta name="keywords" content="Pong, JavaScript, CSS, HTML, clone, game, canvas">
<meta name="author" content="Denis McDonald">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Pong</title>
<link rel="stylesheet" type="text/css" href="style.css">
<link href="https://fonts.googleapis.com/css?family=Monoton|Modak|Bangers" rel="stylesheet">
<!--Howler audio library for sounds used in the game-->
<script await src="https://cdnjs.cloudflare.com/ajax/libs/howler/2.0.12/howler.core.min.js"></script>
<script async type="text/javascript" src="script.js"></script>
</head>
<body>
<!--Animated shapes for highlighting audio mute/unmute button-->
<div id="overlay"></div>
<div id="spotlight"></div>
<!--Animated game heading-->
<div id="pong">
<div id="pp">P</div>
<div id="oo">O</div>
<div id="nn">N</div>
<div id="gg">G</div>
<div id="ex">!</div>
</div>
<!--Begin cat components-->
<div id="umpire">
<div id="leftEar"></div>
<div id="rightEar"></div>
</div>
<div id="umpShirt"></div>
<div id="tail"></div>
<div id="eyeleft">
<div id="shiny1"></div>
<div id="tearLeft"></div>
<div id="eyebrowLeft"></div>
</div>
<div id="eyeright">
<div id="shiny2"></div>
<div id="tearRight"></div>
<div id="eyebrowRight"></div>
</div>
<div id="nose">
<div id="whiskers1"></div>
<div id="whiskers2"></div>
<div id="whiskers3"></div>
<div id="whiskers4"></div>
<div id="whiskers5"></div>
<div id="whiskers6"></div>
</div>
<!--End cat components-->
<!--Scoreboard-->
<div id="p1Score">0</div>
<div id="p2Score">0</div>
<div id="setWins">Score <span id="showScore">5</span> to win!</div>
<div id="clickPlay">Click to play!</div>
<div id="windowAlert"><span>Uh oh!</span><br>Enlarge your browser window to play!</div>
<!--Arrows for adjusting win score-->
<img id="mWins" src="/assets/arrow.png">
<img id="lWins" src="/assets/arrow.png">
<!--Top border ricochet shapes for hit detection -->
<div id="particlesY">
<div id="part1Y"></div>
<div id="part2Y"></div>
<div id="part3Y"></div>
</div>
<!--Bottom border ricochet shapes for hit detection -->
<div id="particlesYb">
<div id="part1Yb"></div>
<div id="part2Yb"></div>
<div id="part3Yb"></div>
</div>
<img id="speakerOn" src="/assets/speakerOn.svg">
<img id="speakerOff" src="/assets/speakerOff.svg">
<!--Ball ricochet lettering-->
<div id="pingLeft">Ping!</div>
<div id="pongRight">Pong!</div>
<canvas id="gameCanvas" width="800" height="550"></canvas>
<a href="https://github.com/denismcdonald/Cat-Pong"><img id="GitHub" src="/assets/GitHub.png"></a>
<footer>Created by <a href="https://github.com/denismcdonald"><span>Denis McDonald</span></a>.<br>
With thanks to <a href="https://github.com/denismcdonald/Cat-Pong/blob/master/README.md"><span>these </span></a><a href="https://freesound.org"><img id="freesound" src="/assets/freesound.png">folk.</a>
</footer>
</body>
</html>