-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSnakeGame.html
More file actions
33 lines (31 loc) · 933 Bytes
/
Copy pathSnakeGame.html
File metadata and controls
33 lines (31 loc) · 933 Bytes
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="data:;base64,iVBORw0KGgo=" />
<title>A simple snake game</title>
<style type="text/css">
canvas {
border: 1px solid;
}
#score {
font-size: 20px;
}
#score-value {
color: green;
font-weight: bold;
}
</style>
</head>
<body>
<div style="display: flex">
<canvas id="myCanvas" width="800" height="800">
Your browser does not have support for Canvas.
</canvas>
<div id="score-board"></div>
</div>
</body>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/three@0.128.0/build/three.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/three@0.128.0/examples/js/controls/TrackballControls.js"></script>
<script type="text/javascript" src="SnakeGame.js"></script>
</html>