重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
rive-animations by dylantarre/animation-principles
npx skills add https://github.com/dylantarre/animation-principles --skill rive-animations使用 Rive 的状态机和交互式动画实现所有 12 项迪士尼动画原则。
在 Rive 编辑器中:
scaleY: 0.8 时,scaleX: 1.2// 从代码触发
rive.play('squash_stretch');
状态机设置:
const inputs = rive.stateMachineInputs('State Machine');
const trigger = inputs.find(i => i.name === 'jump');
trigger.fire(); // 播放预备 → 动作序列
在 Rive 中:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
// 控制可见性
const bgOpacity = inputs.find(i => i.name === 'bgOpacity');
bgOpacity.value = 0.6;
Rive 中的姿势到姿势:
在 Rive 编辑器中:
在 Rive 图形编辑器中:
// 运行时速度控制
rive.play('animation', { speed: 0.5 });
在 Rive 中:
状态机方法:
// 监听状态变化
rive.on('statechange', (event) => {
if (event.data.includes('button_press')) {
// 次要动画通过状态机自动触发
}
});
// 或者混合多个动画
rive.play(['main_action', 'secondary_particles']);
// 快速 - 敏捷的反馈
rive.play('click', { speed: 1.5 });
// 正常
rive.play('hover');
// 缓慢 - 戏剧性的揭示
rive.play('reveal', { speed: 0.5 });
在 Rive 编辑器中:
在 Rive 中:
在 Rive 中:
在 Rive 中设计:
// 平滑的悬停交互
const hover = inputs.find(i => i.name === 'isHovering');
element.addEventListener('mouseenter', () => hover.value = true);
element.addEventListener('mouseleave', () => hover.value = false);
import { useRive, useStateMachineInput } from '@rive-app/react-canvas';
function AnimatedButton() {
const { rive, RiveComponent } = useRive({
src: 'button.riv',
stateMachines: 'Button',
autoplay: true
});
const hoverInput = useStateMachineInput(rive, 'Button', 'isHovering');
return (
<RiveComponent
onMouseEnter={() => hoverInput.value = true}
onMouseLeave={() => hoverInput.value = false}
/>
);
}
每周安装次数
61
代码仓库
GitHub 星标数
20
首次出现
2026 年 1 月 24 日
安全审计
安装于
codex51
opencode48
gemini-cli47
claude-code45
cursor45
github-copilot42
Implement all 12 Disney animation principles using Rive's state machine and interactive animations.
In Rive Editor:
Create shape with bones
Animate scale X/Y with inverse relationship
Key: scaleX: 1.2 when scaleY: 0.8
// Trigger from code rive.play('squash_stretch');
State Machine Setup:
const inputs = rive.stateMachineInputs('State Machine');
const trigger = inputs.find(i => i.name === 'jump');
trigger.fire(); // Plays anticipate → action sequence
In Rive:
Use artboard layers for depth
Apply blur/opacity to background layers
Use nested artboards for complex scenes
// Control visibility const bgOpacity = inputs.find(i => i.name === 'bgOpacity'); bgOpacity.value = 0.6;
Pose to Pose in Rive:
In Rive Editor:
In Rive Graph Editor:
Select keyframes
Apply easing: Cubic, Quad, Bounce
Adjust bezier handles for custom curves
// Runtime speed control rive.play('animation', { speed: 0.5 });
In Rive:
State Machine approach:
// Listen for state changes
rive.on('statechange', (event) => {
if (event.data.includes('button_press')) {
// Secondary animations auto-trigger via state machine
}
});
// Or blend multiple animations
rive.play(['main_action', 'secondary_particles']);
// Fast - snappy feedback
rive.play('click', { speed: 1.5 });
// Normal
rive.play('hover');
// Slow - dramatic reveal
rive.play('reveal', { speed: 0.5 });
In Rive Editor:
In Rive:
In Rive:
Design in Rive:
Smooth bezier curves on shapes
Consistent stroke weights
Pleasing color palette
Clean bone structure
// Smooth hover interactions const hover = inputs.find(i => i.name === 'isHovering'); element.addEventListener('mouseenter', () => hover.value = true); element.addEventListener('mouseleave', () => hover.value = false);
import { useRive, useStateMachineInput } from '@rive-app/react-canvas';
function AnimatedButton() {
const { rive, RiveComponent } = useRive({
src: 'button.riv',
stateMachines: 'Button',
autoplay: true
});
const hoverInput = useStateMachineInput(rive, 'Button', 'isHovering');
return (
<RiveComponent
onMouseEnter={() => hoverInput.value = true}
onMouseLeave={() => hoverInput.value = false}
/>
);
}
Weekly Installs
61
Repository
GitHub Stars
20
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex51
opencode48
gemini-cli47
claude-code45
cursor45
github-copilot42
前端设计系统技能:生产级UI设计、设计令牌与可访问性指南
8,500 周安装