Jump to content
Search Community

Victor Work

Members
  • Posts

    127
  • Joined

  • Last visited

Posts posted by Victor Work

  1. In fact it is only for simple cases like hover, even knowing that you can use GSAP to do the hover, sometimes the css solves with simplicity and everything there at the time of stylization.
    But his explanation was very enlightening.

    Many thanks Jack, not only for the explanation but for developing a tool that is
    certainly  is the revolution of web animations ❤️
    
    • Like 3
  2. hahaha, I'm using the translator and maybe this is not helping.

     

    Let's step by step:
    I need it when the customer presses the button to start revealing the bar, and when you release the bar, do the reverse, and when it reaches the end of the animation it pulls an event.


    Similar to my pen, the only problem is that the progress of the animation is not running by holding the button down but rather at the initial click of the event. And this is not letting the animation time align with the button press.

    see this site (https://www.2017.aristidebenoist.com/), it has a button trigger similar to what I want to do.

    Did you get it?

    • Like 1
  3. Let's see if I can be clearer: I need to synchronize the timeline with the mouseDown event. I want to define that the tween has the progress to the event, something similar with that
     

    button.on('mousedown', function() {
    	tween.progress(+=.1)
    })

    Could I be clearer?

  4. On 12/03/2014 at 3:32 PM, GreenSock said:

    I see what you mean. The behavior you're describing wouldn't technically be an "onReverseStart" because in GSAP, "reverse" means something very particular - it's the orientation of the tween/timeline in the context of its parent timeline. So, for example, imagine the parent timeline's playhead moving forward across where this particular tween resides - if the tween is reversed, it will play in the opposite direction as the parent playhead moves forward. And remember that you can also reverse() that parent timeline, so a reversed tween inside a reversed timeline will appear to play forward even though technically its "reversed" value is true.

     

    The behavior you're describing is attempting to discern when the local direction of the playhead changes, and you can accomplish that with an onUpdate like this:

    
    var tl = new TimelineLite({onUpdate:checkDirection});
    var lastTime = 0;
    var forward = true;
    tl.to(...); //add your tweens or whatever
    
    function checkDirection() {
        var newTime = tl.time();
        if ((forward && newTime < lastTime) || (!forward && newTime > lastTime)) {
            forward = !forward;
            console.log("changed direction");
            if (!forward) {
                onReverseStart();
            }
        }
        lastTime = newTime;
    }
    
    function onReverseStart() {
        //do stuff
    }

    The concept is just to check the time and compare it to the last recorded time - that tells you the local direction of the playhead. When you sense a change, you can call your function or run whatever logic you want. 

     

    Does that help?

     

     

     

     

    Using this example, how do I run the onReverseStart function every time I reverse, and not just when I change the timeline's direction?

     

    See the Pen YaVZOK by Noturnoo (@Noturnoo) on CodePen

     

  5. Hello Gsap'ers,
    Another post about the function so requested: Transition between pages using our beloved GSAP.
    But unlike the others, instead of questions, I am bringing some answers.


    I decided to make a Simple site template with SPA, which I believe will help everyone who is looking for solutions to these tools without having to use a framework.

    The activation of transitions is very simple: just click on the photos to go to the corresponding page.

    I hope it's useful.

     

    Ps¹: It is necessary to use the BarbaJS lib
    Ps²: Some settings are still missing and you can optimize the codes, best experience in Debbug Mode View
    Ps³: I'm using the translator hahaha

     

    See the Pen ZeYREp by Noturnoo (@Noturnoo) on CodePen

    • Like 5
  6. I'm using the translator and maybe this conversion is messing up in my mind, let's see if I can explain it in more detail.

     


    Let's take into consideration the site:
    https://www.videinfra.com/

    when you do a MouseDown on the screen it activates a draggable element that runs all over the screen, this draggable has a sniap that stops at a certain point, gives the trigger to an animation.

     

     

    I would like to achieve the same effect, the scale part applies more to benmingo site that does the same dynamics above, but with scale in the elements of the page, the problem is being manipulate the snap, could I explain better?

  7. I'm going to study a little bit about this method,

    although I do not have any in-depth knowledge of some of the features that you used in your example,

    and let's combine that basic and equivalent to the advanced one for many people, especially my hahahha.


    One question, I always see you  creating this proxy element in Draggable, why is this created?

×
×
  • Create New...