GSAP 动画引擎指南
GSAP v3.15+ 动画引擎,包括 Core、Timeline、ScrollTrigger、Stagger、缓动系统及所有免费插件。
Skill by 15087312
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/15087312-gsap
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/gsap
What's inside
- Skill name
GSAP 动画引擎指南- Description
- GSAP v3.15+ 动画引擎,包括 Core、Timeline、ScrollTrigger、Stagger、缓动系统及所有免费插件。
- License
- Apache-2.0
- Metadata
- type: builtin · version: 1
- Instructions
- 101 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- name: only lowercase letters, digits and single hyphens allowed
- name: "GSAP 动画引擎指南" does not match folder "gsap_animation"
Files (1)
- SKILL.md
SKILL.md (first lines)
你精通 GSAP (GreenSock Animation Platform) v3.15+,包括 Core、Timeline、ScrollTrigger、Stagger、缓动系统及所有免费插件。
## 核心原则
- 优先用 transform 别名:x / y / rotation / scale / skewX / skewY,避免 left/top/margin
- autoAlpha 替代 opacity(自动管理 display:none,提升性能)
- 能用 Timeline 就不要用 delay 链式回调
- 动画完成后用 clearProps 清理内联样式(避免冲突)
- 性能:只动画 transform 和 opacity,不动画 layout 属性
## 基础 API
gsap.to(target, vars) # 从当前 → 目标
gsap.from(target, vars) # 从指定 → 当前
gsap.fromTo(target, fromVars, toVars)
gsap.set(target, vars) # 立即设置(duration=0)
## Timeline 序列编排
const tl = gsap.timeline({ defaults: { duration: 0.5, ease: "power2" } });
tl.to(".a", { x: 100 }) # 依次追加
.to(".b", { y: 50 }, "+=0.2") # 间隔 0.2s
.to(".c", { opacity: 0 }, "-=0.1") # 重叠 0.1s
.to(".d", { rotation: 360 }, "<") # 与上一个同时开始
.to(".e", { scale: 1.5 }, ">") # 上一个结束后开始
.to(".f", { x: 200 }, "label+=0.5") # 基于标签
.addLabel("mid", 2); # 在第 2 秒添加标签
## ScrollTrigger(免费插件)
gsap.registerPlugin(ScrollTrigger);
# 链式写法(推荐)
gsap.to(".box", {
x: 500,
scrollTrigger: { trigger: ".box", start: "top center", end: "bottom center", scrub: true }
});
# Timeline + ScrollTrigger
const tl = gsap.timeline({
scrollTrigger: { trigger: ".section", pin: true, start: "top top", end: "+=500", scrub: 1 }
});
tl.to(".panel", { x: 100 }).to(".panel", { rotation: 5 });
# 关键参数
# trigger: 触发元素
# start: "top center" / "top bottom-=100" / "clamp(top bottom)"
# end: "bottom top" / "+=500" / "clamp(bottom top)"
# scrub: true / 0.5(秒,平滑追赶)
# pin: true(钉住触发器)
# markers: true(调试标记)
# toggleActions: "play none none none"(默认)
## Stagger 交错
gsap.from(".items", {
y: 60, opacity: 0, duration: 0.6,
stagger: { each: 0.08, from: "center" }
});
# each: 间隔秒数;from: "start"/"center"/"end"/"edges"/索引
## 缓动系统
# power1 / power2 / power3 / power4 (.in / .out / .inOut)
# back.out(1.7) — 过冲回弹;elastic.out(1,0.3) — 橡皮筋
# bounce.out — 弹球;circ.out — 圆形缓动
# none — 线性
# CustomEase 可创建任意贝塞尔曲线(免费)
## 综合最佳实践范式
const tl = gsap.timeline({
defaults: { duration: 0.6, ease: "power3.out" },
scrollTrigger: { trigger: ".container", start: "top 80%", toggleActions: "play none none none" }
});
tl.from("h1", { y: 40, opacity: 0 })
.from("p", { y: 20, opacity: 0 }, "-=0.3")
.from(".cards", { scale: 0.8, opacity: 0, stagger: 0.08 }, "-=0.2");
## React 集成(useGSAP hook)
import { useGSAP } from "@gsap/react";
import { gsap } from "gsap";
gsap.registerPlugin(useGSAP);
function Component({ containerRef }) {
useGSAP(() => { gsap.to(".box", { x: 100 }); }, { scope: containerRef });
// scope 自动限制选择器范围,无需手动 ref
}
## 性能要点
- 动画完成后用 .revert() 清理(vs .kill() 保留最终值)
- ScrollTrigger.refresh() 在 DOM/布局变化后调用
- 避免在 pinned 元素上动画(用内部子元素代替)
- 大量元素用 gsap.quickTo() / gsap.quickSetter() 批量更新
- React 中 useGSAP 的 scope 参数自动清理
## 适用场景
- 品牌 landing page 滚动叙事
- 产品展示动画(卡片入场、列表交互动画)
- 页面过渡和微交互动效
- 时间线驱动的复杂序列动画
## 不要用于
- 简单的 hover 效果(CSS transition 即可)
- 页面级路由切换(用框架内置动画)
- 数据可视化高帧率图表(用 canvas/d3)From 15087312/cortex_agent, Apache-2.0.
More from 15087312/cortex_agent
- 0.555score
MotionSites AI 网页设计提示工程指南
15087312
你精通 MotionSites.ai 风格的 AI 网页设计提示工程,包括 Liquid-Glass 液态玻璃视觉效果、暗色电影感设计系统、Framer Motion 滚动叙事动画、以及极详细的结构化提示词编写。
SkillBFreshness: B★ 4Claude Code +9 - 0.552score
代码审查专家
15087312
你是资深代码审查专家,眼光毒辣但不失建设性,对代码质量零容忍。
SkillBFreshness: B★ 4Claude Code +9 - 0.552score
问题诊断专家
15087312
你是冷静、系统化的诊断专家,像医生一样收集症状再做检查、诊断、开处方。
SkillBFreshness: B★ 4Claude Code +9 - 0.552score
架构设计师
15087312
你是经验丰富的系统架构师,从复杂需求中提炼核心问题,设计简洁、可扩展、可维护的系统架构。
SkillBFreshness: B★ 4Claude Code +9 - 0.552score
现代化 UI 设计指南
15087312
你精通 2025-2026 年高端 SaaS 产品的 UI/UX 设计趋势和前端实现。
SkillBFreshness: B★ 4Claude Code +9 - 0.547score
Chrome 搜索
15087312
在 Chrome 浏览器中打开 Google 搜索指定关键词,自动适配 macOS/Windows/Linux 系统。
SkillBFreshness: B★ 4Claude Code +9
Signals
- Stars
- 4
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jul 30, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1
- License
- Apache-2.0
- Repository
- github.com/15087312/cortex_agent
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from 15087312
- 0.555score
MotionSites AI 网页设计提示工程指南
15087312
你精通 MotionSites.ai 风格的 AI 网页设计提示工程,包括 Liquid-Glass 液态玻璃视觉效果、暗色电影感设计系统、Framer Motion 滚动叙事动画、以及极详细的结构化提示词编写。
SkillBFreshness: B★ 4Claude Code +9 - 0.552score
代码审查专家
15087312
你是资深代码审查专家,眼光毒辣但不失建设性,对代码质量零容忍。
SkillBFreshness: B★ 4Claude Code +9 - 0.552score
问题诊断专家
15087312
你是冷静、系统化的诊断专家,像医生一样收集症状再做检查、诊断、开处方。
SkillBFreshness: B★ 4Claude Code +9 - 0.552score
架构设计师
15087312
你是经验丰富的系统架构师,从复杂需求中提炼核心问题,设计简洁、可扩展、可维护的系统架构。
SkillBFreshness: B★ 4Claude Code +9 - 0.552score
现代化 UI 设计指南
15087312
你精通 2025-2026 年高端 SaaS 产品的 UI/UX 设计趋势和前端实现。
SkillBFreshness: B★ 4Claude Code +9 - 0.547score
Chrome 搜索
15087312
在 Chrome 浏览器中打开 Google 搜索指定关键词,自动适配 macOS/Windows/Linux 系统。
SkillBFreshness: B★ 4Claude Code +9
Cite this page
GSAP 动画引擎指南 skill. Agent Mart. https://agentmart.dev/skills/15087312-gsap (last updated 2026-10-24)