Skip to content

Diogenesoftoronto/keating / video/keating-surface-tour/.agents/skills/hyperframes-animation

hyperframes-animation

Verified

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

FileKindSize
SKILL.mdskill md7.6 KB
adapters/animate-text.mdmarkdown4.0 KB
adapters/animejs.mdmarkdown6.1 KB
adapters/css-animations.mdmarkdown5.3 KB
adapters/gsap-easing-and-stagger.mdmarkdown13.0 KB
adapters/gsap-timeline-and-labels.mdmarkdown3.6 KB
adapters/gsap-transforms-and-perf.mdmarkdown8.4 KB
adapters/gsap.mdmarkdown6.9 KB
adapters/html-in-canvas-patterns.mdmarkdown16.8 KB
adapters/lottie.mdmarkdown4.0 KB
adapters/three.mdmarkdown5.1 KB
adapters/typegpu.mdmarkdown7.9 KB
adapters/waapi.mdmarkdown4.1 KB
blueprints-index.mdmarkdown25.9 KB
blueprints/agent-progress-theater.mdmarkdown15.7 KB
blueprints/camera-journey.mdmarkdown13.3 KB
blueprints/comparison-split.mdmarkdown3.2 KB
blueprints/constellation-hub.mdmarkdown7.0 KB
blueprints/cta-morph-press.mdmarkdown6.3 KB
blueprints/cursor-ui-demo.mdmarkdown19.8 KB
blueprints/dataviz-countup.mdmarkdown14.3 KB
blueprints/device-surface-showcase.mdmarkdown16.7 KB
blueprints/fixed-anchor-cycle.mdmarkdown8.9 KB
blueprints/grid-card-assemble.mdmarkdown15.2 KB
blueprints/kinetic-type-beats.mdmarkdown28.5 KB
blueprints/logo-assemble-lockup.mdmarkdown26.0 KB
blueprints/overwhelm-surround.mdmarkdown6.0 KB
blueprints/panel-edit-live-sync.mdmarkdown13.1 KB
blueprints/prompt-type-submit-generate.mdmarkdown18.2 KB
blueprints/spatial-pan-stations.mdmarkdown4.8 KB
blueprints/ticker-takeover.mdmarkdown3.0 KB
blueprints/titlecard-reveal.mdmarkdown7.3 KB
blueprints/transcript-scroll-artifact-reveal.mdmarkdown11.4 KB
blueprints/typewriter-reveal.mdmarkdown6.1 KB
blueprints/video-text-pivot.mdmarkdown3.2 KB
blueprints/zoom-out-workspace-reveal.mdmarkdown14.4 KB
examples/brand-reveal-assemble-zoom.htmlother12.0 KB
examples/comparison-split-cards.htmlother21.2 KB
examples/concept-demo-decode-pan.htmlother18.0 KB
examples/cta-morph-press.htmlother14.8 KB
examples/cta-orbit-collapse.htmlother49.5 KB
examples/demo-page-scroll-spotlight.htmlother24.4 KB
examples/hook-counter-burst.htmlother22.5 KB
examples/messaging-multi-phrase.htmlother11.9 KB
examples/metric-video-text-pivot.htmlother25.0 KB
examples/problem-mockup-overwhelm.htmlother43.4 KB
examples/proof-logo-chain.htmlother28.2 KB
examples/takeover-ticker-displace.htmlother10.7 KB
examples/workflow-approve-press.htmlother20.2 KB
rules-index.mdmarkdown20.7 KB
rules/3d-camera-flight.mdmarkdown17.7 KB
rules/3d-page-scroll.mdmarkdown7.2 KB
rules/3d-text-depth-layers.mdmarkdown6.6 KB
rules/ai-tracking-box.mdmarkdown6.4 KB
rules/ambient-glow-bloom.mdmarkdown9.6 KB
rules/anchored-layout-expand.mdmarkdown10.1 KB
rules/asr-keyword-glow.mdmarkdown6.6 KB
rules/avatar-cloud-network.mdmarkdown6.4 KB
rules/camera-cursor-tracking.mdmarkdown7.7 KB
rules/card-morph-anchor.mdmarkdown7.2 KB
rules/center-outward-expansion.mdmarkdown4.2 KB
rules/chart-scrub-readout.mdmarkdown10.1 KB
rules/chromatic-glitch.mdmarkdown10.1 KB
rules/context-sensitive-cursor.mdmarkdown6.8 KB
rules/control-target-sync.mdmarkdown10.0 KB
rules/coordinate-target-zoom.mdmarkdown7.4 KB
rules/counting-dynamic-scale.mdmarkdown5.8 KB
rules/css-marker-patterns.mdmarkdown5.6 KB
rules/cursor-click-ripple.mdmarkdown6.3 KB
rules/cursor-drag.mdmarkdown10.0 KB
rules/depth-of-field-blur.mdmarkdown8.7 KB
rules/depth-scatter-assemble.mdmarkdown6.9 KB
rules/discrete-text-sequence.mdmarkdown6.3 KB
rules/dynamic-content-sequencing.mdmarkdown8.4 KB
rules/gradient-text-sweep.mdmarkdown8.5 KB
rules/gsap-effects.mdmarkdown6.8 KB
rules/hacker-flip-3d.mdmarkdown5.5 KB
rules/kinetic-beat-slam.mdmarkdown6.3 KB
rules/motion-blur-streak.mdmarkdown10.4 KB
rules/multi-cursor-choreography.mdmarkdown10.3 KB
rules/multi-phase-camera.mdmarkdown7.6 KB
rules/nudge-curve.mdmarkdown2.6 KB
rules/orbit-3d-entry.mdmarkdown6.5 KB
rules/particle-burst.mdmarkdown9.7 KB
rules/physics-press-reaction.mdmarkdown6.5 KB
rules/press-release-spring.mdmarkdown6.9 KB
rules/reactive-displacement.mdmarkdown6.4 KB
rules/scale-swap-transition.mdmarkdown5.4 KB
rules/sine-wave-loop.mdmarkdown6.0 KB
rules/split-tilt-cards.mdmarkdown5.5 KB
rules/spring-pop-entrance.mdmarkdown6.4 KB
rules/stat-bars-and-fills.mdmarkdown5.4 KB
rules/svg-icon-enrichment.mdmarkdown7.4 KB
rules/svg-path-draw.mdmarkdown5.2 KB
rules/theme-crossfade-morph.mdmarkdown9.2 KB
rules/vertical-spring-ticker.mdmarkdown5.4 KB
rules/viewport-change.mdmarkdown8.8 KB
rules/waterfall-entry.mdmarkdown4.5 KB
scripts/animation-map-sampling.mjsscript1.4 KB
scripts/animation-map-sampling.test.mjsscript1.6 KB
scripts/animation-map.mjsscript19.8 KB
scripts/animation-map.test.mjsscript12.1 KB
scripts/package-loader.mjsscript13.2 KB
scripts/package-loader.test.mjsscript2.5 KB
techniques.mdmarkdown15.4 KB
transitions/TRANSITION-REGISTRY.mdmarkdown7.9 KB
transitions/catalog.mdmarkdown6.5 KB
transitions/css-3d.mdmarkdown421 B
transitions/css-blur.mdmarkdown1.7 KB
transitions/css-cover.mdmarkdown1.4 KB
transitions/css-destruction.mdmarkdown4.4 KB
transitions/css-dissolve.mdmarkdown2.4 KB
transitions/css-distortion.mdmarkdown1.8 KB
transitions/css-grid.mdmarkdown370 B
transitions/css-light.mdmarkdown2.3 KB
transitions/css-mechanical.mdmarkdown1.6 KB
transitions/css-other.mdmarkdown838 B
transitions/css-push.mdmarkdown1.2 KB
transitions/css-radial.mdmarkdown1.0 KB
transitions/css-scale.mdmarkdown715 B
transitions/overview.mdmarkdown13.5 KB

