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

## GreenSock Docs (HTML5/JS)

Back to Plugins

ThrowPropsPlugin

Properties Methods # ThrowPropsPlugin.calculateDuration()

ThrowPropsPlugin.calculateDuration( start:Number, end:Number, velocity:Number, ease:*, checkPoint:Number ) : Number

[static] Calculates the duration (in seconds) that it would take to move from a particular start value to an end value at the given initial velocity, decelerating according to a certain easing equation (like Strong.easeOut).

Starting value

Ending value

## velocity: Number

the initial velocity at which the starting value is changing

## ease: *

The easing equation used for deceleration (like `Strong.easeOut` or `Power2.easeOut`).

## checkPoint: Number

(default = `0.05`) — A value between 0 and 1 (typically 0.05) that is used to measure an easing equation’s initial strength. The goal is for the value to have moved at the initial velocity through that point in the ease. So 0.05 represents 5%. If the initial velocity is 500, for example, and the ease is `Strong.easeOut` and `checkpoint` is 0.05, it will measure 5% into that ease and plot the position that would represent where the value would be if it was moving 500 units per second for the first 5% of the tween. If you notice that your tween appears to start off too fast or too slow, try adjusting the `checkpoint` higher or lower slightly. Typically 0.05 works great.

### Returns : Number

The duration (in seconds) that it would take to move from the start value to the end value at the initial velocity provided, decelerating according to the ease. #### Details

Calculates the duration (in seconds) that it would take to move from a particular start value to an end value at the given initial velocity, decelerating according to a certain easing equation (like `Strong.easeOut`).