Jump to content
Search Community

Diaco last won the day on December 20 2017

Diaco had the most liked content!

Diaco

Business
  • Posts

    1,215
  • Joined

  • Last visited

  • Days Won

    86

Posts posted by Diaco

  1. Hi chriswyl  :)

     

    it's about transform matrix multiplication , in your third example , pls check the result with remove x,y attributes from text and set transform to this :

    transform=" translate(100,100) rotate(40 100,100) "

    but if you want to have that result you liked , pls try this :

    TweenMax.set($("#t2"), { attr:{ x:x , y:y } , rotation:rot , svgOrigin:x+' '+y });
    • Like 5
  2. in addition to Carl and Rodrigo , if i understand correctly , you can simply use SlowMo ease type too :

    tl
      .to('#el', 3, {x:200, ease:Linear.easeNone})
      .to('#el', 3, {x:0, ease:Linear.easeNone})
      .to('#el', 3, {y:200, ease:Linear.easeNone})
      .to('#el', 3, {y:0, ease:Linear.easeNone})
    
    
      .from(tl,tl.duration(),{timeScale:5,ease:SlowMo.ease.config(.6,.7, true)},0)
      //.from(tl,tl.duration()-2,{timeScale:5,ease:SlowMo.ease.config(.6,.7, true)},1)

    See the Pen qZVgpv by MAW (@MAW) on CodePen

    • Like 3
  3. as blake suggested before , you can use _gsTransform object for most of css transform properties ,

     

    and for other properties like left ,width , ...etc you can use one of these methods :

     

    1- elem.style['propery name'] , like this : elem.style['width']

     

    2 - CSSPlugin.getStyle() ,  like this : CSSPlugin.getStyle( elem , "width" );

     

    3 - getComputedStyle(elem) , like this : var style = getComputedStyle(elem); console.log( style['width'] )

     

    don't forget every TweenLite instance handles tweening of js objects as raw data ( whithout css prefixes , unit of measurement ) and getting/setting of css properties is CssPlugin's duty . actually you can get raw values from GSAP engine , but it's too deep and needs some really unnecessary functions when you can simply get data with above methods .

    • Like 5
×
×
  • Create New...