Communitygithub.com

nateherkai/hyperframes-student-kit

Referência de animação GSAP para HyperFrames. Abrange gsap.to(), from(), fromTo(), easing, stagger, defaults, timelines (gsap.timeline(), parâmetro de posição, rótulos, aninhamento, reprodução) e desempenho (transformações, will-change, quickTo). Use ao escrever animações GSAP em composições HyperFrames.

O que é hyperframes-student-kit?

Este kit de habilidades fornece uma referência abrangente para animações GSAP (GreenSock Animation Platform) dentro de composições HyperFrames. Ele serve como um guia completo para desenvolvedores que precisam criar animações de alto desempenho e ricas em recursos, detalhando tudo, desde os métodos básicos de tween (gsap.to, from, fromTo, set) até técnicas avançadas como parâmetros de posição de timeline, easing, stagger e gerenciamento de desempenho. O guia enfatiza as melhores práticas, como usar aliases de transformação do GSAP em vez de strings CSS transform, preferir propriedades compositor-friendly como transform e opacity, e empregar ferramentas como gsap.matchMedia() para design responsivo e preferências de movimento reduzido. Além disso, cobre controles avançados de timeline (labels, nesting, play/pause/reverse), funções de utilidade como gsap.quickTo() para animações de alto quadro (ex: seguir o mouse) e instruções de limpeza para evitar problemas de desempenho. O kit inclui arquivos de referência adicionais para efeitos prontos (typewriter, visualizador de áudio) e adverte contra práticas comuns como animar propriedades de layout (width/height) quando transformações são suficientes, ou criar tweens antes que o DOM esteja pronto. Esta é uma ferramenta de referência essencial para qualquer desenvolvedor HyperFrames trabalhando com animações GSAP progressivas, pois garante consistência, desempenho e manutenibilidade em composições animadas.

Funciona com~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/nateherkai/hyperframes-student-kit/tree/HEAD/.agents/skills/gsap

Perguntar na sua IA favorita

Abre um novo chat com esta habilidade de agente já pré-carregada.

Documentação

GSAP

Métodos Core de Tween

  • gsap.to(targets, vars) — anima do estado atual para vars. Mais comum.
  • gsap.from(targets, vars) — anima de vars para o estado atual (entradas).
  • gsap.fromTo(targets, fromVars, toVars) — início e fim explícitos.
  • gsap.set(targets, vars) — aplica imediatamente (duração 0).

Sempre use nomes de propriedade em camelCase (ex: backgroundColor, rotationX).

Variáveis comuns (vars)

  • duration — segundos (padrão 0.5).
  • delay — segundos antes do início.
  • ease — "power1.out" (padrão), "power3.inOut", "back.out(1.7)", "elastic.out(1, 0.3)", "none".
  • stagger — número 0.1 ou objeto: { amount: 0.3, from: "center" }, { each: 0.1, from: "random" }.
  • overwrite — false (padrão), true, ou "auto".
  • repeat — número ou -1 para infinito. yoyo — alterna direção com repeat.
  • onComplete, onStart, onUpdate — callbacks.
  • immediateRender — padrão true para from()/fromTo(). Defina false em tweens subsequentes que visam a mesma propriedade+elemento para evitar sobrescrita.

Transformações e CSS

Prefira os aliases de transformação do GSAP em vez da string transform bruta:

Propriedade GSAPEquivalente
x, y, ztranslateX/Y/Z (px)
xPercent, yPercenttranslateX/Y em %
scale, scaleX, scaleYscale
rotationrotate (deg)
rotationX, rotationYrotate 3D
skewX, skewYskew
transformOrigintransform-origin
  • autoAlpha — prefira em vez de opacity. Em 0: também define visibility: hidden.
  • Variáveis CSS — "--hue": 180.
  • svgOrigin (apenas SVG) — origem no espaço de coordenadas SVG global. Não combine com transformOrigin.
  • Rotação direcional — "360_cw", "-170_short", "90_ccw".
  • clearProps — "all" ou separado por vírgulas; remove estilos inline ao completar.
  • Valores relativos — "+=20", "-=10", "*=2".

Valores Baseados em Função

gsap.to(".item", {
  x: (i, target, targets) => i * 50,
  stagger: 0.1,
});

Easing

Eases embutidos: power1–power4, back, bounce, circ, elastic, expo, sine. Cada um tem .in, .out, .inOut.

Defaults

gsap.defaults({ duration: 0.6, ease: "power2.out" });

Controlando Tweens

const tween = gsap.to(".box", { x: 100 });
tween.pause();
tween.play();
tween.reverse();
tween.kill();
tween.progress(0.5);
tween.time(0.2);

gsap.matchMedia() (Responsivo + Acessibilidade)

Executa a configuração apenas quando uma media query corresponde; reverte automaticamente quando para de corresponder.

let mm = gsap.matchMedia();
mm.add(
  {
    isDesktop: "(min-width: 800px)",
    reduceMotion: "(prefers-reduced-motion: reduce)",
  },
  (context) => {
    const { isDesktop, reduceMotion } = context.conditions;
    gsap.to(".box", {
      rotation: isDesktop ? 360 : 180,
      duration: reduceMotion ? 0 : 2,
    });
  },
);

Timelines

Criando uma Timeline

const tl = gsap.timeline({ defaults: { duration: 0.5, ease: "power2.out" } });
tl.to(".a", { x: 100 }).to(".b", { y: 50 }).to(".c", { opacity: 0 });

Parâmetro de Posição

