hyperframes-animation
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHyperFrames Animation
HyperFrames 动画
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).
For the composition contract (data attributes, sub-compositions, determinism) see .
hyperframes-core一站式获取所有动效知识:规则(原子化实现方案)、蓝图(多阶段场景模板)、过渡(场景间切换)、技巧(通用动效设计模式)以及适配器(各运行时API)。
关于组合约定(数据属性、子组合、确定性)请查看 。
hyperframes-coreDefault: compose atomic rules
默认方式:组合原子规则
Pick 2-4 rules from , glue them together with a single paused GSAP timeline, done. This is faster and produces less code than starting from a blueprint.
rules-index.md从 中挑选2-4条规则,通过单个暂停的GSAP时间线将它们整合,即可完成开发。这种方式比从蓝图开始开发更快,且生成的代码量更少。
rules-index.mdLoad a blueprint when
以下场景请加载蓝图
- The scene matches an existing pre-designed multi-phase template (brand-reveal, social-proof, demo-page-scroll-spotlight, etc.) and reusing its phase pipeline saves real authoring time
- You want runnable ground-truth code for a complex 4-5 phase choreography
Blueprints live in . Each entry points to (recipe) and (runnable sample). Do not read it speculatively; load it when you've already decided you need scene-level orchestration.
blueprints-index.mdblueprints/<id>.mdexamples/<id>.html- 当前场景与现有预设计的多阶段模板匹配(品牌展示、社交证明、演示页面滚动聚焦等),复用其阶段流程可节省实际开发时间
- 你需要复杂的4-5阶段动画编排的可运行基准代码
蓝图存放在 中。每个条目指向 (实现方案)和 (可运行示例)。请勿盲目查阅,仅当你确定需要场景级编排时再加载。
blueprints-index.mdblueprints/<id>.mdexamples/<id>.htmlRouting
导航指引
| Want to… | Read |
|---|---|
| Pick an atomic motion pattern by trigger / tag | |
| Read one rule's full HTML / CSS / GSAP recipe | |
| Pick a multi-phase scene template | |
| Read one blueprint's full recipe | |
| Author a scene transition (CSS-driven, between two clips) | |
| Look up a broader motion-design technique | |
| Analyze an existing composition's animation map | |
| GSAP API — timeline / tweens / position parameters | |
| GSAP — drop-in effect recipes | |
| GSAP — transforms / perf | |
| GSAP — eases / stagger | |
| GSAP — timeline / labels | |
Lottie / dotLottie (After Effects exports, | |
Three.js / WebGL (3D scenes, | |
Anime.js ( | |
CSS keyframes ( | |
Web Animations API ( | |
TypeGPU / WebGPU ( | |
HTML-as-texture + WebGL/GLSL post-fx (capture live DOM via | |
Named text-animation effects (24 IDs via external | |
| 需求 | 查阅文档 |
|---|---|
| 按触发条件/标签选择原子动效模式 | |
| 查看某条规则完整的HTML/CSS/GSAP实现方案 | |
| 选择多阶段场景模板 | |
| 查看某份蓝图的完整实现方案 | |
| 制作场景过渡效果(CSS驱动,两个片段间切换) | |
| 查阅通用动效设计技巧 | |
| 分析现有组合的动效映射 | |
| GSAP API — 时间线/补间动画/位置参数 | |
| GSAP — 即插即用效果实现方案 | |
| GSAP — 变换/性能优化 | |
| GSAP — 缓动/ stagger效果 | |
| GSAP — 时间线/标签 | |
Lottie / dotLottie(After Effects导出, | |
Three.js / WebGL(3D场景, | |
Anime.js( | |
CSS keyframes( | |
Web Animations API( | |
TypeGPU / WebGPU( | |
HTML作为纹理 + WebGL/GLSL后期特效(通过 | |
命名文本动效(通过外部 | |
Picking a runtime
运行时选择指南
- GSAP is the default for 95% of motion work — covers timeline orchestration, transforms, easing, stagger. All atomic rules in this skill are GSAP-based.
- Lottie when an asset has its own pre-baked timeline (typically After Effects exports).
- Three.js for 3D scenes, camera motion, shader-driven visuals.
- Anime.js for lightweight tweening when GSAP is overkill.
- CSS for simple repeated motifs, decoration, shimmer — no JavaScript animation cost.
- WAAPI for native browser keyframes without a GSAP dependency.
- TypeGPU / WebGPU for GPU-rendered canvases (particles, liquid glass, custom shaders).
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.
- GSAP 是95%动效工作的默认选择——涵盖时间线编排、变换、缓动、stagger效果。本技能中的所有原子规则均基于GSAP实现。
- Lottie 适用于资产自带预烘焙时间线的场景(通常为After Effects导出内容)。
- Three.js 用于3D场景、相机动效、着色器驱动的视觉效果。
- Anime.js 适用于轻量补间动画场景,当GSAP过于笨重时选用。
- CSS 用于简单重复的图案、装饰、闪烁效果——无JavaScript动画开销。
- WAAPI 用于无需依赖GSAP的原生浏览器关键帧动画。
- TypeGPU / WebGPU 用于GPU渲染画布(粒子效果、液态玻璃、自定义着色器)。
多个运行时可在同一个组合中共存。每个运行时会将其实例注册到特定全局对象,以便HyperFrames可一次性跳转所有实例。
Critical Constraints
关键约束
Prerequisite: → Non-Negotiable Rules (single paused timeline, governs length, no / / , no , no on later-scene clips, no / animation, no timeline construction inside / / ). Don't restate those here.
hyperframes-coredata-durationMath.randomDate.nowperformance.nowrepeat: -1gsap.setdisplayvisibilityasyncsetTimeoutPromiseAnimation-craft additions on top of core's contract:
- Pre-calculated layout constants — never derive positions from at tween time. Tween-time DOM measurements desync because the renderer samples in parallel; compute coordinates once at composition setup and reuse.
getBoundingClientRect() - Spatial motion uses GSAP transform aliases only (,
x,y,scale). Core's allowlist also permitsrotation/opacity/color/backgroundColorfor non-spatial property tweens — but neverborderRadius/width/height/topfor layout changes.left
前置要求: → 不可违背的规则(单暂停时间线、控制时长、禁止使用//、禁止、禁止对后期场景片段使用、禁止动画/属性、禁止在//内构建时间线)。此处不再赘述这些规则。
hyperframes-coredata-durationMath.randomDate.nowperformance.nowrepeat: -1gsap.setdisplayvisibilityasyncsetTimeoutPromise在核心约定之上的动画制作补充规则:
- 预计算布局常量 — 绝对不要在补间动画执行时通过获取位置。补间时进行DOM测量会导致不同步,因为渲染器是并行采样的;应在组合初始化时一次性计算坐标并复用。
getBoundingClientRect() - 空间动效仅使用GSAP变换别名(、
x、y、scale)。核心允许列表还允许对非空间属性进行补间,包括rotation/opacity/color/backgroundColor——但绝对不要使用borderRadius/width/height/top来修改布局。left
Scripts
脚本
bash
node skills/hyperframes-animation/scripts/animation-map.mjs <composition-dir> \
--out <composition-dir>/.hyperframes/anim-mapReads every GSAP timeline registered on , enumerates tweens, samples bboxes, computes flags, outputs . Use it to audit choreography (dead zones, stagger consistency, lifecycle warnings) after authoring.
window.__timelinesanimation-map.jsonbash
node skills/hyperframes-animation/scripts/animation-map.mjs <composition-dir> \
--out <composition-dir>/.hyperframes/anim-map该脚本会读取所有注册在上的GSAP时间线,枚举补间动画,采样边界框,计算标记,输出。在开发完成后,可使用它来审核动画编排(死区、stagger一致性、生命周期警告)。
window.__timelinesanimation-map.jsonSee Also
相关链接
- — composition structure, data attributes, sub-compositions, deterministic render contract
hyperframes-core - — palettes, typography, narration, beat planning (non-animation creative direction)
hyperframes-creative - —
hyperframes-clinpx hyperframes lint / validate / inspect / preview / render
- — 组合结构、数据属性、子组合、确定性渲染约定
hyperframes-core - — 调色板、排版、旁白、节奏规划(非动画类创意指导)
hyperframes-creative - —
hyperframes-clinpx hyperframes lint / validate / inspect / preview / render