Jump to content
GreenSock

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

RotationY not working after 1.18.0

Recommended Posts

Hello all, 

 

Firstly, I'm very pleased to have found greensock and have already used the wealth of knowledge on this forum to answer many questions I had. However, this one I couldn't find an answer to, so here is my first post. 

 

I found a lovely pen by Allan Pope that has a door opening and closing using "rotationY: 90" and "transformOrigin: "left center"" 

 

This pen is using TweenMax version 1.16.1 I believe. When I went to play around with the code in my editor where I was loading version 1.20.2 it didn't work. 

 

I went ahead and checked the other versions and the position changes when using version 1.19.0 and after that, the door does not rotate either. 

 

I gather there were updates. 

 

Could someone please help me to understand and guide me on how to change the code to work with the latest version of TweenMax? 

 

I created a codepen and at lines 29 in the JS I tried the CSS way and below that is how it was set before.  

See the Pen OxXydJ by anon (@anon) on CodePen

 

Many Thanks in advance, 

 

David

See the Pen OxXydJ by anon (@anon) on CodePen

Link to comment
Share on other sites

Hi @davidgkl :)

 

Welcome to the forum.

 

The SVG spec does not support 3D. You can get away with it in some browsers, but it's best not to rely on that as it could be removed at any time since it goes against the spec. You can rotate an entire SVG in 3D so if you need an element to do that, you can separate it from the main SVG and control it that way.

 

Hopefully this helps. Happy tweening.

:)

  • Like 2
Link to comment
Share on other sites

Yup, PointC is right, since the spec does not support 3D there really isn't a way to get consistent behavior in all browsers.

 

The thread below explains why it "works" in very old versions of TweenMax (CSSPlugin) and why the change was made:

 

  • Like 3
Link to comment
Share on other sites

Thank you so much to both of you for your replies.

  • Like 1
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.
×