-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
89 lines (69 loc) · 3.87 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Rainbow Space</title>
<meta name="description" content="Rainbow Space">
<script src="https://aframe.io/releases/0.3.2/aframe.min.js"></script>
<script src="http://cdn.rawgit.com/donmccurdy/aframe-extras/v2.6.0/dist/aframe-extras.min.js"></script>
</head>
<body>
<a-scene>
<!-- Asset management system //////////////////////////////////////// -->
<a-assets>
<!-- sphere node template -->
<script id="sphere-node" type="text/nunjucks">
<a-sphere class="sphere"
radius="0.25"
material="shader: flat; opacity: 0.6; color: {{ hex }}"
event-set__3="_event: mouseenter; scale: 1.2 1.2 1.2; opacity: 0.8; color: #7766CC"
event-set__4="_event: mouseleave; scale: 1 1 1">
</a-sphere>
</script>
</a-assets>
<!-- Scene /////////////////////////////////////////////////////////////// -->
<!-- CAM -->
<a-entity camera look-controls wasd-controls position="0 2 0">
<a-cursor id="cursor" color="#2E3A87"></a-cursor>
</a-entity>
<!-- Environment -->
<a-plane position="0 0 0" rotation="-90 0 0" width="100" height="100" color="#000033"></a-plane>
<a-sky color="#554497"></a-sky>
<!-- Space -->
<a-entity position="0 0 0">
<!-- 1
<a-entity template="src: #sphere-node" position="-1 1 -4" data-hex="#FF6600"></a-entity>
-->
<a-sphere position="-1 1 -4" radius="0.25" color="#FFFFFF"></a-sphere>
<a-sphere position="0 1 -4" radius="0.25" color="#FFFFFF"></a-sphere>
<a-sphere position="1 1 -4" radius="0.25" color="#FFFFFF"></a-sphere>
<a-sphere position="-1 2 -4" radius="0.25" color="#FFFFFF"></a-sphere>
<a-sphere position="0 2 -4" radius="0.25" color="#FFFFFF"></a-sphere>
<a-sphere position="1 2 -4" radius="0.25" color="#FFFFFF"></a-sphere>
<a-sphere position="-1 3 -4" radius="0.25" color="#FFFFFF"></a-sphere>
<a-sphere position="0 3 -4" radius="0.25" color="#FFFFFF"></a-sphere>
<a-sphere position="1 3 -4" radius="0.25" color="#FFFFFF"></a-sphere>
<!-- 2 -->
<a-sphere position="-1 1 -5" radius="0.25" color="#FFFFFF"></a-sphere>
<a-sphere position="0 1 -5" radius="0.25" color="#FFFFFF"></a-sphere>
<a-sphere position="1 1 -5" radius="0.25" color="#FFFFFF"></a-sphere>
<a-sphere position="-1 2 -5" radius="0.25" color="#FFFFFF"></a-sphere>
<a-sphere position="0 2 -5" radius="0.25" color="#FFFFFF"></a-sphere>
<a-sphere position="1 2 -5" radius="0.25" color="#FFFFFF"></a-sphere>
<a-sphere position="-1 3 -5" radius="0.25" color="#FFFFFF"></a-sphere>
<a-sphere position="0 3 -5" radius="0.25" color="#FFFFFF"></a-sphere>
<a-sphere position="1 3 -5" radius="0.25" color="#FFFFFF"></a-sphere>
<!-- 2 -->
<a-sphere position="-1 1 -6" radius="0.25" color="#FFFFFF"></a-sphere>
<a-sphere position="0 1 -6" radius="0.25" color="#FFFFFF"></a-sphere>
<a-sphere position="1 1 -6" radius="0.25" color="#FFFFFF"></a-sphere>
<a-sphere position="-1 2 -6" radius="0.25" color="#FFFFFF"></a-sphere>
<a-sphere position="0 2 -6" radius="0.25" color="#FFFFFF"></a-sphere>
<a-sphere position="1 2 -6" radius="0.25" color="#FFFFFF"></a-sphere>
<a-sphere position="-1 3 -6" radius="0.25" color="#FFFFFF"></a-sphere>
<a-sphere position="0 3 -6" radius="0.25" color="#FFFFFF"></a-sphere>
<a-sphere position="1 3 -6" radius="0.25" color="#FFFFFF"></a-sphere>
</a-entity>
</a-scene>
</body>
</html>