-
Notifications
You must be signed in to change notification settings - Fork 0
/
1.html
313 lines (255 loc) · 18.3 KB
/
1.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
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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
<html>
<head>
<meta charset="utf-8">
<title>BGSU Psychology Experiment: Test 1</title>
<!-- A-Frame Components -->
<!-- Main Engine -->
<script src="https://aframe.io/releases/0.7.0/aframe.min.js"></script>
<!-- Event System -->
<script src="https://unpkg.com/aframe-event-set-component@^4.0.0/dist/aframe-event-set-component.min.js"></script>
<!-- Kinematic-body -->
<script src="https://cdn.rawgit.com/donmccurdy/aframe-extras/v3.12.3/dist/aframe-extras.min.js"></script>
<!-- Log System -->
<script src="https://unpkg.com/aframe-log-component@1.0.7/dist/aframe-log-component.min.js"></script>
<!-- States -->
<script src="https://unpkg.com/aframe-state-component@1.8.0/dist/aframe-state-component.min.js"></script>
</head>
<body>
<script>
AFRAME.registerReducer('app', {
initialState: {
score: 0,
saved_score: 0
},
handlers: {
recordscore: function (state, action) {
state.score = action.points;
return state;
},
savescore: function (state) {
state.saved_score = state.score;
return state;
}
}
});
</script>
<script>
AFRAME.registerComponent('main', {
tick: function (t) {
var el = this.el;
el.sceneEl.emit('recordscore', {points: t});
}
});
</script>
<script>
AFRAME.registerComponent('phone-found', {
init: function () {
var el = this.el;
el.addEventListener('click', function () {
el.sceneEl.emit(AFRAME.log('You found your phone!'));
el.sceneEl.emit('savescore');
});
}
});
</script>
<a-scene main physics="debug: false">
<!--Player Controls-->
<a-entity camera="userHeight:1.5" position="-48 0 -38" universal-controls kinematic-body>
<a-entity cursor
geometry="primitive: ring; radiusInner: 0.001; radiusOuter: 0.0015"
material="color: #FFFFFF"
position="0 0 -0.1"></a-entity>
<a-entity log geometry="primitive: plane" material="color: #E88B39" text="color: #4F2C1D" scale="0.75 0.75 1" position="-1.25 0.5 -1">
</a-entity>
<a-entity bind__text="value: app.saved_score" text="value: 0; color: #4F2C1D; align: center;" geometry="primitive: plane" material="color: #E88B39" scale="0.75 0.75 1" position="1.25 0.5 -1"></a-entity>
</a-entity>
<!-- Cell Phone-->
<a-box phone-found="" scale="0.5 0.01 0.2" position="16 -0.49 14" color="#000000" flatshading="true"></a-box>
<script>
AFRAME.log('Test 1')
AFRAME.log('Move using the arrow keys.')
AFRAME.log('Look using the mouse.')
AFRAME.log('You need to find your black smartphone.')
AFRAME.log('When you find it, click on it.')
</script>
<!-- Floor -->
<a-box static-body="sphereRadius:NaN" scale="200 1 200" depth="1" position="0 -1 0" color="#CAFF73" flatshading="true"></a-box>
<!-- Hedge Barrier -->
<a-box static-body="sphereRadius:NaN" scale="1 3 200" position="100 -1 0" color="#77E847" flatshading="true"></a-box>
<a-box static-body="sphereRadius:NaN" scale="200 3 1" position="0 -1 100" color="#77E847" flatshading="true"></a-box>
<a-box static-body="sphereRadius:NaN" scale="1 3 200" position="-100 -1 0" color="#77E847" flatshading="true"></a-box>
<a-box static-body="sphereRadius:NaN" scale="200 3 1" position="0 -1 -100" color="#77E847" flatshading="true"></a-box>
<!--Building-->
<a-entity position="75.094 0 -74.049" rotation="0 -35.92445375470262 0">
<a-box static-body="sphereRadius:NaN" scale="8 5 1" position="0 2 -15" color="#4F2C1D" flatshading="true"></a-box>
<a-box static-body="sphereRadius:NaN" scale="2 5 1" position="2.5 2 -10" color="#4F2C1D" flatshading="true"></a-box>
<a-box static-body="sphereRadius:NaN" scale="2 5 1" position="-2.5 2 -10" color="#4F2C1D" flatshading="true"></a-box>
<a-box static-body="sphereRadius:NaN" scale="1 5 4" position="-3 2 -12.5" color="#4F2C1D" flatshading="true"></a-box>
<a-box static-body="sphereRadius:NaN" scale="1 5 4" position="3 2 -12.5" color="#4F2C1D" flatshading="true"></a-box>
<a-box static-body="sphereRadius:NaN" scale="5 1 5" position="0 4 -12" color="#4F2C1D" flatshading="true"></a-box>
</a-entity>
<!--Building Sign-->
<a-entity position="77.814 0 -74.695">
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="1 1 0.1" position="-3 1 -9" color="#E88B39" flatshading="true"></a-cylinder>
<a-cylinder scale="0.1 1 0.1" position="-3 0 -9" color="#E88B39" flatshading="true"></a-cylinder>
<a-entity text="align:center;value:Park Shelter" position="-3 1 -8.9" scale="4 4 1"></a-entity>
</a-entity>
<!--Picnic Table-->
<a-entity position="-70.303 0 110.012">
<a-cylinder static-body="sphereRadius:NaN" scale="1 0.1 1" position="-19 0.5 -17" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-cylinder scale="0.1 2 0.1" position="-19 -0.5 -17" color="#4F2C1D" flatshading="true"></a-cylinder>
</a-entity>
<!--Stool-->
<a-cylinder scale="0.5 1 0.5" position="-92.285 -0.5 91.555" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-cylinder scale="0.5 1 0.5" position="-92.18 -0.5 94.583" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-cylinder scale="0.5 1 0.5" position="-87.884 -0.5 94.982" color="#4F2C1D" flatshading="true"></a-cylinder>
<!--Cherry Trees-->
<a-entity position="-17.571 -1.688 -26.008">
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="-14 -0.5 -18" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="-14 6 -18" color="#FF52CE" flatshading="true"></a-sphere>
</a-entity>
<a-entity position="14.657 0 -47.897">
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="-16 -0.5 -13" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="-16 6 -13" color="#FF52CE" flatshading="true" material="color:#81d193"></a-sphere>
</a-entity>
<a-entity position="-37.185 0 -69.624">
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="-9 -0.5 -9" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="-9 6 -9" color="#FF52CE" flatshading="true"></a-sphere>
</a-entity>
<a-entity position="56.082 0 -22.856">
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="14 -0.5 -19" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="14 6 -19" color="#FF52CE" flatshading="true"></a-sphere>
</a-entity>
<a-entity position="27.291 0 -52.52">
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="16 -0.5 -14" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="16 6 -14" color="#FF52CE" flatshading="true"></a-sphere>
</a-entity>
<a-entity>
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="9 -0.5 -8" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="9 6 -8" color="#FF52CE" flatshading="true"></a-sphere>
</a-entity>
<a-entity position="11.313 0 26.179">
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="-14 -0.5 18" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="-14 6 18" color="#FF52CE" flatshading="true" material="color:#ff5357"></a-sphere>
</a-entity>
<a-entity position="53.648 0 55.636">
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="-16 -0.5 13" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="-16 6 13" color="#FF52CE" flatshading="true" material="color:#ff5353"></a-sphere>
</a-entity>
<a-entity position="-26.798 0 14.925">
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="-9 -0.5 9" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="-9 6 9" color="#FF52CE" flatshading="true" material="color:#b1ad07"></a-sphere>
</a-entity>
<a-entity position="-19.608 0 -0.492">
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="-14 -0.5 -5" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="-14 6 -5" color="#FF52CE" flatshading="true"></a-sphere>
</a-entity><!--Ö���@��@ԁ�����@ׁ��@������%-->
<a-entity>
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="-16 -0.5 4" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="-16 6 4" color="#FF52CE" flatshading="true" material="color:#2e7a2c"></a-sphere>
</a-entity>
<a-entity>
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="-59.225 -0.5 -7.593" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="-59.518 6 -7.607" color="#FF52CE" flatshading="true" material="color:#86cc89"></a-sphere>
</a-entity>
<a-entity position="47.319 0 -81.467">
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="17 -0.5 0" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="17 6 0" color="#FF52CE" flatshading="true"></a-sphere>
</a-entity>
<a-entity position="2.483 0 -32.502">
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="14 -0.5 -5" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="14 6 -5" color="#FF52CE" flatshading="true"></a-sphere>
</a-entity>
<a-entity position="53.351 0 -7.852">
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="10 -0.5 0" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="10 6 0" color="#FF52CE" flatshading="true" material="color:#79db77"></a-sphere>
</a-entity>
<a-entity>
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="-79.034 -0.5 55.897" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="-78.269 6 55.345" color="#FF52CE" flatshading="true" material="color:#57fb74"></a-sphere>
</a-entity>
<a-entity position="22.162 0 40.327">
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="20 -0.5 6" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="20 6 6" color="#FF52CE" flatshading="true"></a-sphere>
</a-entity>
<a-entity position="0.258 0 13.205">
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="21 -0.5 15" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="21 6 15" color="#FF52CE" flatshading="true"></a-sphere>
</a-entity>
<a-entity position="15.084 0 61.632">
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="0 -0.5 20" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="0 6 20" color="#FF52CE" flatshading="true"></a-sphere>
</a-entity>
<a-entity position="-58.822 0 64.754">
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="5 -0.5 17" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="5 6 17" color="#FF52CE" flatshading="true"></a-sphere>
</a-entity>
<a-entity position="-59.539 0 7.723">
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="-6 -0.5 19" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="-6 6 19" color="#FF52CE" flatshading="true" material="color:#e969c9"></a-sphere>
</a-entity>
<a-entity position="-28.877 0 32.167">
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="-10 -0.5 22" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="-10 6 22" color="#FF52CE" flatshading="true" material="color:#fbf257"></a-sphere>
</a-entity>
<a-entity>
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="0 -0.5 15" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="0 6 15" color="#FF52CE" flatshading="true"></a-sphere>
</a-entity>
<a-entity position="-21.814 0 63.676">
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="5 -0.5 13" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="5 6 13" color="#FF52CE" flatshading="true"></a-sphere>
</a-entity>
<a-entity position="78.138 0 12.136">
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="-6 -0.5 7" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="-6 6 7" color="#FF52CE" flatshading="true"></a-sphere>
</a-entity>
<a-entity position="22.444 0 -28.001">
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="0.5 9 0.5" position="15 -0.5 20" color="#4F2C1D" flatshading="true"></a-cylinder>
<a-sphere scale="4 4 4" position="15 6 20" color="#FF52CE" flatshading="true" material="color:#37a23a"></a-sphere>
</a-entity>
<!--Picnic Sign-->
<a-entity position="-79.015 0 77.742" rotation="0 84.2820916637441 0">
<a-cylinder static-body="shape:box;sphereRadius:NaN" scale="1 1 0.1" position="-13 1 -9" color="#E88B39" flatshading="true" rotation="0 45 0"></a-cylinder>
<a-cylinder scale="0.1 2 0.1" position="-13 -0.5 -9" color="#E88B39" flatshading="true"></a-cylinder>
<a-entity text="align:center;value:Picnic Area" position="-12.9 1 -8.7" scale="4 4 1" rotation="0 45 0"></a-entity>
</a-entity>
<!--Pond-->
<a-entity position="-94.986 -0.001 -77.842" scale="3 3 3">
<a-cylinder scale="5 1 5" position="8 -0.5 8.5" color="#608CFF" flatshading="true"></a-cylinder>
<a-box static-body="sphereRadius:NaN" scale="8 5 8" position="8 -0.5 8.5" visible="false" material=""></a-box>
<a-box static-body="sphereRadius:NaN" scale="1 2 2" position="13 0 9" color="#BEBEBE" flatshading="true" rotation="27 23 41"></a-box>
<a-box static-body="sphereRadius:NaN" scale="1 2 2" position="13 0 7" color="#BEBEBE" flatshading="true" rotation="65 -161 130"></a-box>
<a-box static-body="sphereRadius:NaN" scale="1 2 2" position="13 0 10" color="#BEBEBE" flatshading="true" rotation="7.5 156 114"></a-box>
<a-box static-body="sphereRadius:NaN" scale="1 2 4.5" position="11 -0.5 5" color="#BEBEBE" flatshading="true" rotation="7.5 -141.5 114"></a-box>
<a-box static-body="sphereRadius:NaN" scale="1 2 2" position="10 -0.5 4" color="#BEBEBE" flatshading="true" rotation="39 -180 33.5"></a-box>
<a-box static-body="sphereRadius:NaN" scale="1 2 2" position="8.5 -0.5 3" color="#BEBEBE" flatshading="true" rotation="39 108 33.5"></a-box>
<a-box static-body="sphereRadius:NaN" scale="1 2 2" position="7 -0.5 3.5" color="#BEBEBE" flatshading="true" rotation="39 142 33.5"></a-box>
<a-box static-body="sphereRadius:NaN" scale="1 2 2" position="5 -0.5 4" color="#BEBEBE" flatshading="true" rotation="40.5 120.5 -13"></a-box>
<a-box static-body="sphereRadius:NaN" scale="1 2 2" position="4 -0.3 5.4" color="#BEBEBE" flatshading="true" rotation="28.5 175 -147"></a-box>
<a-box static-body="sphereRadius:NaN" scale="1 2 2" position="3 -0.3 7.5" color="#BEBEBE" flatshading="true" rotation="28.5 175 -147"></a-box>
<a-box static-body="sphereRadius:NaN" scale="1 2 2" position="3 -0.3 10" color="#BEBEBE" flatshading="true" rotation="28.5 -152 -147"></a-box>
<a-box static-body="sphereRadius:NaN" scale="1 2 2" position="4.2 -0.3 12" color="#BEBEBE" flatshading="true" rotation="28.5 -126 -147"></a-box>
<a-box static-body="sphereRadius:NaN" scale="1 2 2" position="5.6 -0.3 12.5" color="#BEBEBE" flatshading="true" rotation="28.5 82.5 -147"></a-box>
<a-box static-body="sphereRadius:NaN" scale="1 2 2" position="8 -0.3 13.5" color="#BEBEBE" flatshading="true" rotation="28.5 102.5 -147"></a-box>
<a-box static-body="sphereRadius:NaN" scale="1 2 2" position="10 -0.3 13" color="#BEBEBE" flatshading="true" rotation="28.5 -45 -147"></a-box>
<a-box static-body="sphereRadius:NaN" scale="1 2 2" position="12 -0.3 12" color="#BEBEBE" flatshading="true" rotation="28.5 175 -147"></a-box>
</a-entity>
<!--Sky-->
<a-sky color="#0DEFFF"></a-sky>
<a-entity position="44.633 -1.534 13.906" static-body="sphereRadius:NaN" scale="19 2.304 19" geometry="primitive:sphere" material="color:#CAFF73" flatshading="true"></a-entity>
<a-entity position="42.224 -1.534 -41.292" static-body="sphereRadius:NaN" scale="19 2.304 19" geometry="primitive:sphere" material="color:#CAFF73" flatshading="true"></a-entity>
<a-entity position="81.015 -1.534 -11.077" static-body="sphereRadius:NaN" scale="19 2.304 19" geometry="primitive:sphere" material="color:#CAFF73" flatshading="true"></a-entity>
<a-entity position="20.688 -1.534 -77.466" static-body="sphereRadius:NaN" scale="19 2.304 19" geometry="primitive:sphere" material="color:#CAFF73" flatshading="true"></a-entity>
<a-entity position="-23.22 -1.534 -79.027" static-body="sphereRadius:NaN" scale="19 2.304 19" geometry="primitive:sphere" material="color:#CAFF73" flatshading="true"></a-entity>
<a-entity position="-4.868 -1.534 -8.112" static-body="sphereRadius:NaN" scale="19 2.304 19" geometry="primitive:sphere" material="color:#CAFF73" flatshading="true"></a-entity>
<a-entity position="17.02 -1.534 58.643" static-body="sphereRadius:NaN" scale="19 2.304 19" geometry="primitive:sphere" material="color:#CAFF73" flatshading="true"></a-entity>
<a-entity position="-24.81 -1.534 43.873" static-body="sphereRadius:NaN" scale="19 2.304 19" geometry="primitive:sphere" material="color:#CAFF73" flatshading="true"></a-entity>
<a-entity position="-58.692 -1.534 52.799" static-body="sphereRadius:NaN" scale="19 2.304 19" geometry="primitive:sphere" material="color:#CAFF73" flatshading="true"></a-entity>
<a-entity position="-78.569 -1.534 5.914" static-body="sphereRadius:NaN" scale="19 2.304 19" geometry="primitive:sphere" material="color:#CAFF73" flatshading="true"></a-entity>
<a-entity position="-43.394 -1.534 -24.929" static-body="sphereRadius:NaN" scale="19 2.304 19" geometry="primitive:sphere" material="color:#CAFF73" flatshading="true"></a-entity>
<a-entity position="-7.374 -1.534 -30.221" static-body="sphereRadius:NaN" scale="19 2.304 19" geometry="primitive:sphere" material="color:#CAFF73" flatshading="true"></a-entity>
<a-entity position="68.842 -1.534 46.745" static-body="sphereRadius:NaN" scale="19 2.304 19" geometry="primitive:sphere" material="color:#CAFF73" flatshading="true"></a-entity>
</a-scene>
</body>
</html>