Jump to content
GreenSock

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

ThrowPropsPlugin.calculateChange()

ThrowPropsPlugin.calculateChange( velocity:Number, ease:*, duration:Number, checkPoint:Number ) : Number

[static] Determines the amount of change given a particular velocity, an easing equation, and the duration that the tween will last.

Parameters

velocity: Number

The initial velocity

ease: *

The easing equation (like Strong.easeOut or Power2.easeOut).

duration: Number

The duration (in seconds) of the tween

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 amount of change (can be positive or negative based on the velocity)

Details

Determines the amount of change given a particular velocity, an easing equation, and the duration that the tween will last. This is useful for plotting the resting position of an object that starts out at a certain velocity and decelerates based on an ease (like Strong.easeOut).

Copyright 2017, GreenSock. All rights reserved. This work is subject to theterms of useor for Club GreenSock members, the software agreement that was issued with the membership.
×