Communitygithub.com

HyperFrames 动画

所有 HyperFrames 动画知识:原子运动规则、多阶段场景蓝图、场景过渡、更广泛的动效设计技术,以及七种运行时适配器。适用于任何运动或动画任务。

HyperFrames 动画 是什么?

该技能汇聚了 HyperFrames 动画框架的全部知识,覆盖从原子化运动规则(rules)到多阶段场景蓝图(blueprints)、场景过渡(transitions)、广泛动效设计模式(techniques),以及七个运行时适配器(adapters)。默认推荐组合 2–4 条原子规则,利用单个暂停的 GSAP 时间线快速生成确定性强、代码量少的动画。当场景符合现有预制模板(如品牌揭晓、社交证明等)时,可加载蓝图以节省编排时间。支持同时使用多个运行时(如 GSAP、Lottie、Three.js、Anime.js、CSS 关键帧、Web Animations API、TypeGPU),并在一个组合中协同工作,所有实例注册在运行时特定全局对象上,以实现 HyperFrames 统一 seek 控制。该技能严格遵循 `hyperframes-core` 的非协商规则(单个暂停时间线、`data-duration` 控制时长、禁止随机数与异步构建时间线等),并额外强调预计算布局常量、仅使用 GSAP 变换别名(`x`、`y`、`scale`、`rotation`)进行空间运动。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/9018/mychat/tree/HEAD/OpenMontage/.agents/skills/hyperframes-animation

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

HyperFrames 动画 是做什么的?

所有运动知识汇聚于此技能:规则(原子化配方)、蓝图(多阶段场景模板)、过渡(场景间切换)、技术(更广泛的动效设计模式)以及适配器(各运行时的 API)。

关于组合契约(数据属性、子组合、确定性)请参阅 hyperframes-core。

默认方式:组合原子规则

从 rules-index.md 中挑选 2–4 条规则,通过单个暂停的 GSAP 时间线将它们粘合在一起,完成。这比从蓝图开始更快,生成的代码也更少。

何时加载蓝图

  • 场景匹配现有的预设计多阶段模板(品牌揭晓、社会证明等),且复用其阶段流水线能节省实际的编写时间
  • 你希望为复杂的 4–5 阶段编排获得可运行的真实代码

蓝图位于 blueprints-index.md 中。每个条目指向 blueprints/<id>.md(配方)。不要投机性地读取它;仅在已决定需要场景级编排时加载。

路由

想要…读取
按触发器/标签挑选一个原子运动模式rules-index.md
阅读某个规则的完整 HTML/CSS/GSAP 配方rules/<name>.md
挑选一个多阶段场景模板blueprints-index.md
阅读某个蓝图的完整配方blueprints/<id>.md
编写场景过渡(CSS 驱动,在两个剪辑之间)transitions/overview.md、transitions/catalog.md
查找更广泛的动效设计技术techniques.md
分析现有组合的动画映射scripts/animation-map.mjs
GSAP API — 时间线 / 补间 / 位置参数adapters/gsap.md
GSAP — 即用型效果配方rules/gsap-effects.md
GSAP — 变换 / 性能adapters/gsap-transforms-and-perf.md
GSAP — 缓动 / 交错adapters/gsap-easing-and-stagger.md
GSAP — 时间线 / 标签adapters/gsap-timeline-and-labels.md
Lottie / dotLottie(After Effects 导出,window.__hfLottie)adapters/lottie.md
Three.js / WebGL(3D 场景,AnimationMixer,hf-seek)adapters/three.md
Anime.js(window.__hfAnime)adapters/animejs.md
CSS 关键帧(animation-delay / play-state / fill-mode)adapters/css-animations.md
Web Animations API(element.animate(),currentTime 定位)adapters/waapi.md
TypeGPU / WebGPU(navigator.gpu,WGSL,计算管道)adapters/typegpu.md
HTML 作为纹理 + WebGL/GLSL 后期特效(通过 drawElementImage 捕获实时 DOM)adapters/html-in-canvas-patterns.md
命名文本动画效果(通过外部 animate-text 技能提供的 24 个 ID)adapters/animate-text.md

