]> git.proxmox.com Git - sencha-touch.git/blob - src/src/fx/easing/Bounce.js
import Sencha Touch 2.4.2 source
[sencha-touch.git] / src / src / fx / easing / Bounce.js
1 /**
2 * @private
3 */
4 Ext.define('Ext.fx.easing.Bounce', {
5
6 extend: 'Ext.fx.easing.Abstract',
7
8 config: {
9 springTension: 0.3,
10 acceleration: 30,
11 startVelocity: 0
12 },
13
14 getValue: function() {
15 var deltaTime = Ext.Date.now() - this.getStartTime(),
16 theta = (deltaTime / this.getAcceleration()),
17 powTime = theta * Math.pow(Math.E, -this.getSpringTension() * theta);
18
19 return this.getStartValue() + (this.getStartVelocity() * powTime);
20 }
21 });