|
114 | 114 | left: 64px; |
115 | 115 | } |
116 | 116 |
|
117 | | - .label-center { |
118 | | - top: 50%; |
119 | | - left: 50%; |
120 | | - transform: translate(-50%, -50%); |
121 | | - } |
122 | | - |
123 | | - /* Window B: opacity-tweenable wrapper around the HDR video */ |
124 | | - #window-b-wrapper { |
125 | | - position: absolute; |
126 | | - inset: 0; |
127 | | - opacity: 1; |
128 | | - } |
129 | | - |
130 | | - /* Window D: background → HDR → blue overlay sandwich */ |
131 | | - #window-d-bg { |
| 117 | + /* Window B: z-order sandwich */ |
| 118 | + #window-b-bg { |
132 | 119 | position: absolute; |
133 | 120 | inset: 0; |
134 | 121 | background: #cc6600; |
135 | 122 | z-index: 1; |
136 | 123 | } |
137 | 124 |
|
138 | | - #wd-video { |
| 125 | + #wb-video { |
139 | 126 | z-index: 5; |
140 | 127 | } |
141 | 128 |
|
142 | | - #window-d-overlay { |
| 129 | + #window-b-overlay { |
143 | 130 | position: absolute; |
144 | 131 | top: 64px; |
145 | 132 | right: 64px; |
|
150 | 137 | z-index: 10; |
151 | 138 | } |
152 | 139 |
|
153 | | - /* Window E: side-by-side positioning wrappers (untimed, empty when child videos are hidden) */ |
154 | | - #window-e-left { |
155 | | - position: absolute; |
156 | | - top: 0; |
157 | | - left: 0; |
158 | | - width: 50%; |
159 | | - height: 100%; |
160 | | - overflow: hidden; |
161 | | - } |
162 | | - |
163 | | - #window-e-right { |
164 | | - position: absolute; |
165 | | - top: 0; |
166 | | - right: 0; |
167 | | - width: 50%; |
168 | | - height: 100%; |
169 | | - overflow: hidden; |
170 | | - } |
171 | | - |
172 | | - /* Window F: transform + border-radius applied directly to the HDR video (no wrapper) */ |
173 | | - #window-f-bg { |
| 140 | + /* Window C: transform + border-radius */ |
| 141 | + #window-c-bg { |
174 | 142 | position: absolute; |
175 | 143 | inset: 0; |
176 | 144 | background: #111; |
177 | 145 | z-index: 1; |
178 | 146 | } |
179 | 147 |
|
180 | | - #wf-video { |
| 148 | + #wc-video { |
181 | 149 | position: absolute; |
182 | 150 | top: 50%; |
183 | 151 | left: 50%; |
|
193 | 161 | z-index: 5; |
194 | 162 | } |
195 | 163 |
|
196 | | - /* Window G: object-fit: contain letterbox */ |
197 | | - #window-g-bg { |
198 | | - position: absolute; |
199 | | - inset: 0; |
200 | | - background: #0a0a0a; |
201 | | - z-index: 1; |
202 | | - } |
203 | | - |
204 | | - #wg-video { |
205 | | - position: absolute; |
206 | | - top: 50%; |
207 | | - left: 50%; |
208 | | - width: 960px; |
209 | | - height: 1080px; |
210 | | - margin-top: -540px; |
211 | | - margin-left: -480px; |
212 | | - background: #000; |
213 | | - object-fit: contain; |
214 | | - display: block; |
215 | | - z-index: 5; |
216 | | - } |
217 | | - |
218 | | - /* Window H: shader scenes (no data-start; opacity is driven by the shader-transitions library) */ |
219 | | - #window-h-scene-a, |
220 | | - #window-h-scene-b { |
| 164 | + /* Window D: shader scenes */ |
| 165 | + #window-d-scene-a, |
| 166 | + #window-d-scene-b { |
221 | 167 | position: absolute; |
222 | 168 | inset: 0; |
223 | 169 | overflow: hidden; |
224 | 170 | } |
225 | 171 |
|
226 | | - #window-h-scene-a { |
| 172 | + #window-d-scene-a { |
227 | 173 | opacity: 1; |
228 | 174 | } |
229 | 175 |
|
230 | | - #window-h-scene-b { |
| 176 | + #window-d-scene-b { |
231 | 177 | opacity: 0; |
232 | 178 | } |
233 | 179 |
|
234 | | - #window-h-scene-b img.hdr-image { |
| 180 | + #window-d-scene-b img.hdr-image { |
235 | 181 | position: absolute; |
236 | 182 | inset: 0; |
237 | 183 | width: 100%; |
|
242 | 188 | </style> |
243 | 189 | </head> |
244 | 190 | <body> |
245 | | - <div id="main" data-composition-id="hdr-regression" data-start="0" data-duration="20" data-width="1920" data-height="1080"> |
246 | | - <!-- Window A · Static baseline · 0.0–2.0s --> |
247 | | - <video id="wa-video" class="clip hdr-video" data-start="0" data-duration="2" data-track-index="0" src="hdr-clip.mp4" muted playsinline data-end="2" data-has-audio="true"></video> |
248 | | - <div class="label label-tl clip" data-start="0" data-duration="2"> |
249 | | - A · Baseline HDR + DOM overlay |
250 | | - </div> |
251 | | - |
252 | | - <!-- Window B · Wrapper opacity fade · 2.0–4.5s --> |
253 | | - <div id="window-b-wrapper"> |
254 | | - <video id="wb-video" class="clip hdr-video" data-start="2" data-duration="2.5" data-track-index="0" src="hdr-clip.mp4" muted playsinline data-end="4.5" data-has-audio="true"></video> |
255 | | - </div> |
256 | | - <div class="label label-tl clip" data-start="2" data-duration="2.5"> |
257 | | - B · Wrapper opacity fade |
258 | | - </div> |
259 | | - |
260 | | - <!-- Window C · Direct-on-element opacity · 4.5–7.0s (known fail) --> |
261 | | - <video id="wc-video" class="clip hdr-video" data-start="4.5" data-duration="2.5" data-track-index="0" src="hdr-clip.mp4" muted playsinline data-end="7" data-has-audio="true"></video> |
262 | | - <div class="label label-tl clip" data-start="4.5" data-duration="2.5"> |
263 | | - C · Direct <video> opacity (known fail) |
| 191 | + <div id="main" data-composition-id="hdr-regression" data-start="0" data-duration="6" data-width="1920" data-height="1080"> |
| 192 | + <!-- Window A · Baseline HDR + direct opacity tween · 0.0–2.5s --> |
| 193 | + <video id="wa-video" class="clip hdr-video" data-start="0" data-duration="1.5" data-track-index="0" src="hdr-clip.mp4" muted playsinline data-has-audio="false" data-end="1.5"></video> |
| 194 | + <div class="label label-tl clip" data-start="0" data-duration="1.5"> |
| 195 | + A · Baseline HDR + opacity tween |
264 | 196 | </div> |
265 | 197 |
|
266 | | - <!-- Window D · Z-order sandwich (DOM → HDR → DOM) · 7.0–9.5s --> |
267 | | - <div id="window-d-bg" class="clip" data-start="7" data-duration="2.5"></div> |
268 | | - <video id="wd-video" class="clip hdr-video" data-start="7" data-duration="2.5" data-track-index="0" src="hdr-clip.mp4" muted playsinline data-end="9.5" data-has-audio="true"></video> |
269 | | - <div id="window-d-overlay" class="clip" data-start="7" data-duration="2.5"></div> |
270 | | - <div class="label label-tl clip" data-start="7" data-duration="2.5"> |
271 | | - D · DOM → HDR → DOM stack |
| 198 | + <!-- Window B · Z-order sandwich (DOM → HDR → DOM) · 1.5–3.0s --> |
| 199 | + <div id="window-b-bg" class="clip" data-start="1.5" data-duration="1.5"></div> |
| 200 | + <video id="wb-video" class="clip hdr-video" data-start="1.5" data-duration="1.5" data-track-index="0" src="hdr-clip.mp4" muted playsinline data-has-audio="false" data-end="3"></video> |
| 201 | + <div id="window-b-overlay" class="clip" data-start="1.5" data-duration="1.5"></div> |
| 202 | + <div class="label label-tl clip" data-start="1.5" data-duration="1.5"> |
| 203 | + B · DOM → HDR → DOM stack |
272 | 204 | </div> |
273 | 205 |
|
274 | | - <!-- Window E · Two HDR sources side-by-side · 9.5–12.0s --> |
275 | | - <div id="window-e-left"> |
276 | | - <video id="we-video-left" class="clip hdr-video" data-start="9.5" data-duration="2.5" data-track-index="0" src="hdr-clip.mp4" muted playsinline data-end="12" data-has-audio="true"></video> |
277 | | - </div> |
278 | | - <div id="window-e-right"> |
279 | | - <video id="we-video-right" class="clip hdr-video" data-start="9.5" data-duration="2.5" data-track-index="1" src="hdr-clip.mp4" muted playsinline data-end="12" data-has-audio="true"></video> |
280 | | - </div> |
281 | | - <div class="label label-center clip" data-start="9.5" data-duration="2.5"> |
282 | | - E · Two HDR videos |
| 206 | + <!-- Window C · Transform + border-radius · 3.0–4.5s --> |
| 207 | + <div id="window-c-bg" class="clip" data-start="3" data-duration="1.5"></div> |
| 208 | + <video id="wc-video" class="clip" data-start="3" data-duration="1.5" data-track-index="0" src="hdr-clip.mp4" muted playsinline data-has-audio="false" data-end="4.5"></video> |
| 209 | + <div class="label label-tl clip" data-start="3" data-duration="1.5"> |
| 210 | + C · Rotate + scale + radius |
283 | 211 | </div> |
284 | 212 |
|
285 | | - <!-- Window F · Transform + border-radius (on the video itself) · 12.0–14.5s (known fail) --> |
286 | | - <div id="window-f-bg" class="clip" data-start="12" data-duration="2.5"></div> |
287 | | - <video id="wf-video" class="clip" data-start="12" data-duration="2.5" data-track-index="0" src="hdr-clip.mp4" muted playsinline data-end="14.5" data-has-audio="true"></video> |
288 | | - <div class="label label-tl clip" data-start="12" data-duration="2.5"> |
289 | | - F · Rotate + scale + radius (known fail) |
290 | | - </div> |
291 | | - |
292 | | - <!-- Window G · object-fit: contain · 14.5–17.0s --> |
293 | | - <div id="window-g-bg" class="clip" data-start="14.5" data-duration="2.5"></div> |
294 | | - <video id="wg-video" class="clip" data-start="14.5" data-duration="2.5" data-track-index="0" src="hdr-clip.mp4" muted playsinline data-end="17" data-has-audio="true"></video> |
295 | | - <div class="label label-tl clip" data-start="14.5" data-duration="2.5"> |
296 | | - G · object-fit: contain (letterbox) |
297 | | - </div> |
298 | | - |
299 | | - <!-- Window H · Shader transition (HDR video → HDR image) · 17.0–20.0s --> |
300 | | - <div id="window-h-scene-a" class="scene"> |
301 | | - <video id="wh-video" class="clip hdr-video" data-start="17" data-duration="3" data-track-index="0" src="hdr-clip.mp4" muted playsinline data-end="20" data-has-audio="true"></video> |
302 | | - <div class="label label-tl clip" data-start="17" data-duration="3"> |
303 | | - H · Scene A (HDR video) |
| 213 | + <!-- Window D · Shader transition (HDR video → HDR image) · 4.5–6.0s --> |
| 214 | + <div id="window-d-scene-a" class="scene"> |
| 215 | + <video id="wd-video" class="clip hdr-video" data-start="4.5" data-duration="1.5" data-track-index="0" src="hdr-clip.mp4" muted playsinline data-has-audio="false" data-end="6"></video> |
| 216 | + <div class="label label-tl clip" data-start="4.5" data-duration="1.5"> |
| 217 | + D · Scene A (HDR video) |
304 | 218 | </div> |
305 | 219 | </div> |
306 | | - <div id="window-h-scene-b" class="scene"> |
307 | | - <img id="wh-image" class="clip hdr-image" src="hdr-photo-pq.png" alt="HDR PQ photo" data-start="17" data-duration="3"> |
308 | | - <div class="label label-tl clip" data-start="17" data-duration="3"> |
309 | | - H · Scene B (HDR image) |
| 220 | + <div id="window-d-scene-b" class="scene"> |
| 221 | + <img id="wd-image" class="clip hdr-image" src="hdr-photo-pq.png" alt="HDR PQ photo" data-start="4.5" data-duration="1.5"> |
| 222 | + <div class="label label-tl clip" data-start="4.5" data-duration="1.5"> |
| 223 | + D · Scene B (HDR image) |
310 | 224 | </div> |
311 | 225 | </div> |
312 | 226 | </div> |
|
316 | 230 |
|
317 | 231 | const tl = gsap.timeline({ paused: true }); |
318 | 232 |
|
319 | | - // Window B · wrapper opacity 1 → 0.15 → 1 inside the 2.5s window |
320 | | - tl.to("#window-b-wrapper", { opacity: 0.15, duration: 1.0, ease: "power2.inOut" }, 2.25); |
321 | | - tl.to("#window-b-wrapper", { opacity: 1.0, duration: 1.0, ease: "power2.inOut" }, 3.25); |
322 | | - |
323 | | - // Window C · same shape, but tween opacity directly on the video element |
324 | | - tl.to("#wc-video", { opacity: 0.15, duration: 1.0, ease: "power2.inOut" }, 4.75); |
325 | | - tl.to("#wc-video", { opacity: 1.0, duration: 1.0, ease: "power2.inOut" }, 5.75); |
| 233 | + // Window A · direct opacity tween on the video element (0–1.5s) |
| 234 | + tl.to("#wa-video", { opacity: 0.15, duration: 0.5, ease: "power2.inOut" }, 0.3); |
| 235 | + tl.to("#wa-video", { opacity: 1.0, duration: 0.5, ease: "power2.inOut" }, 0.8); |
326 | 236 |
|
327 | | - // Window F · rotate + scale on the video itself |
328 | | - tl.set("#wf-video", { rotation: 0, scale: 1 }, 0); |
| 237 | + // Window C · rotate + scale on the video itself (3.0–4.5s) |
| 238 | + tl.set("#wc-video", { rotation: 0, scale: 1 }, 0); |
329 | 239 | tl.to( |
330 | | - "#wf-video", |
331 | | - { rotation: 15, scale: 0.8, duration: 2.0, ease: "power2.out" }, |
332 | | - 12.0, |
| 240 | + "#wc-video", |
| 241 | + { rotation: 15, scale: 0.8, duration: 1.2, ease: "power2.out" }, |
| 242 | + 3.0, |
333 | 243 | ); |
334 | 244 |
|
335 | | - // Window H · shader-transitions library: cross-warp-morph between Scene A and Scene B |
| 245 | + // Window D · shader transition: cross-warp-morph between Scene A and Scene B (4.5–6.0s) |
336 | 246 | HyperShader.init({ |
337 | 247 | bgColor: "#000000", |
338 | | - scenes: ["window-h-scene-a", "window-h-scene-b"], |
339 | | - transitions: [{ time: 18.5, shader: "cross-warp-morph", duration: 0.7 }], |
| 248 | + scenes: ["window-d-scene-a", "window-d-scene-b"], |
| 249 | + transitions: [{ time: 5.5, shader: "cross-warp-morph", duration: 0.7 }], |
340 | 250 | timeline: tl, |
341 | 251 | }); |
342 | 252 |
|
|
0 commit comments