export class ParamUpdater { private _key : string ; private _target : number ; private _start : number ; private _delta : number ; private _value : number ; constructor ( key , target ) { this . _key = key ; this . _target = target ; this . _start = 0 ; this . _delta = 0 ; this . _value = 0 ; } init ( start ) { this . _start = start ; this . _delta = this . _target - start ; this . _value = this . _start ; } update ( progress ) { this . _value = this . _start + this . _delta * progress ; return this . _value ; } getDelta ( ) { return this . _delta ; } clone ( ) { return new ParamUpdater ( this . _key , this . _target ) ; } toString ( ) { return `${ this . _key }:${ this . _target }` ; } }