Skip to content

Instantly share code, notes, and snippets.

@RolandWarburton
Last active March 6, 2021 12:25
Show Gist options
  • Save RolandWarburton/07fbb4fb5e4257b63d4cfd6e9350ff24 to your computer and use it in GitHub Desktop.
Save RolandWarburton/07fbb4fb5e4257b63d4cfd6e9350ff24 to your computer and use it in GitHub Desktop.
const bounceEffect = (target) => {
const dur = 1.25;
const bounceEffect = new TimelineMax();
bounceEffect
.to(target, { y: "-=20", ease: Sine.easeInOut, duration: dur })
.to(target, { y: "+=40", ease: Sine.easeInOut, duration: dur })
.to(target, { y: "-=20", ease: Sine.easeInOut, duration: dur });
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment