فهرست منبع

Fixed index lookup for non-quaternions in AnimationUtils.makeClipAdditive and in PropertyMixer._setAdditiveIdentityQuaternion

Christine 5 سال پیش
والد
کامیت
b3e09f7c0f
2فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 2 2
      src/animation/AnimationUtils.js
  2. 1 1
      src/animation/PropertyMixer.js

+ 2 - 2
src/animation/AnimationUtils.js

@@ -252,7 +252,7 @@ const AnimationUtils = {
 			const targetTrack = targetClip.tracks.find( function ( track ) {
 
 				return track.name === referenceTrack.name
-				&& track.ValueTypeName === referenceTrackType;
+					&& track.ValueTypeName === referenceTrackType;
 
 			} );
 
@@ -334,7 +334,7 @@ const AnimationUtils = {
 
 				} else {
 
-					const valueEnd = targetValueSize - targetOffset;
+					const valueEnd = targetValueSize - targetOffset * 2;
 
 					// Subtract each value for all other numeric track types
 					for ( let k = 0; k < valueEnd; ++ k ) {

+ 1 - 1
src/animation/PropertyMixer.js

@@ -234,7 +234,7 @@ Object.assign( PropertyMixer.prototype, {
 	_setAdditiveIdentityQuaternion: function () {
 
 		this._setAdditiveIdentityNumeric();
-		this.buffer[ this._addIndex * 4 + 3 ] = 1;
+		this.buffer[ this._addIndex * this.valueSize + 3 ] = 1;
 
 	},