I've been looking at some referral code, but it's written in an older version of GSAP (see provided pen).
I understand what I'm looking at, but am not sure how I would go about converting what I'm looking at into something written with GSAP 3 syntax.
I was wondering if someone would be willing to explain, or provide a quick snippet, of what the following would look like written using GSAP 3;
btn1.click(function()//front face
{
if(cubeParent[0]._gsTransform.rotationX != 0)
{
TweenMax.to(cubeParent, 1, {rotationX:'0_short'});
TweenMax.to(cubeParent, 1, {rotationY:'0_short'});
TweenMax.to(cubeParent, 1, {rotation:'0_short'});
}
else
{
TweenMax.to(cubeParent, 1, {rotationY:'0_short'});
TweenMax.to(cubeParent, 1, {rotation:'0_short'});
}
});
I'm not concerned with the function portion of the code. I understand what's going on there. What confuses me is how to use the gsap.getProperty() in place of the _gsTransform() in this specific use-case scenario.
As far as the TweenMax.to() is concerned, I'm good to go in that area - so there's no need need for further explanation.
I've already looked at the docs here, but I don't understand how the two correlate in this particular context.
Kind regards,
X