Javascript 如何在Velocity.js中反转步骤

Javascript 如何在Velocity.js中反转步骤,javascript,jquery,css,animation,velocity.js,Javascript,Jquery,Css,Animation,Velocity.js,有没有办法在velocity.js中将动画链接在一起,然后按顺序反向播放。我知道您可以反转最后一个链接的速度动画,但如何逐步完成以前的调用 例如: // Animate an SVG element with a mix of standard CSS properties and SVG-specific properties. $("#rect") .delay(500) .velocity({ x: "+=200", y: "25%" }) .velocity(

有没有办法在
velocity.js
中将动画链接在一起,然后按顺序反向播放。我知道您可以反转最后一个链接的速度动画,但如何逐步完成以前的调用

例如:

// Animate an SVG element with a mix of standard CSS properties and SVG-specific properties.
$("#rect")
    .delay(500)
      .velocity({ x: "+=200", y: "25%" })
    .velocity({ fillGreen: 255, strokeWidth: 2 })
      .velocity({ height: 50, width: 50 })
    .velocity({ rotateZ: 90, scaleX: 0.5 })

.velocity("reverse", { delay: 250 });

这只会反转最后一步,即旋转。如何按顺序通过其他调用反转?

当前实现不可能,但是,您可以将上述代码转换为调用的“序列”,并使用的
RunSequence()
API,然后反转该数组并再次运行以获得反转效果