bromel Posted November 4, 2019 Share Posted November 4, 2019 hi guys I keep getting this warning in my console in regards to this piece of code .to(verifier.dom.container.find('#left-eye'), 3.32, {morphSVG:'#left-wink', type:'rotational', origin:'0% 50%', ease: Power2.easeIn}, 'time+=17.4') now i am not quite sure why, have i done something wrong? many thanks bromel Link to comment Share on other sites More sharing options...
GreenSock Posted November 4, 2019 Share Posted November 4, 2019 Yep, you just formatted your stuff incorrectly - you need to tuck all your morphSVG-related stuff into an object: // BAD: ...{morphSVG:'#left-wink', type:'rotational', origin:'0% 50%', ease: Power2.easeIn}... // GOOD: ...{morphSVG:{shape:'#left-wink', type:'rotational', origin:'0% 50%'}, ease: Power2.easeIn}... As a convenience, if you're ONLY passing a shape in, there's no need to wrap stuff in an object. But once you start needing to define additional morph-related settings, you've gotta wrap it in an object so that it's properly scoped/grouped. The way you've got it formatted now makes GSAP think you're literally trying to animate "type" and "origin" properties of your target (which don't exist, of course, hence the warnings). Does that clear things up for you? 3 Link to comment Share on other sites More sharing options...
bromel Posted November 5, 2019 Author Share Posted November 5, 2019 Hi @GreenSock many many thanks, yes it makes complete sense to me Thanks Bromel 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