Jump to content
Search Community

Translate Div Through a Fixed Point

SMBM test
Moderator Tag

Go to solution Solved by OSUblake,

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

I'm trying to translate a div through a point so that it ends up on the exact opposite side of said point.

ie. if the div's x, y coordinates are (100, 0) and the point is (200, 1) I'd like the div to end up at (300, 2).

I'd like a method I can apply to multiple elements all going through the same point. I tried to find a way by making the point the transform origin of the div but it didn't seem to help anything.

 

Is this possible with Tween?

 

As you can see in the code pen, the circles spin on the y axis and therefore become thin as they cross over, I want them to remain flat and slide over instead.

See the Pen yORPgW by SMBM (@SMBM) on CodePen

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