重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
technical-constraints by dylantarre/animation-principles
npx skills add https://github.com/dylantarre/animation-principles --skill technical-constraints在平台限制内工作,同时保持动画意图。
问题:运行时计算成本过高 修复:预计算动画。使用 CSS 关键帧(姿势到姿势)而非 JS 逐帧(逐帧动画)。
问题:复杂形状导致渲染问题 修复:简化几何形状。使用 CSS 形状而非 SVG 路径。减少 3D 中的多边形数量。
问题:跨设备保持一致的时序 修复:使用相对单位。在最慢的目标设备上测试。对于 JS,考虑使用 requestAnimationFrame。
问题:预算只允许必要的动画 修复:优先处理主要动作。在受限时首先削减次要动画。
问题:有限的屏幕空间 修复:在原地进行动画。使用不影响布局的变换。在受限平台上考虑将减少动画作为默认设置。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
// Feature detection
const supportsAnimation =
'animate' in Element.prototype &&
CSS.supports('transform', 'translateZ(0)');
if (supportsAnimation) {
element.animate(keyframes, options);
} else {
element.classList.add('final-state');
}
// Progressive enhancement
@supports (animation: name) {
.element {
animation: fadeIn 200ms ease-out;
}
}
-webkit- 前缀prefers-reduced-motion 作为代理每周安装数
49
代码仓库
GitHub 星标数
20
首次出现
2026年1月24日
安全审计
安装于
codex42
opencode39
gemini-cli39
cursor38
github-copilot36
claude-code35
Work within platform limitations while preserving animation intent.
Issue : Runtime calculations too expensive Fix : Pre-calculate animations. Use CSS keyframes (pose-to-pose) over JS frame-by-frame (straight ahead).
Issue : Complex shapes cause rendering issues Fix : Simplify geometry. Use CSS shapes over SVG paths. Reduce polygon counts in 3D.
Issue : Consistent timing across devices Fix : Use relative units. Test on slowest target device. Consider requestAnimationFrame for JS.
Issue : Budget only allows essential animation Fix : Prioritize primary actions. Cut secondary animations first when constrained.
Issue : Limited screen real estate Fix : Animate in place. Use transforms that don't affect layout. Consider reduce-motion as default on constrained platforms.
// Feature detection
const supportsAnimation =
'animate' in Element.prototype &&
CSS.supports('transform', 'translateZ(0)');
if (supportsAnimation) {
element.animate(keyframes, options);
} else {
element.classList.add('final-state');
}
// Progressive enhancement
@supports (animation: name) {
.element {
animation: fadeIn 200ms ease-out;
}
}
-webkit- prefixesprefers-reduced-motion as proxyWeekly Installs
49
Repository
GitHub Stars
20
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex42
opencode39
gemini-cli39
cursor38
github-copilot36
claude-code35
GSAP 框架集成指南:Vue、Svelte 等框架中 GSAP 动画最佳实践
3,700 周安装