Skip to content

Write HTML. Render video. Built for agents.

12.6 KB
Raw Blame
{"html":"<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Light Transitions Showcase</title>\n    <script src=\"https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js\"></script>\n    <style>\n      * {\n        margin: 0;\n        padding: 0;\n        box-sizing: border-box;\n      }\n      body {\n        background: #000;\n        overflow: hidden;\n        font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif;\n      }\n\n      /* Title Card */\n      #title-card {\n        position: absolute;\n        inset: 0;\n        z-index: 10;\n        background: linear-gradient(135deg, #0d1b2a 0%, #1b263b 100%);\n        display: flex;\n        flex-direction: column;\n        align-items: center;\n        justify-content: center;\n        opacity: 1;\n      }\n      #title-card h1 {\n        font-size: 72px;\n        font-weight: 800;\n        color: #fff;\n        letter-spacing: -1px;\n        opacity: 0;\n        transform: translateY(30px);\n      }\n      #title-card .subtitle {\n        font-size: 28px;\n        font-weight: 400;\n        color: rgba(255, 255, 255, 0.5);\n        margin-top: 12px;\n        opacity: 0;\n        transform: translateY(20px);\n      }\n\n      /* Scenes */\n      #scene1,\n      #scene2 {\n        position: absolute;\n        inset: 0;\n        display: flex;\n        flex-direction: column;\n        align-items: center;\n        justify-content: center;\n      }\n      #scene1 {\n        background: #1b263b;\n        z-index: 2;\n        opacity: 0;\n      }\n      #scene2 {\n        background: #e07a5f;\n        z-index: 1;\n        opacity: 0;\n      }\n\n      .scene-number {\n        font-size: 180px;\n        font-weight: 900;\n        line-height: 1;\n        opacity: 0.12;\n        letter-spacing: -6px;\n      }\n      #scene1 .scene-number {\n        color: #fff;\n      }\n      #scene2 .scene-number {\n        color: #000;\n      }\n\n      .scene-label {\n        font-size: 48px;\n        font-weight: 700;\n        margin-top: -20px;\n      }\n      #scene1 .scene-label {\n        color: #fff;\n      }\n      #scene2 .scene-label {\n        color: #fff;\n      }\n\n      /* Info bar */\n      .info-bar {\n        position: absolute;\n        bottom: 0;\n        left: 0;\n        right: 0;\n        height: 80px;\n        display: flex;\n        align-items: center;\n        justify-content: space-between;\n        padding: 0 48px;\n      }\n      #scene1 .info-bar {\n        background: rgba(0, 0, 0, 0.3);\n      }\n      #scene2 .info-bar {\n        background: rgba(0, 0, 0, 0.2);\n      }\n      .info-bar .label {\n        font-size: 18px;\n        font-weight: 600;\n        color: rgba(255, 255, 255, 0.7);\n        text-transform: uppercase;\n        letter-spacing: 2px;\n      }\n      .info-bar .desc {\n        font-size: 16px;\n        color: rgba(255, 255, 255, 0.5);\n        font-style: italic;\n      }\n\n      /* Outro */\n      #outro {\n        position: absolute;\n        inset: 0;\n        z-index: 10;\n        background: linear-gradient(135deg, #0d1b2a 0%, #1b263b 100%);\n        display: flex;\n        flex-direction: column;\n        align-items: center;\n        justify-content: center;\n        opacity: 0;\n      }\n      #outro h2 {\n        font-size: 56px;\n        font-weight: 800;\n        color: #fff;\n        opacity: 0;\n        transform: translateY(20px);\n      }\n      #outro .tag {\n        font-size: 22px;\n        color: rgba(255, 255, 255, 0.4);\n        margin-top: 10px;\n        opacity: 0;\n        transform: translateY(15px);\n      }\n    </style>\n  </head>\n  <body>\n    <div\n      id=\"comp\"\n      data-composition-id=\"main\"\n      data-start=\"0\"\n      data-duration=\"21\"\n      data-width=\"1920\"\n      data-height=\"1080\"\n      style=\"position: relative; width: 1920px; height: 1080px; overflow: hidden; background: #000\"\n    >\n      <!-- Title Card -->\n      <div id=\"title-card\">\n        <h1 id=\"title-h1\">Light Transitions</h1>\n        <div class=\"subtitle\" id=\"title-sub\">3 transition styles</div>\n      </div>\n\n      <!-- Scene A -->\n      <div id=\"scene1\">\n        <div class=\"scene-number\">ONE</div>\n        <div class=\"scene-label\">SCENE A</div>\n        <div class=\"info-bar\">\n          <span class=\"label\" id=\"info-label-a\"></span>\n          <span class=\"desc\" id=\"info-desc-a\"></span>\n        </div>\n      </div>\n\n      <!-- Scene B -->\n      <div id=\"scene2\">\n        <div class=\"scene-number\">TWO</div>\n        <div class=\"scene-label\">SCENE B</div>\n        <div class=\"info-bar\">\n          <span class=\"label\" id=\"info-label-b\"></span>\n          <span class=\"desc\" id=\"info-desc-b\"></span>\n        </div>\n      </div>\n\n      <!-- Light Leak Overlays -->\n      <div\n        id=\"leak-warm\"\n        style=\"\n          position: absolute;\n          inset: 0;\n          background: linear-gradient(135deg, rgba(255, 165, 0, 0.6), transparent 60%);\n          z-index: 50;\n          opacity: 0;\n          pointer-events: none;\n        \"\n      ></div>\n      <div\n        id=\"leak-1\"\n        style=\"\n          position: absolute;\n          top: -200px;\n          left: -400px;\n          width: 2400px;\n          height: 1500px;\n          background: radial-gradient(ellipse at 30% 40%, rgba(255, 140, 0, 0.5), transparent 50%);\n          z-index: 51;\n          opacity: 0;\n          pointer-events: none;\n        \"\n      ></div>\n      <div\n        id=\"leak-2\"\n        style=\"\n          position: absolute;\n          top: -100px;\n          left: -200px;\n          width: 2400px;\n          height: 1400px;\n          background: radial-gradient(ellipse at 60% 50%, rgba(255, 200, 0, 0.4), transparent 50%);\n          z-index: 51;\n          opacity: 0;\n          pointer-events: none;\n        \"\n      ></div>\n\n      <!-- Flash Overlay -->\n      <div\n        id=\"flash-overlay\"\n        style=\"\n          position: absolute;\n          inset: 0;\n          background: #fff;\n          z-index: 50;\n          opacity: 0;\n          pointer-events: none;\n        \"\n      ></div>\n\n      <!-- Film Burn Overlays -->\n      <div\n        id=\"burn-a\"\n        style=\"\n          position: absolute;\n          top: -300px;\n          right: -800px;\n          width: 2400px;\n          height: 1800px;\n          background: radial-gradient(ellipse at 70% 40%, rgba(255, 100, 0, 0.5), transparent 50%);\n          z-index: 51;\n          opacity: 0;\n          pointer-events: none;\n        \"\n      ></div>\n      <div\n        id=\"burn-b\"\n        style=\"\n          position: absolute;\n          top: -200px;\n          right: -600px;\n          width: 2400px;\n          height: 1600px;\n          background: radial-gradient(ellipse at 80% 50%, rgba(255, 160, 0, 0.4), transparent 50%);\n          z-index: 51;\n          opacity: 0;\n          pointer-events: none;\n        \"\n      ></div>\n      <div\n        id=\"burn-c\"\n        style=\"\n          position: absolute;\n          top: -100px;\n          right: -500px;\n          width: 2200px;\n          height: 1400px;\n          background: radial-gradient(ellipse at 60% 60%, rgba(255, 200, 50, 0.3), transparent 50%);\n          z-index: 51;\n          opacity: 0;\n          pointer-events: none;\n        \"\n      ></div>\n\n      <!-- Outro -->\n      <div id=\"outro\">\n        <h2 id=\"outro-h2\">Light Transitions</h2>\n        <div class=\"tag\" id=\"outro-tag\">End of showcase</div>\n      </div>\n    </div>\n\n    <script>\n      (function () {\n        var tl = gsap.timeline({ paused: false });\n        window.__timelines = window.__timelines || {};\n        window.__timelines[\"main\"] = tl;\n\n        // Transition demos config\n        var demos = [\n          { label: \"LIGHT LEAK\", desc: \"Use a light leak transition with warm overlays\" },\n          { label: \"OVEREXPOSURE BURN\", desc: \"Use an overexposure burn transition\" },\n          { label: \"FILM BURN\", desc: \"Use a film burn transition with warm edge bleeds\" },\n        ];\n\n        // Reset scenes helper\n        function resetScenes(t, demoIndex) {\n          tl.set(\"#scene1\", { opacity: 1, filter: \"none\", scale: 1 }, t);\n          tl.set(\"#scene2\", { opacity: 0 }, t);\n          tl.set(\"#info-label-a\", { textContent: demos[demoIndex].label }, t);\n          tl.set(\"#info-desc-a\", { textContent: demos[demoIndex].desc }, t);\n          tl.set(\"#info-label-b\", { textContent: demos[demoIndex].label }, t);\n          tl.set(\"#info-desc-b\", { textContent: demos[demoIndex].desc }, t);\n          // Reset light leak overlays\n          tl.set(\"#leak-warm\", { opacity: 0 }, t);\n          tl.set(\"#leak-1\", { opacity: 0, x: 0 }, t);\n          tl.set(\"#leak-2\", { opacity: 0, x: 0 }, t);\n          // Reset flash\n          tl.set(\"#flash-overlay\", { opacity: 0 }, t);\n          // Reset burn overlays\n          tl.set(\"#burn-a\", { opacity: 0, x: 0 }, t);\n          tl.set(\"#burn-b\", { opacity: 0, x: 0 }, t);\n          tl.set(\"#burn-c\", { opacity: 0, x: 0 }, t);\n        }\n\n        // ===== TITLE CARD (0s - 3s) =====\n        tl.to(\"#title-h1\", { opacity: 1, y: 0, duration: 0.6, ease: \"power2.out\" }, 0.3);\n        tl.to(\"#title-sub\", { opacity: 1, y: 0, duration: 0.5, ease: \"power2.out\" }, 0.6);\n        tl.to(\"#title-card\", { opacity: 0, duration: 0.4, ease: \"power1.inOut\" }, 2.5);\n\n        // ===== DEMO 1: LIGHT LEAK (3s - 8s) =====\n        var T1 = 3;\n        resetScenes(T1, 0);\n        var T = T1 + 2;\n        tl.to(\"#leak-warm\", { opacity: 0.4, duration: 0.3, ease: \"power1.in\" }, T);\n        tl.to(\"#leak-1\", { opacity: 0.9, x: 300, duration: 0.5, ease: \"sine.inOut\" }, T + 0.05);\n        tl.to(\"#leak-2\", { opacity: 0.8, x: 200, duration: 0.6, ease: \"sine.inOut\" }, T + 0.1);\n        tl.to(\"#leak-warm\", { opacity: 0.6, duration: 0.15, ease: \"power2.in\" }, T + 0.35);\n        tl.set(\"#scene1\", { opacity: 0 }, T + 0.45);\n        tl.set(\"#scene2\", { opacity: 1 }, T + 0.45);\n        tl.to(\"#leak-warm\", { opacity: 0, duration: 0.4, ease: \"power2.out\" }, T + 0.5);\n        tl.to(\"#leak-1\", { opacity: 0, x: 600, duration: 0.35, ease: \"power1.out\" }, T + 0.5);\n        tl.to(\"#leak-2\", { opacity: 0, x: 400, duration: 0.35, ease: \"power1.out\" }, T + 0.55);\n\n        // ===== DEMO 2: OVEREXPOSURE BURN (8s - 13s) =====\n        var T2 = 8;\n        resetScenes(T2, 1);\n        T = T2 + 2;\n        tl.to(\n          \"#scene1\",\n          { filter: \"brightness(1.5)\", scale: 1.03, duration: 0.2, ease: \"power1.in\" },\n          T,\n        );\n        tl.to(\n          \"#scene1\",\n          { filter: \"brightness(3)\", scale: 1.06, duration: 0.2, ease: \"power2.in\" },\n          T + 0.2,\n        );\n        tl.to(\"#flash-overlay\", { opacity: 0.5, duration: 0.25, ease: \"power1.in\" }, T + 0.15);\n        tl.to(\"#flash-overlay\", { opacity: 1, duration: 0.15, ease: \"power2.in\" }, T + 0.4);\n        tl.set(\"#scene1\", { opacity: 0 }, T + 0.55);\n        tl.set(\"#scene2\", { opacity: 1 }, T + 0.55);\n        tl.set(\"#scene1\", { filter: \"none\", scale: 1 }, T + 0.55);\n        tl.to(\"#flash-overlay\", { opacity: 0, duration: 0.35, ease: \"power2.out\" }, T + 0.55);\n\n        // ===== DEMO 3: FILM BURN (13s - 18s) =====\n        var T3 = 13;\n        resetScenes(T3, 2);\n        T = T3 + 2;\n        tl.to(\"#burn-a\", { opacity: 1, x: -300, duration: 0.4, ease: \"power1.in\" }, T);\n        tl.to(\"#burn-b\", { opacity: 1, x: -500, duration: 0.5, ease: \"power1.in\" }, T + 0.05);\n        tl.to(\"#burn-c\", { opacity: 1, x: -200, duration: 0.45, ease: \"power1.in\" }, T + 0.1);\n        tl.set(\"#scene1\", { opacity: 0 }, T + 0.35);\n        tl.set(\"#scene2\", { opacity: 1 }, T + 0.35);\n        tl.to(\"#burn-a\", { opacity: 0, duration: 0.3, ease: \"power2.out\" }, T + 0.45);\n        tl.to(\"#burn-b\", { opacity: 0, duration: 0.3, ease: \"power2.out\" }, T + 0.5);\n        tl.to(\"#burn-c\", { opacity: 0, duration: 0.3, ease: \"power2.out\" }, T + 0.55);\n\n        // ===== OUTRO (18s - 21s) =====\n        tl.to(\"#scene1\", { opacity: 0, duration: 0.3 }, 18);\n        tl.to(\"#scene2\", { opacity: 0, duration: 0.3 }, 18);\n        tl.to(\"#outro\", { opacity: 1, duration: 0.4, ease: \"power1.inOut\" }, 18.2);\n        tl.to(\"#outro-h2\", { opacity: 1, y: 0, duration: 0.5, ease: \"power2.out\" }, 18.5);\n        tl.to(\"#outro-tag\", { opacity: 1, y: 0, duration: 0.4, ease: \"power2.out\" }, 18.8);\n      })();\n    </script>\n  </body>\n</html>\n"}