Explicitly define the page height in ScrollControl

13 Views Asked by At

I'm currently using the ScrollControl component from react-three/fiber to build a smooth scrolling experience. However, the height for each page is fixed as 100% of the viewport height, which causes problem when using devices with different viewport height.

For example I'm current setting the height of the html component to be 200vh. It's perfectly fine when the viewport height is 1920px. enter image description here

However, when the viewport height is small (200vh is lesser px now), the content height is bigger than the 200vh container height, causing the scrollbar to show up enter image description here

Is it possible to define or set the page height as a arbitrary value, such as 1920px? So that I can also set the height for the container to be 1920px height?

0

There are 0 best solutions below