This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function FilmsPage() { | |
const mainCont = useRef(); | |
const scrollTween = useRef(); | |
const { contextSafe } = useGSAP(() => { | |
const panels = gsap.utils.toArray('.prv-sect'); | |
panels.forEach((panel, i) => { | |
ScrollTrigger.create({ | |
trigger: panel, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const elementRef = useRef(null); | |
const tl1Ref = useRef(null); | |
const tl2Ref = useRef(null); | |
useLayoutEffect(() => { | |
tl1Ref.current = gsap.timeline(); | |
gsap.set(elementRef.current, { y: "100%", opacity: 1 }); | |
const ctx = gsap.context(() => { | |
tl1Ref.current |