Jump to content
Search Community

Convert TweenMax to gsap 3

Brendan8c test
Moderator Tag

Go to solution Solved by OSUblake,

Recommended Posts

  • Solution

Welcome to the forums @Brendan8c

 

Normally I would advise against animating the transform attribute like that, and just use GSAP properties like x, y, and rotation, but I didn't want to mess the animation as it already works.

 

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

 

Also, here's the Migration Guide for v3.

 

 

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

49 minutes ago, OSUblake said:

Welcome to the forums @Brendan8c

 

Normally I would advise against animating the transform attribute like that, and just use GSAP properties like x, y, and rotation, but I didn't want to mess the animation as it already works.

 

 

 

 

Also, here's the Migration Guide for v3.

 

 

Yes, thank you, you helped me. 
I've tried setting properties like x, y, and rotation, but the animation behaves differently.

 

gsap.to('.blob', {
    duration: 2,
    x: "random(50, 0.1)",
    y: "random(20, 0.8)",
    rotation: "random(-0.1, -0.8)",
    ease: Linear.easeNone,
    repeat: -1,
    repeatRefresh: true
})

 

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