Jump to content
Search Community

Osemwengie Benjamin

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Osemwengie Benjamin

  1. On 9/10/2021 at 11:06 PM, John Polacek said:
    npm install && npm install gsap@npm:@gsap/<package

    I'm curious to know if this is all I should add to my next build. I get a registry error when I used 

    npm install && npm install gsap@npm:@gsap/SplitText

     

  2. I'm encountering a problem with using gsap in Nextjs. Once an animation has completed, it inexplicably restarts after a short period of time or whenever a link or button is hovered. This behavior is quite unusual and unexpected.
     

    const brandlink = useRef()
    
    useEffect(() => {
      let brandlinkanim = new SplitType(brandlink.current, { types: 'words, lines, chars' });
    
      gsap.from(brandlinkanim.words, {
                opacity: 0,
                delay: 4.3,
                yPercent: -100,
                rotateX: -90,
                ease: Power3.easeInOut,
                invalidateOnRefresh: false,
                duration: 0.8,
                stagger: { each: 0.06 },
            })
    }

     

×
×
  • Create New...