|
@@ -42,18 +42,22 @@ THREE.KeyframeTrack.prototype = {
|
|
|
this.lastIndex ++;
|
|
|
};
|
|
|
|
|
|
+ // this can not go lower than 0.
|
|
|
+ while( ( this.lastIndex > 0 ) && ( time < this.keys[this.lastIndex - 1].time ) ) {
|
|
|
+ this.lastIndex --;
|
|
|
+ }
|
|
|
+
|
|
|
+ //if( /morph/i.test( this.name ) ) {
|
|
|
+ // console.log( "lastIndex: ", this.lastIndex );
|
|
|
+ //}
|
|
|
+
|
|
|
if( this.lastIndex >= this.keys.length ) {
|
|
|
|
|
|
- this.setResult( this.keys[ this.lastIndex - 1 ].value );
|
|
|
+ this.setResult( this.keys[ this.keys.length - 1 ].value );
|
|
|
return this.result;
|
|
|
|
|
|
}
|
|
|
|
|
|
- // this can not go lower than 0.
|
|
|
- while( ( this.lastIndex > 0 ) && ( time < this.keys[this.lastIndex - 1].time ) ) {
|
|
|
- this.lastIndex --;
|
|
|
- }
|
|
|
-
|
|
|
if( this.lastIndex === 0 ) {
|
|
|
|
|
|
this.setResult( this.keys[ 0 ].value );
|