Jump to content
Search Community

Simple Overshoot/Pop Animation

devin1229 test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

I'm new to this Greensock thing and I'm trying to create just a simple "pop" that adjusts the scale and overshoots it a bit before returning back to the original scale. Something like what's found on

See the Pen dYvLpN by Jtwa (@Jtwa) on CodePen

.

 

I've been pouring over the documentation and I'm not sure if it's using a .fromTo or something. Or do you just link a bunch of gsap.to's together?

See the Pen BaRbpYq by devin1229 (@devin1229) on CodePen

Link to comment
Share on other sites

15 minutes ago, PointC said:

Hi @devin1229 :)

 

Welcome to the forum.

 

It should be 'ease' instead of 'easing'. Something like this should get you started.



gsap.to(".circle", {
  duration: 1,
  scale: 2,
  ease: "elastic.inOut",
  yoyo: true,
  repeat: -1
});

Happy tweening and welcome aboard.

:)

 

 

Thanks! That gets me closer, but I need the circle to shrink back to the initial scale. The above keeps the scale as 2.
If I were using a CSS animation, it'd be something like:

 

@keyframes animation {
  
  0% {
    transform: scale(0)
  }
  
  80% {
    transform: scale(1.2)
  }
  
  100% {
    transform: scale(1)
  }

 

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