Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

rotationY not working!

Recommended Posts

Guys, sorry for third issue, but I have no idea what is going on! 

I have the same animation with anime.js and it's working no problemo.

Trying to migrate to GSAP and have this issues over and over.


See the Pen MZKRNN by dubdub (@dubdub) on CodePen


Why rotationY doesn't apply?


(the second issue here transformOrigin doesn't set by TweenMax.set properly, but I already created dedicated topic about this)

See the Pen MZKRNN by dubdub (@dubdub) on CodePen

Link to comment
Share on other sites

The SVG spec does not officially support 3D but you can get the behavior you want using CSSPlugin.useSVGTransformAttr = false;


See the Pen REabpM?editors=0010 by GreenSock (@GreenSock) on CodePen


however this is not recommend as explained here:




  • Like 3
Link to comment
Share on other sites

@Carl thank you, didn't know that! SVG has so many secrets ?


Incredibly enlightening, can't believe how much time I needed to spent to figure this out myself, so THANK YOU again.


Then probably I could make another animation for this.

Link to comment
Share on other sites

Yeah, I'd be very careful about using 3D animations in SVG - it probably won't work in all browsers. GSAP originally used CSS transforms on SVG elements, but we discovered a bunch of little annoying bugs and inconsistencies across browsers (unrelated to GSAP), so we switched to using the "transform" attribute instead to normalize behavior and to be consistent with the spec. I'm sure you'll see that 3D CSS transforms work in Chrome and some other browsers (which is probably why anime.js was 'working'), but I suspect you'd find that your stuff broke in various other browsers. We work really hard to deliver consistency across browsers with GSAP as much as possible. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.