Communitygithub.com

HyperFrames 动画

所有关于 HyperFrames 的动画知识——原子运动规则、多阶段场景蓝图、场景过渡、广泛的运动设计技巧,以及七种运行时适配器(默认 GSAP,外加 Lottie、Three.js、Anime.js、CSS 关键帧、Web 动画 API、TypeGPU)。适用于任何运动或动画任务:挑选 2-4 条规则进行组合,或加载蓝图,或查阅特定运行时的 API(例如 GSAP 缓动 / Lottie 播放器 / Three.js 混合器)。HyperFrames 原生:单条暂停时间线、安全寻址、确定性。

HyperFrames 动画 是什么?

该技能将所有 HyperFrames 动画知识整合到一个包中,提供了原子规则(配方)、多阶段场景蓝图、场景过渡、通用运动设计模式以及七种不同运行时的适配器。默认运行时是 GSAP,用于 95% 的运动任务,包括时间线编排、变换、缓动和交错效果。当需要使用像 Lottie 这样的预烘焙动画资产时,可以切换到 Lottie(After Effects 导出);或者对于 3D 场景、相机运动和着色器驱动的视觉效果,切换到 Three.js。该技能旨在快速组合:开发者可以选择 2-4 条原子规则,将它们与单条暂停的 GSAP 时间线粘合在一起,从而比从头开始编写复杂场景更快。它还通过蓝图设计来支持多阶段场景,蓝图是支持品牌揭示、社交证明等常见模式的预设计模板。该技能支持通过适配器同时使用多种运行时,并且所有实例都在特定运行时的全局对象上注册,以便 HyperFrames 在一次遍历中寻址所有实例。关键约束包括使用预计算布局常量,避免在补间时间使用 getBoundingClientRect(),以及将空间运动限制在 GSAP 的变换别名(x、y、scale、rotation)内。此外,还包括一个用于审查编舞脚本的脚本,以及与 core、creative 和 CLI 等相关技能的交叉引用。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/1345AbhishekKumar/starter-supabase/tree/HEAD/.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 动画 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
命名字体动画特效(24 个 ID,通过外部 animate-text 技能)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 内构建时间线)。此处不再复述。

在 core 契约基础上增加的动画制作约束:

  • 预计算的布局常量 —— 绝不在补间时从 getBoundingClientRect() 推导位置。补时时的 DOM 测量会不同步,因为渲染器会并行采样;在组合设置时一次性计算坐标并重复使用。
  • 空间运动仅使用 GSAP 变换别名(x、y、scale、rotation)。Core 的允许列表也允许非空间属性补间使用 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 13 individual skills — each has its own dedicated page.

1345AbhishekKumar/starter-supabase

Add captions to a talking-head video. ONE catalog (CATALOG.md) of 32 visual identities behind two engines: column-flow (captions composited INTO the scene — matte occlusion + mix-blend; cream/ink/editorial/keynote/documentary/loud/neon/glitch/chrome/velocity) and themed constitutions (anchor/ordnance/terminal/neonsign/stardust/stomp/scoreboard/transit/vhs/arcade/dossier/laser/thunder/hologram/biolume/aurora/spectrum/papercut/popup/chalkboard/graffiti/brush/inkwater/ransom/lastpage/nightcity — e.g. a glyph-decode climax, a neon sign WRITTEN stroke by stroke, or the quiet `anchor` rail default). Route by identity, never by mode. Trigger on "captions/subtitles", "embed/cinematic captions", "VFX captions", "炸/特效/酷炫字幕", a named identity, or top-tier motion-graphics asks. Embedding every word is wrong for most talking-head content — `anchor` is the verbatim default. Pipeline: transcription → hyperframes remove-background matting → HTML render → ffmpeg overlay. Requires hyperframes and a single-subject clip.

1345AbhishekKumar/starter-supabase

The fallback workflow for authoring custom HyperFrames video compositions at any length or format — longer or multi-scene pieces, brand / sizzle reels, montages, title cards, static loops, and freeform compositions. Input- and length-agnostic. If a specialized workflow clearly fits the input — a marketed product, a website, a topic explainer, a GitHub PR, existing footage, a short motion graphic, or a Remotion port — prefer it (see /hyperframes); use this only as the general fallback when none fit.

1345AbhishekKumar/starter-supabase

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

1345AbhishekKumar/starter-supabase

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.

1345AbhishekKumar/starter-supabase

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

1345AbhishekKumar/starter-supabase

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.

1345AbhishekKumar/starter-supabase

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

1345AbhishekKumar/starter-supabase

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.

1345AbhishekKumar/starter-supabase

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.

1345AbhishekKumar/starter-supabase

turn a product or marketing URL, pasted script, or brief into a product launch video, including SaaS promos, feature reveals, app launches, company promos, and product marketing videos. Use this skill when the user wants to market, launch, promote, or reveal a product. Do not use it for general non-launch website tours, non-product topic explainers, GitHub pull requests, captioning existing footage, or short unnarrated motion graphics. If the intent is unclear, route through /hyperframes first. This is the new shot-sequence architecture: every visual frame is authored as a time-coded shot sequence picked from a menu of golden blueprints, so frames develop over their full duration instead of freezing after entrance.

1345AbhishekKumar/starter-supabase

turn a GitHub pull request (a PR URL like github.com/<owner>/<repo>/pull/<N>, an <owner>/<repo>#<N> ref, or 'this PR' in a checked-out repo) into a code-change explainer video, up to ~3 min (sweet spot 30-90s) — changelog, feature reveal, fix, or refactor walkthrough, rendered from the diff / commits / files. The input is a CODE CHANGE read via the gh CLI; there is no website capture. Use this skill for a GitHub PR. Do not use it for a product launch/promo (use /product-launch-video), a tour of a real website (use /website-to-video), a topic explainer with no PR (use /faceless-explainer), captions on existing footage (use /embedded-captions), or a short unnarrated motion graphic (use /motion-graphics). If the intent is unclear, route through /hyperframes first.

1345AbhishekKumar/starter-supabase

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.

1345AbhishekKumar/starter-supabase

Capture a general website/URL and turn it into a HyperFrames video (site tour, showcase, or social clip from the site's own visuals). Uses headless Chrome screenshots + brand assets. Use when intent is general — portfolio/blog/landing-page showcase or social clip from the site. NOT for: product/SaaS launch or promo (→ /product-launch-video, even from a URL); topic explainer with no site (→ /faceless-explainer); GitHub PR (→ /pr-to-video); adding captions to existing video (→ /embedded-captions); short unnarrated page-highlight motion graphic (→ /motion-graphics). Unclear launch-vs-general-site? Ask one question or start at /hyperframes.

相关技能