gsap
GSAP animation reference for HyperFrames. Covers gsap.to(), from(), fromTo(), easing, stagger, defaults, timelines (gsap.timeline(), position parameter, labels, nesting, playback), and performance (transforms, will-change, quickTo). Use when writing GSAP animations in HyperFrames compositions.
1How It Works & Mechanism
The skill itself is a GSAP quick-reference cheat sheet compressed to 6KB, organized by API surfaces (Tween methods → common vars options → transform aliases → easing → defaults → playback control → matchMedia → Timeline → performance → reference files), ready for on-demand lookup while agents write HyperFrames compositions.
GSAP animation reference for HyperFrames. Covers gsap.to(), from(), fromTo(), easing, stagger, defaults, timelines (gsap.timeline(), position parameter, labels, nesting, playback), and performance (transforms, will-change, quickTo).
Prevents common agent pitfalls through strict conventions: mandates camelCase property names, prefers transform aliases over string concatenation, and prioritizes autoAlpha over opacity.
Always use **camelCase** property names (e.g. `backgroundColor`, `rotationX`). … - **autoAlpha** — prefer over `opacity`. At 0: also sets `visibility: hidden`.
Establishes Timeline as the primary choreography mechanism and provides four ways to write position parameters (absolute values, relative `+=`/`-=`, labels, and `<`/`>` alignments).
- **Alignment**: `"<"` — same start as previous; `">"` — after previous ends; `"<0.2"` — 0.2s after previous starts
Sets the performance benchmark as 'staying on the compositor': mutate only x/y/scale/rotation/opacity, avoid animating layout properties, apply will-change only to elements that actually animate, use quickTo for high-frequency updates, prefer stagger over multiple tweens, and clean up when no longer needed.
Animating `x`, `y`, `scale`, `rotation`, `opacity` stays on the compositor. Avoid `width`, `height`, `top`, `left` when transforms achieve the same effect.
Handles accessibility and responsiveness with gsap.matchMedia(): automatically reverts when conditions no longer match, with examples integrating directly with prefers-reduced-motion.
Runs setup only when a media query matches; auto-reverts when it stops matching. … reduceMotion: "(prefers-reduced-motion: reduce)",
references/effects.md provides two drop-in effects (typewriter and audio visualizer), emphasizing that all effects must adhere to HyperFrames determinism rules.
All effects follow HyperFrames composition rules — deterministic, no randomness, timelines registered via `window.__timelines`.
Includes a Python script to convert audio into frame-by-frame visualization data: decodes audio via ffmpeg into mono 44.1kHz samples, runs numpy RMS and logarithmic frequency-band FFT, and outputs JSON ready to embed into compositions.
Outputs JSON with RMS amplitude and frequency band data at the target FPS, ready to embed in a HyperFrames composition. … cmd = [ "ffmpeg", "-i", path, "-vn", "-ac", "1", "-ar", str(SAMPLE_RATE), "-f", "s16le", "-acodec", "pcm_s16le", "-loglevel", "error", "pipe:1", ] … result = subprocess.run(cmd, capture_output=True)
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| package | GSAP 3.14.2(随仓库 npm ci 安装;上游来自 heygen-com/hyperframes 技能生态) |
| network | cdn.jsdelivr.net(**产物期**:effects.md 给出的示例片段在生成的 HTML 里用 script 标签引 gsap@3.14.2 与 TextPlugin;执行 skill 时并不外发) |
| cli | ffmpeg(extract-audio-data.py 用它解码音频为 s16le 管道) |
| package | numpy(脚本内 FFT/RMS 计算,需 pip 安装) |
| cli | Python 3.9+(跑 extract-audio-data.py) |
4Recommended Governance & Evidence
- scripts/: Executes local script or command: python3 .claude/skills/gsap/scripts/extract-audio-data.py <audio-or-video>
- 网络端点: Declares external network access: Artifact-phase (unrated): example snippets in references/effects.md reference cdn.jsdelivr.net in generated composition HTML
- 本地工作目录: File I/O and artifact output: audio-data.json (specified via -o/--output, writes to current directory by default; contains frame-by-frame rms + bands values)
5Second-Pass Verification
- [ok] 文件清单与类型 — SKILL.md(6.4KB 文档)、references/effects.md(8.8KB 文档)、scripts/extract-audio-data.py(6.5KB 脚本)、NOTICE.txt(228B 声明);无隐藏文件、无 node_modules、无二进制资产。
- [ok] 网络外发反例搜索 — 目录内 3 条 http 命中:effects.md 两行 jsdelivr script 标签(产物期示例)与 NOTICE.txt 的 https://github.com/heygen-com/hyperframes(出处链接)。fetch( 命中位于『**Do NOT use async `fetch()` to load audio data.**』这句告诫中,非调用。
- [ok] 凭证面反例搜索 — 0 处 env/API_KEY/TOKEN/SECRET 命中;Python 脚本 import 仅 argparse/json/subprocess/sys/numpy。
- [ok] description 覆盖度核对 — 描述里点名的每一项都能在正文定位到专节:Core Tween Methods / Common vars(stagger、defaults)/ Easing / Timelines(position parameter、labels、nesting、playback)/ Performance(transforms、will-change、quickTo)。无夸大。
- [ok] 脚本产物与用法核对 — main() 用 argparse 提供 input/-o/--fps/--bands,默认 audio-data.json、30fps、16 段;输出结构含 duration/fps/bands/totalFrames/frames[{time,rms,bands[]}],与 effects.md 里展示的 JSON 结构一致。
- [ok] 上游归属与许可 — NOTICE.txt 声明来源 heygen-com/hyperframes(Apache-2.0),并注明 student-kit 只做 runtime-relative 路径与可移植打包;与仓库 skills-lock.json 中 gsap 条目指向的 source 一致。
6Verdict & Scenarios
68a50bcbc9292840…