Jump to content
GreenSock

jash

MotionPath and PIXI not working together?

Recommended Posts

I try to figure out how to get MotionPathPlugin and PixiPlugin working together. Following code doesn't work by getting an error:

 

gsap.to(target, {
  motionPath: [
    {pixi: {scaleX: 0.8, scaleY: 0.8}},
    {pixi: {scaleX: 1, scaleY: 1}},
  ]
})

// results in this error: Uncaught TypeError: target.getAttribute is not a function

 

Another possibility I tried didn't work as well:

gsap.to(target, {
  pixi: {
    motionPath: [
      {scaleX: 0.8, scaleY: 0.8},
      {scaleX: 1, scaleY: 1},
    ],
  },
})

// results in this warning: gsap-core.js:83 Invalid property motionPath set to (2) [{…}, {…}] Missing plugin? gsap.registerPlugin()

 

What worked, but therefore I do not need the PixiPlugin anymore (and losing the benefits, to have only one tween, when i.e. animating the alpha as well)

gsap.to(target.scale, {
  motionPath: [
    {x: 0.8, y: 0.8},
    {x: 1, y: 1},
  ],
})

 

What do you say? Did I miss something, or is there currently no support to make use of the PixiPlugin within the MotionPathPlugin?

 

Best regards – Matthias

Link to comment
Share on other sites

Generally speaking you can't nest plugin settings inside other plugins. Please consult this thread for a working example of MotionPathPlugin + Pixi: 

 

  • Like 3
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.
×