Skip to content

Write HTML. Render video. Built for agents.

4.0 KB
Raw Blame
{"html":"<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\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      html,\n      body {\n        background: transparent;\n        overflow: hidden;\n      }\n      body {\n        width: 1920px;\n        height: 1080px;\n        font-family: \"Montserrat\", sans-serif;\n      }\n\n      #root .lt {\n        position: absolute;\n        left: 130px;\n        bottom: 122px;\n        display: flex;\n        flex-direction: column;\n        align-items: flex-start;\n        gap: 14px;\n      }\n      #root .lt-namewrap {\n        position: relative;\n        overflow: hidden;\n        padding: 2px 0;\n      }\n      #root .lt-name {\n        font-size: 72px;\n        font-weight: 900;\n        color: #ffffff;\n        line-height: 0.98;\n        letter-spacing: -0.02em;\n        white-space: nowrap;\n        text-shadow: 0 2px 22px rgba(0, 0, 0, 0.45);\n        will-change: clip-path;\n      }\n      #root .lt-sweep {\n        position: absolute;\n        top: 0;\n        bottom: 0;\n        left: 0;\n        width: 8px;\n        background: #ffd23f;\n      }\n      #root .lt-role {\n        font-size: 28px;\n        font-weight: 500;\n        color: #e7eaf0;\n        line-height: 1.2;\n        letter-spacing: 0.02em;\n        white-space: nowrap;\n        text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);\n      }\n    </style>\n  </head>\n  <body>\n    <div\n      id=\"root\"\n      data-composition-id=\"lt-mask-reveal\"\n      data-width=\"1920\"\n      data-height=\"1080\"\n      data-start=\"0\"\n      data-duration=\"4.8\"\n    >\n      <div id=\"lt-clip\" class=\"clip\" data-start=\"0\" data-duration=\"4.8\" data-track-index=\"0\">\n        <div id=\"lt\" class=\"lt\">\n          <div class=\"lt-namewrap\">\n            <div id=\"lt-name\" class=\"lt-name\">Dr. Maya Chen</div>\n            <div id=\"lt-sweep\" class=\"lt-sweep\"></div>\n          </div>\n          <div id=\"lt-role\" class=\"lt-role\">Host · Neuroscientist</div>\n        </div>\n      </div>\n    </div>\n\n    <script>\n      window.__timelines = window.__timelines || {};\n      var tl = gsap.timeline({ paused: true });\n\n      var wrap = document.getElementById(\"lt\");\n      var nameEl = document.getElementById(\"lt-name\");\n      var sweep = document.getElementById(\"lt-sweep\");\n      var role = document.getElementById(\"lt-role\");\n\n      // An accent sweep crosses left→right; the name is revealed by a clip-path wipe behind it; role fades up.\n      // Sweep travel: left:\"100%\" was parent-relative (offsetParent = .lt-namewrap). Since the sweep is\n      // only 8px wide, xPercent would travel just 8px, so translate by the container width in pixels instead.\n      // The .lt-namewrap shrink-wraps the name \"Dr. Maya Chen\" to 536px (no horizontal padding/border, so\n      // clientWidth == content width), which is exactly what left:\"100%\" resolved to.\n      var SWEEP_TRAVEL = 536;\n      gsap.set(nameEl, { clipPath: \"inset(0 100% 0 0)\" });\n      gsap.set(sweep, { x: 0, opacity: 0 });\n      gsap.set(role, { y: 14, opacity: 0 });\n\n      tl.to(sweep, { opacity: 1, duration: 0.12, ease: \"none\" }, 0.1);\n      tl.to(sweep, { x: SWEEP_TRAVEL, duration: 0.55, ease: \"power2.inOut\" }, 0.12);\n      tl.to(nameEl, { clipPath: \"inset(0 0% 0 0)\", duration: 0.5, ease: \"power2.inOut\" }, 0.16);\n      tl.to(sweep, { opacity: 0, duration: 0.15, ease: \"none\" }, 0.6);\n      tl.to(role, { y: 0, opacity: 1, duration: 0.5, ease: \"power3.out\" }, 0.55);\n\n      // Exit: name un-wipes, role fades, hard kill.\n      tl.to(role, { opacity: 0, duration: 0.3, ease: \"power2.in\" }, 4.25);\n      tl.to(nameEl, { clipPath: \"inset(0 0 0 100%)\", duration: 0.4, ease: \"power2.in\" }, 4.3);\n      tl.set(wrap, { visibility: \"hidden\" }, 4.75);\n\n      window.__timelines[\"lt-mask-reveal\"] = tl;\n    </script>\n  </body>\n</html>\n"}