-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsummer_future.html
More file actions
187 lines (168 loc) · 6.71 KB
/
summer_future.html
File metadata and controls
187 lines (168 loc) · 6.71 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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<!DOCTYPE html>
<html>
<head>
<title>Lake Norman in the Future (Summer)</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° video background -->
<a-assets>
<video id="vrVideo" autoplay loop muted playsinline crossorigin="anonymous">
<source src="summer_future_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>
<!-- 🚗 Flying Car #1 -->
<a-entity id="car1"
position="-4 3 -3"
rotation="0 15 0"
animation__fly="property: position;
from: -4 3 -3;
to: 4 3 -2;
dur: 8000;
easing: easeInOutSine;
loop: true;
delay: 2000;">
<a-box depth="0.8" height="0.3" width="0.5" color="red" material="emissive: red; emissiveIntensity: 0.5"></a-box>
<a-box depth="0.9" height="0.2" width="0.55" position="0 0.25 0" color="silver"></a-box>
<a-sphere radius="0.1" color="black" position="0.25 -0.2 0.3"></a-sphere>
<a-sphere radius="0.1" color="black" position="-0.25 -0.2 0.3"></a-sphere>
<a-sphere radius="0.1" color="black" position="0.25 -0.2 -0.3"></a-sphere>
<a-sphere radius="0.1" color="black" position="-0.25 -0.2 -0.3"></a-sphere>
</a-entity>
<!-- 🚘 Flying Car #2 -->
<a-entity id="car2"
position="4 3.5 -3.5"
rotation="0 -30 0"
animation__fly="property: position;
from: 4 3.5 -3.5;
to: -4 3.3 -2.5;
dur: 9000;
easing: easeInOutSine;
loop: true;
delay: 3000;">
<a-box depth="0.8" height="0.3" width="0.5" color="blue" material="emissive: blue; emissiveIntensity: 0.5"></a-box>
<a-box depth="0.9" height="0.2" width="0.55" position="0 0.25 0" color="gray"></a-box>
<a-sphere radius="0.1" color="black" position="0.25 -0.2 0.3"></a-sphere>
<a-sphere radius="0.1" color="black" position="-0.25 -0.2 0.3"></a-sphere>
<a-sphere radius="0.1" color="black" position="0.25 -0.2 -0.3"></a-sphere>
<a-sphere radius="0.1" color="black" position="-0.25 -0.2 -0.3"></a-sphere>
</a-entity>
<!-- 🚕 Flying Car #3 -->
<a-entity id="car3"
position="-3 2.8 -2.8"
rotation="0 0 0"
animation__fly="property: position;
from: -3 2.8 -2.8;
to: 3 2.8 -2;
dur: 7000;
easing: easeInOutSine;
loop: true;
delay: 1500;">
<a-box depth="0.8" height="0.3" width="0.5" color="yellow" material="emissive: yellow; emissiveIntensity: 0.5"></a-box>
<a-box depth="0.9" height="0.2" width="0.55" position="0 0.25 0" color="white"></a-box>
<a-sphere radius="0.1" color="black" position="0.25 -0.2 0.3"></a-sphere>
<a-sphere radius="0.1" color="black" position="-0.25 -0.2 0.3"></a-sphere>
<a-sphere radius="0.1" color="black" position="0.25 -0.2 -0.3"></a-sphere>
<a-sphere radius="0.1" color="black" position="-0.25 -0.2 -0.3"></a-sphere>
</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.2 -0.6 0"
opacity="0.8"
event-set__enter="_event: mouseenter; color: #FFD700; scale: 1.1 1.1 1"
event-set__leave="_event: mouseleave; color: #333; scale: 1 1 1">
</a-plane>
<a-text value="Past"
position="-1.2 -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"
opacity="0.8"
event-set__enter="_event: mouseenter; color: #FFD700; scale: 1.1 1.1 1"
event-set__leave="_event: mouseleave; color: #333; scale: 1 1 1">
</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.2 -0.6 0"
opacity="0.8"
event-set__enter="_event: mouseenter; color: #FFD700; scale: 1.1 1.1 1"
event-set__leave="_event: mouseleave; color: #333; scale: 1 1 1">
</a-plane>
<a-text value="Future"
position="1.2 -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.1 0"
opacity="0.8"
event-set__enter="_event: mouseenter; color: #FFD700; scale: 1.1 1.1 1"
event-set__leave="_event: mouseleave; color: #333; scale: 1 1 1">
</a-plane>
<a-text value="Home"
position="0 -1.1 0.02"
align="center"
color="white"
width="2"
font="https://cdn.aframe.io/fonts/DejaVu-sdf.fnt">
</a-text>
</a-entity>
</a-scene>
<script>
// Play video immediately
const videoEl = document.getElementById('vrVideo');
videoEl.play().catch(() => console.warn('Autoplay blocked.'));
// Navigation links
const buttons = {
btnPast: 'summer_past.html',
btnPresent: 'summer_present.html',
btnFuture: 'summer_future.html',
btnHome: 'index.html'
};
// Add event listeners for button clicks
document.querySelectorAll('.gazeButton').forEach(btn => {
btn.addEventListener('click', () => {
const target = buttons[btn.id];
if (target) window.location.href = target;
});
});
</script>
</body>
</html>