Communitygithub.com

Referencia GSAP para HyperFrames

Referencia de animaciones GSAP para HyperFrames. Cubre gsap.to(), from(), fromTo(), easing, stagger, defaults, líneas de tiempo (gsap.timeline(), parámetro de posición, etiquetas, anidamiento, reproducción) y rendimiento (transformaciones, will-change, quickTo). Úsalo al escribir animaciones GSAP en composiciones de HyperFrames.

¿Qué es Referencia GSAP para HyperFrames?

Este skill es una referencia completa de GSAP (GreenSock Animation Platform) diseñada específicamente para su uso dentro de HyperFrames, un entorno de composición visual. Proporciona una guía detallada sobre los métodos principales de animación de GSAP como `gsap.to()`, `gsap.from()` y `gsap.fromTo()`, así como conceptos avanzados como easing, stagger, valores por defecto y el potente sistema de líneas de tiempo. Cubre también aspectos críticos de rendimiento, recomendando el uso de propiedades de transformación y opacidad, la propiedad `will-change` y el método `gsap.quickTo()` para animaciones frecuentes, como las de seguimiento del ratón. El skill incluye tablas de referencia rápida para alias de transformación, easing y parámetros de posición en timelines, además de una sección de 'Mejores Prácticas' y 'No Hacer' para guiar a los desarrolladores a escribir animaciones eficientes y mantenibles. Es compatible con cualquier agente de IA que genere código GSAP (como Claude Code, Cursor, Codex, etc.) y se integra directamente con el ecosistema HyperFrames.

Compatible con✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/assafkip/claude-video-editor/tree/HEAD/skills/gsap

Preguntar en tu IA favorita

Abre un nuevo chat con esta habilidad de agente ya precargada.

Documentación

GSAP

Métodos Tween Principales

  • gsap.to(targets, vars) — anima desde el estado actual a vars. El más común.
  • gsap.from(targets, vars) — anima desde vars al estado actual (entradas).
  • gsap.fromTo(targets, fromVars, toVars) — inicio y fin explícitos.
  • gsap.set(targets, vars) — aplica inmediatamente (duración 0).

Usa siempre nombres de propiedad en camelCase (ej. backgroundColor, rotationX).

vars comunes

  • duration — segundos (por defecto 0.5).
  • delay — segundos antes de iniciar.
  • ease — "power1.out" (por defecto), "power3.inOut", "back.out(1.7)", "elastic.out(1, 0.3)", "none".
  • stagger — número 0.1 u objeto: { amount: 0.3, from: "center" }, { each: 0.1, from: "random" }.
  • overwrite — false (por defecto), true, o "auto".
  • repeat — número o -1 para infinito. yoyo — alterna dirección con repetición.
  • onComplete, onStart, onUpdate — callbacks.
  • immediateRender — por defecto true para from()/fromTo(). Pon false en tweens posteriores que apunten a la misma propiedad+elemento para evitar sobrescritura.

Transformaciones y CSS

Prefiere los alias de transformación de GSAP sobre la cadena transform sin procesar:

Propiedad GSAPEquivalente
x, y, ztranslateX/Y/Z (px)
xPercent, yPercenttranslateX/Y en %
scale, scaleX, scaleYescala
rotationrotar (grados)
rotationX, rotationYrotar 3D
skewX, skewYsesgar
transformOrigintransform-origin
  • autoAlpha — preferible sobre opacity. En 0: también establece visibility: hidden.
  • Variables CSS — "--hue": 180.
  • svgOrigin (Solo SVG) — origen en el espacio de coordenadas SVG global. No combinar con transformOrigin.
  • Rotación direccional — "360_cw", "-170_short", "90_ccw".
  • clearProps — "all" o separado por comas; elimina estilos en línea al completar.
  • Valores relativos — "+=20", "-=10", "*=2".

Valores Basados en Funciones

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

Easing

Eases integrados: power1–power4, back, bounce, circ, elastic, expo, sine. Cada uno tiene .in, .out, .inOut.

Valores por Defecto

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

Control de 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 + Accesibilidad)

Ejecuta la configuración solo cuando una media query coincide; se revierte automáticamente cuando deja de coincidir.

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,
    });
  },
);

Líneas de Tiempo

Crear una Línea de Tiempo

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 Posición

El tercer argumento controla la ubicación:

  • Absoluto: 1 — en 1s
  • Relativo: "+=0.5" — después del final; "-=0.2" — antes del final
  • Etiqueta: "intro", "intro+=0.3"
  • Alineación: "<" — mismo inicio que el anterior; ">" — después de que termina el anterior; "<0.2" — 0.2s después de que comienza el anterior
tl.to(".a", { x: 100 }, 0);
tl.to(".b", { y: 50 }, "<"); // mismo inicio que .a
tl.to(".c", { opacity: 0 }, "<0.2"); // 0.2s después de que comienza .b

Etiquetas

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

Opciones de Línea de Tiempo

  • paused: true — crea pausada; llama a .play() para iniciar.
  • repeat, yoyo — se aplican a toda la línea de tiempo.
  • defaults — vars se fusionan en cada tween hijo.

