Communitygithub.com

BintzGavin/helios-skills

Padrões para usar Helios com Framer Motion. Use quando quiser usar a física e transições do Framer Motion, mas precisar de sincronização perfeita com Helios.

O que é helios-skills?

Esta skill fornece padrões para sincronizar animações do Framer Motion com a engine de animação baseada em frames e “scrubbable” Helios. Como o Framer Motion normalmente depende do tempo, a integração exige mapear estados de frame (obtidos via hook `useVideoFrame` do Helios) para `MotionValues`, permitindo que as animações respondam à reprodução frame a frame. A documentação cobre tanto o uso básico com `useTransform` para derivar valores de animação (como rotação e opacidade) quanto uma abordagem avançada que atualiza `MotionValues` diretamente em uma assinatura para melhor desempenho em árvores de componentes profundas. É útil para desenvolvedores que trabalham com React e buscam combinar a expressividade do Framer Motion com o controle preciso que o Helios oferece.

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

Perguntar na sua IA favorita

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

Documentação

Integração com Framer Motion

As animações do Framer Motion são normalmente baseadas no tempo. Para sincronizá-las com o Helios (que é baseado em frames e pode ser arrastado), você deve mapear o estado do frame Helios para MotionValues.

Início Rápido

1. Hook useVideoFrame

Certifique-se de ter o hook useVideoFrame (veja examples/react/SKILL.md).

2. Mapear Frames para MotionValues

Use useTransform para mapear o frame atual (de useVideoFrame) para valores de animação.

import { useMotionValue, useTransform, motion } from 'framer-motion';
import { useVideoFrame } from './hooks/useVideoFrame';

export const MyComponent = ({ helios }) => {
  // 1. Obter o frame atual
  const frame = useVideoFrame(helios);

  // 2. Criar um MotionValue para o frame
  const frameMv = useMotionValue(0);

  // Sincronizar MotionValue sempre que o frame mudar
  useEffect(() => {
    frameMv.set(frame);
  }, [frame, frameMv]);

  // 3. Transformar Frame -> Valor de Animação
  // Exemplo: Rotacionar 360 graus em 60 frames (0 a 60)
  const rotate = useTransform(frameMv, [0, 60], [0, 360]);

  // Exemplo: Fade de opacidade nos primeiros 30 frames
  const opacity = useTransform(frameMv, [0, 30], [0, 1]);

  return (
    <motion.div
      style={{
        width: 100,
        height: 100,
        background: 'blue',
        rotate,   // Vincula o valor transformado
        opacity
      }}
    />
  );
};

Avançado: Definição Manual de MotionValue

Para melhor desempenho em árvores profundas, atualize um MotionValue compartilhado diretamente na assinatura, ignorando o estado do React.

const frameMv = useMotionValue(0);

useEffect(() => {
  const unsubscribe = helios.subscribe((state) => {
    // Atualizar MotionValue diretamente - sem re-renderização do React!
    frameMv.set(state.currentFrame);
  });
  return unsubscribe;
}, [helios, frameMv]);

const x = useTransform(frameMv, [0, 100], [0, 500]);

return <motion.div style={{ x }} />;

Arquivos de Origem

  • Exemplo: examples/framer-motion-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 GSAP (GreenSock). Use when integrating GSAP timelines with the Helios timeline for precise scrubbing and rendering.

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