laser1209/aerie-yunqi/gsap
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install laser1209/aerie-yunqi/gsapSKILL.md
GSAP 动画(gsap)
当你要用 GSAP 做页面动效——元素入场、时间轴编排、滚动触发、逐项错开——时走这份流程。产出应是一段可直接跑的 GSAP 代码,明确每步的起始状态、缓动、时长与并发关系。
铁律
- 优先用 transform 与 opacity:改
x/y/scale/rotation/opacity走合成层不触发重排,改width/top/left会掉帧。 - `fromTo` 只在需要精确控制起止时用:普通入场用
from,只需知道终点用to,滥用fromTo会让代码啰嗦难维护。 - 用 timeline 编排序列,不靠 delay 硬堆:有先后关系就交给
gsap.timeline(),调节奏只改 position 参数,不要逐个算 delay 数字。 - 缓动要有意图:入场用
power2.out、退场用power2.in、拟物回弹用back.out,全部留默认linear往往最生硬。 - stagger 做列表错开:列表/网格逐项动画用
stagger: 0.05~0.1,比手写循环更整齐也更好调。 - 避免每帧改布局属性:给会动的元素加
will-change: transform,动画结束后移除,别让它常驻。
步骤
- 定时间轴结构:先画出"先做什么、后做什么、哪些同时发生",写成 timeline 的先后顺序。
- 设起始状态:需要从某状态进来的用
from,避免元素在动画开始前闪现(配合 CSS 初始态或gsap.set)。 - 写核心动画:给出
to/from/fromTo的 targets、属性、时长duration、缓动ease。 - 挂到 timeline:用位置参数控制节奏,
"+=0.2"表示上一个结束再等 0.2 秒,"<"表示与上一个同时开始。 - 加 stagger:列表类动画补
stagger,必要时用stagger: { each, from: "start" }。 - 滚动触发:需要随滚动播放时接 ScrollTrigger,声明
trigger元素与start/end位置,不要自己监听 scroll 事件。 - 验帧率:在浏览器 Performance 面板录制,确认没有长任务、没有 layout thrashing。
输出形态
反面例子(不要这样)
- 给每个元素单独写
delay: 0.1/0.3/0.5,改一处节奏要重算全部。 - 用
setTimeout串联动画,而不是 timeline。 - 动画
top/left/width导致每帧重排卡顿。 - 所有缓动都留默认
linear,动效显得机械。
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cloud/gsap/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/laser1209/aerie-yunqi/gsap)