返回 html-video
main-graphics.html
根目录 / templates / frame-kinetic-type / compositions / main-graphics.html
1 <template id="main-graphics-template">
2 <div
3 data-composition-id="main-graphics"
4 data-width="1920"
5 data-height="1080"
6 data-duration="14.72"
7 >
8 <!-- A-Roll Video -->
9 <video
10 id="a-roll-video"
11 src="https://gen-os-static.s3.us-east-2.amazonaws.com/astral_assets/uploaded_assets/67cf5a05_e134ec83a57042b38776c952da595870.mp4"
12 style="
13 position: absolute;
14 width: 100%;
15 height: 100%;
16 object-fit: cover;
17 opacity: 1;
18 z-index: 0;
19 "
20 crossorigin="anonymous"
21 ></video>
22
23 <!-- Scene 1: Hook -->
24 <div
25 id="white-wipe"
26 style="
27 position: absolute;
28 top: 0;
29 left: 0;
30 width: 100%;
31 height: 100%;
32 background-color: white;
33 z-index: 15;
34 "
35 ></div>
36 <div id="scene-1" class="scene">
37 <div class="hook-container">
38 <div class="hook-what-if">What if</div>
39 <div class="hook-motion-graphics">motion graphics</div>
40 <div class="hook-wrote-themselves">wrote themselves?</div>
41 </div>
42 </div>
43
44 <!-- Scene 2: Swiss Style -->
45 <div id="scene-2" class="scene">
46 <div class="swiss-panel">
47 <div class="swiss-grid">
48 <div class="grid-line horizontal" style="top: 25%"></div>
49 <div class="grid-line horizontal" style="top: 50%"></div>
50 <div class="grid-line horizontal" style="top: 75%"></div>
51 <div class="grid-line vertical" style="left: 25%"></div>
52 <div class="grid-line vertical" style="left: 50%"></div>
53 <div class="grid-line vertical" style="left: 75%"></div>
54 <div class="swiss-circle"></div>
55 <div class="swiss-square"></div>
56 </div>
57 <div class="swiss-content">
58 <div class="swiss-title">HyperFrames</div>
59 <div class="swiss-subtitle">turns code into</div>
60 <div class="swiss-main-text">
61 <span class="word">production-ready</span>
62 <span class="word">video</span>
63 </div>
64 </div>
65 </div>
66 </div>
67
68 <!-- Scene 3: Figma Config Style -->
69 <div id="scene-3" class="scene">
70 <div class="dark-overlay"></div>
71 <div class="figma-container">
72 <div class="figma-item" id="figma-animations">
73 <div class="glyph-container">
74 <div class="glyph-ring ring-unified"></div>
75 <div class="glyph-diamond"></div>
76 </div>
77 <div class="figma-label">animations</div>
78 </div>
79 <div class="figma-item" id="figma-transitions">
80 <div class="glyph-container">
81 <div class="glyph-rect rect-unified"></div>
82 <div class="glyph-wipe"></div>
83 </div>
84 <div class="figma-label">transitions</div>
85 </div>
86 <div class="figma-item" id="figma-typography">
87 <div class="glyph-container">
88 <div class="glyph-tri tri-unified"></div>
89 <div class="glyph-lines">
90 <div class="line"></div>
91 <div class="line"></div>
92 <div class="line"></div>
93 </div>
94 </div>
95 <div class="figma-label">typography</div>
96 </div>
97 <div class="figma-footer">all generated from a single prompt</div>
98 </div>
99 </div>
100
101 <!-- Scene 4: David Carson Style -->
102 <div id="scene-4" class="scene">
103 <div class="carson-overlay"></div>
104 <div class="carson-container">
105 <div class="carson-line-1">No timeline<span class="red-dot">.</span></div>
106 <div class="carson-line-2">no After Effects.</div>
107 </div>
108 </div>
109
110 <!-- Scene 5: Wes Anderson -->
111 <div id="scene-5" class="scene">
112 <div class="wes-bg"></div>
113 <div class="wes-container">
114 <div class="wes-text-top">Just describe the motion</div>
115 <div class="wes-rule"></div>
116 <div class="wes-text-bottom">and render.</div>
117 </div>
118 </div>
119
120 <!-- Scene 6: Vignelli Style -->
121 <div id="scene-6" class="scene">
122 <div
123 id="scene-6-overlay"
124 style="
125 position: absolute;
126 top: 0;
127 left: 0;
128 width: 100%;
129 height: 100%;
130 background-color: black;
131 z-index: -1;
132 "
133 ></div>
134 <div class="vignelli-container">
135 <div class="vignelli-title">HyperFrames</div>
136 <div class="vignelli-subtitle">is here.</div>
137 <div class="vignelli-rule"></div>
138 </div>
139 </div>
140
141 <!-- Black Out -->
142 <div
143 id="black-out"
144 style="
145 position: absolute;
146 top: 0;
147 left: 0;
148 width: 100%;
149 height: 100%;
150 background-color: black;
151 z-index: 100;
152 opacity: 0;
153 pointer-events: none;
154 "
155 ></div>
156
157 <style>
158 [data-composition-id="main-graphics"] {
159 background: black;
160 font-family: "Inter", sans-serif;
161 color: white;
162 overflow: hidden;
163 }
164
165 .scene {
166 position: absolute;
167 top: 0;
168 left: 0;
169 width: 100%;
170 height: 100%;
171 display: flex;
172 justify-content: center;
173 align-items: center;
174 opacity: 0;
175 z-index: 1;
176 }
177
178 /* Scene 1: Hook */
179 #scene-1 {
180 background-color: #0a0a0f;
181 z-index: 10;
182 opacity: 1;
183 }
184 .hook-container {
185 text-align: center;
186 }
187 .hook-what-if {
188 font-size: 32px;
189 font-weight: 400;
190 opacity: 0;
191 }
192 .hook-motion-graphics {
193 font-size: 120px;
194 font-weight: 900;
195 text-transform: uppercase;
196 margin-top: 10px;
197 transform: scale(0);
198 }
199 .hook-wrote-themselves {
200 font-size: 48px;
201 font-style: italic;
202 color: #00e5ff;
203 margin-top: 10px;
204 opacity: 0;
205 }
206
207 /* Scene 2: Swiss Style */
208 .swiss-panel {
209 position: absolute;
210 right: 100px;
211 width: 800px;
212 height: 400px;
213 background: #ffffff;
214 border-radius: 4px;
215 display: flex;
216 padding: 40px;
217 color: black;
218 z-index: 2;
219 }
220 .swiss-grid {
221 position: absolute;
222 top: 0;
223 left: 0;
224 width: 100%;
225 height: 100%;
226 pointer-events: none;
227 }
228 .grid-line {
229 position: absolute;
230 background: #e53935;
231 }
232 .grid-line.horizontal {
233 width: 100%;
234 height: 2px;
235 }
236 .grid-line.vertical {
237 height: 100%;
238 width: 2px;
239 }
240
241 .swiss-circle {
242 position: absolute;
243 width: 60px;
244 height: 60px;
245 background: #e53935;
246 border-radius: 50%;
247 top: 20%;
248 left: 10%;
249 opacity: 0;
250 }
251 .swiss-square {
252 position: absolute;
253 width: 50px;
254 height: 50px;
255 background: black;
256 bottom: 15%;
257 right: 15%;
258 opacity: 0;
259 }
260
261 .swiss-content {
262 position: relative;
263 z-index: 3;
264 display: flex;
265 flex-direction: column;
266 justify-content: center;
267 }
268 .swiss-title {
269 font-family: "Inter", sans-serif;
270 font-size: 64px;
271 font-weight: 900;
272 opacity: 0;
273 }
274 .swiss-subtitle {
275 font-size: 24px;
276 color: #666;
277 margin-top: 10px;
278 opacity: 0;
279 }
280 .swiss-main-text {
281 font-size: 48px;
282 font-weight: 900;
283 margin-top: 20px;
284 display: flex;
285 gap: 15px;
286 }
287 .swiss-main-text .word {
288 opacity: 0;
289 }
290
291 /* Scene 3: Figma Config Style */
292 .dark-overlay {
293 position: absolute;
294 width: 100%;
295 height: 100%;
296 background: rgba(0, 0, 0, 0.55);
297 z-index: 1;
298 }
299 .figma-container {
300 position: relative;
301 z-index: 2;
302 width: 1200px;
303 display: flex;
304 justify-content: space-between;
305 align-items: center;
306 flex-wrap: wrap;
307 }
308 .figma-item {
309 display: flex;
310 flex-direction: column;
311 align-items: center;
312 gap: 20px;
313 opacity: 0;
314 }
315 .glyph-container {
316 position: relative;
317 width: 120px;
318 height: 120px;
319 display: flex;
320 justify-content: center;
321 align-items: center;
322 }
323 .glyph-ring {
324 position: absolute;
325 width: 100%;
326 height: 100%;
327 border-radius: 50%;
328 border: 8px solid transparent;
329 }
330 .ring-unified {
331 background:
332 linear-gradient(black, black) padding-box,
333 linear-gradient(to right, #f24e1e, #a259ff) border-box;
334 }
335 .glyph-diamond {
336 width: 40px;
337 height: 40px;
338 background: white;
339 transform: rotate(45deg);
340 }
341 .glyph-rect {
342 position: absolute;
343 width: 100%;
344 height: 100%;
345 border-radius: 8px;
346 background: linear-gradient(to bottom right, #f24e1e, #a259ff);
347 }
348 .glyph-wipe {
349 position: absolute;
350 width: 0%;
351 height: 100%;
352 background: rgba(255, 255, 255, 0.3);
353 left: 0;
354 }
355 .glyph-tri {
356 width: 100px;
357 height: 100px;
358 background: linear-gradient(to bottom right, #f24e1e, #a259ff);
359 clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
360 }
361 .glyph-lines {
362 display: flex;
363 flex-direction: column;
364 gap: 8px;
365 width: 60px;
366 }
367 .glyph-lines .line {
368 height: 4px;
369 background: white;
370 width: 0;
371 }
372 .figma-label {
373 font-size: 40px;
374 font-weight: bold;
375 }
376 .figma-footer {
377 width: 100%;
378 text-align: center;
379 font-size: 22px;
380 margin-top: 60px;
381 opacity: 0;
382 }
383
384 /* Scene 4: David Carson Style */
385 .carson-overlay {
386 position: absolute;
387 width: 100%;
388 height: 100%;
389 background: rgba(0, 0, 0, 0.6);
390 z-index: 1;
391 }
392 .carson-container {
393 position: relative;
394 z-index: 2;
395 width: 100%;
396 height: 100%;
397 }
398 .carson-line-1 {
399 position: absolute;
400 top: 20%;
401 left: 10%;
402 font-size: 140px;
403 font-weight: 900;
404 transform: translateY(200px);
405 z-index: 2;
406 }
407 .carson-line-1 .red-dot {
408 color: #ff0000;
409 font-size: 240px;
410 position: absolute;
411 top: -40px;
412 left: 80%;
413 z-index: 1;
414 opacity: 0.8;
415 }
416 .carson-line-2 {
417 position: absolute;
418 bottom: 30%;
419 right: 10%;
420 font-size: 80px;
421 font-weight: 400;
422 opacity: 0;
423 z-index: 3;
424 transform: rotate(-5deg);
425 }
426
427 /* Scene 5: Wes Anderson */
428 .wes-bg {
429 position: absolute;
430 width: 100%;
431 height: 100%;
432 background: #f5f0e8;
433 z-index: -1;
434 }
435 .wes-bg::after {
436 content: "";
437 position: absolute;
438 top: 0;
439 left: 0;
440 width: 100%;
441 height: 100%;
442 opacity: 0.05;
443 background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
444 }
445 .wes-container {
446 text-align: center;
447 color: #2c1e16;
448 overflow: hidden;
449 }
450 .wes-text-top {
451 font-family: "Libre Baskerville", serif;
452 font-size: 44px;
453 font-style: italic;
454 transform: translateY(-100px);
455 }
456 .wes-rule {
457 width: 0;
458 height: 1px;
459 background: #2c1e16;
460 margin: 20px auto;
461 }
462 .wes-text-bottom {
463 font-family: "Libre Baskerville", serif;
464 font-size: 44px;
465 transform: translateY(100px);
466 }
467
468 /* Scene 6: Vignelli Style */
469 .vignelli-container {
470 text-align: center;
471 }
472 .vignelli-title {
473 font-family: "Inter", sans-serif;
474 font-size: 120px;
475 font-weight: 900;
476 letter-spacing: -0.02em;
477 opacity: 0;
478 }
479 .vignelli-subtitle {
480 font-family: "Inter", sans-serif;
481 font-size: 32px;
482 color: #00e5ff;
483 margin-top: 20px;
484 opacity: 0;
485 }
486 .vignelli-rule {
487 width: 0;
488 height: 2px;
489 background: white;
490 margin: 30px auto 0;
491 }
492 </style>
493
494 <script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
495 <script>
496 const tl = gsap.timeline({ paused: true });
497
498 const video = document.getElementById("a-roll-video");
499
500 // --- Initial Setup ---
501 tl.set(
502 video,
503 { width: "100%", height: "100%", left: 0, top: 0, borderRadius: 0, scale: 1, opacity: 0 },
504 0,
505 );
506 tl.set("#white-wipe", { xPercent: -100 }, 0);
507
508 // --- Scene 1: Hook (0s - 2.0s) ---
509 tl.set("#scene-1", { opacity: 1, clipPath: "none" }, 0);
510 tl.to(".hook-what-if", { opacity: 1, y: -30, duration: 0.8, ease: "power3.out" }, 0.2);
511 tl.to(".hook-motion-graphics", { scale: 1, duration: 0.8, ease: "back.out(1.7)" }, 0.5);
512 tl.fromTo(
513 ".hook-wrote-themselves",
514 { x: 100, opacity: 0 },
515 { x: 0, opacity: 1, duration: 0.6, ease: "power2.out" },
516 0.9,
517 );
518
519 // --- Transition to Scene 2 (2.0s - 2.4s) ---
520 tl.to("#white-wipe", { xPercent: 0, duration: 0.2, ease: "power2.in" }, 2.0);
521 tl.set("#scene-1", { opacity: 0 }, 2.2);
522 tl.set(video, { opacity: 1 }, 2.2);
523 tl.to("#white-wipe", { xPercent: 100, duration: 0.2, ease: "power2.out" }, 2.2);
524
525 // --- Scene 2: Swiss Style (2.0s - 5.0s) ---
526 gsap.set(".swiss-panel", { xPercent: 100 });
527 tl.to("#scene-2", { opacity: 1, duration: 0.1 }, 2.2);
528 tl.to(".swiss-panel", { xPercent: 0, duration: 0.8, ease: "expo.out" }, 2.3);
529 tl.to(".swiss-title", { opacity: 1, duration: 0.1 }, 2.5);
530 tl.to(".swiss-subtitle", { opacity: 1, y: 0, duration: 0.4 }, 2.7);
531 tl.to(
532 ".swiss-main-text .word",
533 { opacity: 1, y: 0, stagger: 0.15, duration: 0.5, ease: "power2.out" },
534 3.0,
535 );
536 tl.to(".swiss-circle", { opacity: 1, scale: 1.2, duration: 0.6, ease: "back.out" }, 3.2);
537 tl.to(".swiss-square", { opacity: 1, rotation: 45, duration: 0.6, ease: "back.out" }, 3.4);
538 tl.to(".swiss-panel", { xPercent: 120, duration: 0.7, ease: "expo.in" }, 4.7);
539 tl.to("#scene-2", { opacity: 0, duration: 0.1 }, 5.0);
540
541 // --- Scene 3: Figma Config Style (5.3s - 9.6s) ---
542 tl.to("#scene-3", { opacity: 1, duration: 0.3 }, 5.3);
543 tl.to("#figma-animations", { opacity: 1, y: 0, duration: 0.6 }, 5.5);
544 tl.to(".glyph-diamond", { rotation: 225, duration: 2, repeat: 1, ease: "power2.inOut" }, 5.5);
545
546 tl.to("#figma-transitions", { opacity: 1, y: 0, duration: 0.6 }, 6.2);
547 tl.to(".glyph-wipe", { width: "100%", duration: 1, ease: "power2.inOut" }, 6.2);
548
549 tl.to("#figma-typography", { opacity: 1, y: 0, duration: 0.6 }, 6.9);
550 tl.to(".glyph-lines .line", { width: "100%", stagger: 0.2, duration: 0.5 }, 7.1);
551
552 tl.to(".figma-footer", { opacity: 1, y: -20, duration: 0.8 }, 7.8);
553 tl.to("#scene-3", { opacity: 0, duration: 0.5 }, 9.1);
554
555 // --- Scene 4: David Carson Style (9.6s - 11.7s) ---
556 tl.to("#scene-4", { opacity: 1, duration: 0.1 }, 9.6);
557 tl.to(".carson-line-1", { y: 0, duration: 0.6, ease: "expo.out" }, 9.7);
558 tl.to(".carson-line-2", { opacity: 1, x: -50, duration: 0.5, ease: "back.out" }, 10.2);
559 tl.to(".carson-container", { y: 300, duration: 0.6, ease: "expo.in" }, 11.4);
560 tl.to("#scene-4", { opacity: 0, duration: 0.1 }, 11.7);
561
562 // --- Scene 5: Wes Anderson (11.7s - 13.5s) ---
563 tl.to(video, { opacity: 0, duration: 0.4 }, 11.7);
564 tl.to("#scene-5", { opacity: 1, duration: 0.1 }, 11.7);
565 tl.to(".wes-text-top", { y: 0, duration: 0.6, ease: "back.out(1.2)" }, 12.0);
566 tl.to(".wes-rule", { width: 400, duration: 0.6 }, 12.3);
567 tl.to(".wes-text-bottom", { y: 0, duration: 0.6, ease: "back.out(1.2)" }, 12.6);
568 tl.to("#scene-5", { opacity: 0, duration: 0.5 }, 13.0);
569
570 // --- Scene 6: Vignelli Style (13.5s - 14.72s) ---
571 tl.set(video, { opacity: 1 }, 13.5);
572 tl.set("#scene-6", { opacity: 1 }, 13.5);
573 tl.set("#scene-6-overlay", { opacity: 1 }, 13.5);
574
575 tl.to("#scene-6-overlay", { opacity: 0.6, duration: 0.4 }, 13.5);
576
577 tl.to(".vignelli-title", { opacity: 1, duration: 0.5 }, 13.8);
578 tl.to(".vignelli-subtitle", { opacity: 1, duration: 0.5 }, 14.0);
579 tl.to(".vignelli-rule", { width: 300, duration: 0.4 }, 14.2);
580
581 tl.to("#scene-6-overlay", { opacity: 0, duration: 0.3 }, 14.4);
582
583 tl.set("#black-out", { opacity: 1 }, 14.7);
584
585 window.__timelines = window.__timelines || {};
586 window.__timelines["main-graphics"] = tl;
587 </script>
588 </div>
589 </template>
590
590 lines HTML