I have managed to add the Bezier curve capability to ianime.js. Click the icon below to see the demo (by the way, this animation was all done in HTML+Javascript, not Flash).
The syntax is quite straightfoward. You just need to give a set of control points as a property "cp" just like the example below.
anime.add({
element: obj,
cp: [{x:50, y:0}, {x:0, y:50}],
x: 100,
y: 100,
duration: 1000,
});
This means "move the specified DOM object along the bezier curve specified by two control points, (50,0) and (0,50), from the current location to the specified end point (100,100) in 1 second".
Comments