Jump to content
Search Community

Easing not working in the gsap module.

NamedPlayer test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

image.thumb.png.4fc2a982a2441846c3e41e06be73407e.png

 

I'm currently running a Nuxt project with gsap hooked in. However all the basic ease things don't seem to be working except those 'RoughEase,Slowmo' imported separately. I get error messages like 'Power4 is not defined' or similar. How do I import all the basic ease things properly?

 

 

image.thumb.png.99eb5c5e30ec579a4f7e6480178a8407.png

 

 

 

Link to comment
Share on other sites

  • Solution

That error message indicates you forgot to import it. 

import { gsap, Power4 } from "gsap";

But frankly, I think it's much cleaner to just use the string-based syntax that was introduced in GSAP 3. No extra imports needed at all:

gsap.to(".class", { ease: "power4" });

There's "power4.out", "power4.in", and "power4.inOut" and when you leave off the ".*", it defaults to ".out". 

 

https://greensock.com/3-migration

  • Like 2
Link to comment
Share on other sites

3 hours ago, tailbreezy said:

Hello,

 

Interesting, Power4 should be accessible. Have you tried to use the more conventional way ease: "power4"?

 

2 hours ago, GreenSock said:

That error message indicates you forgot to import it. 


import { gsap, Power4 } from "gsap";

But frankly, I think it's much cleaner to just use the string-based syntax that was introduced in GSAP 3. No extra imports needed at all:


gsap.to(".class", { ease: "power4" });

There's "power4.out", "power4.in", and "power4.inOut" and when you leave off the ".*", it defaults to ".out". 

 

https://greensock.com/3-migration

 

I just tried, It works fine with second version!

 

Thanks to all of you! have a nice day XD

 

 

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