Skip to content

Herk Edit Kit by Nate Herk: edit videos, reels, and YouTube Shorts with Codex or Claude Code. 15 skills, transcript-driven cuts, storytelling, 406 motion-graphics cards, and HyperFrames templates.

3.1 KB
Raw Blame
<template id="seam-treatment-template">
  <div
    data-composition-id="seam-treatment"
    data-start="0"
    data-width="1080"
    data-height="1920"
    data-duration="18.84"
  >
    <!-- Navy→transparent gradient that feathers the top 80px of the face into
         the scene panel above. Sits at y=960 (the hard seam) and extends down
         to y=1040. -->
    <div class="seam-gradient" id="seam-gradient"></div>

    <!-- Thin accent scan line sitting exactly on y=960 with soft glow. -->
    <div class="seam-line" id="seam-line"></div>

    <style>
      [data-composition-id="seam-treatment"] {
        position: absolute;
        inset: 0;
        pointer-events: none;
      }
      [data-composition-id="seam-treatment"] .seam-gradient {
        position: absolute;
        left: 0;
        right: 0;
        top: 960px;
        height: 80px;
        background: linear-gradient(
          to bottom,
          rgba(7, 18, 28, 0.85) 0%,
          rgba(7, 18, 28, 0.4) 35%,
          rgba(7, 18, 28, 0) 100%
        );
        opacity: 0;
      }
      [data-composition-id="seam-treatment"] .seam-line {
        position: absolute;
        left: 0;
        right: 0;
        top: 958px;
        height: 2px;
        background: linear-gradient(
          90deg,
          transparent 0%,
          rgba(55, 189, 248, 0.35) 20%,
          rgba(55, 189, 248, 0.9) 50%,
          rgba(55, 189, 248, 0.35) 80%,
          transparent 100%
        );
        box-shadow: 0 0 18px rgba(55, 189, 248, 0.55);
        opacity: 0;
      }
    </style>

    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script>
    <script>
      (function () {
        const tl = gsap.timeline({ paused: true });
        const scope = '[data-composition-id="seam-treatment"] ';
        const FADE = 0.25;

        // Seam is visible during BOTTOM-mode scenes where there's a visible edge
        // between the scene panel (top 960px) and the face (y=1136+).
        // Scenes: 1 (0-2.15), 2 (2.15-5.80), 5 (9.55-13.50), 7 (16.55-18.84).
        // Scene 3 (5.80-7.30) fully covers screen, scene 4 & 6 are fullscreen face.
        const VISIBLE_WINDOWS = [
          [0.0, 2.15],     // scene 1
          [2.15, 5.80],    // scene 2
          [9.55, 13.50],   // scene 5
          [16.55, 18.84],  // scene 7
        ];

        const els = [scope + "#seam-gradient", scope + "#seam-line"];

        // Start hidden.
        els.forEach(function (sel) {
          tl.set(sel, { opacity: 0 }, 0);
        });

        VISIBLE_WINDOWS.forEach(function (win) {
          const inAt = Math.max(win[0] - 0.1, 0);
          const outAt = Math.max(win[1] - FADE - 0.05, inAt + 0.1);
          els.forEach(function (sel, i) {
            const target = i === 0 ? 1.0 : 0.8;
            tl.to(sel, { opacity: target, duration: FADE, ease: "power2.out" }, inAt);
            tl.to(sel, { opacity: 0, duration: FADE, ease: "power2.in" }, outAt);
          });
        });

        tl.set({}, {}, 18.84);

        window.__timelines = window.__timelines || {};
        window.__timelines["seam-treatment"] = tl;
      })();
    </script>
  </div>
</template>