Anidamiento de Líneas de Tiempo

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

Control de Reproducción

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


Rendimiento

Prefiere Transformación y Opacidad

Animar x, y, scale, rotation, opacity permanece en el compositor. Evita width, height, top, left cuando las transformaciones logren el mismo efecto.

will-change

will-change: transform;

Solo en elementos que realmente se animan.

gsap.quickTo() para Actualizaciones Frecuentes

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 en Lugar de Múltiples Tweens

Usa stagger en lugar de tweens separados con retardos manuales.

Limpieza

Pausa o elimina animaciones fuera de la pantalla.


Referencias (cargadas bajo demanda)

  • references/effects.md — Efectos listos para usar: texto de máquina de escribir, visualizador de audio. Léelo cuando necesites patrones de efectos prefabricados para HyperFrames.

Mejores Prácticas

  • Usa nombres de propiedad en camelCase; prefiere alias de transformación y autoAlpha.
  • Prefiere líneas de tiempo sobre encadenamiento con delay; usa el parámetro de posición.
  • Añade etiquetas con addLabel() para una secuenciación legible.
  • Pasa defaults al constructor de la línea de tiempo.
  • Guarda el valor de retorno del tween/línea de tiempo cuando necesites controlar la reproducción.

No Hacer

  • Animar propiedades de layout (width/height/top/left) cuando las transformaciones sean suficientes.
  • Usar tanto svgOrigin como transformOrigin en el mismo elemento SVG.
  • Encadenar animaciones con delay cuando una línea de tiempo pueda secuenciarlas.
  • Crear tweens antes de que exista el DOM.
  • Omitir la limpieza — siempre elimina tweens cuando ya no sean necesarios.

Individual skills in this repo

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

assafkip/claude-video-editor

Build videos from stills when there is nothing to cut — narration first (ElevenLabs v3 with audio tags), then still keyframes from ANY source (AI image tools, screenshots, photos, HyperFrames-rendered HTML), animated deterministically with the animate-stills recipe (HyperFrames camera moves + GSAP atmosphere). Use when the user wants an explainer, documentary-style video, or any video built from generated or collected visuals instead of recorded footage.

assafkip/claude-video-editor

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.

assafkip/claude-video-editor

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.

assafkip/claude-video-editor

Create video compositions, animations, title cards, overlays, captions, voiceovers, audio-reactive visuals, and scene transitions in HyperFrames HTML. Use when asked to build any HTML-based video content, add captions or subtitles synced to audio, generate text-to-speech narration, create audio-reactive animation (beat sync, glow, pulse driven by music), add animated text highlighting (marker sweeps, hand-drawn circles, burst lines, scribble, sketchout), or add transitions between scenes (crossfades, wipes, reveals, shader transitions). Covers composition authoring, timing, media, and the full video production workflow. For CLI commands (init, lint, preview, render, transcribe, tts) see the hyperframes-cli skill.

assafkip/claude-video-editor

Beginner-friendly end-to-end video creator for HyperFrames. Use when the user says "make a video", "create a video", "new video", "build a video", "video from scratch", "I want to make a video", "help me create a video", or when someone who's never used HyperFrames before arrives with a concept, script, or rough idea and wants a finished MP4. Interviews the user in one pass, then builds the full video with mandatory preview and visual-verification gates.

assafkip/claude-video-editor

Build and iterate short-form vertical (9:16) videos in Hyperframes — TikTok/Reels/Shorts style. Use when Nate says "short-form video", "vertical video", "TikTok/Reels/Shorts", "make a short", "talking-head + motion graphics", or when the target is a 1080x1920 composition with face video + synced scene overlays + karaoke captions. Encodes the full May Shorts 19 playbook: face-mode choreography, audio-synced scene timing, karaoke captions, and the 10-rule quality checklist.

assafkip/claude-video-editor

Edit any video by conversation — the orchestrator for the bundled video pipeline. Use when the user wants to edit, cut, caption, grade, or add motion graphics to footage; drops a folder of clips and says "edit this"; or asks to make a promo/teaser/tutorial/short. Routes to video-use (the cut engine) and HyperFrames (motion-graphics overlays), with a motion-craft library for taste.

assafkip/claude-video-editor

Production pipeline for mathematical and technical animations using Manim Community Edition. Creates 3Blue1Brown-style explainer videos, algorithm visualizations, equation derivations, architecture diagrams, and data stories. Use when users request: animated explanations, math animations, concept visualizations, algorithm walkthroughs, technical explainers, 3Blue1Brown style videos, or any programmatic animation with geometric/mathematical content.

assafkip/claude-video-editor

Capture a website and create a HyperFrames video from it. Use when: (1) a user provides a URL and wants a video, (2) someone says "capture this site", "turn this into a video", "make a promo from my site", (3) the user wants a social ad, product tour, or any video based on an existing website, (4) the user shares a link and asks for any kind of video content. Even if the user just pastes a URL — this is the skill to use.

Skills relacionados