Jump to content
Search Community

| GreenSock
44162

CustomWiggle extends CustomEase (think of it like a wrapper that creates a CustomEase under the hood based on the variables you pass in), allowing you to not only set the number of wiggles, but also the type of wiggle (there are 5 types; see demo below). Advanced users can even alter the plotting of the wiggle curves along either axis using amplitudeEase and timingEase special properties. Note that the video is using GSAP 2 format.

Demo: CustomWiggle Types

Options

  • wiggles (Integer) - Number of oscillations back and forth. Default: 10
  • type (String) "easeOut" | "easeInOut" | "anticipate" | "uniform" | "random" - tThe type (or style) of wiggle (see demo above). Default: "easeOut"
  • amplitudeEase (Ease) - Provides advanced control over the shape of the amplitude (y-axis in the ease visualizer). You define an ease that controls the amplitude's progress from 1 toward 0 over the course of the tween. Defining an amplitudeEase (or timingEase) will override the "type" (think of the 5 "types" as convenient presets for amplitudeEase and timingEase combinations). See the example codepen to play around and visualize how it works.
  • timingEase (Ease) - Provides advanced control over how the waves are plotted over time (x-axis in the ease visualizer). Defining an timingEase (or amplitudeEase) will override the "type" (think of the 5 "types" as convenient presets for amplitudeEase and timingEase combinations). See the example CodePen to play around and visualize how it works.

How do you control the strength of the wiggle (or how far it goes)? Simply by setting the tween property values themselves. For example, a wiggle to rotation:30 would be stronger than rotation:10. Remember, and ease just controls the ratio of movement toward whatever value you supply for each property in your tween.

Sample code

//Create a wiggle with 6 oscillations (default type:"easeOut")
CustomWiggle.create("myWiggle", {wiggles:6});
//now use it in an ease. "rotation" will wiggle to 30 and back just as much in the opposite direction, ending where it began. 
gsap.to(".class", {duration: 2, rotation:30, ease:"myWiggle"});

//Create a 10-wiggle anticipation ease:
CustomWiggle.create("funWiggle", {wiggles:10, type:"anticipate"});
gsap.to(".class", {duration: 2, rotation:30, ease:"funWiggle"}); 

Wiggling isn't just for "rotation"; you can use it for any property. For example, you could create a swarm effect by using just 2 randomized wiggle tweens on "x" and "y", as demonstrated here.

Download CustomWiggle

CustomWiggle and CustomBounce are membership benefits of Club GreenSock. It's our way of saying "thanks" to those who support GreenSock's ongoing efforts. Joining Club GreenSock gets you a bunch of other bonus plugins and tools like MorphSVGPlugin as well, so check out greensock.com/club/ for details and sign up today. Note: CustomWiggle is not in the GitHub repository or CDN; it's only available for download at GreenSock.com.

Demos

  • Thanks 1

Get an all-access pass to premium plugins, offers, and more!

Join the Club

With great power comes great responsibility. Tween wisely.

- Team GreenSock



User Feedback

Recommended Comments

@kute CustomWiggle is a membership benefit of Club GreenSock. It looks like you haven't signed up yet, so that's why it's not in your ZIP file. Once you sign up (and are logged in), the ZIP file you download will indeed have CustomWiggle in there (along with the other bonus plugins). Enjoy!

Link to comment
Share on other sites

On 10/20/2020 at 11:41 PM, GreenSock said:

@kute CustomWiggle is a membership benefit of Club GreenSock. It looks like you haven't signed up yet, so that's why it's not in your ZIP file. Once you sign up (and are logged in), the ZIP file you download will indeed have CustomWiggle in there (along with the other bonus plugins). Enjoy!

That's strange. I have signed up and downloaded the zip file(twice), but I don't see CustomWiggle.js file anywhere. Could you know what the reason might be?

Link to comment
Share on other sites

14 hours ago, praaatik said:

That's strange. I have signed up and downloaded the zip file(twice), but I don't see CustomWiggle.js file anywhere. Could you know what the reason might be?

It doesn't look like you signed up for Club GreenSock yet, @praaatik. CustomWiggle is only available to members. You can sign up at https://greensock.com/club

 

Once you're a paying member, your download zip will have those extra plugins. 

Link to comment
Share on other sites

3 hours ago, GreenSock said:

It doesn't look like you signed up for Club GreenSock yet, @praaatik. CustomWiggle is only available to members. You can sign up at https://greensock.com/club

 

Once you're a paying member, your download zip will have those extra plugins. 

 

Thanks for the reply.

I guess this page needs to be updated? Or perhaps there's a link to a more recent documentation which I may have missed because this page clearly states that

 

Quote

Get CustomWiggle by creating a FREE GreenSock account which gets you access to our community forums plus you’ll receive our exclusive “GreenSock Insider” email series (you can unsubscribe anytime). Use the widget below to sign up (or if you’re already logged in, you’ll get immediate access to the download zip containing CustomWiggle).

 

Edited by praaatik
Spaces update
Link to comment
Share on other sites

7 minutes ago, praaatik said:

I guess this page needs to be updated? Or perhaps there's a link to a more recent documentation which I may have missed because this page clearly states that

I'm so sorry about the confusion. It has been updated. CustomWiggle was never free - the typo probably came when a staff member inadvertently copied some text from the CustomEase page (CustomEase is indeed free to anyone who creates a GreenSock account). Thanks for pointing out the miscommunication!

Link to comment
Share on other sites

3 hours ago, GreenSock said:

I'm so sorry about the confusion. It has been updated. CustomWiggle was never free - the typo probably came when a staff member inadvertently copied some text from the CustomEase page (CustomEase is indeed free to anyone who creates a GreenSock account). Thanks for pointing out the miscommunication!

 

@GreenSock It's not a problem. Thanks for the clarification!

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

×
×
  • Create New...