-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
83 lines (83 loc) · 2.66 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<html>
<head>
<script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-environment-component/dist/aframe-environment-component.min.js"></script>
<script src="components/cursor-listener.js"></script>
<script src="components/found-item.js"></script>
</head>
<body>
<!-- Sets the base scene for every 3D world/layout -->
<a-scene>
<a-assets>
<img id="woodTexture" src="./assets/img/wood.jpg" />
<img id="metalTexture" src="./assets/img/metal.jpg" />
<img id="brickTexture" src="./assets/img/brick.jpg" />
<img id="stoneTexture" src="./assets/img/stone.jpg" />
<img id="skyTexture" src="./assets/img/sky.jpg" />
<audio src="./assets/sounds/background-music.mp3" autoplay preload></audio>
</a-assets>
<a-box
id="wooden-block"
height="3"
rotation="0 60 45"
src="#woodTexture"
position="37 1 -37"
animation__position="property: object3D.position.y; to: 2.2; dir: alternate; dur: 2000; loop: true"
found-item
></a-box>
<a-sphere
position="-45 1 40"
radius="1.25"
src="#metalTexture"
found-item
></a-sphere>
<a-box
id="finder-box"
position="41 1 29"
material="color: blue"
cursor-listener
found-item
></a-box>
<a-cylinder
position="44 1 -53"
radius="0.5"
height="1.5"
src="#stoneTexture"
found-item
></a-cylinder>
<a-plane
color="#d1d1d1"
height="2"
width="2"
position="-1 3 -3"
animation__position="property: object3D.position.y; to: 2.2; dir: alternate; dur: 2000; loop: true"
>
<a-entity
text="color: #161a19;
value:
You need to find:\n
1 metal sphere\n
1 brick cylinder\n
1 colored box\n
1 wooden block"
position="1 0 0"
scale="3 3 3"
>
</a-plane>
<a-entity
environment="preset: goaland; dressingAmount: 750; dressingColor: #519839; seed: 5; skyType: atmosphere; shadow: true; fog: 0.3; ground: canyon; groundColor: #c46404;"
></a-entity>
<a-entity id="camera-container">
<a-camera look-controls id="world-camera">
<a-entity
cursor="fuse: true; fuseTimeout: 500"
position="0 0 -1"
geometry="primitive: ring; radiusInner: 0.01; radiusOuter: 0.03"
material="color: black; shader: flat"
id="marker"
></a-entity>
</a-camera>
</a-entity>
</a-scene>
</body>
</html>