-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
51 lines (45 loc) · 1.89 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Virtual Park</title>
<script src="https://aframe.io/releases/1.2.0/aframe.min.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<canvas id="canvas"></canvas>
<br>
<a-scene>
<a-assets>
<img id="tree-texture" src="https://cdn.aframe.io/a-painter/images/floor.jpg">
<img id="grass-texture" src="https://cdn.aframe.io/a-painter/images/floor.jpg">
</a-assets>
<!-- Ground -->
<a-plane src="#grass-texture" rotation="-90 0 0" width="30" height="30" color="#7CFC00"></a-plane>
<!-- Trees -->
<a-entity position="-4 0 -5">
<a-cylinder height="2" radius="0.2" color="#8B5A2B"></a-cylinder>
<a-sphere radius="1.5" position="0 2 0" color="#228B22"></a-sphere>
</a-entity>
<a-entity position="2 0 -3">
<a-cylinder height="2" radius="0.2" color="#8B5A2B"></a-cylinder>
<a-sphere radius="1.5" position="0 2 0" color="#228B22"></a-sphere>
</a-entity>
<a-entity position="5 0 -7">
<a-cylinder height="2" radius="0.2" color="#8B5A2B"></a-cylinder>
<a-sphere radius="1.5" position="0 2 0" color="#228B22"></a-sphere>
</a-entity>
<!-- Benches -->
<a-box position="-3 0.5 -2" width="1.5" height="0.2" depth="0.5" color="#8B4513"></a-box>
<a-box position="-3 0.8 -2" width="1.5" height="0.1" depth="0.1" color="#8B4513"></a-box>
<a-box position="3 0.5 -4" width="1.5" height="0.2" depth="0.5" color="#8B4513"></a-box>
<a-box position="3 0.8 -4" width="1.5" height="0.1" depth="0.1" color="#8B4513"></a-box>
<!-- Fountain -->
<a-torus-knot position="0 0.5 -6" radius="1" tube="0.1" p="2" q="3" color="#1E90FF"></a-torus-knot>
<!-- Camera and controls -->
<a-entity camera look-controls wasd-controls position="0 1.6 5"></a-entity>
</a-scene>
<script src="view.js"></script>
<script src="firework.js"></script>
</body>
</html>