Jump to content
Search Community

Pb in rotation of opening doors

C.Surieux test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hello,

 

 

I want to offer an effect of opening pannel just as in this codepen

 

Please note that I can't attach the images normally figuring the doors so I used red background.

 

Problem is the rotation is not keeping the normal aspect ratio of the 2 openning panels, they seem to be growing when opening.
Is there a way to improve this.

 

 

Moreover, I have another option wich would be to open sliding (not rotating) each element respectivelly to left and right. How to do it ?

 

Thanks you for help.

 

CS

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

Link to comment
Share on other sites

Hi C.Surieux :),

 

You can change the perspective of the doors by changing the transform perspective. You currently have it set to 800, but you can crank it up to your liking. Just change the last line of your CodePen to something like:

 CSSPlugin.defaultTransformPerspective = 2500;

Hopefully that looks better to you. :)

  • Like 2
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.
×
×
  • Create New...