Jump to content
Search Community

Yoyo Animation with variations in timing

Kikovich 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

We are just trying to convert our clients Flash-Animations to GSAP.

You can see a part of it in the Codepen URL. I used a Yoyo-Animation to make the eyes blink. But to make it feel more natural, I want some variations in the blinking. The time between the blinks is now at one second. How can I achieve these variations, so that ,for example, one time it takes 1 second, the next time it takes 2 seconds and so on. How can I achieve this?

Thx in advance!

 

See the Pen xGNzaO by anon (@anon) on CodePen

Link to comment
Share on other sites

Hey, great solutions!

Thank you very much, Diaco and Carl! :)

 

I'm using Carls solution, because - for me, as a No-Coder - it's somehow more readable.

I adapted the timing it a little bit to make the blinking eyes look more natural.

 

I have to study Diaco's solution in depth, so that I understand how it's working...  :D

 

See the Pen zGQLbP by anon (@anon) on CodePen

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