Jump to content
Search Community

CustomEase not working

DTales 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

Hello,

I downloaded GSAP libraries and I tried dealing with CustomEase.js. 

I've imported it together with jQuery and TweenMax but I got this errore in console:

"Uncaught ReferenceError: CustomEase is not defined".

What's the problem?

Thanks.

Link to comment
Share on other sites

Keep in mind that CustomEase isn't in the github repo or the NPM registry (because it's only for people with a GreenSock account). All you need to do is download the zip file from our web site after logging in. Have you tried that? I wonder if maybe you were using the public files or something (which wouldn't have CustomEase). 

 

If you're still having trouble, feel free to post your project either from github or zip the files together so we can see exactly what you've got going on. I'm sure we can help identify the problem once we see your files/setup. 

 

Thanks for being "Shockingly Green"! 

  • Like 1
Link to comment
Share on other sites

Hello,

Yes I'm a member and I've downloaded GSAP Libraries from GSAP Club.

I found the issue, first I've imported CustomEase.js and got an error "Uncaught ReferenceError: CustomEase is not defined",

then I tried with CustomEase.min.js and it works!

So the issue is in the uncompressed version of the plugin, if you're interested in I created a github repo reproducing the error:

https://github.com/mrk197702/GSAP-CustomEase

 

Thanks

 

  • Like 1
Link to comment
Share on other sites

Ah, yes - it looks like you were trying to use the ES6 module version of CustomEase directly in the browser through a <script> tag but that'll only work if you set type="module" in the <script> tag, and only in browsers that support ES6 (most modern ones do these days). That's not related to GSAP specifically - it's just a general JavaScript/browser thing. 

 

If you want to use CustomEase in a <script> tag that's not being run through a bundler like Webpack, I'd strongly recommend using the regular minified (ES5) version of the file. It sounds like you did that and it works well. Super. 

 

Let us know if you need anything else. Happy tweening!

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