-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
182 lines (138 loc) · 5.81 KB
/
index.html
File metadata and controls
182 lines (138 loc) · 5.81 KB
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no,user-scalable=no,maximum-scale=1">
<title>The Mall - Future of E-Commerce</title>
<link rel="stylesheet" href="css/custom.css"/>
<link rel="stylesheet" href="bootstrap-4.1.0-dist/css/bootstrap.min.css"/>
<!--<script src="js/vendor/aframe.min.js"></script>-->
<script src="https://aframe.io/releases/0.8.2/aframe.min.js"></script>
<script src="js/vendor/bundle.js"></script>
<script src="js/vendor/aframe-physics-system.js"></script>
</head>
<body>
<a-scene physics renderer="gammaOutput: true">
<!-- Assets -->
<a-assets>
<a-asset-item id="why-male-models" src="https://raw.githubusercontent.com/aframevr/aframe/master/examples/showcase/shopping/man/man.dae"></a-asset-item>
<img id="outside-wall-texture" src="media/img/wall-texture.jpg">
<img id="dune-wall" src="media/img/dune-wall-11.jpg">
<img id="brown-wall-texture" src="media/img/brown-wall-texture.jpg">
</a-assets>
<!-- Camera -->
<a-entity id="rig" movement-controls kinematic-body>
<a-entity id="camera"
camera
position="0 1.6 0"
look-controls="pointerLockEnabled: true">
<a-entity cursor="fuse: true;"
position="0 0 -3"
geometry="primitive: ring; radiusInner: 0.02; radiusOuter: 0.03"
material="color: black; shader: flat">
</a-entity>
</a-entity>
</a-entity>
<!-- Ground -->
<a-plane src="#brown-wall-texture" color="#8e8b84" height="200" width="200" rotation="-90 0 0" position="0 -7 0" static-body></a-plane>
<!-- Obstacles -->
<a-box
src="#dune-wall"
color="#f2f3f4"
width="100" height="30" depth="0.1"
position="0 8 27"
static-body></a-box>
<a-plane color="#f2f3f4"
width="100" height="20" depth="0.1"
position="-0.050 12.577 16.94"
rotation="90"
static-body></a-plane>
<a-plane color="#f2f3f4"
width="100" height="20" depth="0.1"
position="-0.050 12.577 -16.94"
rotation="90"
static-body></a-plane>
<a-box color="#f2f3f4"
width="100" height="30" depth="0.1"
position="0 8 -27"
static-body></a-box>
<a-box color="#f2f3f4"
width="54" height="30" depth="0.1"
position="-50 8 0"
rotation=" 0 90 0"
static-body></a-box>
<a-box color="#f2f3f4"
width="23" height="30" depth="0.1"
position="50 8 16"
rotation=" 0 90 0"
static-body></a-box>
<a-box color="#f2f3f4"
width="23" height="30" depth="0.1"
position="50 8 -16"
rotation=" 0 90 0"
static-body></a-box>
<!-- Shops Glasses Shop 1 -->
<a-box color="#c9dbdc"
opacity="0.2"
width="10" height="20" depth="0.1"
position="-45 2.8 10.27"
static-body></a-box>
<a-box color="#c9dbdc"
opacity="0.5"
width="20" height="20" depth="0.1"
position="-23 2.8 10.27"
static-body></a-box>
<!-- Shops Glasses Shop 2 -->
<a-box color="#c9dbdc"
opacity="0.2"
width="20" height="20" depth="0.1"
position="5.4 2.8 10.27"
static-body></a-box>
<!-- Shops Glasses Shop 3 -->
<a-box color="#c9dbdc"
opacity="0.2"
width="25" height="20" depth="0.1"
position="37.5 2.8 10.27"
static-body></a-box>
<!-- Shops Glasses Shop 1-2 Inner Wall -->
<a-box color="#c9dbdc" opacity="0.2" width="0.1" height="20" depth="17" position="-23 2.8 18.77" static-body ></a-box>
<!-- Shops Glasses Shop 2-3 Inner Wall -->
<a-box color="#c9dbdc" opacity="0.2" width="0.1" height="20" depth="17" position="9.3 2.8 18.77" static-body ></a-box>
<a-box color="#c9dbdc" opacity="0.2" width="100" height="10" depth="0.1" position="-0.27 7.6 10.25" static-body ></a-box>
<!-- Model Dummy -->
<a-entity id="model" position="-47 -7 15">
<a-animation attribute="rotation" from="0 -30 0" to="0 330 0" dur="15000"
easing="linear" repeat="indefinite"></a-animation>
<a-collada-model position="-.35 0 .55" rotation="0 -20 0" scale="1.5 1.5 1.5"
src="#why-male-models"></a-collada-model>
</a-entity>
</div>
<!-- Lighting -->
<a-light type="ambient" color="#bbb"></a-light>
<a-light color="#ccc" position="0 30 0" distance="100" intensity="0.4" type="point"></a-light>
<a-light color="#ccc" position="3 10 -10" distance="50" intensity="0.4" type="point"></a-light>
</a-scene>
<div class="cart">
<p>Total Bill: $<span class="bill">0</span></p>
<p>Total Items: <span class="items">0</span></p>
</div>
<!-- JS Libraries -->
<script src="js/vendor/jquery-3.2.1.min.js" type="text/javascript"></script>
<script src="bootstrap-4.1.0-dist/js/bootstrap.bundle.min.js" type="text/javascript"></script>
<!-- Custom JS -->
<script>
var cart = [], totalBill=0;
$(document).ready(function() {
$("#model").on('click', function () {
if(!cart.includes('red')) {
cart.push('red');
totalBill += 100;
console.log(cart.length)
$(".cart span.bill").text(totalBill);
$(".cart span.items").text(cart.length);
}
})
});
</script>
</body>
</html>