Explorar el Código

debugging lack of morphTargets working.

Ben Houston hace 10 años
padre
commit
a95ec4d4c5
Se han modificado 1 ficheros con 15 adiciones y 9 borrados
  1. 15 9
      src/animation/KeyframeTrack.js

+ 15 - 9
src/animation/KeyframeTrack.js

@@ -33,7 +33,9 @@ THREE.KeyframeTrack.prototype = {
 	// TODO: this is a straight forward linear search for the key that corresponds to this time, this
 	//    should be optimized.
 	getAt: function( time ) {
-		//console.log( 'KeyframeTrack[' + this.name + '].getAt( ' + time + ' )' );
+		//if( /morph/i.test( this.name ) ) {
+		//	console.log( 'KeyframeTrack[' + this.name + '].getAt( ' + time + ' )' );
+		//}
 		
 		// this can not go higher than this.keys.length.
 		while( ( this.lastIndex < this.keys.length ) && ( time >= this.keys[this.lastIndex].time ) ) {
@@ -65,18 +67,22 @@ THREE.KeyframeTrack.prototype = {
 		this.setResult( this.keys[ this.lastIndex - 1 ].value );
 		this.result = this.lerp( this.result, this.keys[ this.lastIndex ].value, alpha );
 		//console.log( 'lerp result', this.result )
-		/*console.log( '   interpolated: ', {
-			value: interpolatedValue, 
-			alpha: alpha,
-			time0: this.keys[ i - 1 ].time,
-			time1: this.keys[ i ].time,
-			value0: this.keys[ i - 1 ].value,
-			value1: this.keys[ i ].value
-		} );*/
+		/*if( /morph/i.test( this.name ) ) {
+			console.log( '   interpolated: ', {
+				index: this.lastIndex, 
+				value: this.result, 
+				alpha: alpha,
+				time0: this.keys[ this.lastIndex - 1 ].time,
+				time1: this.keys[ this.lastIndex ].time,
+				value0: this.keys[ this.lastIndex - 1 ].value,
+				value1: this.keys[ this.lastIndex ].value
+			} );
+		}*/
 
 		return this.result;
 
 	},
+
 	setResult: function( value ) {
 		if( this.result.copy ) {
 			this.result.copy( value );