选择运行时

  • GSAP 是 95% 动效工作的默认选择 — 涵盖时间线编排、变换、缓动、交错。本技能中的所有原子规则均基于 GSAP。
  • Lottie 用于带有预制时间线的资源(通常是 After Effects 导出)。
  • Three.js 用于 3D 场景、相机运动、着色器驱动的视觉效果。
  • Anime.js 用于轻量级补间,当 GSAP 大材小用时。
  • CSS 用于简单的重复图案、装饰、闪烁 — 无需 JavaScript 动画开销。
  • WAAPI 用于无需 GSAP 依赖的原生浏览器关键帧。
  • TypeGPU / WebGPU 用于 GPU 渲染画布(粒子、液态玻璃、自定义着色器)。

多个运行时可以在同一个组合中共存。每个运行时将其实例注册在运行时特定的全局对象上,以便 HyperFrames 在一次遍历中都能 seek 到它们。

关键约束

前置条件:hyperframes-core → 不可协商的规则(单个暂停时间线,data-duration 控制时长,无 Math.random / Date.now / performance.now,无 repeat: -1,无 gsap.set 作用于后续场景剪辑,无 display / visibility 动画,不在 async / setTimeout / Promise 内部构建时间线)。此处不再重复。

在核心契约基础上新增的动画制作约束:

  • 预计算的布局常量 — 绝不在补间时从 getBoundingClientRect() 推导位置。补间时的 DOM 测量会导致不同步,因为渲染器会并行采样;在组合设置时一次性计算坐标并复用。
  • 空间运动仅使用 GSAP 变换别名(x、y、scale、rotation)。核心的白名单也允许使用 opacity / color / backgroundColor / borderRadius 进行非空间属性的补间 — 但绝不允许使用 width / height / top / left 进行布局更改。

脚本

node skills/hyperframes-animation/scripts/animation-map.mjs <composition-dir> \
  --out <composition-dir>/.hyperframes/anim-map

读取注册在 window.__timelines 上的每个 GSAP 时间线,枚举补间,采样包围盒,计算标志,输出 animation-map.json。在编写后使用它来审计编排(死区、交错一致性、生命周期警告)。

另请参阅

  • hyperframes-core — 组合结构、数据属性、子组合、确定性渲染契约
  • hyperframes-creative — 调色板、排版、叙述、节拍规划(非动画创意指导)
  • hyperframes-cli — npx hyperframes lint / validate / inspect / preview / render

Individual skills in this repo

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

9018/mychat

Generate AI videos from text prompts using multiple provider gateways. Use when: (1) Generating videos from text descriptions, (2) Creating AI-generated video clips for content production, (3) Image-to-video generation with a reference image, (4) Choosing between video generation providers (VEO, Kling, Sora, Runway, Seedance, MiniMax, Gemini Omni). Supports gateways: HeyGen API, fal.ai API, Kling official direct API, and the Gemini API (Gemini Omni Flash).

9018/mychat

Create AI avatar videos with precise control over avatars, voices, scripts, scenes, and backgrounds using HeyGen's v2 API. Use when: (1) Choosing a specific avatar and voice for a video, (2) Writing exact scripts for an avatar to speak, (3) Building multi-scene videos with different backgrounds per scene, (4) Creating transparent WebM videos for compositing, (5) Using talking photos as video presenters, (6) Integrating HeyGen avatars with Remotion, (7) Batch video generation with exact specs, (8) Brand-consistent production videos with precise control.

9018/mychat

Use p5.js/canvas for local procedural character effects: particles, weather, squash/stretch, walk cycles, and environmental motion.

9018/mychat

Review local character animation with schema checks, Playwright browser previews, frame sampling, and FFmpeg/ffprobe final output checks.

9018/mychat

Create videos from a text prompt using HeyGen's Video Agent. Use when: (1) Creating a video from a description or idea, (2) Generating explainer, demo, or marketing videos from a prompt, (3) Making a video without specifying exact avatars, voices, or scenes, (4) Quick video prototyping or drafts, (5) One-shot prompt-to-video generation, (6) User says "make me a video" or "create a video about X".

9018/mychat

Generate Mandarin and multilingual narration with Volcengine Doubao Speech 2.0. Use when creating Chinese voiceovers, when the user prefers Doubao/Volcengine/火山引擎/豆包 TTS, or when narration needs character-level timestamp metadata for subtitles.

9018/mychat

Video and audio processing with FFmpeg. Use for format conversion, resizing, compression, audio extraction, and preparing assets for Remotion. Triggers include converting GIF to MP4, resizing video, extracting audio, compressing files, or any media transformation task.

9018/mychat

Use when implementing Disney's 12 animation principles with Framer Motion in React applications

9018/mychat

