maki3000 Posted February 22, 2023 Share Posted February 22, 2023 When I use morphSVG with shapeIndex duration the duration is ignored. I do: morphSVG.convertToPath('#letter-k-polygon, #letter-ki-svg-morph-rect') gsap.to('#letter-k-polygon', { morphSVG: { shape: '#letter-ki-svg-morph-rect', shapeIndex: 12, duration: 10 } }) Like this the animation goes quite fast. But when I do: gsap.to('#letter-k-polygon', { morphSVG: '#letter-ki-svg-morph-rect', duration: 10 }) The animation duration is 10 seconds. What am I doing wrong? Sorry, I can't add a CodePen, because I don't know how to get around restricted use of morphSVG... Link to comment Share on other sites More sharing options...
GreenSock Posted February 22, 2023 Share Posted February 22, 2023 That's because you put the duration INSIDE the morphSVG object, but it doesn't belong there. // BAD {morphSVG:{ shape: "#...", shapeIndex: 12, duration: 10}} // GOOD {morphSVG:{ shape: "#...", shapeIndex: 12}, duration: 10} As for using MorphSVG on CodePen, you can use all the bonus plugins for free there. See (there are special trial versions that only work on whitelisted domains). Happy tweening! 2 Link to comment Share on other sites More sharing options...
maki3000 Posted February 23, 2023 Author Share Posted February 23, 2023 Thank you very much! Works like charm! I spent half a day yesterday to find a good JS SVG morph library to be honest. Finally I took the decision to buy good software and boom, it's working 👍 1 Link to comment Share on other sites More sharing options...
GreenSock Posted February 23, 2023 Share Posted February 23, 2023 5 minutes ago, maki3000 said: I spent half a day yesterday to find a good JS SVG morph library to be honest. Finally I took the decision to buy good software and boom, it's working 👍 We love hearing that, @maki3000. Thanks for being part of Club GreenSock! 💚 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