Communitygithub.com

BintzGavin/helios-skills

Patrones para usar Helios con Framer Motion. Útil cuando quieras usar las físicas y transiciones de Framer Motion pero necesitas sincronización fotograma perfecta con Helios.

¿Qué es helios-skills?

Este skill proporciona patrones de integración para sincronizar Helios (un sistema de animación basado en fotogramas y desplazable) con Framer Motion (basado en tiempo). Permite a los desarrolladores aprovechar las físicas y transiciones de Framer Motion manteniendo un control fotograma a fotograma con Helios, lo que es esencial para aplicaciones donde cada fotograma cuenta, como reproductores de video interactivos o animaciones controladas por el usuario. El skill se centra en dos técnicas principales: el uso del hook `useVideoFrame` para obtener el fotograma actual y mapearlo a MotionValues mediante `useTransform`, y la actualización manual de MotionValues en la suscripción de Helios para evitar re-renderizados innecesarios en árboles de componentes profundos. Está diseñado para plataformas React y Framer Motion, ofreciendo un enfoque directo y eficiente para lograr animaciones perfectamente sincronizadas. Los ejemplos de código muestran cómo rotar objetos, cambiar opacidades y trasladar elementos basándose en el fotograma actual de Helios.

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

Preguntar en tu IA favorita

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

Documentación

Integración con Framer Motion

Las animaciones de Framer Motion normalmente se basan en el tiempo. Para sincronizarlas con Helios (que se basa en fotogramas y se puede desplazar), debes mapear el estado de fotograma de Helios a MotionValues.

Inicio Rápido

1. Hook useVideoFrame

Asegúrate de tener el hook useVideoFrame (consulta examples/react/SKILL.md).

2. Mapear Fotogramas a MotionValues

Usa useTransform para mapear el fotograma actual (de useVideoFrame) a valores de animación.

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

export const MyComponent = ({ helios }) => {
  // 1. Obtener el fotograma actual
  const frame = useVideoFrame(helios);

  // 2. Crear un MotionValue para el fotograma
  const frameMv = useMotionValue(0);

  // Sincronizar MotionValue cuando el fotograma cambie
  useEffect(() => {
    frameMv.set(frame);
  }, [frame, frameMv]);

  // 3. Transformar Fotograma -> Valor de Animación
  // Ejemplo: Rotar 360 grados en 60 fotogramas (0 a 60)
  const rotate = useTransform(frameMv, [0, 60], [0, 360]);

  // Ejemplo: Aparecer gradualmente en los primeros 30 fotogramas
  const opacity = useTransform(frameMv, [0, 30], [0, 1]);

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

Avanzado: Configuración Manual de MotionValue

Para un mejor rendimiento en árboles profundos, actualiza un MotionValue compartido directamente en la suscripción, evitando el estado de React.

const frameMv = useMotionValue(0);

useEffect(() => {
  const unsubscribe = helios.subscribe((state) => {
    // Actualizar MotionValue directamente - ¡sin re-renderizado de React!
    frameMv.set(state.currentFrame);
  });
  return unsubscribe;
}, [helios, frameMv]);

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

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

Archivos Fuente

  • Ejemplo: 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.

Skills relacionados