Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

oligsap

ShockinglyGreen
  • Content Count

    22
  • Joined

  • Last visited

Community Reputation

9 Newbie

About oligsap

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi @akapowl ! I'm trying to do the same thing now but with toggleClass. I've just modified the demo for buttons to toggle from red (not in viewport) to green (in viewport) but it doesn't work. What am I missing out here ? https://codepen.io/olig/pen/VwjYZLw Thanks a lot
  2. Hi, I have a horizontal scroll using the Smooth-scrollbar library. I'm trying to do a simple rotation on a square by using GSAP ScrollTrigger's proxy but I can't get it to work. What am I missing out here ? As always thanks a lot for your help !
  3. Hi Paul, Thanks for the help, it solved my problem. Sorry for that I'll check into these mistakes, I didn't even know I was making one. Cheers
  4. Hello, I'm trying to refresh my button animation without having to put it after the main animation (it's my paradigm). As you can see the start marker is situated where the button was before the pin spacer of the main animation was added. Thanks for your help
  5. @ZachSaucier Could we do the same with the kill function ? like trigger.kill(false); ?
  6. Hi @mikel, @ZachSaucier, Thank you very much for your feedbacks. It helped me a lot to get where I wanted to go !
  7. Hi everyone, I've managed to animate text on an SVG path but I can't manage to make the animated text arrive in the center of the screen when the snap stops. It either stops before or after the center. I'd tried to mess with the snapTo without success. Thanks for your help
  8. Makes perfect sense. I just forked the Horizontal snapping demo that has the same logic : https://codepen.io/GreenSock/pen/YzygYvM In the demo, elements offscreen are still animated.
  9. Hi there ! I have a horizontal scroll in place with Scrolltrigger. I was wondering if it was possible to disable animating elements when they're out of the viewport for performance matter ? Juste like Locomotive scroll : https://locomotivemtl.github.io/locomotive-scroll/ Thanks for your feedback
  10. Ok so I think I managed to solve it - like this : https://codepen.io/olig/pen/GRZORvX Code: const sections = gsap.utils.toArray("section"); let maxWidth = 0; sections.forEach((section) => { maxWidth += section.offsetWidth; }); gsap.to(sections, { x: () => `-${maxWidth - window.innerWidth}`, ease: "none", scrollTrigger: { trigger: ".wrapper", pin: true, scrub: 1, end: () => `+=${maxWidth}` } }); I'm not really sure if my code is optimized so critics welcomed !
  11. I would be interested in knowing how you fixed this. Thanks !
  12. Hi guys ! I'm looping on an array of elements to toggle a class on these elements each time they enter the viewport but I don't think my code is optimized. Is there anything I could do to simplify this : const buttons = gsap.utils.toArray('.btn'); buttons.forEach((btn) => { gsap.from(btn, { scrollTrigger: { start: 'top bottom', end: 'bottom top', trigger: btn, onEnter() { btn.classList.remove('disable'); }, onLeave() { btn.classList.add('disable'); }, onEnterBack() { btn.classList.remove('di
×