-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
75 lines (57 loc) · 3.23 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Space</title>
<meta name="description" content="Space Scene">
<script src="https://aframe.io/releases/0.5.0/aframe.min.js"></script>
<script src="./components/follow.js"></script>
<script src="./components/walk.js"></script>
</head>
<body>
<a-scene>
<a-assets>
<a-asset-item id="outdoor-obj" src="./objects/tinker.obj"></a-asset-item>
<a-asset-item id="outdoor-mtl" src="./objects/obj.mtl"></a-asset-item>
<a-asset-item id="alien_spaceship-obj" src="./objects/alien_spaceship.obj"></a-asset-item>
<a-asset-item id="alien_spaceship-mtl" src="./objects/alien_spaceship.mtl"></a-asset-item>
<a-asset-item id="alien1-obj" src="./objects/alien1.obj"></a-asset-item>
<a-asset-item id="alien1-mtl" src="./objects/alien1.mtl"></a-asset-item>
<a-asset-item id="boxy_robot-obj" src="./objects/boxy_robot.obj"></a-asset-item>
<a-asset-item id="boxy_robot-mtl" src="./objects/boxy_robot.mtl"></a-asset-item>
<a-asset-item id="tree-obj" src="./objects/tree.obj"></a-asset-item>
<a-asset-item id="future_tree-obj" src="./objects/future_tree.obj"></a-asset-item>
<a-asset-item id="tree-mtl" src="./objects/tree.mtl"></a-asset-item>
</a-assets>
<a-sky src="./images/galaxy.jpg"></a-sky>
<a-entity obj-model="obj: #outdoor-obj; mtl: #outdoor-mtl" position="1.53 -1.8 -5.00" rotation="-90 0 0" scale="0.12 0.16 0.16">
</a-entity>
<a-entity obj-model="obj: #boxy_robot-obj; mtl: #boxy_robot-mtl" position="1 1 1" rotation="-90 0 0" scale=".1 .1 .1"></a-entity>
<a-entity>
<a-entity obj-model="obj: #alien_spaceship-obj; mtl: #alien_spaceship-mtl" scale="0.1 0.1 0.1" rotation="-90 0 0" position="10 0 0">
<a-animation attribute="position" dur="1000" from="10 0 0" to="10 -5 0" direction="alternate" repeat="1" begin="mouseenter">
</a-animation>
</a-entity>
<a-animation attribute="rotation" dur="10000" fill="forwards" to="0 -360 0" repeat="indefinite"></a-animation>
</a-entity>
<!-- planet group -->
<a-entity>
<a-entity geometry="primitive: sphere" material="color: blue" position="7 8 0">
<a-animation attribute="position" dur="500" from="7 8 0" to="7 4 0" direction="alternate" repeat="1" begin="mouseenter">
</a-animation>
</a-entity>
<a-entity geometry="primitive: dodecahedron" material="color: pink" position="10 12 0"></a-entity>
<a-entity geometry="primitive: sphere" material="color: orange" position="9 10 0"></a-entity>
<a-animation attribute="rotation" dur="20000" fill="forwards" to="0 -360 0" repeat="indefinite"></a-animation>
</a-entity>
<!-- shrinky aliens -->
<a-entity follow="target: #user; speed: 1.5;" obj-model="obj: #alien1-obj; mtl: #alien1-mtl" material="opacity: 1" scale="0.1 0.1 0.1" rotation="-90 -100 0" position="-3 0 -25">
<a-animation attribute="scale" from="0.08 0.08 0.08" to=".05 .05 .05" direction="alternate" begin="mouseenter"></a-animation>
</a-entity>
<a-entity id="target" position="10 2 15"></a-entity>
<a-camera id="user" position="18 2 15" rotation="2 0 0" look-controls walk>
<a-cursor opacity="0.5"></a-cursor>
</a-camera>
</a-scene>
</body>
</html>