-
Notifications
You must be signed in to change notification settings - Fork 2
/
vr-2.html
51 lines (41 loc) · 2.1 KB
/
vr-2.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>
<title>Robots in the fog</title>
<script src="https://aframe.io/releases/0.9.0/aframe.min.js"></script>
<script src="//cdn.rawgit.com/donmccurdy/aframe-extras/v5.0.1/dist/aframe-extras.min.js"></script>
</head>
<body>
<a-scene fog="type: linear; color: lightgrey; far: 15; near: 1">
<a-assets>
<a-asset-item id="drone" src="mech_drone/scene.gltf"></a-asset-item>
<audio id="robot" src="robot.ogg" preload="auto"></audio>
</a-assets>
<a-curvedimage height="6.0" radius="5" theta-length="180"
position="0 3 -4" rotation="0 60 0" color="brown"></a-curvedimage>
<a-sphere position="-2 1.25 -5" radius="1.25" color="grey"></a-sphere>
<a-cylinder position="1 1.25 -3" radius="0.5" height="2.5" color="grey"></a-cylinder>
<a-plane position="0 0 -4" rotation="-90 0 0" width="15" height="6" repeat="4 2" color="brown"></a-plane>
<a-entity position="1 2.5 -3" gltf-model="#drone" animation-mixer
scale="0.01 0.01 0.01"
animation="property: rotation; dur: 10000; to:0 360 0; loop: true">
</a-entity>
<a-entity position="-5 3 -1" gltf-model="#drone" animation-mixer
scale="0.01 0.01 0.01"
animation="property: position; dur: 10000; to: -3 .5 -1; dir: alternate; loop: true"
sound="src: #robot; autoplay: true; loop: true; distanceModel: exponential">
</a-entity>
<a-entity position="6 3 -1" gltf-model="#drone" animation-mixer
scale="0.01 0.01 0.01"
animation="property: position; dur: 10000; to: 4 .5 -1; dir: alternate; loop: true"
sound="src: #robot; autoplay: true; loop: true; distanceModel: exponential">
</a-entity>
<a-light type="ambient" color="grey"></a-light>
<a-light type="point" intensity="2" position="-2 2 4"></a-light>
<a-sky color="lightgrey"></a-sky>
<a-entity movement-controls="fly: true" position="0 0 5">
<a-entity camera position="0 1.6 0" look-controls></a-entity>
</a-entity>
</a-scene>
</body>
</html>