Hi, is it possible to get the ScrollTrigger offscreen reset technique (good demo on another post) working with scrub?
My code, which almost works, is:
const anim_supersonic_image_1 = gsap.from("#supersonic-image-1", {
opacity:0,
x: 80,
duration:1,
ease: "back(1)",
paused: true,
scale: 1.1,
perspective: 250,
rotateX: -15,
rotateY: 30,
})
const play_anim_supersonic_image_1 = ScrollTrigger.create({
trigger: "#supersonic-image-1",
scrub: 1, // <---- BEING IGNORED
start:"top 70%",
onEnter: () => anim_supersonic_image_1.play()
});
const reset_anim_supersonic_image_1 = ScrollTrigger.create({
trigger:'#supersonic-image-1',
onLeaveBack: () => anim_supersonic_image_1.pause(0)
});
See my note about 'BEING IGNORED'?
Where am I going wrong here?
Many thanks!