Jump to content
Search Community

Gsap, Pixi and transform origin

dejv test
Moderator Tag

Recommended Posts

Hi, im trying to wrap my head around gsap 3 and pixi.

Im scaling and rotating some sprites so I need some way to set the origin of the transforms.

 

I cant find any mention of transformOrigin in the gsap 3 documentation and when im trying to implement it I am getting "gsap.min.js:10 Invalid property transformOrigin set to 50% 50% Missing plugin? gsap.registerPlugin()"

 

I cant find any plugin for transformorigin.

 

Is this something to do with me, Pixi or did transformorigin go missing from gsap 3?

Very confused here. Thanks

Link to comment
Share on other sites

3 hours ago, dejv said:

I am getting "gsap.min.js:10 Invalid property transformOrigin set to 50% 50% Missing plugin? gsap.registerPlugin()"

That means that your target is not a DOM object and transformOrigin can't apply (because it doesn't exist).

 

I believe that Pixi has a pivot that you can set instead, though it's not strictly the same thing as a transform origin. @OSUblake works with Pixi more and might can provide additional insight.

 

Alternatively you could place the item in a container, translate it negatively by half of its width and height, and then rotate the container instead. 

  • Like 1
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...