Hi Greensock community,
I just want to know that is there any way to adjust the scroll smoother speed and distance like Lucid air https://www.lucidmotors.com/air
if you notice if we scroll mouse wheel the scroll distance is very short
can anyone help to acheive this.
Thanks
Yeah, if you're already using ScrollSmoother, there's no need to animate the native scroll position - you can just set it immediately and ScrollSmoother will gradually "catch up".
let ratio = 0.5;
document.addEventListener("wheel", function (e) {
e.preventDefault();
window.scrollTo(0, window.pageYOffset + e.deltaY * ratio);
});
Or leverage Observer since it has debouncing built-in:
let ratio = 0.5;
Observer.create({
type: "wheel",
preventDefault: true,
onChangeY: self =>