Jump to content
Search Community

TransformAroundPointPlugin for JS?

martis test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

  • 11 months later...

Howdy Mr. Makinson. Yeah, the whole "transform around point" thing is dependent on some matrix math and the ability to factor in various things like rotation, scale, skew, etc. I'm not very familiar with PixiJS (although I've heard nothing but great things, and I've seen wonderful demos), so I'm not in a position to explain exactly how to do it, but like Jamie said above, the capability is built into the CSSPlugin for DOM elements (including SVG). Does PixiJS provide access to the matrix of any object? 

Link to comment
Share on other sites

Hey Jack! Good to hear from you. Pixi does have a matrix included:

 

http://www.goodboydigital.com/pixijs/docs/classes/Matrix.html

 

I was able to fake what I needed and it looks good. I just find myself looking towards "old reliable" ( read greensock ) when I need these things.  :)  

I am using pixi because I was getting choppiness using css transforms. So far so good! I just need to see if it runs how I want on a Chromebox

Link to comment
Share on other sites

Excellent. Glad you got things working well. Let us know how it goes on the other devices. I've seen some AMAZING performance with PixiJS and GSAP on mobile devices. I was pretty shocked, especially compared to normal DOM stuff. 

 

By the way, I didn't see in the Pixi docs where you actually get/set matrix values on DisplayObjects. Got any idea? 

Link to comment
Share on other sites

I completely missed that you had asked about the matrix setting. I also don't see a way from the docs, but I do notice that on github it shows that they changed the api to take a matrix for PIXI.RenderTexture. I'll have to search around the source at some point to see where else its used.

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...