Нашли или выдавили из себя код, который нельзя назвать нормальным,
на который без улыбки не взглянешь?
Не торопитесь его удалять или рефакторить, — запостите его на
говнокод.ру, посмеёмся вместе!
/**
* @private
* The exponent used in the easer function for the main part of the throw animation.
* NOTE: if you change this, you need to re-differentiate the easer
* function and use the resulting derivative calculation in createThrowMotionPath.
*/
private static const THROW_CURVE_EXPONENT:Number = 3.0;
...
// Set the velocity for the next loop iteration. Make sure it matches the actual velocity in effect when the
// throw reaches the end of the list.
//
// The easer function we use for the throw is 1-((1-x)^3), the derivative of which is 3*x^2-6*x+3.
// (I used http://www.numberempire.com/derivatives.php to differentiate the easer function).
// Since the slope of a curve function at any point x (i.e. f(x)) is the value of the derivative at x (i.e. f'(x)),
// we can use this to determine the velocity of the throw at the point it reached the beginning of the bounce.
var x:Number = partialTime / effectTime;
var y:Number = 3 * Math.pow(x, 2) - 6 * x + 3;
Flex 4.5 Hero.
Благо на работу кода это не сказывается, но всё-таки...
Разработчикам: Вообще класс и непосредственно алгоритм touch/kinetic скролла там сделан отвратительно, но с некоторыми весьма хорошими фишками (отпределение скорости, например). Советую вам покопаться.
Какой сейчас процент планшетных дестктопов?
http://www.wolframalpha.com/input/?i=d%281-%281-x%29%5Ey%29%2Fdx