* Executes a motion object * @param currentMotion - motion object * @private
(currentMotion:Object, time:number)
| 436 | * @private |
| 437 | */ |
| 438 | private _execMotion(currentMotion:Object, time:number):void { |
| 439 | for (var prop in currentMotion) { |
| 440 | if (currentMotion.hasOwnProperty(prop)) { |
| 441 | var m = <IMotion> currentMotion[prop]; |
| 442 | this[prop] = m.easing( |
| 443 | Math.min(Math.max(time - m.delay, 0), m.dur), |
| 444 | m.from, |
| 445 | m.to - m.from, |
| 446 | m.dur); |
| 447 | } |
| 448 | } |
| 449 | } |
| 450 | |
| 451 | /** |
| 452 | * Update the comment's position depending on the applied motion |