-
Notifications
You must be signed in to change notification settings - Fork 1
/
target.html
86 lines (75 loc) · 3.4 KB
/
target.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
84
85
86
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Animation</title>
<meta name="description" content="Animation - A-Frame">
<script src="https://aframe.io/releases/0.3.0/aframe.min.js"></script>
</head>
<body>
<a-scene stats>
<a-assets>
<a-mixin id="planet" geometry="primitive: sphere; radius: 0.5" material="color: green" roughness="0.2"></a-mixin>
<a-mixin id="electron" geometry="primitive: sphere; radius: 0.2" material="color: blue" roughness="0.2"></a-mixin>
<a-mixin id="neutron" geometry="primitive: sphere; radius: 0.5" material="color: gray" roughness="0.4"></a-mixin>
<a-mixin id="proton" geometry="primitive: sphere; radius: 0.5" material="color: red" roughness="0.6"></a-mixin>
<a-mixin id="orbit" attribute="rotation" to="0 360 0"
repeat="indefinite" easing="linear" dur="3000"></a-mixin>
<a-mixin id="spin" attribute="rotation" to="0 -360 360"
repeat="indefinite" easing="linear" dur="9000"></a-mixin>
</a-assets>
<a-sky color="#AAB"></a-sky>
<a-entity position="0 0 6">
<a-camera wasd-controls-enabled="true" user-height="0"></a-camera>
</a-entity>
<!-- Lights. -->
<a-entity light="type: point; intensity: 2"></a-entity>
<a-entity light="type: ambient; color: #888"></a-entity>
<a-entity rotation="0 0 0" position="0 0 -5">
<a-entity mixin="proton" position="0 -0.5 0"></a-entity>
<a-entity mixin="proton" position="0 0.5 0"></a-entity>
<a-entity mixin="neutron" position="0 0 -0.5"></a-entity>
<a-entity mixin="neutron" position="0 0 0.5"></a-entity>
<a-animation mixin="spin"></a-animation>
</a-entity>
<a-entity rotation="45 0 0">
<a-entity position="0 0 0" >
<a-animation mixin="orbit" to="0 -360 0"></a-animation>
<a-entity mixin="electron" position="1 0 0" ></a-entity>
</a-entity>
</a-entity>
<a-entity rotation="45 0 180">
<a-entity position="0 0 0" >
<a-animation mixin="orbit" ></a-animation>
<a-entity mixin="electron" position="1 0 0" ></a-entity>
</a-entity>
</a-entity>
<a-entity rotation="60 45 0">
<a-entity position="0 0 0" >
<a-animation mixin="orbit"></a-animation>
<a-entity mixin="electron" position="2 0 0" ></a-entity>
</a-entity>
</a-entity>
<a-entity rotation="300 -45 180">
<a-entity position="0 0 0" >
<a-animation mixin="orbit" to="0 -360 0"></a-animation>
<a-entity mixin="electron" position="2 0 0" ></a-entity>
</a-entity>
</a-entity>
<!--
<a-entity position="0 0 0" rotation="45 45 45">
<a-animation mixin="orbit"></a-animation>
<a-entity mixin="electron" position="4 0 0"></a-entity>
</a-entity>
<a-entity position="0 0 0">
<a-animation mixin="orbit" dur="6000"></a-animation>
<a-entity mixin="electron" position="8 0 0"></a-entity>
<a-entity mixin="electron" position="-8 0 0"></a-entity>
<a-entity mixin="electron" position="0 0 8"></a-entity>
<a-entity mixin="electron" position="0 0 -8"></a-entity>
</a-entity>
-->
</a-entity>
</a-scene>
</body>
</html>