如何沿路径设置Raphael对象的动画? [英] How to animate a Raphael object along a path?
问题描述
对象可以是简单的,矩形或圆形。但路径应该是一条贝塞尔曲线。如果没有太多麻烦,请提供javascript / Raphael 代码。
The object could be simple, a rect or circle. But the path should be a bezier curve. Please provide javascript/Raphael code if not too much trouble.
如果在动画期间存在移动物体的拖尾效果,那就太好了。
It will be nice if there is trailing effect of the moving object during annimation.
推荐答案
以防万一你试图使用这与RaphaelJS 2(animateAlong不再存在),在这里您可以看到一个可能的解决方案: http:// jsfiddle .net / gyeSf / 17 / 。
Just in case you are trying to use this with RaphaelJS 2 (animateAlong doesn't exist anymore), here you can see a possible solution: http://jsfiddle.net/gyeSf/17/.
这里是最初的讨论: https://groups.google.com/forum/#!searchin/raphaeljs/animatealong/raphaeljs/W9bA0SkArVY/KnPRKi8uFrsJ
编辑:这里有另一个例子: http:// raphaeljs。 com / gear.html
And here another example: http://raphaeljs.com/gear.html
这篇关于如何沿路径设置Raphael对象的动画?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!