gsap-greensock by dylantarre/animation-principles
npx skills add https://github.com/dylantarre/animation-principles --skill gsap-greensock使用 GSAP 强大的时间轴和补间系统实现所有 12 条迪士尼动画原则。
gsap.to(".ball", {
scaleX: 1.2,
scaleY: 0.8,
yoyo: true,
repeat: 1,
duration: 0.15,
ease: "power2.inOut"
});
const tl = gsap.timeline();
tl.to(".character", { y: 20, scaleY: 0.9, duration: 0.2 }) // 蓄力
.to(".character", { y: -200, duration: 0.4, ease: "power2.out" }); // 动作
gsap.to(".background", { filter: "blur(3px)", opacity: 0.6 });
gsap.to(".hero", { scale: 1.1, zIndex: 10 });
// 使用明确关键帧进行姿势到姿势动画
gsap.to(".sprite", {
keyframes: [
{ x: 0, y: 0 },
{ x: 100, y: -50 },
{ x: 200, y: 0 },
{ x: 300, y: -30 }
],
duration: 1
});
const tl = gsap.timeline();
tl.to(".body", { x: 200, duration: 0.5 })
.to(".hair", { x: 200, duration: 0.5 }, "-=0.4") // 重叠
.to(".cape", { x: 200, duration: 0.6 }, "-=0.45"); // 更多拖拽感
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
gsap.to(".element", {
x: 300,
duration: 0.6,
ease: "power2.inOut" // 慢入慢出
});
// 其他缓动函数:"power3.in", "power3.out", "elastic.out"
gsap.to(".ball", {
motionPath: {
path: [{ x: 0, y: 0 }, { x: 100, y: -100 }, { x: 200, y: 0 }],
curviness: 1.5
},
duration: 1
});
const tl = gsap.timeline();
tl.to(".button", { scale: 1.1, duration: 0.2 })
.to(".icon", { rotation: 15, duration: 0.15 }, "<") // 同时发生
.to(".particles", { opacity: 1, stagger: 0.05 }, "<0.1");
// 快速弹跳
gsap.to(".fast", { x: 100, duration: 0.15 });
// 轻柔浮动
gsap.to(".slow", { y: -20, duration: 2, ease: "sine.inOut", yoyo: true, repeat: -1 });
gsap.to(".element", {
scale: 1.5, // 夸张的缩放
rotation: 720, // 多圈旋转
duration: 0.8,
ease: "back.out(2)" // 过冲
});
gsap.to(".box", {
rotationX: 45,
rotationY: 30,
transformPerspective: 1000,
duration: 0.5
});
gsap.to(".card", {
scale: 1.02,
boxShadow: "0 20px 40px rgba(0,0,0,0.2)",
duration: 0.3,
ease: "power1.out"
});
const masterTL = gsap.timeline({ defaults: { ease: "power2.out" }});
masterTL
.add(anticipation())
.add(mainAction())
.add(followThrough());
gsap.timeline() - 序列化动画ease - 30+ 内置缓动函数stagger - 错开多个元素motionPath - 弧线和路径动画yoyo / repeat - 循环控制"<" / "-=0.2" - 用于重叠的位置参数每周安装量
109
代码仓库
GitHub 星标数
20
首次出现
2026年1月24日
安全审计
安装于
codex93
opencode90
gemini-cli88
cursor82
github-copilot80
claude-code78
Implement all 12 Disney animation principles using GSAP's powerful timeline and tween system.
gsap.to(".ball", {
scaleX: 1.2,
scaleY: 0.8,
yoyo: true,
repeat: 1,
duration: 0.15,
ease: "power2.inOut"
});
const tl = gsap.timeline();
tl.to(".character", { y: 20, scaleY: 0.9, duration: 0.2 }) // wind up
.to(".character", { y: -200, duration: 0.4, ease: "power2.out" }); // action
gsap.to(".background", { filter: "blur(3px)", opacity: 0.6 });
gsap.to(".hero", { scale: 1.1, zIndex: 10 });
// Pose to pose with explicit keyframes
gsap.to(".sprite", {
keyframes: [
{ x: 0, y: 0 },
{ x: 100, y: -50 },
{ x: 200, y: 0 },
{ x: 300, y: -30 }
],
duration: 1
});
const tl = gsap.timeline();
tl.to(".body", { x: 200, duration: 0.5 })
.to(".hair", { x: 200, duration: 0.5 }, "-=0.4") // overlaps
.to(".cape", { x: 200, duration: 0.6 }, "-=0.45"); // more drag
gsap.to(".element", {
x: 300,
duration: 0.6,
ease: "power2.inOut" // slow in and out
});
// Other eases: "power3.in", "power3.out", "elastic.out"
gsap.to(".ball", {
motionPath: {
path: [{ x: 0, y: 0 }, { x: 100, y: -100 }, { x: 200, y: 0 }],
curviness: 1.5
},
duration: 1
});
const tl = gsap.timeline();
tl.to(".button", { scale: 1.1, duration: 0.2 })
.to(".icon", { rotation: 15, duration: 0.15 }, "<") // same time
.to(".particles", { opacity: 1, stagger: 0.05 }, "<0.1");
// Fast snap
gsap.to(".fast", { x: 100, duration: 0.15 });
// Gentle float
gsap.to(".slow", { y: -20, duration: 2, ease: "sine.inOut", yoyo: true, repeat: -1 });
gsap.to(".element", {
scale: 1.5, // exaggerated scale
rotation: 720, // multiple spins
duration: 0.8,
ease: "back.out(2)" // overshoot
});
gsap.to(".box", {
rotationX: 45,
rotationY: 30,
transformPerspective: 1000,
duration: 0.5
});
gsap.to(".card", {
scale: 1.02,
boxShadow: "0 20px 40px rgba(0,0,0,0.2)",
duration: 0.3,
ease: "power1.out"
});
const masterTL = gsap.timeline({ defaults: { ease: "power2.out" }});
masterTL
.add(anticipation())
.add(mainAction())
.add(followThrough());
gsap.timeline() - Sequence animationsease - 30+ built-in easing functionsstagger - Offset multiple elementsmotionPath - Arc and path animationsyoyo / repeat - Loop control"<" / "-=0.2" - Position parameter for overlapWeekly Installs
109
Repository
GitHub Stars
20
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex93
opencode90
gemini-cli88
cursor82
github-copilot80
claude-code78
Flutter应用架构设计指南:分层结构、数据层实现与最佳实践
4,500 周安装