Jump to content
Search Community

elegantseagulls last won the day on March 29 2023

elegantseagulls had the most liked content!

elegantseagulls

Members
  • Posts

    712
  • Joined

  • Last visited

  • Days Won

    13

Community Answers

  1. elegantseagulls's post in ScrollTrigger section glitch was marked as the answer   
    Your fromTo needs more information, but it looks to me like you can just use a to animation for this. Example:
     
    gsap.to( ".right-door", { opacity: 0.85, scrollTrigger: { trigger: ".right-door", scrub: true, start: "top top" }, xPercent: -50 } );  
  2. elegantseagulls's post in How to stop my opacity animation effect, I want my opacity style from 0 to 1 without animation was marked as the answer   
    Adding ease: 'steps(1)'  to your from and to will fix this, otherwise you can change duration to 0 and add a delay.
  3. elegantseagulls's post in SplitText Headers Flicker (Flash Briefly into View) on Page Transition was marked as the answer   
    Looks like maybe fouc to me? You'll want to set your initial css property to visibility: hidden; Better details here:
     
     
  4. elegantseagulls's post in Problem with scrollTrigger, moving headers/text using gsap.to() was marked as the answer   
    Using from is probably a better bet for this animation:
    to lengthen duration, you'll want to add a duration: to your tweens.

    See the Pen NWLmGbO?editors=0110 by elegantseagulls (@elegantseagulls) on CodePen
     
    I'm a bit confused as to what you're looking for for "#3"
  5. elegantseagulls's post in SteppedEase.config(1) returning undefined in typewriter code (Using Nuxt, mixin, and GSAP ctx) was marked as the answer   
    Looks like the docs have Stepped ease as:
    ease: "steps(1)"
  6. elegantseagulls's post in How to make scrollbar for Horizontal Scroll section? was marked as the answer   
    I think you'll want to use GSAP's Draggable for this (observer may work for this too).
     
    This thread may be helpful:

    Draggable Docs here:
     
  7. elegantseagulls's post in Horizontal scroll with "Pin" at the end was marked as the answer   
    This is to prevent a horizontal scroll bar, which can mess things up (transforms vs real scroll).

    If you want the box animation to be longer/tied to the pin, you'll maybe want to consider adding it as part of the timeline, and dividing the timeline's duration up to match the ratio of each animation. I updated my codepen to show how this would look:
    See the Pen ExegKJN?editors=0010 by elegantseagulls (@elegantseagulls) on CodePen
  8. elegantseagulls's post in Parallax effect - have content in original position in the center of the screen was marked as the answer   
    Ah yes, that's cause it's taking the transformed position of the element.

     
    const parallax50 = gsap.utils.toArray('.parallax50'); parallax50.forEach(lax50 => { gsap.fromTo(lax50, { yPercent: 50, }, { yPercent: -50, ease: 'none', scrollTrigger: { trigger: lax50, start: "-50% bottom", //top of element (offsetting 50% "from" transform), bottom of viewport end: "50% top", //bottom of element (offsetting -50% "to" transform), top of viewport scrub: true, markers: true, } }); });  
  9. elegantseagulls's post in Gsap lag problem was marked as the answer   
    Hi Sukro,

    Wondering if what you're seeing is FOUC, since the page will load with the HTML and CSS before it applies Javascript styles.
    This article might be helpful:
     
  10. elegantseagulls's post in Rotation horizontal scrolling was marked as the answer   
    This is because your rotation elements aren't part of your ScrollTrigger You'll want to either separate those into their own ScrollTriggers, or add this to your pin/scrub tween as a timeline like this:

     
    gsap.timeline({ scrollTrigger: { scroller: pageContainer, //locomotive-scroll scrub: true, trigger: "#sectionPin", pin: true, start: "top top", end: pinWrapWidth, markers: true, }, defaults: { ease: 'none' } }) .to(".pin-wrap", { x: -horizontalScrollLength, }) .to('.anuncio1', { rotation: 360*5, },0);  
  11. elegantseagulls's post in How to add an easing with svgmorph on mousemove was marked as the answer   
    I think using gsap's quickTo would be a good solution here. If you look at the mouse-follow example, you could apply the 'follow easing logic' to your progress.
    https://greensock.com/docs/v3/GSAP/gsap.quickTo()
     
    You can tween a timeline's progress like this: gsap.to(timeline, { progress: desiredProgressAmount })
    or quickTo would look something like this:const letterScale = gsap.quickTo(timeline, "progress", {duration: 0.6, ease: "power3"})
  12. elegantseagulls's post in behavior is different on live update and page load (with react) was marked as the answer   
    This could be happening if you're using React in Strict Mode. Also your GSAP syntax is using the old v2 syntax. You may consider looking at these two links:
     
    GSAP v3 migration:
     
    GSAP and React:
     
  13. elegantseagulls's post in ScrollTrigger on a page with no overflow was marked as the answer   
    I cannot get your sandbox to work.

    If I understand you, you're looking to scrub an animation with the scroll/wheel event rather than the actual scroll action (sounds as though you don't want to actually scroll, but hard to tell without a working demo). You may consider checking out GSAP's somewhat new Observer, which can nicely watch events (the first demo may point you in the right direction). https://greensock.com/docs/v3/Plugins/Observer
  14. elegantseagulls's post in help for a landing page was marked as the answer   
    It would definitely be worth looking at the FLIP plugin an effect like this: https://greensock.com/docs/v3/Plugins/Flip
  15. elegantseagulls's post in Progress Bar works 90%+ of the time, but sometimes breaks on resize was marked as the answer   
    So animating height isn't very performant.
    You may have better luck setting the progress bar to height: 100vh; with a transform-origin: top center; then animating the scaleY from 0

    gsap.from(progressBar, { scaleY: 0, scrollTrigger: { ... }}
     
    This way you wont need to calculate the window's size on refresh.
  16. elegantseagulls's post in NextJS importing DrawSVGPlugin was marked as the answer   
    Do you have the private NPM module installed with the bonus files?
  17. elegantseagulls's post in How to remove this stuff??? was marked as the answer   
    markers: false or just remove markers: true
  18. elegantseagulls's post in Remove/add timeline animation when the window inner width is greater/lower than a breakpoint was marked as the answer   
    This may be helpful if you are using ScrollTrigger, which it seems you are: https://greensock.com/docs/v3/Plugins/ScrollTrigger/static.matchMedia()
  19. elegantseagulls's post in Looping Text Marquee Animation was marked as the answer   
    There's a few approaches you could take for this.
     
    One would be to duplicate your content line, and transform both elements together to (-)100%, then repeat that infinitely.
    Details here:
     
    The other thing you can do is use gsap's wrap utility and modifiers to set the out of view elements to the end of the loop. More details here:
     
    Here's a simplified codepen that does this in a similar, but slightly different manner.
     

    See the Pen MWJpPmP?editors=0011 by elegantseagulls (@elegantseagulls) on CodePen
  20. elegantseagulls's post in ScrollTrigger Simple Parallax with Functions was marked as the answer   
    So I might be missing something here, but why not just use background-attachment: fixed; in your CSS instead of gsap to animate the background-position to be fixed?

    I'd look at the ScrollTrigger docs on using callbacks for using functions in your ScrollTriggers.
  21. elegantseagulls's post in Best way to reset timeline created inside a loop was marked as the answer   
    Have you looked at ScrollTrigger.matchMedia?
     
    https://greensock.com/docs/v3/Plugins/ScrollTrigger/static.matchMedia()
  22. elegantseagulls's post in Updating height variable within timeline and ScrollTrigger water resize was marked as the answer   
    I think you mean invalidateOnRefresh (not resize). What this does, resets the starting and ending values, so if there's a change it can accommodate for that. However, in your example, you'll want your y value to be functional rather than a just a set variable that's just getting calculated once (the timeline isn't calculating the value in your example) eg:
     
  23. elegantseagulls's post in Scrolltrigger with motionpath for svg moving along with scroll was marked as the answer   
    scrub: 1, adds a 1s smoothing-effect to the animation, so It'll dip off the screen if you're moving fast. scrub: true, or scrub: 0, will tie it directly to your scroll position. https://greensock.com/docs/v3/Plugins/ScrollTrigger
  24. elegantseagulls's post in Scrolltrigger with motionpath for svg moving along with scroll was marked as the answer   
    scrub: 1, adds a 1s smoothing-effect to the animation, so It'll dip off the screen if you're moving fast. scrub: true, or scrub: 0, will tie it directly to your scroll position. https://greensock.com/docs/v3/Plugins/ScrollTrigger
  25. elegantseagulls's post in Scrolltrigger with motionpath for svg moving along with scroll was marked as the answer   
    scrub: 1, adds a 1s smoothing-effect to the animation, so It'll dip off the screen if you're moving fast. scrub: true, or scrub: 0, will tie it directly to your scroll position. https://greensock.com/docs/v3/Plugins/ScrollTrigger
×
×
  • Create New...