hyperframes-animation
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
1How It Works & Mechanism
SKILL.md serves as the entry point and router for four layers of knowledge: atomic rules (rules-index.md indexing 48 recipes in rules/<name>.md) → multi-phase scene blueprints (blueprints-index.md indexing 22 blueprints) → transitions directory (16 files) → techniques.md; plus 12 runtime adapter cards.
All motion knowledge in one skill: **rules** (atomic recipes), **blueprints** (multi-phase scene templates), **transitions** (scene-to-scene), **techniques** (broader motion-design patterns), and **adapters** (per-runtime APIs).
The default authoring approach is composing atomic rules: pick 2-4 rules and stitch them together using a single paused GSAP timeline rather than starting from blueprints—claiming faster workflows and less code; blueprints are used only when a scene matches a pre-designed template.
Pick 2-4 rules from `rules-index.md`, glue them together with a single paused GSAP timeline, done. This is faster and produces less code than starting from a blueprint.
All recipes are strictly constrained within the determinism contract of core, appending motion-layer-specific rules: pre-calculating layout constants (banning getBoundingClientRect during tweens—parallel renderer sampling would lose sync) and using only GSAP transform aliases for spatial movement.
**Pre-calculated layout constants** — never derive positions from `getBoundingClientRect()` at tween time. Tween-time DOM measurements desync because the renderer samples in parallel; compute coordinates once at composition setup and reuse.
A functional runtime adapter layer exists: seven types of runtimes (GSAP default + Lottie/Three.js/Anime.js/CSS/WAAPI/TypeGPU-WebGPU) each register to the global scope (window.__hfLottie, window.__hfAnime, etc.), allowing HyperFrames to seek them all at once; adapter cards provide registration and seek conventions for each runtime within HyperFrames.
Multiple runtimes can coexist in one composition. Each registers its instances on the runtime-specific global so HyperFrames can seek all of them in one pass.
Auditability is backed by an actual script: animation-map.mjs reads all GSAP timelines in window.__timelines, enumerates tweens, samples bounding boxes, computes flags, and outputs animation-map.json for choreography review (dead zones, stagger consistency, lifecycle warnings).
Reads every GSAP timeline registered in window.__timelines, enumerates tweens, samples bboxes at N points per tween, computes flags and human-readable summaries. Outputs a single animation-map.json.
Dependency bootstrapping includes security guardrails: package-loader.mjs only installs pinned package specs, uses --ignore-scripts to disable dependency lifecycle scripts, spawns npm with an argv array rather than concatenating shell strings, displays install lines without executing them directly, and requests consent via confirmBootstrap prior to bootstrapping.
// package-loader — bootstrap optional helper packages only when missing, with // defense-in-depth so a malicious or typo'd dependency can't run on install: // • install runs `npm install --ignore-scripts` — package lifecycle scripts // never execute
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| package | @hyperframes/producer / @hyperframes/core(animation-map.mjs 运行时依赖;项目优先,缺失才 bootstrap) |
| network | 产物运行期 CDN 库(gsap/three/animejs 经 jsdelivr 进 composition/示例——作品级依赖,渲染浏览器加载) |
| cli | hyperframes CLI(lint/check/snapshot/render,验证动画产出;命令细节在 hyperframes-cli) |
| package | 外部 animate-text skill(24 个具名文本动画效果的实现方) |
4Recommended Governance & Evidence
- scripts/: Executes local scripts or commands: node skills/hyperframes-animation/scripts/animation-map.mjs <composition-di
- scripts/ 或 SKILL.md: Declares dynamic installation of external language package dependencies
- 网络端点: Declares external network access: package bootstrap (only when dependencies are missing and user consents): official @hyperframes packages from npm registry
- 本地工作目录: File read/write and artifact output: Author output: composition HTML/styles/scripts (within project)
5Second-Pass Verification
- [ok] rules-index/blueprints 数量与路由声称一致 — find 实测 rules/ 48 个 md、blueprints/ 22 个 md、examples/ 13 个 html、adapters/ 12 个 md、transitions/ 16 个,与 SKILL.md/rules-index 描述一致。
- [ok] 『7 个运行时适配器』声称(GSAP+Lottie+Three+Anime+CSS+WAAPI+TypeGPU) — adapters/ 目录实测含对应 7 种 + html-in-canvas-patterns + animate-text + gsap 细分 3 卡;TypeGPU 卡存在(WebGPU/WGSL)。
- [ok] package-loader 安全声称(防依赖投毒) — 源码注释与实现复核:pinned spec 断言(assertPinnedPackageSpecs)、--ignore-scripts、argv spawn、display-only installLine、confirmBootstrap 征求同意——逐条命中。
- [discrepancy] animation-map 是否会在无依赖时擅自联网 — 首轮注记偏『项目优先』;复核发现若项目无包且用户同意 bootstrap 会执行 npm install(网络)——非默认路径但确实存在,已在外联 deps/scripts_executed 如实标注并保持 blue(官方包 + consent + --ignore-scripts)。
- [ok] 有无把文档站链接误当外发依赖 — gsap.com/threejs.org/animejs.com 等仅为 adapter 卡内的 API 文档引用(人类阅读),非运行依赖,未列入 external_deps。
6Verdict & Scenarios
f370d7615a306ee2…