可动画设置

可动画属性设置可以全局地应用于参数对象上的所有属性,或者通过传递对象专门应用于某个属性。

createAnimatable(targets, {
  x: {
┌──────────────────┐
│   unit: 'rem',   │
│   duration: 400, ├─ Specific Property Settings
│   ease: 'out(4)' │
└──────────────────┘
  },
  y: 200,
  rotate: 1000,
┌──────────────────┐
│ ease: 'out(2)',  ├─ Global Properties Settings
└──────────────────┘
});