@@ -123,8 +123,6 @@ export class RuntimeAnimation {
123123 private _keys : IAnimationKey [ ] ;
124124 private _minFrame : number ;
125125 private _maxFrame : number ;
126- private _minValue : any ;
127- private _maxValue : any ;
128126 private _targetIsArray = false ;
129127
130128 /** @internal */
@@ -206,12 +204,10 @@ export class RuntimeAnimation {
206204 this . _keys = this . _animation . getKeys ( ) ;
207205 this . _minFrame = this . _keys [ 0 ] . frame ;
208206 this . _maxFrame = this . _keys [ this . _keys . length - 1 ] . frame ;
209- this . _minValue = this . _keys [ 0 ] . value ;
210- this . _maxValue = this . _keys [ this . _keys . length - 1 ] . value ;
211207
212208 // Add a start key at frame 0 if missing
213209 if ( this . _minFrame !== 0 ) {
214- const newKey = { frame : 0 , value : this . _minValue } ;
210+ const newKey = { frame : 0 , value : this . _keys [ 0 ] . value } ;
215211 this . _keys . splice ( 0 , 0 , newKey ) ;
216212 }
217213
@@ -575,10 +571,10 @@ export class RuntimeAnimation {
575571 if ( ! loop && to >= from && ( ( absoluteFrame >= frameRange && speedRatio > 0 ) || ( absoluteFrame <= 0 && speedRatio < 0 ) ) ) {
576572 // If we are out of range and not looping get back to caller
577573 returnValue = false ;
578- highLimitValue = animation . _getKeyValue ( this . _maxValue ) ;
574+ highLimitValue = animation . evaluate ( to ) ;
579575 } else if ( ! loop && from >= to && ( ( absoluteFrame <= frameRange && speedRatio < 0 ) || ( absoluteFrame >= 0 && speedRatio > 0 ) ) ) {
580576 returnValue = false ;
581- highLimitValue = animation . _getKeyValue ( this . _minValue ) ;
577+ highLimitValue = animation . evaluate ( from ) ;
582578 } else if ( this . _animationState . loopMode !== Animation . ANIMATIONLOOPMODE_CYCLE ) {
583579 const keyOffset = to . toString ( ) + from . toString ( ) ;
584580 if ( ! this . _offsetsCache [ keyOffset ] ) {
0 commit comments