Jump to content
GreenSock

payne199

Trouble loading SlowMo for first time

Go to solution Solved by Carl,

Recommended Posts

Sorry for such a basic question. But it is a real problem. I am a GreenSock member and trying to load SlowMo for the first time and it just won't go.

 

I've written basic code and loaded the proper CDNs

<style> .box{width: 100px; height: 100px; border: solid 1px black;}</style>

 

<body>
    <div class="box"></div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.7.1/gsap.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.7.1/EasePack.min.js"></script>
    <script src="EasePack.min.js"></script>
    <script>
          gsap.to('.box'3,{x: 1000, ease: "slow(.1, .7"});
    </script>
</body>

 

I've loaded the EasePack.min.js  file into my project:

file.PNG.d1e8b06955306e8eb49589333d805133.PNG

 

By all appearances (to me) this should do it.

The code runs but does not include the SlowMo.

A simple task for many, but I've spent a lot of time spinning my wheels on this and getting nowhere.

Would someone please direct me as to where I am going wrong?

 

Link to comment
Share on other sites

  • Solution

judging solely from the code you provided you have a typo in that you are missing the closing ) and you probably should use leading 0s

 

try

gsap.to('.box', 3,{x: 1000, ease: "slow(0.1, 0.7)"});

and it looks like you are loading EasePack from 2 sources. just use 1 of them

  • Like 3
Link to comment
Share on other sites

Wow! And I thought I thoroughly combed over that code (and over and over). Thank you.

  • Like 1
Link to comment
Share on other sites

no problem. we all make those mistakes every day. it's the fun of being a developer.

glad you got it working. SlowMo is my favorite ease. Here's a fun demo

See the Pen KKWBaYW?editors=1010 by snorkltv (@snorkltv) on CodePen

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