设计与多媒体

popmotion

dylantarre/anim…inciples

Use when implementing Disney's 12 animation principles with Popmotion's functional animation library

  • 495 次安装
  • 133 星标
  • 收录于

安装命令

npx skills add https://github.com/dylantarre/animation-principles --skill popmotion

SKILL.md

Popmotion Animation Principles

Implement all 12 Disney animation principles using Popmotion's composable animation functions.

1. Squash and Stretch

import { animate } from "popmotion";

animate({
  from: { scaleX: 1, scaleY: 1 },
  to: { scaleX: 1.2, scaleY: 0.8 },
  duration: 150,
  onUpdate: ({ scaleX, scaleY }) => {
    element.style.transform = `scaleX(${scaleX}) scaleY(${scaleY})`;
  }
});