O terceiro argumento controla o posicionamento:

  • Absoluto: 1 — em 1s
  • Relativo: "+=0.5" — após o fim; "-=0.2" — antes do fim
  • Rótulo: "intro", "intro+=0.3"
  • Alinhamento: "<" — mesmo início que o anterior; ">" — após o anterior terminar; "<0.2" — 0.2s após o início do anterior
tl.to(".a", { x: 100 }, 0);
tl.to(".b", { y: 50 }, "<"); // mesmo início que .a
tl.to(".c", { opacity: 0 }, "<0.2"); // 0.2s após .b iniciar

Rótulos

tl.addLabel("intro", 0);
tl.to(".a", { x: 100 }, "intro");
tl.addLabel("outro", "+=0.5");
tl.play("outro");
tl.tweenFromTo("intro", "outro");

Opções da Timeline

  • paused: true — cria pausada; chame .play() para iniciar.
  • repeat, yoyo — aplica a timeline inteira.
  • defaults — vars mescladas em cada tween filho.

Aninhando Timelines

const master = gsap.timeline();
const child = gsap.timeline();
child.to(".a", { x: 100 }).to(".b", { y: 50 });
master.add(child, 0);

Controle de Reprodução

tl.play(), tl.pause(), tl.reverse(), tl.restart(), tl.time(2), tl.progress(0.5), tl.kill().


Desempenho

Prefira Transform e Opacity

Animar x, y, scale, rotation, opacity permanece no compositor. Evite width, height, top, left quando transformações alcançam o mesmo efeito.

will-change

will-change: transform;

Apenas em elementos que realmente animam.

gsap.quickTo() para Atualizações Frequentes

let xTo = gsap.quickTo("#id", "x", { duration: 0.4, ease: "power3" }),
  yTo = gsap.quickTo("#id", "y", { duration: 0.4, ease: "power3" });
container.addEventListener("mousemove", (e) => {
  xTo(e.pageX);
  yTo(e.pageY);
});

Stagger > Muitos Tweens

Use stagger em vez de tweens separados com delays manuais.

Limpeza

Pause ou mate animações fora da tela.


Referências (carregadas sob demanda)

  • references/effects.md — Efeitos prontos: texto de máquina de escrever, visualizador de áudio. Leia quando precisar de padrões de efeitos prontos para HyperFrames.

Melhores Práticas

  • Use nomes de propriedade em camelCase; prefira aliases de transformação e autoAlpha.
  • Prefira timelines em vez de encadeamento com delay; use o parâmetro de posição.
  • Adicione rótulos com addLabel() para sequenciamento legível.
  • Passe defaults no construtor da timeline.
  • Armazene o valor retornado do tween/timeline ao controlar a reprodução.

Não Faça

  • Anime propriedades de layout (width/height/top/left) quando transformações forem suficientes.
  • Use svgOrigin e transformOrigin no mesmo elemento SVG.
  • Encadeie animações com delay quando uma timeline pode sequenciá-las.
  • Crie tweens antes do DOM existir.
  • Pule a limpeza — sempre mate tweens quando não forem mais necessários.

Individual skills in this repo

This repo contains 8 individual skills — each has its own dedicated page.

nateherkai/hyperframes-student-kit

Agent 2 of the video editing pipeline. Finds and removes spoken mistakes — stutters, repeated words, false starts, and retakes (re-recorded lines) — from a talking-head recording. Use after cut-silences, when asked to cut mistakes, remove stutters / repeats / filler restarts, clean up flubs, or keep the best take. Works review-gated: it proposes every cut with context and a reason for approval, then renders only the approved cuts via ffmpeg. Requires a word-level transcript.

nateherkai/hyperframes-student-kit

Agent 1 of the video editing pipeline. Removes silences and dead air from a talking-head recording. Use when asked to cut silences, trim pauses, remove dead air / gaps, or tighten the pacing of a raw video, given a word-level transcript. Produces an edit list (EDL), a re-timed transcript for downstream agents, and optionally the cut video via ffmpeg. Does NOT cut mistakes, repeats, or false starts — that is the cut-mistakes agent.

nateherkai/hyperframes-student-kit

Edit a raw talking-head video through transcription, silence trimming, mistake review, visual storytelling, motion graphics, and verified HyperFrames rendering. Use for a complete edit; route a single requested operation directly to its specialist skill.

nateherkai/hyperframes-student-kit

HyperFrames CLI tool — hyperframes init, lint, preview, render, transcribe, tts, doctor, browser, info, upgrade, compositions, docs, benchmark. Use when scaffolding a project, linting or validating compositions, previewing in the studio, rendering to video, transcribing audio, generating TTS, or troubleshooting the HyperFrames environment.

nateherkai/hyperframes-student-kit

Install and wire registry blocks and components into HyperFrames compositions. Use when running hyperframes add, installing a block or component, wiring an installed item into index.html, or working with hyperframes.json. Covers the add command, install locations, block sub-composition wiring, component snippet merging, and registry discovery.

nateherkai/hyperframes-student-kit

Plan, write, time, style, and validate motion-graphic beats for long-form talking-head HyperFrames videos. Use when Codex is asked to add or improve visual beats, glassmorphism lower thirds, crumpled-paper full-screen takeovers, transcript-synced callouts, pacing coverage, YouTube retention graphics, or render-ready overlays in an existing HyperFrames video project.

nateherkai/motion-showreel

Build 10–30s motion-design showreels in the style of Nate's Opus 5.5 CLAUDE/MOTION REEL — brand motif chapters, HUD, BPM-locked cuts, logo lockup.

nateherkai/website-to-hyperframes

Capture a website URL and produce a HyperFrames promo/product-tour video — site → finished marketing video outcome.

Habilidades Relacionadas