That might be an option i would consider probably in the future when i can pay for it but right now i think i would have to implement it myself. I thought scrollSmoother is built on scrollTrigger based on the doc i read earlier. And that i can implement the same with scrollTrigger. If implementing this with scrollTrigger is going to be a pain. I guess i would have to forgo it then, but since you have a better experience with this, what would you advice i do. Because currently. I tried updating the translateY of the direct child element of the .bkg-layer by setting the value from the scroll.progress, doing something like this but doesn't seem to work or update the value:
const gsap = window.gsap;
const scrollTrigger = window.scrollTrigger;
function updateTranslateOnScroll(value) {
// var scrollUpdate = gsap.timeline();
gsap.to(".bkg-content-holder", {
// transform: "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)",
translate: `translateY({value})`,
});
console.log("triggered this");
}
// window property holder
const win = {
h: window.innerHeight,
w: window.innerWidth,
};
gsap.registerPlugin(scrollTrigger);
// timeline
var anime = gsap.timeline({
// repeat: -1,
});
anime.to(".bkg-layer", {
position: "fixed",
overflow: "hidden",
});
anime.set(".bkg-content-holder", {
transform: "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)",
// transform: "matrix(0, 0, 1, 0, 0, 1)",
width: "100%",
overflow: "visible",
});
anime.to(".content-top-content", {
scrollTrigger: {
trigger: ".content-top-content",
end: "bottom top",
scrub: true,
pin: ".hero-bg-img-main",
toggleActions: "play pause reverse pause",
markers: true,
onUpdate: (self) => {
console.log("progress", self.progress),
updateTranslateOnScroll(self.progress);
},
},
});
I hope i can get a response back.