Jump to content
Search Community

rlaurencelle

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by rlaurencelle

  1. See the Pen pegKZV by rlaurencelle (@rlaurencelle) on CodePen

     

    In my example I have an object located at 300,200 within a container div.  If I wanted to tween it to X,Y coordinate 25, 25 I would have to calculate the difference between the current coordinate and the target coordinate and use the result in tween code.  I have many objects and it would take time to do this.  I was wondering if GSAP has a method that does this for you automatically - so you can simply provide the target coordinates and GSAP will do the rest?  In effect, tell the object to go to the specified location instead of the using x: and y: to tell it how far it should move to get there. 

  2. I'm having trouble trying to hide the backface of a 3D rotating div that contains text.  I'm actually rotating a container div that contains a div with an SVG graphic and a div with text. The text backface is not hiding when the div rotates. Here is the abridged code:

     

    <div id="Q1">
    <div id="Q1img"><img src="images/Q1.svg" alt=""/></div>
    <div id="Q1outerText">Stages of Change</div>
    </div>

     

     

    var $Q1 = $("#Q1"),
        $Q1outerText = $("#Q1outerText"),
    tl;

    tl = new TimelineMax();

    tl.set($Q1outerText, {backfaceVisibility:"hidden",transformStyle: "preserve-3d"})
       .to($Q1, 2, {transformOrigin:"right top", rotationY:135, delay:2, transformStyle: "preserve-3d", zIndex:10, ease:Power1.easeOut});

×
×
  • Create New...