Communitygithub.com

Padrões de Integração GSAP com Helios

Padrões para usar Helios com GSAP (GreenSock). Use ao integrar timelines GSAP com a timeline Helios para controle preciso de scrub e renderização.

O que é Padrões de Integração GSAP com Helios?

Este skill fornece padrões essenciais para integrar animações GSAP com a timeline do Helios, permitindo controle preciso de frame a frame. A abordagem principal é criar uma timeline GSAP pausada (paused: true) e sincronizá-la com o estado do Helios usando o método subscribe(). Dentro do callback, o frame atual do Helios é convertido em segundos e passado para tl.seek() para buscar a posição exata. Isso garante que as animações GSAP possam ser scrubbed (arrastadas), pausadas e renderizadas frame a frame sem conflitos. O skill é compatível com qualquer plataforma que suporte Helios e GSAP, como navegadores web, e segue regras críticas como sempre pausar a timeline GSAP, usar seek em vez de progress e evitar loops requestAnimationFrame próprios, delegando o controle ao Helios.

Funciona com~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/BintzGavin/helios-skills/tree/HEAD/skills/examples/gsap

Perguntar na sua IA favorita

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

Documentação

Padrões de Integração GSAP

Para usar GSAP com Helios, você deve conduzir a instância da Timeline GSAP usando o estado de frame do Helios. Isso permite que animações GSAP sejam controladas (scrubbed), pausadas e renderizadas frame a frame.

Início Rápido

O Padrão "Timeline Pausada"

  1. Crie uma Timeline GSAP com paused: true.
  2. Inscreva-se nas atualizações do Helios.
  3. Dentro da inscrição, converta o frame do Helios em segundos.
  4. Chame timeline.seek(segundos) para sincronizar.
<script type="module">
  import { Helios } from '@helios-project/core';
  import { gsap } from 'gsap';

  // 1. Inicialize o Helios
  const helios = new Helios({
    fps: 30,
    durationInSeconds: 5,
  });

  // 2. Configure a Timeline GSAP (PAUSADA é crítico)
  const tl = gsap.timeline({ paused: true });

  // 3. Defina as animações
  tl.to(".box", {
    rotation: 360,
    x: 100,
    duration: 2,
    ease: "power1.inOut"
  })
  .to(".box", {
    scale: 2,
    duration: 2
  });

  // 4. Inscreva-se e sincronize
  helios.subscribe((state) => {
    // Converta a contagem de frames em segundos
    const timeInSeconds = state.currentFrame / helios.fps;

    // Busque o GSAP para o tempo exato
    tl.seek(timeInSeconds);
  });

  // 5. Vincule para Preview
  helios.bindToDocumentTimeline();
  window.helios = helios;
</script>

Regras Críticas

  1. Sempre Pausar: A timeline GSAP deve ser inicializada com { paused: true }. Se ela reproduzir automaticamente, entrará em conflito com o Helios pelo controle.
  2. Usar Seek: Não use tl.progress() a menos que calcule o valor normalizado de 0 a 1. tl.seek(segundos) geralmente é mais direto, pois o Helios conhece FPS e a contagem de frames.
  3. Sem requestAnimationFrame: Não crie seu próprio loop rAF para o GSAP. Deixe o Helios conduzir as atualizações através de subscribe.

Arquivos Fonte

  • Exemplo: examples/gsap-animation/

Individual skills in this repo

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

BintzGavin/helios-skills

Make a video, MP4, GIF, animation, music video, short film, explainer, chart animation, product demo, logo reveal or social clip from code. Write one HTML page that draws any frame from its time t, render it frame-exact to MP4 with Helios, check stills and contact sheets, and add a soundtrack. Use whenever the user asks for a video or an animation file.

BintzGavin/helios-skills

>- Story-first motion design philosophy for animated video: motion must earn its place; arc (establish, complicate, resolve); show vs tell; shots as units of thought; quiet vs loud motion; Disney principles with restraint; timing heuristics; composition; grammar by medium (product demos, logos, data viz, explainers); technical commitments (deterministic time, scrubbability, refs); cutting discipline; explicit anti-patterns. Use when planning, storyboarding, critiquing, or implementing programmatic or motion-driven video (Helios, Remotion, explainers, loops, UI capture, logo reveals), or when the user asks for motion direction, pacing, or visual-story structure.

BintzGavin/helios-skills

>- End-to-end production plan template for feeling-first cinematic product promos: brief interrogation, 45s beat structure (cold open through brand), hero-element metaphor, storyboard fidelity ladder, visual system (palette, type, camera, texture), motion mix and easing vocabulary, audio and captions, tooling (animatic through HTML or AE), deliverables matrix, accessibility, review milestones, and compromises to accept or refuse. Use when planning, pitching, storyboarding, or producing polished brand films for any SaaS or consumer product—not category-specific; pair with skills/design/animated-video-philosophy for broader motion principles.

BintzGavin/helios-skills

Patterns for using Helios with Framer Motion. Use when you want to use Framer Motion's physics and transitions but need frame-perfect synchronization with Helios.

BintzGavin/helios-skills

End-to-end guided workflow for creating an explainer or walkthrough video. Extracts brand identity from the repo, generates a measured soundtrack, and produces a narrative-driven motion.dev composition rendered via Helios CLI. Use when making how-it-works, feature walkthrough, or educational videos.

BintzGavin/helios-skills

Motion design framework for programmatic video. Defines anti-slideshow architecture, visual layering, physics-based easing, choreography rules, and quality validation. Reference this skill from any guided video skill.

BintzGavin/helios-skills

End-to-end guided workflow for creating a promotional hype video. Extracts brand identity from the repo, generates beat-synced music, and produces a high-energy motion.dev composition rendered via Helios CLI. Use when making brand-aligned promo or hype videos.

BintzGavin/helios-skills

End-to-end guided workflow for creating a social proof or testimonial video. Extracts brand identity from the repo, generates a warm soundtrack, and produces a trust-building motion.dev composition rendered via Helios CLI. Use when making customer testimonial, review highlight, or social proof videos.

BintzGavin/helios-skills

Workflow for rendering a Helios composition to a video file. Use when you need to automate video production or export a high-quality animation.

Habilidades Relacionadas