-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaFrame.html
101 lines (90 loc) · 3.49 KB
/
aFrame.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<title>Beerphong</title>
<script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
<!-- we import arjs version without NFT but with marker + location based support -->
<script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar.js"></script>
<script src="./src_aFrame/main.js" type="module"></script>
<link rel="stylesheet" href="aFrame.css">
<style>
body {
overflow: hidden;
}
</style>
</head>
<body>
<p id="display" style="position: fixed; top: 100px; left: 10px; font-size: 40px; color: white;">
</p>
<a-scene embedded arjs id="a_Scene" renderer="antialias: true" vr-mode-ui="enabled: false">
<a-marker position rotation preset='custom' type='pattern' url='Assets/beerpong.patt' id="a_Marker">
<a-entity id="a_ScaleEntity" position="0 0 0" scale="2.94 2.94 2.94">
<a-entity position="0 0 0" scale='1 1 1' gltf-model="./Assets/Table.glb"></a-entity>
<a-sphere id="ball" scale='0.02 0.02 0.02' position="0 1.5 0"></a-sphere>
</a-entity>
</a-marker>
<a-entity position rotation camera id="camera"></a-entity>
</a-scene>
<div class="cupUI">
<div class="cups red" rotaion="0">
<div class="row 1">
<div class="cup" id="red1"></div>
</div>
<div class="row 2">
<div class="cup" id="red2"></div>
<div class="cup" id="red3"></div>
</div>
<div class="row 3">
<div class="cup" id="red4"></div>
<div class="cup" id="red5"></div>
<div class="cup" id="red6"></div>
</div>
<div class="row 4">
<div class="cup" id="red7"></div>
<div class="cup" id="red8"></div>
<div class="cup" id="red9"></div>
<div class="cup" id="red10"></div>
</div>
</div>
<div class="settings">
<div class="openClose">
<p>Scale:</p>
<p class="close">+</p>
</div>
<div class="mode">
<label class="switch">
<input id="sizeToggle" type="checkbox">
<span class="slider round"></span>
</label>
<div class="label">
<p>Table</p>
<p>Real Life</p>
</div>
</div>
</div>
<div class="cups blue" rotation="0">
<div class="row 1">
<div class="cup" id="blue1"></div>
</div>
<div class="row 2">
<div class="cup" id="blue2"></div>
<div class="cup" id="blue3"></div>
</div>
<div class="row 3">
<div class="cup" id="blue4"></div>
<div class="cup" id="blue5"></div>
<div class="cup" id="blue6"></div>
</div>
<div class="row 4">
<div class="cup" id="blue7"></div>
<div class="cup" id="blue8"></div>
<div class="cup" id="blue9"></div>
<div class="cup" id="blue10"></div>
</div>
</div>
</div>
</body>
</html>