Jump to content
Search Community

conspireagency

Members
  • Posts

    2
  • Joined

  • Last visited

conspireagency's Achievements

1

Reputation

  1. Yeahhh just figured that out right now looking at the console haha! Thanks for the quick reply though, honestly amazed. Just in case this helps anyone... import gsap, {TweenMax, Sine} from 'gsap' import MorphSVGPlugin from 'gsap/MorphSVGPlugin' Then usage something like this gsap.registerPlugin(MorphSVGPlugin); const lineAnimate = useRef(null); const lineRef = useRef(null); useEffect(() => { TweenMax.to(lineAnimate.current, 1.2, { morphSVG : lineRef.current, repeat: -1, yoyo: true, ease: Sine.easeInOut, delay: 0, }); });
  2. Having a similar issue where morphSVG seems to be ignored, but other gsap animations work fine. React project. I've installed gsap via the members npm package and imported. import TweenMax from 'gsap' import Sine from 'gsap' import MorphSVGPlugin from 'gsap/MorphSVGPlugin' Here's what the usage looks like (the items with ".current" are the references to the svg elements). TweenMax.to(lineAnimate.current, 1.2, { morphSVG: lineRef.current, repeat: -1, yoyo: true, ease: Sine.easeInOut, delay: 0, });
×
×
  • Create New...