Jump to content
Search Community

dazzafact

Members
  • Posts

    37
  • Joined

  • Last visited

Posts posted by dazzafact

  1. Can anybody give me a hint, what i've missed to zoom it to the given coordinates?
    This animation just zooms to the Center of the Image. Thats not what i want. i want these coordiantes [0.9,0.8]


    This is just in simple Code example. My original Code is using more paramters. But i just want to understand how this Works
    Thanks

    See the Pen RwjexKY by dazzafact (@dazzafact) on CodePen

  2. is it possible to give me the variable of a previously defined second?
    For example: i want to define id's in the loop for a Timerange.  After i want to call it outside the loop

     

    $tl =gsap.timeline({})
    
    var startatText=0;
    
    for(id in arr){ 
        $text[id ] = $('element')
        $tl.fromTo($text[id ] ,{alpha:0,x:($w/2)},{alpha:1,duration:fade},startatText)
        .to($text[id ] ,{duration:textDur},'>')
        .to($text[id ] ,{alpha:0,duration:fade},'>');
    
        startatText +=textDur+(fade*2);
    }
    
    //...
    
    $id=23
    
    var idOfSecond= $tl.time($id)

                        

  3. 13 hours ago, GreenSock said:

    Yep, I think you're looking for .fromTo(). But another concept that MAY help is to simply use .to() but then if you're dynamically updating things you can first record the playhead position (using .time()) and then set .progress(0).invalidate() to reset things to the start and flush recorded values, make your changes like adding .to() stuff, then set .time() to the recorded value. That way you don't need to worry about setting both start and end values on every single tween. Just an idea. There's absolutely nothing wrong with using .fromTo() for them all though. 

    Hey, Thanks,
    i will try somethink like this and response again to it.
    😃

  4. Hello, Thanks for your great Plugin!
    Right now iam working on an Slideshow Maker.The Slideshowmaker can have several Media Objects, which changed by user.
    I found out, its not that easy, just working with the method "to()", because of the calculation of the  parallel objects (like Background Music).
    is there an easier Way? It whold be cool to work with fix Seconds to order the elements.
    I need somethink like
    $tl.FromTo($el,0,2,{params})
    $tl.FromTo($el,2,5,{params})
    $tl.FromTo($el,1,6,{params})

    image.png.989081df812420ff7212eec09a6b1cd6.png

    See the Pen YzxEbwz by szczepan-krol (@szczepan-krol) on CodePen

  5.  

    How can i pass variables from a Loop
    i expect to access Values param1,param2,param3,etc
    But it always gives the last key param13

     

    for (i in $slideTextArr){
    let y=i;
    slideAni.eventCallback("onStart", function(t){
                    console.log(t) // always last key "param13"
                }, ["param"+y]);
    
    }

    UPDATE Solution:

     

    for (i in $slideTextArr){
      let y=i;
      slideAni.to(textMesh[i],{
    		onStart:function(t){
    			console.log(t)
    		},
    		onStartParams: ["param"+y]
    	})
    }

     

  6. Hello i run the tweenmax in a loop for a Videoslideshow

    Between new Titles in a delay of 5 seconds  , .

    the problem is that the loop is pointing to the last title, because it not async (and not waiting)

    event "onStart" is always starting immediately - so  maybe a solution would be a new Event which start after the delay "onDelayStart"

     

    loop1

        TweenMax.to(title, 1, {pixi:{onStart:function(){title.text='Label 1';},alpha:1, delay:0,colorizeAmount:1}});

    loop2

        TweenMax.to(title, 1, {pixi:{onStart:function(){title.text='Label 2';},alpha:1, delay:5,colorizeAmount:1}});

    loop3

        TweenMax.to(title, 1, {pixi:{onStart:function(){title.text='Label 3';},alpha:1, delay:10,colorizeAmount:1}});

     

    See the Pen mQajrO?editors=1010 by szczepan-krol (@szczepan-krol) on CodePen

×
×
  • Create New...