Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
martis

TransformAroundPointPlugin for JS?

Recommended Posts

Heya,

 

Any plans to release TransformAroundPointPlugin for JS? Anyone have an example of an element rotating around a fixed point in JS?

 

Thanks!

Link to post
Share on other sites
  • 11 months later...

I am looking for this as well, though not sure if it would help me. I am looking to scale around a point for the pixijs TilingSprite.tileScale.

Link to post
Share on other sites

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 post
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 post
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 post
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 post
Share on other sites

Yeah, please let us know if you find something that serves as a matrix getter/setter. 

Link to post
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.

×