Share Posted September 22, 2022 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! Link to comment Share on other sites More sharing options...
Share Posted September 22, 2022 (edited) Hi @Delarge! Is that possible to provide a demo from codepen please? I'm not sure without testing, but your example seems to be something like the URL you propose... I have tested some part of your code by copy/paste him in the codepen of the DEMO, but is working good for me. ScrollTrigger is register too? gsap.registerPlugin(ScrollTrigger); Best regards! Sam Edited September 22, 2022 by Sam Tremblay Edit post after real test 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now