Alexli

3D transform of <image> element

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: 

 

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

Share this post


Link to post
Share on other sites

Sorry, the current SVG spec doesn't allow 3D transforms on child elements. SVG 2.0 probably will. For now you can rotate the whole SVG all you want.

 

Hopefully that helps. Happy tweening.

:)

 

  • Like 5

Share this post


Link to post
Share on other sites

Dear Point C,

 

Thank you so much for your reply.

 

may I ask if there is something from gasp instead of can do this flipping besides 3D transform?

 

Thank you and wish you have a happy weekend.

 

cheers,

 

alex

Share this post


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

Share this post


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.