Hi all!
I'm having several issues while attempting to develop a "paper-like" folding animation (like this one: http://codepen.io/rendro/pen/dxtHc).
As you can see, in my pen the two parts split and that's because of the transformOrigin; if I switch the origins like below
var $foldUpper = new TweenMax($upper, 0.5, {
rotationX: "-45deg",
transformPerspective: 2500,
transformOrigin: "bottom center",
transformStyle:"preserve-3d"
});
var $foldLower = new TweenMax($lower, 0.5, {
rotationX: "45deg",
transformPerspective: 2500,
transformOrigin:"top center",
transformStyle:"preserve-3d"
});
I can successfully folding keeping the elements together (since they fold using the center of the container as reference) but I also want to keep the upper border sticked to the top of the main container.
The other issue I noticed is a strange "snap" (or lag) when I get back to the original position.
Could you help me?
Best Regards,
Maurizio