Jump to content
GreenSock

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

Swing Motion Problem

Go to solution Solved by George Carlin,

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

hi I want to make my div animated like this swf file.

but it sound's to me like I can't do so because of my misunderstanding of transformOrigin system.

here is my code:

js:

TweenLite.set("#pageone", {perspective:750});

window.onload = function(){
      tweens();
};
function tweens(){
      TweenLite.set("#header",{rotationX:180,opacity:0});
      TweenLite.to("#header", 2.5,{rotationX:0,opacity:1, transformOrigin:"0px 0px 0px",ease: Elastic.easeOut.config(1, 0.3)});
}
html:
<body>
<div data-role="page" id="pageone">
    <header>
        <div id="header"></div>
        </header>
    </div>
</body>
the tween happens but not as expected.
Link to comment
Share on other sites

  • Solution

 

hi I want to make my div animated like this swf file.

but it sound's to me like I can't do so because of my misunderstanding of transformOrigin system.

here is my code:

js:

TweenLite.set("#pageone", {perspective:750});

window.onload = function(){
      tweens();
};
function tweens(){
      TweenLite.set("#header",{rotationX:180,opacity:0});
      TweenLite.to("#header", 2.5,{rotationX:0,opacity:1, transformOrigin:"0px 0px 0px",ease: Elastic.easeOut.config(1, 0.3)});
}
html:
<body>
<div data-role="page" id="pageone">
    <header>
        <div id="header"></div>
        </header>
    </div>
</body>
the tween happens but not as expected.

 

I have found the solution.

I removed 4 lines of css property of header id, and it works great, these are those lines:

-webkit-transition: 0.5s ease-out;
-moz-transition: 0.5s ease-out;
-o-transition: 0.5s ease-out;
transition: 0.5s ease-out;
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.

×