-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsummer_present.html
More file actions
177 lines (151 loc) · 5.85 KB
/
summer_present.html
File metadata and controls
177 lines (151 loc) · 5.85 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<!DOCTYPE html>
<html>
<head>
<title>Summer at Lake Norman</title>
<script src="https://aframe.io/releases/1.5.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-event-set-component@5.0.0/dist/aframe-event-set-component.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<a-scene>
<!-- 360° VR video background -->
<a-assets>
<video id="vrVideo" autoplay loop muted playsinline crossorigin="anonymous">
<source src="summer_present_2.mp4" type="video/mp4">
</video>
</a-assets>
<a-videosphere src="#vrVideo"></a-videosphere>
<!-- Camera + gaze cursor -->
<a-entity camera look-controls position="0 1.6 0">
<a-cursor fuse="true" fuse-timeout="2000" color="yellow" raycaster="objects: .gazeButton"></a-cursor>
</a-entity>
<!-- HUD-style navigation buttons -->
<a-entity id="hudButtons" position="0 0 -2">
<!-- Past -->
<a-plane class="gazeButton"
id="btnPast"
color="#333"
width="0.6" height="0.3"
position="-1 -0.6 0"
event-set__enter="_event: mouseenter; color: #FFD700; opacity: 1"
event-set__leave="_event: mouseleave; color: #333; opacity: 0.8">
</a-plane>
<a-text value="Past"
position="-1 -0.6 0.02"
align="center"
color="white"
width="2"
font="https://cdn.aframe.io/fonts/DejaVu-sdf.fnt">
</a-text>
<!-- Present -->
<a-plane class="gazeButton"
id="btnPresent"
color="#333"
width="0.6" height="0.3"
position="0 -0.6 0"
event-set__enter="_event: mouseenter; color: #FFD700; opacity: 1"
event-set__leave="_event: mouseleave; color: #333; opacity: 0.8">
</a-plane>
<a-text value="Present"
position="0 -0.6 0.02"
align="center"
color="white"
width="2"
font="https://cdn.aframe.io/fonts/DejaVu-sdf.fnt">
</a-text>
<!-- Future -->
<a-plane class="gazeButton"
id="btnFuture"
color="#333"
width="0.6" height="0.3"
position="1 -0.6 0"
event-set__enter="_event: mouseenter; color: #FFD700; opacity: 1"
event-set__leave="_event: mouseleave; color: #333; opacity: 0.8">
</a-plane>
<a-text value="Future"
position="1 -0.6 0.02"
align="center"
color="white"
width="2"
font="https://cdn.aframe.io/fonts/DejaVu-sdf.fnt">
</a-text>
<!-- Home -->
<a-plane class="gazeButton"
id="btnHome"
color="#333"
width="0.6" height="0.3"
position="0 -1 0"
event-set__enter="_event: mouseenter; color: #FFD700; opacity: 1"
event-set__leave="_event: mouseleave; color: #333; opacity: 0.8">
</a-plane>
<a-text value="Home"
position="0 -1 0.02"
align="center"
color="white"
width="2"
font="https://cdn.aframe.io/fonts/DejaVu-sdf.fnt">
</a-text>
</a-entity>
<!-- Bee flight frame -->
<a-entity id="bee-frame"
position="0 1.6 -3"
animation__orbit="property: rotation;
from: 0 0 0;
to: 0 360 0;
dur: 12000;
loop: true;
easing: linear">
<!-- 🐝 Bee -->
<a-entity id="bee"
position="0 0 -1"
rotation="0 0 0"
animation__wave="property: position;
from: 0 0 -1;
to: 0 0.3 -1.2;
dir: alternate;
dur: 600;
easing: easeInOutSine;
loop: true">
<!-- Body -->
<a-cylinder height="0.25" radius="0.07" color="yellow" rotation="0 0 90"></a-cylinder>
<!-- Stripes -->
<a-cylinder height="0.03" radius="0.071" position="0 0.05 0" color="black" rotation="0 0 90"></a-cylinder>
<a-cylinder height="0.03" radius="0.071" position="0 0 0" color="black" rotation="0 0 90"></a-cylinder>
<a-cylinder height="0.03" radius="0.071" position="0 -0.05 0" color="black" rotation="0 0 90"></a-cylinder>
<!-- Head -->
<a-sphere position="0.14 0 0" radius="0.06" color="black"></a-sphere>
<!-- Eyes -->
<a-sphere position="0.18 0.02 0.03" radius="0.015" color="white"></a-sphere>
<a-sphere position="0.18 -0.02 0.03" radius="0.015" color="white"></a-sphere>
<!-- Wings -->
<a-plane position="0 0.07 0" width="0.15" height="0.08" color="white" opacity="0.8"
rotation="0 0 15"
animation="property: rotation; to: 0 0 35; dir: alternate; dur: 100; loop: true"></a-plane>
<a-plane position="0 -0.07 0" width="0.15" height="0.08" color="white" opacity="0.8"
rotation="0 0 -15"
animation="property: rotation; to: 0 0 -35; dir: alternate; dur: 100; loop: true"></a-plane>
<!-- Stinger -->
<a-cone position="-0.14 0 0" height="0.06" radius-bottom="0.02" color="black" rotation="0 0 -90"></a-cone>
</a-entity>
</a-entity>
</a-scene>
<script>
// Play video immediately
const videoEl = document.getElementById('vrVideo');
videoEl.play().catch(() => {}); // silently ignore errors
// Gaze navigation with 2-second fuse
const buttons = {
btnPast: 'summer_past.html',
btnPresent: 'summer_present.html',
btnFuture: 'summer_future.html',
btnHome: 'index.html'
};
document.querySelectorAll('.gazeButton').forEach(btn => {
btn.addEventListener('click', () => {
const target = buttons[btn.id];
if (target) window.location.href = target;
});
});
</script>
</body>
</html>