Jump to content
Search Community

draggable object with throwResistance and minDuration

Lacika1981 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

Hi,

 

Could you explain me some things that I do not understand while I was experiencing with the draggable object.

The codepen link is the GSAP example.

 

There are two properties if I use together they do undesirable effect.

If the minDuration set i.e. 50 and throwResistance very high like 100000 than the knob will spin for 50 seconds and will decrease the speed gradually.

However if I use the same minDuration but the throwResistance set to very low like 100 than the knob stops spinning in couple of seconds. 

 

Should not the knob spin for at least 50 seconds in each case?

 

Thank you

See the Pen wMQYEV by GreenSock (@GreenSock) on CodePen

Link to comment
Share on other sites

First, that demo isn't using the latest version of TweenMax or Draggable, which is currently at 2.0.2, so that's part of the problem.

 

Now check out the docs for ThrowPropsPlugin.to(), which is what creates the throw tween.

https://greensock.com/docs/Plugins/ThrowPropsPlugin/static.to

 

Quote

resistance : Number - think of resistance like the rate of velocity decay. If no resistance value is found, the ThrowPropsPlugin.defaultResistance value will be used. The resistance values merely affect the duration of the tween and can be overriden by the maxDuration and minDuration parameters.

 

So setting a duration cancels out the throwResistance.

 

 

  • Like 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.
×
×
  • Create New...