Jump to content
Search Community

Possible bug with transformOrigin in SVG when using gsap.from()

zulin test
Moderator Tag

Recommended Posts

Ok, so here are 2 almost identical tweens.

Both initially set transformOrigin of bars to bottom-center.

The first one uses gsap.from() and it works weird, looks like it's some bug (or perhaps I miss something?)
The second one is almost the same, but it uses gsap.to() and transformOrigin seems to work fine.

What could be the reason for such behaviour?

See the Pen QWjBZPd by zulin (@zulin) on CodePen

Link to comment
Share on other sites

Nah, I think you just need to do...

tl.set(items, { transformOrigin: '50% 100%', immediateRender: true });

// OR SET IT BEFORE CREATING YOUR TIMELINE
gsap.set(items, { transformOrigin: "50% 100%"})

About immediate render.

 

Also, you're using a deprecated ease syntax. Just lowercase and the type. 

https://greensock.com/docs/v3/Eases

 

"power3" // same as power3.out
"power3.in"
"power3.out"
"power3.inOut"

 

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