Jump to content
Search Community

Get drag force

Victor Work test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hello GSAPer's
I'm trying to make a Draggable Slider similar to this one in Link (https://asaro.co.uk/experiences/challenges/).

But I could not find the best way to make the skew proportional to the drag force.
And I also noticed that the draggable of the ((https://asaro.co.uk/experiences/challenges/) has a greater force when pulling the container, can you do this using the Draggable Plugin?

 

here is my attempt:

See the Pen KGxKBb by Noturnoo (@Noturnoo) on CodePen


 

Link to comment
Share on other sites

I took a look at the pens presented in the topic but I confess they are a little above my level of understanding, but I tried to do using the track similar to the way @GreenSock  (Jack) uses in his example, but skewX does not render the value of the track, Why?
The attempt is below.
 

See the Pen BqOdBP by Noturnoo (@Noturnoo) on CodePen

 

  • Like 1
Link to comment
Share on other sites

It looks like you were creating a new tracker on every single onDrag event. You should just create a tracker once and it "watches" that property on that object from that point on. It's super wasteful to constantly be creating new ones, and they wouldn't have a chance to collect any data about the velocity yet when you're trying to query it. 

 

I assume this is kinda like what you were after, right?: 

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

 

 

  • Like 4
Link to comment
Share on other sites

  • 1 month later...

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