UNPKG

inrtia

Version:

☄️ lightweight inertia based animation library

13 lines (9 loc) 309 B
import elastic from './elastic'; export default function (current, target, params, dTime, reset, key) { const result = elastic.call(this, current, target, params, dTime, reset, key); if ((result - target) >= 0) { this._setSpeed(-this._getSpeed(key), key); return target; } return result; }