Jump to content
Search Community

3D transform of <image> element

Alexli 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

Dear All,

 

I love Gsap and I am working on a website full of animations using Gsap. 

 

Gsap is awesome!

 

Recently I ran into a new problem, I am not able to do 3D transform for an <image> element in my SVG

 

I have looked into many threads in here, and this one too: 

See the Pen yzahJ by GreenSock (@GreenSock) on CodePen

 

I am not sure what I have missed, but I am quite sure Gsap can do the 3D transform of it.

 

Guys, please help me out. Thank you so much.

 

Wish you All have a wonderful Friday.

 

Cheers,

 

Alex

See the Pen jvdKoK by alexli2017 (@alexli2017) on CodePen

Link to comment
Share on other sites

I'd recommend rotating the whole SVG or just using a regular DOM div/image instead of putting the image in the SVG. That being said, you can use scaleX:-1 which looks kind of like a y rotation. You could try this:

 

.to($('#hello'), 1, {scaleX:-1, transformOrigin:"center center", ease:Back.easeOut}, "helloGsapTLStart+=1");

 

That might work for your needs. Happy tweening.

:)

 

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