Jump to content
Search Community

motionPath always throws errors

jsp test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...