HyperFrames CLI dev loop. Use when running npx hyperframes init, add, catalog, capture, lint, validate, inspect, layout, snapshot, preview, play, render, publish, lambda, doctor, browser, info, upgrade, skills, compositions, docs, benchmark, telemetry, transcribe, tts, or remove-background, or when troubleshooting the HyperFrames build/render environment. Entry point for AWS Lambda cloud rendering (`hyperframes lambda deploy / render / progress / destroy / policies`).

9018/mychat

The HyperFrames composition contract — build one renderable project. Use for composition structure, the `data-*` timing attributes, `class="clip"`, tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

9018/mychat

Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use `hyperframes-animation`.

9018/mychat

Audio and media assets for HyperFrames compositions, produced by one shared audio engine (`scripts/audio.mjs`) — multi-provider TTS (HeyGen / ElevenLabs / Kokoro local), background music + sound effects (HeyGen audio-library retrieval by default, with local Lyria / MusicGen BGM generation and a bundled SFX library as the no-credential fallback), Whisper transcription, background removal, and caption authoring. Use for voiceover / TTS, BGM, SFX / sound effects, transcription, captions / subtitles / lyrics / karaoke / per-word styling, voice + provider selection, and music-mood prompting.

9018/mychat

Install and wire registry blocks and components into HyperFrames compositions. Use when running hyperframes add, installing a block or component, wiring an installed item into index.html, or working with hyperframes.json. Covers the add command, install locations, block sub-composition wiring, component snippet merging, registry discovery, and authoring a new block or component to contribute upstream (idea → scaffold → validate → PR).

9018/mychat

Use when the user wants a short, design-led motion graphic where motion is the message: kinetic typography, stat or number count-up, chart/data-viz hit, logo sting, brand lockup, lower-third, callout, social overlay, animated headline/tweet/news item, motion poster, or quick captured-page highlight. Usually under 10s and up to ~30s, with no narration arc, voice-over, or live-action subject. Can render to MP4 or transparent overlay. Not for longer, multi-scene, narrated, or brand-reel pieces (use general-video), narrated website videos (website-to-video), topic explainers (faceless-explainer), product promos (product-launch-video), PR videos (pr-to-video), or captions on existing footage (embedded-captions). When unsure whether it's a quick motion-first piece or a longer / narrated treatment, see /hyperframes.

9018/mychat

Use when the user has a music track (an audio file, or a video to pull audio from) and wants a beat-synced HyperFrames video, calm to hard-hitting. The music drives everything: one analyzer reads it once, the orchestrator lays out the frames and fills a per-frame plan, and one sub-agent builds each frame. Typography and templates are the floor — a complete video needs zero assets — but any images or videos the user supplies are cut into the frames on the same beat grid (beat-cut / ken-burns). The genre (lyric video, slideshow, kinetic promo) falls out of the per-frame choices; the pipeline never branches on it.

9018/mychat

Toolkit-specific Remotion patterns — custom transitions, shared components, and project conventions. For core Remotion framework knowledge (hooks, animations, rendering, etc.), see the `remotion-official` skill.

9018/mychat

Port an existing Remotion (React) composition to HyperFrames HTML. Use ONLY when the user explicitly asks to port/convert/migrate/translate a Remotion source. Do NOT use: (a) authoring a new HyperFrames composition; (b) Remotion mentioned in passing; (c) Remotion code shared as reference only; (d) "same video as my Remotion one" without explicit migrate request — treat as fresh build. Doubt → `/general-video`. One-way, Remotion-only: no reverse export (HyperFrames→Remotion or any framework), no non-Remotion source (After Effects, Framer Motion, plain React/CSS) → out of scope, re-create via `/general-video`. Flags unsupported patterns (useState, useEffect, async calculateMetadata, third-party React libs, `@remotion/lambda`) and recommends runtime interop over lossy translation. Unsure whether to port vs. build fresh, or only a passing Remotion mention? → /hyperframes.

9018/mychat

Animate SVG character rigs with GSAP, CSS transforms, Remotion frame control, and HyperFrames-compatible browser previews.

9018/mychat

Three.js animation - keyframe animation, skeletal animation, morph targets, animation mixing. Use when animating objects, playing GLTF animations, creating procedural motion, or blending animations.

9018/mychat

Download video and audio from YouTube and 1000+ sites using yt-dlp. No API keys needed. Use when: (1) Downloading a video from YouTube or other sites, (2) Extracting audio from a video URL, (3) Downloading subtitles/captions from a video, (4) Getting video metadata without downloading.

相关技能