KristineJ Posted May 12, 2022 Share Posted May 12, 2022 Hi! I am trying to get these flowers to sway gently from side to side-- each of the flowers are separate SVGs. Not sure about the best way to go about this or what methods to use- thanks for any help or suggestions!! Link to comment Share on other sites More sharing options...
OSUblake Posted May 12, 2022 Share Posted May 12, 2022 Welcome to the forums @KristineJ You might be able to use the MorphSVGPlugin, which is a Club GreenSock perk. Other than that, animating a plant swaying is not trivial. It definitely ranks up there on the difficulty scale. I made some grass animations several years ago, and even the most basic version required ended up being really math heavy. See the Pen OyEgop by osublake (@osublake) on CodePen 2 Link to comment Share on other sites More sharing options...
KristineJ Posted May 12, 2022 Author Share Posted May 12, 2022 Ah, gotcha I was able to get a slight sway -- it's not perfect, but it'll do the job-- I ran into some browser trouble though, my SVG's aren't loading properly on Firefox (even without animation), over my PNG's are working-- but if I use the PNG the animation doesn't work-- is there a way to use my animation with PNG files? I've included a sample of my code Link to comment Share on other sites More sharing options...
OSUblake Posted May 12, 2022 Share Posted May 12, 2022 Nothing stands out as being off, and you can certainly animate PNGs, but I'm not sure you would see that animate if the rotation is going from -1 to 1. That's a tiny amount of movement. Can you make a minimal demo of the issue? Link to comment Share on other sites More sharing options...
KristineJ Posted May 13, 2022 Author Share Posted May 13, 2022 Perfect, it did work with the PNGs and the issue is fixed. I don't where I got the idea that I couldn't use PNGs, whoops! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now