Jump to content
Search Community

pcdavis

Members
  • Posts

    7
  • Joined

  • Last visited

pcdavis's Achievements

0

Reputation

  1. Hi, I have a React component that is a replica of the Reddit character. It is composed of several grouped paths and I would like to conditionally render a different face on the character based on the value of this.state.face in the component and tween the animation when the faces change. In the codepen example, I have two alternative groups of paths: base_face and angry_face. I use a ternary operator to click and show each version, but I can't figure out how to tween a group of paths to animate from base_face to angry_face and vice versa. Any help would be greatly appreciated. Thanks, Paul
  2. I have a GSAP animation working in a React component on codepen (thank you @rodrigo). Now I am trying to use it in my React project, but I get an error message saying, "'../../index' does not contain an export named 'TweenMax'." I'm guessing my strategy of placing the cdn links for TweenMax and MorphSVGPlugin in the public/index.html was not the correct way to add GSAP to the project. Do I have to download the source code and place it in the project or can I still use the CDN - and if so, where do I place the link? Thanks for any suggestions. Paul
  3. Any chance you could take a look at my codepen? I can get my GSAP svg to work without React. But, as soon as I try to place it inside a React component, it doesn't show up. I am not quite sure how to create and render React components inside of codepen, so I followed the example you showed above. Below I am pasting links to the codepen where the GSAP svg works (non-React) and the broken one (React). I would be grateful for any help. If you know of any npm packages that help GSAP and svg in-general work well with React, please let me know. Thanks again. Paul. Broken React version: And here is the version that works without React:
  4. Hi, I'm new to Greensock, so please excuse me if this is a dumb question. I used Illustrator to create two alternatives of the reddit logo: one with fill color gray, the other with fill color red. The morphSVG works correctly on the shape change, but the color is not changing from gray to red. Any help would be greatly appreciated. NOTE: In the attached codepen, you have to click on the word "Devil" to start the animation. Thanks, Paul
  5. You guys are awesome. Thanks so much for the help!
  6. I am learning GSAP by following your YouTube tutorial "Getting Started Quickly with GSAP". I am trying to animate a jpg across the screen but am getting no joy. Could someoen take a look at my codepen and tell me what I'm doing wrong? Sorry for the newbie question. Paul
×
×
  • Create New...