-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
69 lines (61 loc) · 3.88 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hello, World! • A-Frame</title>
<meta name="description" content="Hello, World! • A-Frame">
<script src="https://aframe.io/releases/latest/aframe.min.js"></script>
<script src="/node_modules/nunjucks/browser/nunjucks.js"></script>
<script src="https://cdn.socket.io/socket.io-1.4.5.js"></script>
</head>
<body>
<script id="x-mark-template" type="text/x-nunjucks-template">
<a-entity class="x-mark piece" position="{{ position }}">
<a-image src="/images/x.png" width="1" height="1"></a-image>
</a-entity>
</script>
<script id="o-mark-template" type="text/x-nunjucks-template">
<a-entity class="o-mark piece" position="{{ position }}">
<a-image src="/images/o.png" width="1" height="1"></a-image>
</a-entity>
</script>
<script id="winner1" type="text/x-nunjucks-template">
<a-entity position="0 4 2">
<a-image src="/images/winner1.png"></a-image>
</a-entity>
</script>
<script id="winner2" type="text/x-nunjucks-template">
<a-entity position="0 4 2">
<a-image src="/images/winner2.png"></a-image>
</a-entity>
</script>
<a-scene>
<a-sky color="rgb(121, 184, 212)" src="/images/sky.jpg"></a-sky>
<a-entity id="board">
<a-plane rotation="0 0 0" position="0 2 0" width="3" height="3" color="rgb(195, 193, 31)"></a-plane>
</a-entity>
<a-entity
geometry="primitive: plane; width: 30; height: 30"
rotation="-90 0 0"
position="0 0 0"
material="src: url(/images/floor2.jpg); repeat: 5 5;"
></a-entity>
<a-plane class="placeholder" rotation="0 0 0" position="-1 3 0.1" width="1" height="1" color="rgb(233, 255, 56)" piecePosition="1" id="placeholder1"></a-plane>
<a-plane class="placeholder" rotation="0 0 0" position="0 3 0.1" width="1" height="1" color="rgb(233, 255, 56)" piecePosition="2" id="placeholder2"></a-plane>
<a-plane class="placeholder" rotation="0 0 0" position="1 3 0.1" width="1" height="1" color="rgb(233, 255, 56)" piecePosition="3" id="placeholder3"></a-plane>
<a-plane class="placeholder" rotation="0 0 0" position="-1 2 0.1" width="1" height="1" color="rgb(233, 255, 56)" piecePosition="4" id="placeholder4"></a-plane>
<a-plane class="placeholder" rotation="0 0 0" position="0 2 0.1" width="1" height="1" color="rgb(233, 255, 56)" piecePosition="5" id="placeholder5"></a-plane>
<a-plane class="placeholder" rotation="0 0 0" position="1 2 0.1" width="1" height="1" color="rgb(233, 255, 56)" piecePosition="6" id="placeholder6"></a-plane>
<a-plane class="placeholder" rotation="0 0 0" position="-1 1 0.1" width="1" height="1" color="rgb(233, 255, 56)" piecePosition="7" id="placeholder7"></a-plane>
<a-plane class="placeholder" rotation="0 0 0" position="0 1 0.1" width="1" height="1" color="rgb(233, 255, 56)" piecePosition="8" id="placeholder8"></a-plane>
<a-plane class="placeholder" rotation="0 0 0" position="1 1 0.1" width="1" height="1" color="rgb(233, 255, 56)" piecePosition="9" id="placeholder9"></a-plane>
<a-entity id="camera" position="-2 2 5" rotation="0 0 0">
<a-entity camera gamepad-controls look-controls wasd-controls>
<a-entity cursor="fuse: true; timeout: 100; maxDistance: 10;" geometry="primitive: ring; radiusInner: 0.02; radiusOuter: 0.03" material="color: blue" position="0 0 -2"></a-entity>
</a-entity>
</a-entity>
</a-scene>
<script src="/js/game.js"></script>
<script src="/js/game-network.js"></script>
</body>
</html>