Jump to content
Search Community

Random numbers for polygon point animation

sygad1 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

Hi All,

 

I'm trying to create a continuously changing polygon animation that uses randomly generated values for the points.

 

I've got it working for the 1st set of generated numbers, but it doesn't use the subsequent set of values.

 

It keeps repeating between the initial shape points and the 1st set of generated points.

 

Any ideas on how to "refresh" the points so it can constantly change the shape of the polygon

 

Cheers

See the Pen ZydmKV by sygad1 (@sygad1) on CodePen

Link to comment
Share on other sites

@OSUblake thank you for that, very interesting way of doing it and actually a lot closer to what I had in mind from a finished visual. The offset is an idea I have been bouncing around to limit the amount of movement and it helps to keep it close to the original shape without it collapsing too heavily onto itself.

 

 

  • Like 1
Link to comment
Share on other sites

  • 4 years later...

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