-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsummer_past.html
More file actions
164 lines (143 loc) · 5.24 KB
/
summer_past.html
File metadata and controls
164 lines (143 loc) · 5.24 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
<!DOCTYPE html>
<html>
<head>
<title>Lake Norman in the Past (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_past_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>
<!-- 🌠 Shooting Star -->
<a-entity id="shooting-star"
position="-5 4 -8"
animation__move="property: position;
from: -5 4 -8;
to: 5 2 -6;
dur: 4000;
easing: easeOutQuad;
loop: true;
delay: 3000;"
animation__fade="property: material.opacity;
from: 1;
to: 0;
dur: 4000;
easing: easeOutQuad;
loop: true;
delay: 3000;">
<a-sphere radius="0.05"
color="#ffffff"
material="emissive: #fff; emissiveIntensity: 2; opacity: 1;">
</a-sphere>
<a-cylinder height="1.2"
radius="0.02"
color="#ffffff"
material="opacity: 0.3; emissive: #fff; emissiveIntensity: 1;"
rotation="0 0 60"
position="0 -0.4 0">
</a-cylinder>
</a-entity>
<!-- HUD Buttons (Past, Present, Future, Home) -->
<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 when ready
const videoEl = document.getElementById('vrVideo');
videoEl.play().catch(err => console.warn('Autoplay blocked:', err));
// Button navigation map
const buttons = {
btnPast: 'summer_past.html',
btnPresent: 'summer_present.html',
btnFuture: 'summer_future.html',
btnHome: 'index.html'
};
// Handle button clicks
document.querySelectorAll('.gazeButton').forEach(btn => {
btn.addEventListener('click', () => {
const target = buttons[btn.id];
if (target) window.location.href = target;
});
});
</script>
</body>
</html>