Hi, greetings! I am a complete newbie and am very excited to get started learning GSAP for SVG animation.
Right now I have one of the most basic questions: can I get a current step of a transform attribute component from an affected SVG shape using GSAP? I noticed that the amazing and intuitive capability of GSAP turns transform attribute parts into a matrix and I've come across https://css-tricks.com/get-value-of-css-rotation-through-javascript/ which is what I'll resort to outside of this forum.
However, I have to ask if there's already a native GSAP method of doing this. My goal is to simply keep track of transform values in units, such as rotation of a clock-arrow, using an onUpdate function.
tl.fromTo(
elem,
duration,
{
rotation : oldAngle,
transformOrigin : "50% 50%"
},
{
rotation : newAngle,
transformOrigin : "50% 50%",
ease: myEase,
onUpdate : function(){
// elem.currentRotationAngle = ?
}
},
myLabel
);
Thanks, and thanks to all who made this code available for the people of Earth.