Communitygithub.com

HyperFrames 动画技能

汇总 HyperFrames 平台所有动画知识:原子运动规则、多阶段场景蓝图、场景过渡、更广泛的动效设计技巧,以及七个运行时适配器(默认 GSAP,另含 Lottie、Three.js、Anime.js、CSS 关键帧、Web Animations API、TypeGPU)。适用于任何动效或动画任务:挑选 2-4 条规则进行组合,加载蓝图,或查阅特定运行时的 API(例如 GSAP 缓动 / Lottie 播放器 / Three.js 混合器)。还涵盖对现有合成作品编排(动画映射)的审核以及 24 种命名字体动画效果。HyperFrames 原生特性:单一暂停时间线、安全查找、确定性。

HyperFrames 动画技能 是什么?

该技能将 HyperFrames 平台的全部动画知识整合为一项技能,涵盖原子规则(原子配方)、蓝图(多阶段场景模板)、过渡(场景间切换)、技巧(更广泛的动效设计模式)和适配器(各运行时 API)。其默认工作流程是“轻量组合”:从 `rules-index.md` 中挑选 2-4 条规则,通过单一暂停的 GSAP 时间线进行组合,这比从蓝图开始编写更快速、代码更少。当需要复用一个预先设计好的多阶段模板(如品牌展示、社交证明)或需要一个复杂 4-5 阶段编排的可运行标准代码时,则应加载蓝图。该技能通过清晰的表格路由指导用户根据需求查找对应的文档。它支持七个运行时适配器(GSAP 为默认,用于 95% 的动效工作),并强调了关键约束,例如使用预先计算的布局常量、仅使用 GSAP 变换别名进行空间运动,以及必须遵守 `hyperframes-core` 中“单一暂停时间线、确定性”的非协商规则。该技能还包含一个用于审核现有作品编排 (动画映射)` 的脚本,帮助分析死区、交错一致性等。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/dbillion/hermes-skills-public/tree/HEAD/skills-external/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 可以一次性定位所有实例。

关键约束

前置条件:hyperframes-core → 不可协商规则(单一暂停时间线,data-duration 控制时长,不使用 Math.random / Date.now / performance.now,不使用 repeat: -1,不在页面加载时对后期场景片段执行 gsap.set,不使用 display 或原始 visibility 补间,不在 async / setTimeout / Promise 内部构建时间线)。核心允许多使用 GSAP autoAlpha 和零持续时间的可见性设置,但必须放在明确的时间线边界上。这些例外只能用于非片段元素或片段内部的包装器;框架拥有 .clip 的生命周期管理。此处不再重复完整的契约内容。

在核心契约基础上补充的动画制作规范:

  • 预先计算的布局常量 —— 永远不要在补间时从 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。用于在创作后审核编排(死区、交错一致性、生命周期警告)。

animation-map.mjs 首先从当前项目解析辅助包,然后可以引导捆绑的 HyperFrames 包版本。仅当在捆绑的 CLI/技能安装之外运行此技能,并且需要明确固定该引导版本时,才设置 HYPERFRAMES_SKILL_PKG_VERSION=<版本>。

另请参阅

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

Individual skills in this repo

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

dbillion/hermes-skills-public

Edit an existing image based on a text prompt.

dbillion/hermes-skills-public

Add `flutter_localizations` and `intl` dependencies, enable "generate true" in `pubspec.yaml`, and create an `l10n.yaml` configuration file. Use when initializing localization support for a new Flutter project.

dbillion/hermes-skills-public

Expert in video composition, editing, and format conversion. Use when the user wants to generate high-quality video, overlay images on video, concatenate clips, create GIFs, or sync audio to video using mcp-avtool-go and mcp-veo-go.

dbillion/hermes-skills-public

Use the HyperFrames CLI development loop: init, add, catalog, capture, lint, check, snapshot, compare, grade-compare, preview, play, present, beats, keyframes, single or batch render, publish, cloud, cloudrun, feedback, lambda, doctor, browser, info, upgrade, skills, compositions, docs, benchmark, telemetry, transcribe, auth, tts, and remove-background. Also use when diagnosing build or render failures. validate, inspect, and layout are deprecated aliases; use check. Covers local, HeyGen-hosted cloud, AWS Lambda, and Google Cloud Run rendering.

dbillion/hermes-skills-public

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. Also covers Tailwind projects and the STORYBOARD.md / SCRIPT.md plan formats. Read before writing composition HTML.

dbillion/hermes-skills-public

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`.

相关技能