用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/dylantarre/animation-principles --skill rive-animations命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | rive-animations |
| description | Use when implementing Disney's 12 animation principles with Rive interactive animations |
Implement all 12 Disney animation principles using Rive's state machine and interactive animations.
In Rive Editor:
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:
// 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:
// 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 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}
/>
);
}