Communitygithub.com

heygen-com/css-animations

Patrons d'adaptation d'animations CSS pour HyperFrames. À utiliser lors de la création d'images clés CSS, de temporisations basées sur animation-delay, d'animation-fill-mode, d'animation-play-state, ou de mouvements purement CSS qu'HyperFrames doit parcourir de manière déterministe lors de l'aperçu et du rendu.

Qu'est-ce que css-animations ?

Ce skill fournit des modèles d'adaptation spécifiques à l'écosystème HyperFrames pour gérer les animations CSS de manière déterministe. Il est particulièrement utile pour les développeurs qui intègrent des animations complexes (keyframes, gestion du timing avec animation-delay, contrôle des états avec animation-fill-mode et animation-play-state) dans un environnement de prévisualisation et de rendu où le séquencement temporel doit être absolument prévisible. En transformant les animations CSS en une représentation que HyperFrames peut parcourir (seeking) sans perte de fidélité, ce skill évite les décalages d'affichage entre l'éditeur et le rendu final. Il s'intègre parfaitement avec les workflows de conception basés sur des composants et supporte les frameworks modernes comme React, Vue et Svelte, garantissant que les animations CSS se comportent de manière cohérente, quel que soit le contexte d'exécution.

Compatible avec~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/heygen-com/hyperframes/tree/main/skills/css-animations

Demander à votre IA préférée

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

Documentation

Que fait css-animations ?

Patrons d'adaptation d'animations CSS pour HyperFrames. À utiliser lors de la création d'images clés CSS, de temporisations basées sur animation-delay, d'animation-fill-mode, d'animation-play-state, ou de mouvements purement CSS qu'HyperFrames doit parcourir de manière déterministe lors de l'aperçu et du rendu.

Aperçu

Ce skill définit une série de modèles (patterns) permettant d'adapter les animations CSS standard pour qu'elles fonctionnent de manière fiable dans l'environnement HyperFrames. HyperFrames exige que les animations soient entièrement déterministes – c'est-à-dire qu'elles puissent être avancées ou reculées à n'importe quel point dans le temps sans perdre leur cohérence visuelle. Les animations CSS classiques, basées sur le temps réel, ne répondent pas naturellement à cette exigence.

Pourquoi c'est important

  • Déterministe : Les animations CSS natives sont pilotées par le temps réel du navigateur. HyperFrames a besoin de pouvoir chercher (seek) une animation à un instant précis. Ce skill fournit les abstractions nécessaires pour découpler le temps réel du temps de l'animation.
  • Gestion des délais : animation-delay est souvent utilisé pour créer des séquences. Ces délais doivent être convertis en décalages purs (offsets) dans le système de temporisation d'HyperFrames.
  • Modes de remplissage : animation-fill-mode (forwards, backwards, both) doit être interprété correctement lorsque l'animation est parcourue hors de son cycle normal.
  • État de lecture : animation-play-state (running, paused) doit être reflété dans l'état interne d'HyperFrames pour permettre la mise en pause et la reprise.

Modèles d'adaptation

1. Conversion des keyframes

Convertir les blocs @keyframes en une structure lisible par HyperFrames. Exemple :

