Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Jakob Sternberg

Can i do bezier, rotatation and transformOrigin all together?

Go to solution Solved by Jakob Sternberg,

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

Hi

 

I want to create a bezier motion, and each element should rotate around it self, sofar so good.

Now, can i control each element's offset?  I tried to use transformOrigin, but it does not seem to work. What am i missing? =)

See the Pen pNbrRb by squadjot (@squadjot) on CodePen

Link to post
Share on other sites

Can you elaborate on what exactly you mean by "each element's offset"? Offset from where? Do you mean their progress along the path? 

Link to post
Share on other sites

The x/y offset. The goal was to some how change the rotation point/axis of the elements.

Thanks

 

Edited... :P

Link to post
Share on other sites

Sorry, I'm still unclear about what you're asking. I really want to give you an answer, but I don't understand what your goal is specifically. Does anyone else understand? 

 

If you're asking how to get the x/y values, you can use element._gsTransform.x and element._gsTransform.y. 

Link to post
Share on other sites

My last reply didnt make much sense, i was in a hurry and forgot a few words. Sorry! i've edited it

 

Ok, so rotation makes a element rotate around it's own center.

But can i change it so it rotates around, let's say the bottom left corner?

 

Thanks alot

Link to post
Share on other sites

Ehmm omg.. i must be tired.i DO get the desired effect by using transformOrigin.. sorry for wasting your time :/

Link to post
Share on other sites

No problem. Thanks for letting us know. Glad you figured it out :)

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.

×