Jump to content
Search Community

DavTho

Members
  • Posts

    4
  • Joined

  • Last visited

Recent Profile Visitors

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

DavTho's Achievements

1

Reputation

  1. I want to use the bonus plugin MotionPathPlugin. I moved the gsap-bonus.tgz file from the extracted download zip to my local project directory and ran npm install --save ./gsap-bonus.tgz. Then in my package.json I get the line: "gsap": "file:gsap-bonus.tgz", This doesn't seem right, and when I try npm start to run the project, I get 'MotionPathPlugin' is not defined How do I use MotionPathPlugin in React?
  2. That's awesome! Thanks for helping me out so quickly!
  3. I need to stop the flicker that happens on loading a React component with an SVG inside, so that the SVG appears offscreen at the start. I'm using React Hooks and a simple setTimeOut inside a useEffect hook to control a display property does not seem to work. This animation code works, but produces a flicker: const mortarBoard = useRef(null); useEffect(() => { const tl = new TimelineMax(); tl.fromTo("#mortarboard", 5, { y: 1200 }, { y: 0 }); }, []); whereas this code the flicker is not noticeable: const mortarBoard = useRef(null); useEffect(() => { TweenMax.fromTo( [mortarBoard.current], 0.5, { x: 5, y: 18 }, { x: -5, y: -40, yoyo: true, repeat: 3 } ); }, []); How do I hide the component before the animation starts?
×
×
  • Create New...