-
Notifications
You must be signed in to change notification settings - Fork 1
/
example1.html
executable file
·45 lines (31 loc) · 1.39 KB
/
example1.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
<html>
<!-- Warning: None of this is the right way to do html, js, or a-frame! -->
<head>
<title>Object manipulation | Micro:bit-controlled A-Frame scene | Neill</title>
<script src="libs/aframe.min.js"></script>
<script src="libs/aframe-environment-component.min.js"></script>
<script src="libs/p5.min.js"></script>
<script src="libs/p5.serialport.js"></script>
<script src="sketch1.js"></script>
</head>
<body>
<a-scene>
<!-- just an interesting background -->
<a-entity environment="preset: arches; numDressing: 500; seed: 9"></a-entity>
<a-box id='neillhouse' color='#E9D256' position="0 1 -5" rotation="0 0 0" scale="4 2 2">
<a-box color='#998574' position="0 0.5 0" rotation="0 0 0" scale="1.1 0.2 1.2"></a-box>
<a-box color='#E9646A' position="0 -0.1 0.5" rotation="0 0 0" scale="0.2 0.7 0.2">
<a-sphere color="#998574" position="-0.3 0 0.5" scale="0.1 0.05 0.1"></a-sphere>
</a-box>
<a-box color='#E9A956' position="-0.3 0.1 0.5" rotation="0 0 0" scale="0.3 0.4 0.1"></a-box>
<a-box color='#E9A956' position="0.3 0.1 0.5" rotation="0 0 0" scale="0.3 0.4 0.1"></a-box>
<a-sphere color="#65AC9D" position="0 0.5 0.7" scale="0.1 0.1 0.1"></a-sphere>
<!-- animation on click -->
<a-animation attribute="scale" begin="click" dur="1000" to="2 2 2"></a-animation>
</a-box>
<a-camera>
<a-cursor></a-cursor>
</a-camera>
</a-scene>
</body>
</html>