Jump to content
Search Community

cereal_beast

Members
  • Posts

    18
  • Joined

  • Last visited

Posts posted by cereal_beast

  1. In my demo (reattached here), the sections (boxes) are being scaled down when scrolled and then scaled back up when the active box is fully in view but only when scrolling with the mouse NOT when dragging. The code above is the code that is doing this: 
    tl.to(".box", 0.25, { scale: 0.5 });
    &
    tl.to(".box", 0.25, { scale: 1 });

    Im not sure how to use those gsaps in your demo though.

  2. Yeh thats great thanks, I can fix the boundaries etc. One last thing, do you know how to incorporate the scaling from my demo with draggable?

      tl = new TimelineMax();
      tl.to(".box", 0.25, { scale: 0.5 });
      tl.to("#targets", 0.4, { xPercent: -100/slides.length * activeSlide });
      tl.to(".box", 0.25, { scale: 1 });
    }

  3. I've added draggable along the x axis to my pen, but Im unsure of how the 'points' work which is what snap uses. I've read the snap doc but I'm still none the wiser. How can I just make each '.box' snap to fit the screen (100vw, 100vh) when the next box is dragged over 50% of the way along the x axis (so the next box is taking up more of the screen than the previous box)

  4. Im having an issue with a fullscreen menu, using CSS it is set to "transform:translateX(-100vw);" so that it starts off the page to the left, then using GSAP it animates to show fullscreen using "x:0". The problem is the 100vw doesnt seem to be updating when the browser is resized. If you look at my codepen, make the browser smaller and refresh the page, open the menu, make the browser bigger then close the menu, you will see that it doesnt close all the way as its remembering the old width. 

     

    See the Pen PoRwvpB by gjjr (@gjjr) on CodePen

×
×
  • Create New...