Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
khairunnisaas

What is "Hamster()" in GSAP Draggable

Go to solution Solved by OSUblake,

Recommended Posts

hello everyone,

im new with gsap, and i already learn the basic of gsap. right now i want to learn about gsap draggable plugin. i found a codepen about gsap draggable, scrollable auto slider from greensock account and i confused in the last part of JS code where there's a Hamster() function, and i don't know where it come from. any lead?

 

image.png.04256e69e7830fd012ffea00c151c9de.png

See the Pen ExvZjZQ?editors=1010 by GreenSock (@GreenSock) on CodePen

Link to comment
Share on other sites

  • Solution

Welcome to the forums @khairunnisaas

 

Draggable doesn't have any hamsters 🐹

 

Best bet is to look at what scripts are being loaded in that pen...

 

image.png

 

Looks like HamsterJS is a library to help with mouse wheel events...

https://github.com/monospaced/hamster.js

 

 

  • Like 5
Link to comment
Share on other sites

giphy.gif

This is officially my favourite forum post so far.

Thanks for starting my morning off with a chuckle @khairunnisaas 

  • Like 1
  • Haha 5
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.
×