examples/messaging-multi-phrase.html

View on GitHub
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=1920, height=1080" />
    <title>Scene — HyperFrames Messaging Multi-Phrase</title>

    <!--
      Blueprint: messaging-multi-phrase (HyperFrames preview)
      HyperFrames-native version of the scene-9-multi-phrase concept.

      Choreography (3 phrases, ~7.5 seconds total, content-driven duration):

        Phrase 1 [0.00 – 3.86 s]
          "With an AI assistant " (21 chars × 0.083 s = 1.75 s)
        + "you can trust"          (13 chars × 0.083 s = 1.08 s, accent pink)
        + hold 1.00 s
        → total 1.75 + 1.08 + 1.00 ≈ 3.83 s (computed by JS)

        Phrase 2 [3.86 – 5.27 s]
          "Instant " (8 chars × 0.083 s = 0.67 s)
        + "insights" (8 chars × 0.083 s = 0.67 s, accent pink)
        + hold 1.00 s
        → total 0.67 + 0.67 + 1.00 ≈ 2.33 s, but starts at 3.86 → endTime ≈ 6.18 s

        Phrase 3 [6.18 – 9.45 s]
          "Endless "      (8 chars × 0.083 = 0.67 s)
        + "possibilities" (13 chars × 0.083 = 1.08 s, accent pink)
        + hold 2.00 s     (longer — closing beat)
        → total 0.67 + 1.08 + 2.00 ≈ 3.75 s, but starts at 6.18 → endTime ≈ 9.93 s

        Continuous: cursor blink (square wave via `tl.time() % 1.0`)
          color, cursor blink. No per-phrase tweens.
        - No conditional DOM — phrase container exists from t=0 with empty text;
          onUpdate overwrites textContent in-place at each frame.
        - TIMELINE is a plain const computed once at script load (no useMemo).
        - Frames become seconds: charSpeed 2.5 frames → 0.083 s; hold 30 frames → 1.0 s.
        - Cursor blink: `(t % BLINK_CYCLE) < BLINK_CYCLE / 2 ? 1 : 0` inside the same
          onUpdate, not a separate component with `useCurrentFrame`.
        - textContent !== visible guard skips redundant DOM writes during hold windows.
    -->

    <script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>

    <style>
      :root {
        --text-primary: #ffffff;
        --text-accent: #32fff6;
        --text-accent-2: #a3ff7a;
        --bg: linear-gradient(
          135deg,
          #3a3a3a 0%,
          #17211f 30%,
          #0b2328 48%,
          #1f3518 70%,
          #343434 100%
        );
      }
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }
      html,
      body {
        margin: 0;
        width: 1920px;
        height: 1080px;
        overflow: hidden;
        background: var(--bg);
        font-family:
          "Inter",
          -apple-system,
          BlinkMacSystemFont,
          "Segoe UI",
          Roboto,
          sans-serif;
        color: var(--text-primary);
        -webkit-font-smoothing: antialiased;
        text-rendering: geometricPrecision;
      }

      .stage {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      /* ============================================================
         PHRASE STAGE — one shared line with three inline children:
           .phrase-main   primary-color portion
           .phrase-accent accent-color portion
           .phrase-cursor block cursor (color overridden per-frame)
         `white-space: pre` keeps the trailing space in textMain so the
         accent doesn't merge with the lead-in.
         ============================================================ */
      .phrase-stage {
        position: absolute;
        inset: 0;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 150px;
        font-weight: 800;
        line-height: 1;
        letter-spacing: 0;
        white-space: pre;
        text-align: center;
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.16);
      }
      .phrase-main {
        color: var(--text-primary);
      }
      .phrase-accent {
        color: var(--text-accent);
        text-shadow: 0 0 12px rgba(50, 255, 246, 0.28);
      }
      .phrase-cursor {
        display: inline-block;
        flex: 0 0 auto;
        width: 8px;
        height: 162px; /* ≈ 1.08 × fontSize */
        background: var(--text-primary);
        margin-left: 12px;
        vertical-align: middle;
        transform: translateY(10px); /* baseline alignment */
        will-change: opacity, background-color;
        box-shadow: 0 0 12px rgba(50, 255, 246, 0.36);
      }

      /* ============================================================
         BACKGROUND TINT — subtle radial glow so pure black doesn't
         feel sterile. Drops to ~rgb(8,8,12) at corners.
         ============================================================ */
      .bg-tint {
        position: absolute;
        inset: 0;
        background:
          radial-gradient(ellipse at 42% 48%, rgba(24, 217, 232, 0.32), transparent 42%),
          radial-gradient(ellipse at 58% 52%, rgba(123, 234, 90, 0.26), transparent 44%),
          radial-gradient(ellipse at 50% 50%, rgba(8, 16, 18, 0.42), transparent 70%);
        pointer-events: none;
      }
    </style>
  </head>
  <body>
    <div
      id="root"
      data-composition-id="main"
      data-start="0"
      data-duration="7.5"
      data-width="1920"
      data-height="1080"
    >
      <div
        id="multi-phrase-scene"
        class="stage clip"
        data-start="0"
        data-duration="7.5"
        data-track-index="1"
      >
        <div class="bg-tint"></div>
        <div class="phrase-stage">
          <span class="phrase-main"></span><span class="phrase-accent"></span
          ><span class="phrase-cursor"></span>
        </div>
      </div>
    </div>

    <script>
      window.__timelines = window.__timelines || {};
      const tl = gsap.timeline({ paused: true });

      /* ============================================================
         SCRIPT — content + per-phrase timing config.
         Change SCRIPT and the timeline reshapes itself.
         ============================================================ */
      const SCRIPT = [
        {
          textMain: "Build video with ",
          textAccent: "HTML",
          charSpeed: 0.083, // seconds per character (= 2.5 frames @ 30 fps)
          hold: 1.0,
        },
        {
          textMain: "Seek ",
          textAccent: "any frame",
          charSpeed: 0.083,
          hold: 1.0,
        },
        {
          textMain: "Render to ",
          textAccent: "MP4",
          charSpeed: 0.083,
          hold: 2.0, // longer closing beat
        },
      ];

      /* ============================================================
         TIMELINE — flat reduce, computed once.
         Each entry gains absolute startTime + endTime in seconds.
         ============================================================ */
      let acc = 0;
      const TIMELINE = SCRIPT.map((item) => {
        const totalChars = item.textMain.length + item.textAccent.length;
        const typingDuration = totalChars * item.charSpeed;
        const totalDuration = typingDuration + item.hold;
        const start = acc;
        const end = start + totalDuration;
        acc = end;
        return Object.assign({}, item, {
          startTime: start,
          endTime: end,
          typingDuration,
        });
      });
      const TOTAL = TIMELINE[TIMELINE.length - 1].endTime;
      // TOTAL ≈ 9.93s with the SCRIPT above. The composition root caps at 7.5s
      // (data-duration), which is the actual render window — phrases 1+2 fit
      // comfortably; phrase 3 holds long enough that any time after ~6.18s is
      // already on the closing line. Adjust SCRIPT durations to fit your budget.

      /* ============================================================
         COLORS & BLINK
         ============================================================ */
      const MAIN_COLOR = "#FFFFFF";
      const ACCENT_COLOR = "#32FFF6";
      const BLINK_CYCLE = 1.0; // seconds — 0.5s on, 0.5s off (matches 30-frame square wave)

      const mainEl = document.querySelector(".phrase-main");
      const accentEl = document.querySelector(".phrase-accent");
      const cursorEl = document.querySelector(".phrase-cursor");

      /* ============================================================
         MASTER ENGINE — single onUpdate writes text + cursor every frame.
         ============================================================ */
      // Cache the most-recently-active phrase index for seek-safe scans.
      let lastIdx = 0;

      function findPhrase(t) {
        // Hot path: same phrase still active
        if (t >= TIMELINE[lastIdx].startTime && t < TIMELINE[lastIdx].endTime) {
          return TIMELINE[lastIdx];
        }
        // Cold path: linear scan (handles forward + backward seeks)
        for (let i = 0; i < TIMELINE.length; i++) {
          if (t >= TIMELINE[i].startTime && t < TIMELINE[i].endTime) {
            lastIdx = i;
            return TIMELINE[i];
          }
        }
        return null;
      }

      function renderAt(t) {
        // ----- Cursor blink (square wave, runs always) -----
        cursorEl.style.opacity = t % BLINK_CYCLE < BLINK_CYCLE / 2 ? "1" : "0";

        // ----- Find current phrase -----
        const phrase = findPhrase(t);
        if (!phrase) {
          if (mainEl.textContent !== "") mainEl.textContent = "";
          if (accentEl.textContent !== "") accentEl.textContent = "";
          cursorEl.style.background = MAIN_COLOR;
          return;
        }

        // ----- Compute visible characters -----
        const activeT = t - phrase.startTime;
        const charIdx = Math.floor(activeT / phrase.charSpeed);
        const mainLen = phrase.textMain.length;

        const visMain = phrase.textMain.slice(0, Math.min(charIdx, mainLen));
        const accentLen = Math.max(0, charIdx - mainLen);
        const visAccent = phrase.textAccent.slice(0, accentLen);

        // ----- DOM writes (guarded) -----
        if (mainEl.textContent !== visMain) mainEl.textContent = visMain;
        if (accentEl.textContent !== visAccent) accentEl.textContent = visAccent;

        // ----- Cursor color follows active segment -----
        const inAccent = visMain.length === mainLen && visAccent.length > 0;
        cursorEl.style.background = inAccent ? ACCENT_COLOR : MAIN_COLOR;
      }

      tl.to(
        { tick: 0 },
        {
          tick: 1,
          duration: 7.5, // matches data-duration; clips the timeline
          ease: "none",
          onUpdate: () => renderAt(tl.time()),
        },
        0,
      );

      const pauseTimeline = tl.pause.bind(tl);
      tl.pause = (time, suppressEvents) => {
        const result = pauseTimeline(time, suppressEvents);
        if (typeof time === "number") renderAt(time);
        return result;
      };

      function wrapSeekOwner(owner) {
        if (!owner || owner.__multiPhraseSeekWrapped) return;
        let currentSeek = owner.seek;
        Object.defineProperty(owner, "seek", {
          configurable: true,
          get: () => currentSeek,
          set: (value) => {
            if (typeof value !== "function") {
              currentSeek = value;
              return;
            }
            currentSeek = function (time) {
              const result = value.apply(this, arguments);
              if (typeof time === "number") renderAt(time);
              return result;
            };
          },
        });
        owner.seek = currentSeek;
        owner.__multiPhraseSeekWrapped = true;
      }

      function installWindowSeekHook(key) {
        if (window[key]) {
          wrapSeekOwner(window[key]);
          return;
        }
        let pendingOwner;
        Object.defineProperty(window, key, {
          configurable: true,
          get: () => pendingOwner,
          set: (value) => {
            pendingOwner = value;
            wrapSeekOwner(value);
          },
        });
      }
      installWindowSeekHook("__player");
      installWindowSeekHook("__hf");

      renderAt(0);

      window.__timelines["main"] = tl;
    </script>
  </body>
</html>
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 468kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 468kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 468kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall