Skip to content

Write HTML. Render video. Built for agents.

11.2 KB
Raw Blame
{"html":"<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=1920\" />\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        width: 1920px;\n        height: 1080px;\n        overflow: hidden;\n        background: #000;\n        font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif;\n      }\n      .scene {\n        position: absolute;\n        top: 0;\n        left: 0;\n        width: 1920px;\n        height: 1080px;\n        overflow: hidden;\n      }\n      .scene-inner {\n        width: 100%;\n        height: 100%;\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        flex-direction: column;\n      }\n      .info-bar {\n        position: absolute;\n        bottom: 0;\n        left: 0;\n        right: 0;\n        z-index: 100;\n        background: rgba(0, 0, 0, 0.88);\n        padding: 24px 60px;\n        display: flex;\n        align-items: center;\n        gap: 40px;\n        opacity: 0;\n      }\n      .info-num {\n        font-size: 14px;\n        font-weight: 700;\n        color: #e07a5f;\n        letter-spacing: 0.1em;\n      }\n      .info-name {\n        font-size: 20px;\n        font-weight: 700;\n        color: #fff;\n      }\n      .info-desc {\n        font-size: 14px;\n        color: rgba(255, 255, 255, 0.5);\n      }\n      #title-card {\n        position: absolute;\n        top: 0;\n        left: 0;\n        width: 1920px;\n        height: 1080px;\n        background: #0d1b2a;\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        flex-direction: column;\n        z-index: 50;\n      }\n      #outro-card {\n        position: absolute;\n        top: 0;\n        left: 0;\n        width: 1920px;\n        height: 1080px;\n        background: #0d1b2a;\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        flex-direction: column;\n        z-index: 50;\n        opacity: 0;\n      }\n    </style>\n  </head>\n  <body>\n    <div\n      data-composition-id=\"main\"\n      data-start=\"0\"\n      data-duration=\"24\"\n      data-width=\"1920\"\n      data-height=\"1080\"\n    >\n      <!-- Title Card -->\n      <div id=\"title-card\">\n        <div\n          id=\"title-label\"\n          style=\"\n            font-size: 14px;\n            font-weight: 700;\n            color: #e07a5f;\n            letter-spacing: 0.2em;\n            text-transform: uppercase;\n            opacity: 0;\n          \"\n        >\n          TRANSITION CATALOG\n        </div>\n        <div\n          id=\"title-main\"\n          style=\"font-size: 72px; font-weight: 900; color: #fff; margin-top: 16px; opacity: 0\"\n        >\n          Dissolve Transitions\n        </div>\n        <div\n          id=\"title-count\"\n          style=\"\n            font-size: 24px;\n            font-weight: 400;\n            color: rgba(255, 255, 255, 0.4);\n            margin-top: 12px;\n            opacity: 0;\n          \"\n        >\n          4 transitions\n        </div>\n      </div>\n\n      <!-- Scene A -->\n      <div id=\"scene1\" class=\"scene\" style=\"z-index: 1\">\n        <div class=\"scene-inner\" id=\"s1\" style=\"background: #1b263b\">\n          <div style=\"font-size: 200px; font-weight: 900; color: rgba(255, 255, 255, 0.08)\">\n            ONE\n          </div>\n          <div\n            style=\"\n              font-size: 32px;\n              font-weight: 700;\n              color: #778da9;\n              letter-spacing: 0.15em;\n              margin-top: -20px;\n            \"\n          >\n            SCENE A\n          </div>\n        </div>\n      </div>\n\n      <!-- Scene B -->\n      <div id=\"scene2\" class=\"scene\" style=\"z-index: 2; opacity: 0\">\n        <div class=\"scene-inner\" id=\"s2\" style=\"background: #e07a5f\">\n          <div style=\"font-size: 200px; font-weight: 900; color: rgba(255, 255, 255, 0.15)\">\n            TWO\n          </div>\n          <div\n            style=\"\n              font-size: 32px;\n              font-weight: 700;\n              color: #fff;\n              letter-spacing: 0.15em;\n              margin-top: -20px;\n            \"\n          >\n            SCENE B\n          </div>\n        </div>\n      </div>\n\n      <!-- Info Bars -->\n      <div id=\"info-1\" class=\"info-bar\">\n        <div class=\"info-num\">01</div>\n        <div class=\"info-name\">Crossfade</div>\n        <div class=\"info-desc\">Use a crossfade transition</div>\n      </div>\n      <div id=\"info-2\" class=\"info-bar\">\n        <div class=\"info-num\">02</div>\n        <div class=\"info-name\">Blur Crossfade</div>\n        <div class=\"info-desc\">Use a blur crossfade transition</div>\n      </div>\n      <div id=\"info-3\" class=\"info-bar\">\n        <div class=\"info-num\">03</div>\n        <div class=\"info-name\">Focus Pull</div>\n        <div class=\"info-desc\">Use a focus pull transition</div>\n      </div>\n      <div id=\"info-4\" class=\"info-bar\">\n        <div class=\"info-num\">04</div>\n        <div class=\"info-name\">Color Dip</div>\n        <div class=\"info-desc\">Use a color dip to black transition</div>\n      </div>\n\n      <!-- Outro Card -->\n      <div id=\"outro-card\">\n        <div\n          id=\"outro-label\"\n          style=\"\n            font-size: 14px;\n            font-weight: 700;\n            color: #e07a5f;\n            letter-spacing: 0.2em;\n            text-transform: uppercase;\n            opacity: 0;\n          \"\n        >\n          DISSOLVE TRANSITIONS\n        </div>\n        <div\n          id=\"outro-main\"\n          style=\"font-size: 56px; font-weight: 900; color: #fff; margin-top: 16px; opacity: 0\"\n        >\n          4 Transitions\n        </div>\n      </div>\n    </div>\n\n    <script>\n      (function () {\n        var tl = gsap.timeline({ paused: true });\n        var t = 0;\n\n        // === TITLE CARD (3s) ===\n        tl.to(\"#title-label\", { opacity: 1, y: 0, duration: 0.4, ease: \"power2.out\" }, t + 0.3);\n        tl.fromTo(\n          \"#title-main\",\n          { opacity: 0, y: 20 },\n          { opacity: 1, y: 0, duration: 0.5, ease: \"power2.out\" },\n          t + 0.6,\n        );\n        tl.fromTo(\n          \"#title-count\",\n          { opacity: 0 },\n          { opacity: 1, duration: 0.4, ease: \"power2.out\" },\n          t + 1.0,\n        );\n        tl.to(\"#title-card\", { opacity: 0, duration: 0.4, ease: \"power2.inOut\" }, t + 2.4);\n        t += 3;\n\n        function resetScenes() {\n          tl.set(\n            \"#scene1\",\n            {\n              opacity: 1,\n              x: 0,\n              y: 0,\n              scale: 1,\n              scaleX: 1,\n              rotation: 0,\n              filter: \"none\",\n              clipPath: \"none\",\n              zIndex: 1,\n              skewX: 0,\n            },\n            t,\n          );\n          tl.set(\n            \"#scene2\",\n            {\n              opacity: 0,\n              x: 0,\n              y: 0,\n              scale: 1,\n              scaleX: 1,\n              rotation: 0,\n              filter: \"none\",\n              clipPath: \"none\",\n              zIndex: 2,\n              skewX: 0,\n            },\n            t,\n          );\n          tl.set(\n            \"#s1\",\n            {\n              opacity: 1,\n              x: 0,\n              y: 0,\n              scale: 1,\n              rotation: 0,\n              filter: \"none\",\n              skewX: 0,\n              scaleX: 1,\n              transformOrigin: \"50% 50%\",\n            },\n            t,\n          );\n          tl.set(\n            \"#s2\",\n            {\n              opacity: 1,\n              x: 0,\n              y: 0,\n              scale: 1,\n              rotation: 0,\n              filter: \"none\",\n              skewX: 0,\n              scaleX: 1,\n              transformOrigin: \"50% 50%\",\n            },\n            t,\n          );\n        }\n\n        // === TRANSITION 1: Crossfade ===\n        resetScenes();\n        tl.to(\"#info-1\", { opacity: 1, duration: 0.3 }, t + 0.2);\n        var T = t + 1.5;\n        tl.to(\"#s1\", { opacity: 0, duration: 0.5, ease: \"power2.inOut\" }, T);\n        tl.set(\"#scene2\", { opacity: 1 }, T);\n        tl.fromTo(\"#s2\", { opacity: 0 }, { opacity: 1, duration: 0.5, ease: \"power2.inOut\" }, T);\n        t = T + 1.5 + 1.0;\n        tl.to(\"#info-1\", { opacity: 0, duration: 0.2 }, t);\n        t += 0.5;\n\n        // === TRANSITION 2: Blur Crossfade ===\n        resetScenes();\n        tl.to(\"#info-2\", { opacity: 1, duration: 0.3 }, t + 0.2);\n        T = t + 1.5;\n        tl.to(\n          \"#s1\",\n          { filter: \"blur(10px)\", scale: 1.03, opacity: 0, duration: 0.5, ease: \"power2.inOut\" },\n          T,\n        );\n        tl.set(\"#scene2\", { opacity: 1 }, T);\n        tl.fromTo(\n          \"#s2\",\n          { filter: \"blur(10px)\", scale: 0.97, opacity: 0 },\n          { filter: \"blur(0px)\", scale: 1, opacity: 1, duration: 0.5, ease: \"power2.inOut\" },\n          T + 0.1,\n        );\n        t = T + 1.5 + 1.0;\n        tl.to(\"#info-2\", { opacity: 0, duration: 0.2 }, t);\n        t += 0.5;\n\n        // === TRANSITION 3: Focus Pull ===\n        resetScenes();\n        tl.to(\"#info-3\", { opacity: 1, duration: 0.3 }, t + 0.2);\n        T = t + 1.5;\n        tl.to(\"#s1\", { filter: \"blur(15px)\", duration: 0.5, ease: \"power1.in\" }, T);\n        tl.to(\"#s1\", { opacity: 0, duration: 0.3, ease: \"power2.in\" }, T + 0.25);\n        tl.set(\"#scene2\", { opacity: 1 }, T);\n        tl.fromTo(\n          \"#s2\",\n          { opacity: 0 },\n          { opacity: 1, duration: 0.3, ease: \"power2.out\" },\n          T + 0.25,\n        );\n        t = T + 1.5 + 1.0;\n        tl.to(\"#info-3\", { opacity: 0, duration: 0.2 }, t);\n        t += 0.5;\n\n        // === TRANSITION 4: Color Dip ===\n        resetScenes();\n        tl.to(\"#info-4\", { opacity: 1, duration: 0.3 }, t + 0.2);\n        T = t + 1.5;\n        tl.to(\"#s1\", { opacity: 0, duration: 0.2, ease: \"power2.in\" }, T);\n        tl.set(\"#scene2\", { opacity: 1 }, T);\n        tl.fromTo(\n          \"#s2\",\n          { opacity: 0 },\n          { opacity: 1, duration: 0.2, ease: \"power2.out\" },\n          T + 0.25,\n        );\n        t = T + 1.5 + 1.0;\n        tl.to(\"#info-4\", { opacity: 0, duration: 0.2 }, t);\n        t += 0.5;\n\n        // === OUTRO (3s) ===\n        tl.set(\"#scene1\", { opacity: 0 }, t);\n        tl.set(\"#scene2\", { opacity: 0 }, t);\n        tl.to(\"#outro-card\", { opacity: 1, duration: 0.4, ease: \"power2.inOut\" }, t);\n        tl.to(\"#outro-label\", { opacity: 1, duration: 0.4, ease: \"power2.out\" }, t + 0.3);\n        tl.fromTo(\n          \"#outro-main\",\n          { opacity: 0, y: 20 },\n          { opacity: 1, y: 0, duration: 0.5, ease: \"power2.out\" },\n          t + 0.6,\n        );\n        tl.to(\"#outro-card\", { opacity: 0, duration: 0.4, ease: \"power2.inOut\" }, t + 2.4);\n\n        window.__timelines = window.__timelines || {};\n        window.__timelines[\"main\"] = tl;\n      })();\n    </script>\n  </body>\n</html>\n"}