Reputation: 3818
I am making an animation using Raphaeljs. I have a set with a circle and a rectangle inside. I can rotate the set easily, but I don't know how to animate this rotation.
Here is my code:
var gun = paper.set();
gun.push(
paper.circle(550, 400, 70)
.attr({ fill: "85FFA5" }),
paper.rect(510, 350, 80, 100, 5)
.attr({ fill: "E8E8E8" })
);
gun.transform("R45, 550, 400");
How do I animate that last line?
Upvotes: 0
Views: 391
Reputation: 231
gun.animate({
transform: "R45, 550, 400"
}, 1000);
1000 is the time in miliseconds
Upvotes: 1