gsap-core
核心 API:to / from / fromTo、缓动、时长、stagger、defaults 与 matchMedia 响应式动画。
GSAP · GreenSock Animation Platform
GSAP 官方 AI Skills 库:核心 API、时间线、滚动触发与插件的最佳实践。把经官方验证的用法教给任何编码代理——Claude、Cursor、Copilot,以及 40+ 智能体。
由 GreenSock 团队维护的 Agent Skills,按 Agent Skills 标准编写,覆盖从单次补间到插件生态的全部官方最佳实践。
gsap-core核心 API:to / from / fromTo、缓动、时长、stagger、defaults 与 matchMedia 响应式动画。
gsap-timeline时间线:序列编排、position 参数、标签、嵌套与播放控制,替代链式 delay 的官方做法。
gsap-scrolltrigger滚动触发:滚动联动、pin 固定、scrub 跟手、batch 批量入场与刷新清理。
gsap-plugins插件生态:ScrollTo、ScrollSmoother、Flip、Draggable、SplitText、CustomEase 等全部免费。
gsap-utils工具函数:clamp、mapRange、normalize、interpolate、random、snap、wrap 等计算辅助。
gsap-reactReact 集成:useGSAP 钩子、ref 作用域、gsap.context 清理与 SSR 处理。
gsap-performance性能指南:优先 transform 属性、will-change 使用时机、批量处理与 ScrollTrigger 提示。
gsap-frameworks框架支持:Vue、Svelte 等框架的生命周期、选择器作用域与卸载清理。
四个实验均由本页真实运行的 GSAP 驱动——前三个点击「重播」观看,第四个随页面滚动联动。代码即官方推荐写法。
gsap.to() 从当前位置补间到目标状态,优先使用 transform 别名与内置缓动。
gsap.to(box, { x: 170, rotation: 360, duration: 0.8, ease: "power2.inOut" });
stagger 让同一补间按固定间隔错开,back.out 带来回弹收尾。
gsap.to(items, { y: -36, stagger: 0.08, ease: "back.out(1.7)", duration: 0.5 });
时间线按顺序编排多步动作,比链式 delay 更精确、可整体控制。
const tl = gsap.timeline({ defaults: { duration: 0.5 } }); tl.to(box, { x: 170, duration: 0.7 }) .to(box, { backgroundColor: "#0AE448" }) .to(box, { scale: 0.55 }, "+=0.1");
动画进度与滚动位置一一对应——继续向下滚动,旋钮沿轨道移动并填充进度。
gsap.to(knob, { x: () => trackWidth, ease: "none", scrollTrigger: { trigger: stage, start: "top 75%", end: "bottom 55%", scrub: 1 } });
三种方式任选其一,技能即装即用。详细对照表见仓库内 README。
自动识别当前代理并安装,兼容 Cursor、Claude Code、Codex、Windsurf、Copilot 等 40+ 工具。
npx skills add https://github.com/greensock/gsap-skills
通过插件市场直接添加官方插件,或克隆后复制 skills/ 目录到 ~/.claude/skills/。
/plugin marketplace add greensock/gsap-skills
Settings → Rules → Add Rule → Remote Rule (Github),填入仓库名即可。
greensock/gsap-skills