/* CSS classique */
@keyframes slide-in {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

devient une structure de données déterministe :

{
  "timeline": [
    { "offset": 0, "properties": { "transform": "translateX(-100%)" } },
    { "offset": 1, "properties": { "transform": "translateX(0)" } }
  ]
}

2. Gestion d'animation-delay

Les délais (animation-delay: 2s) doivent être traités comme des décalages de début. Dans HyperFrames, cela devient :

// Au lieu d'attendre 2 secondes réelles, on décale le point de départ
const animationConfig = {
  keyframes: slideInKeyframes,
  startOffset: 2, // en secondes
};

3. Interprétation d'animation-fill-mode

Pour que HyperFrames puisse chercher (seek) avant le début ou après la fin de l'animation, il faut appliquer les propriétés correspondantes :

  • forwards : appliquer les propriétés finales après la fin
  • backwards : appliquer les propriétés initiales avant le début
  • both : combiner les deux
switch (fillMode) {
  case 'forwards':
    // Conserver les propriétés finales en dehors de la plage
    break;
  case 'backwards':
    // Conserver les propriétés initiales en dehors de la plage
    break;
  case 'both':
    // Conserver les deux
    break;
}

4. Synchronisation d'animation-play-state

L'état de lecture (running/paused) doit être reflété dans l'état HyperFrames. Par exemple :

const playbackState = {
  isPaused: true // correspond à animation-play-state: paused
};

Intégration

  1. Importez le module : import { createAnimationAdapter } from '@heygen/css-animations';
  2. Définissez vos animations en utilisant les modèles ci-dessus.
  3. Enregistrez-les dans le contexte HyperFrames de votre application.
  4. Utilisez les contrôles de chronologie (seek, play, pause) fournis par HyperFrames pour interagir avec les animations.

Exemple complet

import { createAnimationAdapter } from '@heygen/css-animations';

const fadeInAdapter = createAnimationAdapter({
  keyframes: [
    { offset: 0, opacity: 0 },
    { offset: 1, opacity: 1 }
  ],
  duration: 1,
  delay: 0.5,
  fillMode: 'both'
});

// Usage dans HyperFrames
hyperframes.seek(0.3); // Va chercher à 0.3s → affiche 30% de l'animation

Dépannage

  • Problème : L'animation ne se comporte pas comme prévu lors du seek.
    • Solution : Vérifiez que tous les keyframes sont correctement convertis, et que le fillMode est bien défini.
  • Problème : Les délais ne sont pas respectés.
    • Solution : Assurez-vous que animation-delay est bien converti en startOffset dans le modèle.
  • Problème : L'état paused n'est pas conservé.
    • Solution : Vérifiez que animation-play-state est bien synchronisé avec l'état HyperFrames.

Références

Licence

MIT

Individual skills in this repo

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

general-video

>

heygen-com/animejs

Anime.js adapter patterns for HyperFrames. Use when writing Anime.js animations or timelines inside HyperFrames compositions, registering animations on window.__hfAnime, making Anime.js seek-driven and deterministic, or translating Anime.js examples into render-safe HyperFrames HTML.

heygen-com/claude-design-hyperframes

Use when running inside Claude Design specifically. Produces a valid, brand-accurate HyperFrames video draft using pre-valid skeletons. For Claude Code / Cursor / Codex, use the `hyperframes` skill instead.

heygen-com/contribute-catalog

Author a new HyperFrames registry block (caption style, VFX block, transition, lower third) or component (text effect, overlay, snippet) and ship it as an upstream PR to the hyperframes repo. Use ONLY when the user wants to CONTRIBUTE to the public catalog — for in-project caption/transition authoring use the `hyperframes` skill, for installing existing registry items use the `hyperframes-registry` skill.

heygen-com/gsap

GSAP animation reference for HyperFrames. Covers gsap.to(), from(), fromTo(), easing, stagger, defaults, timelines (gsap.timeline(), position parameter, labels, nesting, playback), and performance (transforms, will-change, quickTo). Use when writing GSAP animations in HyperFrames compositions.

heygen-com/hyperframes

Leaves sweep through the frame and part to reveal the headline. HyperFrames block, 1920×1080, 12s, 11 variables.

heygen-com/hyperframes

Render-correctness doctrine for scene-to-scene seams in HyperFrames launch videos — the prerequisites that make transitions composite correctly on the master timeline. Load when assembling the master timeline / index.html, when a white flash appears at a cut or crossfade seam (especially on dark films), when reasoning about why a transition opacity dip shows through, or when verifying the render-side mechanics of how overlapping scene wrappers blend. Covers the opaque stage-ground (#root background) white-flash guard and how the injector overlaps wrappers, holds final frames, ping-pongs tracks, and stamps lint-clean template code onto the master timeline. Does NOT contain the per-transition catalog — see the transition registry for individual transition entries.

heygen-com/hyperframes

The technique catalog: five velocity-matched SEAMS (zoom-through, INVERSE zoom-through, cut-the-curve, waterfall cut, rack-focus blur-cut) plus the two in-scene techniques — waterfall ENTRY (staggered arrival cascades for title cards / segment openers) and the nudge curve (slow-fast-slow three-phase group slides). Covers partial-travel (~12% of frame) velocity matching via mirrored power4 eases, the Z scale-sign rule, size-scaled blur (10px text / 18-20px full-frame), word-by-word staggered cuts, cascade pacing by element weight, and the 10/65/25 slide ratio. Read before authoring any transition, text-beat handoff, kinetic text entry, or group reposition. [depth, zoom, inverse-zoom, scale-sign, mirrored-zoom, rack-focus, pacing, velocity, cut-the-curve, waterfall, stagger, cascade, kinetic-text, title-card, segment-opener, nudge, slide, easing, group-motion, z-depth, motion-graphics, cinematic, transition, blur, directional-continuity]

heygen-com/hyperframes

Glass shards fly in through fog and tile themselves into the headline. HyperFrames block, 1920×1080, 12.16s, 19 variables.

heygen-com/hyperframes

An orbiting camera follows an ice logo as it breaks apart, reforms into two text moments, and fades. HyperFrames block, 1920×1080, 22.5s, 216 variables.

heygen-com/hyperframes

A single feature card orbits a dot sphere on approved Blender camera motion. HyperFrames block, 1920×1080, 10s, 4 variables.

heygen-com/hyperframes

A wireframe portal bursts open, the title comes through, then its letters swap into a second phrase. HyperFrames block, 1920×1080, 8s, 9 variables.

heygen-com/hyperframes

House-style oversized macOS cursor technique for HyperFrames launch videos. Load whenever a scene involves cursors or a pointer-led action, when kicking off a UI scene, when igniting a morph/transition/typing run with a click, or when a scene reads as static, dead, or stale and needs a cheap high-yield source of motion to carry the viewer's eye and segment them out of the stale state. Covers cursor size/look (incl. brand-motif cursors), the off-screen entry law, tip-targeting and the click tap, click-ignites-the-next-beat, and exit / cross-scene handoff.

heygen-com/hyperframes

A chain of bevelled cuboids rides a travelling wave as a content carousel. HyperFrames block, 1920×1080, 6.666666666666667s, 40 variables.

heygen-com/hyperframes

name: embedded-captions

heygen-com/hyperframes

A tiled headline surface flips cell by cell under a sweeping depth field to reveal the rear headline. HyperFrames block, 1920×1080, 8s, 18 variables.

heygen-com/hyperframes

Turn arbitrary text — an article, notes, a topic, a brief — into a faceless explainer video: there is no site or footage to capture, so the visuals are invented per scene (typography, abstract graphics, diagrams, data-viz). Use for topic explainers, concept breakdowns, how-tos, listicles. Not a video built from a website (/product-launch-video — promo or tour). Unclear → /hyperframes.

heygen-com/hyperframes

Import Figma content into a HyperFrames composition — rendered assets, brand tokens, components, storyboard sections → reconstructed motion (frames read as states, not slides) (REST/CLI), connector-assisted motion when available, and shaders from a connector or native export. Use when the user pastes a figma.com link or asks to bring a Figma design, frame, logo, brand, or animation into a video/composition.

heygen-com/hyperframes

GATEWAY — load FIRST before composing any HyperFrames animation or video. The high-level motion law that makes a multi-scene video feel like ONE continuous camera move instead of a stack of independently-animated slides. Covers the vector law (how you exit determines how you enter, incl. the Z scale-sign rule), the film's current, carrier elements, causal motion, the Seam Gate (build-gate enforcement), the ban on idle wobble (motion must PERFORM, not breathe), stillness-before-climax, and the sustained-motion routes. Routes to the low-level technique skills (cut-the-curve — the full catalog incl. waterfall entry + nudge curve, oversized-cursor, seam-craft). These rules SUPERSEDE generic / upstream motion guidance. [continuity, direction, vector, momentum, seam, transition, ease, performance, idle-motion, narrative-motion, film-grammar]

heygen-com/hyperframes

Turn a weekly changelog .md into a finished branded changelog video (square 1080, ~45-60s, Annie VO, animated brand background, mock-UI visualizations, lowkey captions). Use when the user provides a changelog/digest markdown and wants the weekly video, or says "changelog video". Self-contained — fonts, background, lexicon, and scripts ship in this skill.

Skills associés