Jump to content
Search Community

shenning

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by shenning

  1. I didnt get the point with CSS Plugin due to given example on documentation handles straight the x-position.

    Nevertheless I got it to work by manipulating the attributes of the vars object.

     

    I changed the tweening method from to() to fromTo() In order to be able to adapt the starting values as well.

     

    Finally I ended up in the following code

    for(var key in this.oTweenElement) {
        //I) set FROM if given
        if(this.oTweenElement[key].tween.vars.startAt!==undefined) {
            this.oTweenElement[key].tween.vars.startAt.x=iXFrom;
        }
    
        //II) set TO dependend of status
        if(true===this.oTweenElement[key].tween._initted) {
            this.oTweenElement[key].tween.vars.css.x=iXTo;
        } else {
            this.oTweenElement[key].tween.vars.x=iXTo;
        }
    }
    

    Thanks a lot!

  2. Hi everyone,

     

    there is an issue when populating a timeline by the returned Tweens of a function. Using TweenMax.to() with a duration of 0 or using TweenMax.set() are triggered at function call:

    function getTween() {
        return {
            one:TweenMax.set($el,{property:1}),
            two:TweenMax.to($el,0,{property:2}),
            three:TweenMax.to($el,1,{property:3})
        };
    }
    

    Property 1 and 2 are applied to $el on function call. Property 3 is applied as intended on TimelineMax.add(getTween().three)

    Is there a way to prevent immediate trigger of Tweens with duration of 0?

     

    Thank you in advance!

    See the Pen bdKjzN by anon (@anon) on CodePen

  3. Basically I have a TimelineMax that is populated by some TweenMax.

    TimelineMax might be triggered multiple times by TimelineMax.restart().

    On event window.resize() some vars of TweenMax are updated by TweenMax.updateTo().

     

    All works fine when TimelineMax has not been started.

    But updateTo() seems to not alter given vars after TimelineMax has been started the first time.

     

    Have a look here:

    I) Initial x position is set to 700.

    II) X position is set to 100 before first restart().

    III) This new property is set perfect.

    IV) All following updateTo() have no effect anymore

     

    Did I implement something wrong?

     

    See the Pen mJKwJj by anon (@anon) on CodePen

  4. That solves the rendering problem. Thank you!!

    Any idea what causes this problem? Would like to add Tweenmax.set(el,{rotation:0.01}) only to browsers that have given rendering issue. (something like if(true!==Modernizr.feature){Tweenmax.set(el,{rotation:0.01})} ...)

  5. Internet Explorer 9 flickers at exactly scale=1 when scaling a simple div from 0 to e.g. 1.3.

    I created an example on codepen that works perfect on every browser except IE9 (9.0.8080 on Vista):

     

     

    At scale 1 the given div flickers/stutters - hope one might help.

     

    Thank you in advance!

    See the Pen KpVgKp by anon (@anon) on CodePen

×
×
  • Create New...