Jump to content
Search Community

Akamiaxx

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by Akamiaxx

  1. Hello GSAP Community,

    I am trying out ScrollSmoother with ScrollTrigger and I would like to have my title to be "pinned" at the center of the page while scrolling, from to to bottom. 
    The problem is that I get a weird spacing below my page content, when I am using the pin option with ScrollTrigger. Tried to set the pinSpacing to false but I still get an extra plus spacing.

    Here are screenshots of what I get (first) and what I am expecting (second) :

    You can also find the demo on codesandbox here : https://codesandbox.io/s/bold-shadow-in3nnw
     

    Thank you!

    Capture d’écran 2023-02-19 à 9.36.39 PM.png

    Capture d’écran 2023-02-19 à 9.36.29 PM.png

    See the Pen by s (@s) on CodePen

  2. Sorry I can't create one right now, but I am trying to get the scroll position in pixels from scrollsmoother. Do you have any idea of how I can get that ?

    Since scrollsmoother doesnt provide that I was thinking about : scrollsmoother.progress * window.scrollY.

    Any thoughts ?

  3. Hello,

     

    I have a project with htlm images and I am creating a threejs plane per image and I am placing them using the img's getBoundingClientRect().

    This part is working fine but the problem is when I try to have the scrollsmoother on both my html page and my threejs scene, in sync with ScrollSmoother.

    By offseting the position of my elements by the window.scrollY this is working fine but obvioulsy I dont get the smoothness from ScrollSmoother, and when I am trying to do scrollsmoother.progress * window.scrollY I am expecting to have to correct position but this is not working.

     

    This is how I am calculating the position of my mesh. 

    image.png.ce6d607f680208b6ab73f701539b4cd1.png

     

    This is my ScrollSmoother instance
    image.png.5cb7c039ca13245642b4fbc68c022fde.png

     

    Here is a preview with an offset with window.scrollY & another with window.scrollY * scrollsmoother.progress.

    https://drive.google.com/drive/folders/17n9zVM2ROEEFZxx_-1r67aqoory8sdTm?usp=sharing

     

    Thank you!

     

×
×
  • Create New...