jsp Posted June 15, 2023 Share Posted June 15, 2023 Hello, I'm trying to work with the MotionPath Plugin and no matter what I use, SVG string or an array of object with x,y coordinates I always get the same error trying to animate a canvas object: gsap.min.js?125:10 Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'. at _parseTransform (gsap.min.js?125:10:62306) at _get (gsap.min.js?125:10:61604) at Object.Id [as save] (gsap.min.js?125:10:53349) at gsap.min.js?125:10:53213 at Array.forEach (<anonymous>) at Object.Id [as save] (gsap.min.js?125:10:53183) at gsap.min.js?125:10:54163 at Array.forEach (<anonymous>) at Ld (gsap.min.js?125:10:54134) at i.init (MotionPathPlugin.min.js:10:19130) I'm using several other plugins without issue, but no matter what data i provide the motionpath I get the same identical error. Even this fails: const tgt = this.controller.character; gsap.to(tgt,{ duration:1, motionPath: [{x:100, y:50}, {x:200, y:0}, {x:300, y:100}] }) Link to comment Share on other sites More sharing options...
Solution GreenSock Posted June 15, 2023 Solution Share Posted June 15, 2023 There was a regression in a version a little while back but it has been resolved - just update your GSAP version and it should resolve things. Sorry about any confusion there. Link to comment Share on other sites More sharing options...
jsp Posted June 15, 2023 Author Share Posted June 15, 2023 That solved it! thank you so much for the assist! Link to comment Share on other sites More sharing options...
GreenSock Posted June 15, 2023 Share Posted June 15, 2023 Anytime! And thanks for being a Club GreenSock member, @jsp 🥳💚 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