Communitygithub.com

BintzGavin/helios-skills

Modèles pour utiliser Helios avec Framer Motion. À utiliser lorsque vous souhaitez tirer parti de la physique et des transitions de Framer Motion tout en nécessitant une synchronisation parfaite avec Helios.

Qu'est-ce que helios-skills ?

Cette compétence fournit des modèles et des bonnes pratiques pour intégrer les animations basées sur le temps de Framer Motion avec le système basé sur les images (frames) et scrutable de Helios. Elle permet aux développeurs de créer des animations fluides et réactives tout en conservant une synchronisation parfaite entre les deux bibliothèques. La compétence est utile pour ceux qui souhaitent utiliser la physique et les transitions de Framer Motion dans un environnement où chaque image compte, comme dans des applications de montage vidéo, de présentation ou de design interactif. Elle prend en charge les plateformes React et JavaScript, et fonctionne en mappant l'état d'image d'Helios à des MotionValues de Framer Motion via les hooks `useVideoFrame` et `useTransform`. Les modèles incluent une approche réactive standard via React state et une approche plus performante pour les arbres de composants profonds, où les MotionValues sont mises à jour directement dans l'abonnement à Helios, évitant ainsi les re-rendus inutiles. Cette compétence est essentielle pour tout développeur travaillant avec Helios et cherchant à enrichir ses animations avec la puissance de Framer Motion.

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

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

Intégration de Framer Motion

Les animations de Framer Motion sont généralement basées sur le temps. Pour les synchroniser avec Helios (qui est basé sur les images et scrutable), vous devez mapper l'état d'image d'Helios à des MotionValues.

Démarrage rapide

1. Hook useVideoFrame

Assurez-vous de disposer du hook useVideoFrame (voir examples/react/SKILL.md).

2. Mapper les images aux MotionValues

Utilisez useTransform pour mapper l'image courante (depuis useVideoFrame) aux valeurs d'animation.

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

export const MyComponent = ({ helios }) => {
  // 1. Obtenir l'image courante
  const frame = useVideoFrame(helios);

  // 2. Créer une MotionValue pour l'image
  const frameMv = useMotionValue(0);

  // Synchroniser la MotionValue à chaque changement d'image
  useEffect(() => {
    frameMv.set(frame);
  }, [frame, frameMv]);

  // 3. Transformer Image -> Valeur d'animation
  // Exemple : Rotation de 360 degrés sur 60 images (0 à 60)
  const rotate = useTransform(frameMv, [0, 60], [0, 360]);

  // Exemple : Fondu d'opacité sur les 30 premières images
  const opacity = useTransform(frameMv, [0, 30], [0, 1]);

  return (
    <motion.div
      style={{
        width: 100,
        height: 100,
        background: 'blue',
        rotate,   // Lier la valeur transformée
        opacity
      }}
    />
  );
};

Avancé : Définition manuelle de la MotionValue

Pour de meilleures performances dans des arbres de composants profonds, mettez à jour une MotionValue partagée directement dans l'abonnement, en contournant l'état React.

const frameMv = useMotionValue(0);

useEffect(() => {
  const unsubscribe = helios.subscribe((state) => {
    // Mettre à jour la MotionValue directement - pas de re-rendu React !
    frameMv.set(state.currentFrame);
  });
  return unsubscribe;
}, [helios, frameMv]);

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

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

Fichiers source

  • Exemple : 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 associés