merlin Posted November 21, 2019 Share Posted November 21, 2019 Using GSAP V3.0.1 Anyone know why an error like this may occur? We’re importing eases like this: import { Power1 } from 'gsap/all' which is the v2 way. We’ve tried with power1.in aswell, same error. The ‘undefined’ comes from Linear which I think makes sense because you can’t ease a linear? Link to comment Share on other sites More sharing options...
OSUblake Posted November 21, 2019 Share Posted November 21, 2019 How are you using the eases? You don't have to import the eases unless you are using the object syntax. import { gsap, Power0, Power1 } from "gsap/all" gsap.to(obj1, { x: 200, ease: Power0.easeNone }); gsap.to(obj2, { x: 200, ease: Power1.easeIn }); Using strings, you don't need to import any of the eases. import { gsap } from "gsap/all" gsap.to(obj1, { x: 200, ease: "linear" }); gsap.to(obj2, { x: 200, ease: "power1.in" }); // or gsap.to(obj, { x: 200, ease: "none" }); gsap.to(obj2, { x: 200, ease: "power1.in" }); Importing from gsap/all demo See the Pen e7f67c7a0c37c0b937bc6e8edc124025 by osublake (@osublake) on CodePen 2 Link to comment Share on other sites More sharing options...
merlin Posted November 21, 2019 Author Share Posted November 21, 2019 Not sure if it's an error with the eases in particular. It seems to happen ONLY when running the environment in Docker. If we find the problem i'll let you know. Link to comment Share on other sites More sharing options...
OSUblake Posted November 21, 2019 Share Posted November 21, 2019 1 minute ago, merlin said: Not sure if it's an error with the eases in particular. It seems to happen ONLY when running the environment in Docker. I'm not familiar with Docker. Is there anything special about that environment, like can it use es-modules? es-modules is the default that gsap uses, but maybe try using the umd version of gsap. import { gsap, Power0, Power1 } from "gsap/dist/gsap"; 2 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now