Jump to content


Div folding open: best approach

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

For my client I need to develop a theme that revolves around div's that "fold open", sort of. They are pretty simple animations, but I need to make them work on different screens, and it needs to be as smooth and performative as possible. I am leaning towards SVG, because I will ned the morphsvg plugin in other parts of the website for sure, but for this folding div's, can I somehow specify and animate the four corners of the rectangle in a timeline? Something like: first left-upper corner move 100px to the left, then right-upper corner move 75px up, and so forth? What would be the best way to go about the project?


Link to comment
Share on other sites

Hi and welcome to the GreenSock forums,


I couldn't open your video file. Apparently QuickTime (Mac) doesn't like it.


Not exactly sure of the effect you want. Animating the position of div corners isn't really a standard thing.


But if  you want to do something like:




It uses GSAP and perspectivetransform.js which you can read about here: https://github.com/edankwan/PerspectiveTransform.js


Is there something on youtube or another site that can help us better understand the effect you are after?

  • Like 2
Link to comment
Share on other sites

Hello Carl, thank you for looking into this, despite the failing video.


I will need to try this library out on the project, but by the looks of it, it might just be perfect for the job! Will report back.

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.