Jump to content
Search Community

ReferenceError: CustomEase is not defined

_marta test
Moderator Tag

Recommended Posts

Hello all, 

 

I've been using gsap for quite a while with no problems, but today I started experimenting with CustomEase. I dowloaded the zip file and ran npm install for the .tgz file on the "npm-install-this" folder. After that I went to the js file in which I was using CustomEase and I added at the beginning of the file:

 

import 'gsap/CustomEase';

And then where I wanted to use the easing function I did:

 

CustomEase.create('custom', 'M0,0,C0.126,0.382,0.324,0.584,0.482,0.732,0.553,0.798,0.612,0.78,0.69,0.796,0.69,0.796,0.816,0.842,0.816,0.842,0.84,0.862,0.859,0.879,0.893,0.918,0.918,0.946,0.951,1,1,1');
        

But when I ran the easing it gave me the error ReferenceError: CustomEase is not defined. Am I missing something?

Link to comment
Share on other sites

  • 2 years later...

How can i do this if I am not using imports, I am using the cdn and I have referenced this in my html

 

<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.0/gsap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.0/EasePack.min.js"></script>
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...