Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Chuck Taylor

Docs improvement suggestion for CustomWiggle

Recommended Posts

Hi, I just spent a fair bit of time trying to get a basic CustomWiggle to work. I'm importing via npm, so I use

import { gsap } from 'gsap'
import { CustomWiggle } from 'gsap/CustomWiggle'
gsap.registerPlugin(CustomWiggle, CustomEase)

I created a rather simple wiggle animation, and was hit with an error coming from CustomWiggle.js indicating that yEase is not a function. I came to the forums, but couldn't find anyone having a similar issue. (Probably all asking about ScrollTrigger 😆).

Anyway, after a few hours, I tried adding the CustomEase as well to my project.

import { gsap } from 'gsap'
import { CustomEase } from 'gsap/CustomEase'
import { CustomWiggle } from 'gsap/CustomWiggle'
gsap.registerPlugin(CustomWiggle, CustomEase)

 

This fixed the problem for me. While the docs state :

Quote

CustomWiggle is a variation of CustomEase that lets you set the wiggle amount and type.

it doesn't go far enough to indicate that you must include the CustomEase script in order for it to work.

https://greensock.com/docs/v3/Eases/CustomWiggle

 

I am using gsap 3.8.0

 

Screen Shot 2021-10-29 at 10.46.20 PM.png

Screen Shot 2021-10-29 at 10.48.17 PM.png

Link to comment
Share on other sites

2 hours ago, Chuck Taylor said:

(Probably all asking about ScrollTrigger 😆).

 

Haha. That's pretty much what every question seems to be these days.

 

2 hours ago, Chuck Taylor said:

it doesn't go far enough to indicate that you must include the CustomEase script in order for it to work.

 

It does link to the installation page, but maybe it's not clear enough. Any and all suggestions are welcomed on how to improve or make it clearer.

 

On the installation page, if you use the helper, it will automatically show that you need to import CustomEase...

https://greensock.com/docs/v3/Installation

 

image.png

 

 

Link to comment
Share on other sites

5 minutes ago, OSUblake said:

It does link to the installation page

 

Maybe we could change some of those links so that it will show the plugin selected in the helper, kind of like this.

https://greensock.com/docs/v3/Installation?checked=core,customEase,customWiggle

 

Although it doesn't scroll to helper. Might need to find a way to fix that.

 

  • Like 1
Link to comment
Share on other sites

Thanks for the suggestion, @Chuck Taylor. I just updated the text a bit to make it clearer. Blake, I like your idea too with the link. 👍

Link to comment
Share on other sites

Just thinking how I work, (and this is clearly not everyone), my default workflow is I add the plugin to my project (intellisense in my editor allows me to see all the plugins pretty easily while doing the import). Then, I try to just have something basic work, and if that is not going as planned, I check out the docs.

 

I'm used to reading in most of your documentation clarifications or overview explanation near the top before you get into methods and properties that can be played with. So perhaps clarifying that CustomEase is a dependency of CustomWiggle and must be included in your project (as opposed to just mentioning that it extends CustomEase), would be the clearest?

Again, this is just likely a result of my workflow, but as a result of it, I really don't default to installation notes to see this information.

 

Lastly, thank you for this plugin extension! An old one, but a good one! I was able to get the effect I was after in about 6 lines of code (x, y, and rotation separated) and quickly iterate over variations to find the result I was after. WAAAAY better than fiddling with paths in illustrator and going back and forth over and over again. 😄

Link to comment
Share on other sites

Yep, I already said it must be included in the project. Plus I added a gsap.registerPlugin(CustomEase, CustomWiggle) to the sample code to make it even clearer. Did you have a specific recommendation for changing the current text? 

 

8 hours ago, Chuck Taylor said:

Lastly, thank you for this plugin extension! An old one, but a good one! I was able to get the effect I was after in about 6 lines of code (x, y, and rotation separated) and quickly iterate over variations to find the result I was after. WAAAAY better than fiddling with paths in illustrator and going back and forth over and over again. 😄

Yay! Very happy to hear that. 🎉

Link to comment
Share on other sites

On 10/30/2021 at 4:56 PM, GreenSock said:

Yep, I already said it must be included in the project.

Ah! I don't think that this showed up for me when I looked again. I refreshed and see it! Thanks.

  • Like 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.
×