Skip to content

Write HTML. Render video. Built for agents.

4.6 KB
Raw Blame
{"html":"<!doctype html>\n<!-- Demo plate for the catalog preview. Identical to yt-screen-warp.html except the\n     root background, which is opaque here so the transparent overlay reads.\n     Not installed by `hyperframes add` - registry-item.json lists yt-screen-warp.html only. -->\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      *::before,\n      *::after {\n        margin: 0;\n        padding: 0;\n        box-sizing: border-box;\n      }\n      body {\n        background: #14161c;\n        overflow: hidden;\n      }\n      /* ---- yt-screen-warp ---------------------------------------------------\n         Make footage read as a physical display: add .yt-screen-warp3d to the\n         media WRAPPER (subtle perspective), and place .yt-screen-fx overlay\n         inside it (pixel grid + scanlines + vignette + sheen). */\n      .yt-screen-warp3d {\n        transform: perspective(1400px) rotateY(-3.5deg) rotateX(1.6deg);\n      }\n      .yt-screen-fx {\n        position: absolute;\n        inset: 0;\n        pointer-events: none;\n        opacity: 0;\n        background:\n          /* sheen */\n          linear-gradient(115deg, rgba(255, 255, 255, 0.09) 0%, transparent 30%),\n          /* scanlines */\n          repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.1) 0 1px, transparent 1px 3px),\n          /* pixel grid */\n          repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.06) 0 1px, transparent 1px 4px);\n        box-shadow:\n          inset 0 0 90px rgba(0, 0, 0, 0.4),\n          inset 0 0 8px rgba(0, 0, 0, 0.5);\n      }\n      /* self-preview stand-in */\n      #yt-sw-wrap {\n        position: absolute;\n        left: 360px;\n        top: 190px;\n        width: 1200px;\n        height: 700px;\n        border-radius: 18px;\n        overflow: hidden;\n      }\n      #yt-sw-fill {\n        position: absolute;\n        inset: 0;\n        /* Placeholder footage: L3 of the ink over the dark ground, plus a 3px\n           achromatic hatch so the plate reads as a media surface, not an empty box. */\n        background:\n          repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 3px),\n          rgba(255, 255, 255, 0.18);\n        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        font-family: \"Inter\", ui-sans-serif, sans-serif;\n        font-weight: 700;\n        font-size: 92px;\n        color: rgba(255, 255, 255, 0.93);\n      }\n    </style>\n  </head>\n  <body>\n    <!-- Self-preview wrapper. WIRING: copy the two CSS classes; add\n         class=\"yt-screen-warp3d\" to your media wrapper and\n         <div class=\"yt-screen-fx\" id=\"yt-my-fx\"></div> as its LAST child. Then:\n\n           ytScreenOn(tl, \"#yt-my-fx\", 2.0);\n           ytScreenOff(tl, \"#yt-my-fx\", 8.0);\n    -->\n    <div\n      id=\"yt-sw-root\"\n      data-composition-id=\"yt-screen-warp\"\n      data-start=\"0\"\n      data-duration=\"4\"\n      data-width=\"1920\"\n      data-height=\"1080\"\n    >\n      <div id=\"yt-sw-wrap\" class=\"yt-screen-warp3d\">\n        <div id=\"yt-sw-fill\">on screen</div>\n        <div class=\"yt-screen-fx\" id=\"yt-sw-fx\"></div>\n      </div>\n      <div\n        id=\"yt-sw-drv\"\n        class=\"clip\"\n        data-start=\"0\"\n        data-duration=\"4\"\n        data-track-index=\"0\"\n        style=\"position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none\"\n      ></div>\n    </div>\n    <script>\n      (function () {\n        window.__timelines = window.__timelines || {};\n\n        // ---- copy these helpers into the host script ----\n        window.ytScreenOn = function (tl, target, at) {\n          tl.to(target, { opacity: 1, duration: 0.5, ease: \"power2.out\" }, at);\n        };\n        window.ytScreenOff = function (tl, target, at) {\n          tl.to(target, { opacity: 0, duration: 0.4, ease: \"power2.in\" }, at);\n        };\n\n        // Self-preview timeline.\n        var tl = gsap.timeline({ paused: true });\n        gsap.set(\"#yt-sw-wrap\", { opacity: 0, scale: 0.96 });\n        tl.to(\"#yt-sw-wrap\", { opacity: 1, scale: 1, duration: 0.5, ease: \"power2.out\" }, 0.2);\n        window.ytScreenOn(tl, \"#yt-sw-fx\", 0.8);\n        window.ytScreenOff(tl, \"#yt-sw-fx\", 3.1);\n        tl.to(\"#yt-sw-wrap\", { opacity: 0, duration: 0.35, ease: \"power2.in\" }, 3.5);\n        tl.set(\"#yt-sw-root\", { visibility: \"hidden\" }, 3.98);\n        window.__timelines[\"yt-screen-warp\"] = tl;\n      })();\n    </script>\n  </body>\n</html>\n"}