فهرست منبع

Animation: Clean up (#8719)

Michael Herzog 9 سال پیش
والد
کامیت
667993657a
4فایلهای تغییر یافته به همراه7 افزوده شده و 9 حذف شده
  1. 2 3
      src/animation/AnimationClip.js
  2. 2 3
      src/animation/AnimationMixer.js
  3. 2 2
      src/animation/KeyframeTrack.js
  4. 1 1
      src/animation/PropertyBinding.js

+ 2 - 3
src/animation/AnimationClip.js

@@ -266,7 +266,7 @@ Object.assign( THREE.AnimationClip, {
 			var animationKeys = hierarchyTracks[ h ].keys;
 
 			// skip empty tracks
-			if ( ! animationKeys || animationKeys.length == 0 ) continue;
+			if ( ! animationKeys || animationKeys.length === 0 ) continue;
 
 			// process morph targets in a way exactly compatible
 			// with AnimationHandler.init( animation )
@@ -301,7 +301,7 @@ Object.assign( THREE.AnimationClip, {
 						var animationKey = animationKeys[k];
 
 						times.push( animationKey.time );
-						values.push( ( animationKey.morphTarget === morphTargetName ) ? 1 : 0 )
+						values.push( ( animationKey.morphTarget === morphTargetName ) ? 1 : 0 );
 
 					}
 
@@ -346,4 +346,3 @@ Object.assign( THREE.AnimationClip, {
 	}
 
 } );
-

+ 2 - 3
src/animation/AnimationMixer.js

@@ -291,7 +291,7 @@ THREE.AnimationMixer._Action =
 
 		var interpolant = tracks[ i ].createInterpolant( null );
 		interpolants[ i ] = interpolant;
-		interpolant.settings = interpolantSettings
+		interpolant.settings = interpolantSettings;
 
 	}
 
@@ -377,7 +377,7 @@ THREE.AnimationMixer._Action.prototype = {
 		var start = this._startTime;
 
 		return this.enabled && ! this.paused && this.timeScale !== 0 &&
-				this._startTime === null && this._mixer._isActiveAction( this )
+				this._startTime === null && this._mixer._isActiveAction( this );
 
 	},
 
@@ -1396,4 +1396,3 @@ Object.assign( THREE.AnimationMixer.prototype, {
 	_controlInterpolantsResultBuffer: new Float32Array( 1 )
 
 } );
-

+ 2 - 2
src/animation/KeyframeTrack.js

@@ -62,7 +62,7 @@ THREE.KeyframeTrack.prototype = {
 
 	setInterpolation: function( interpolation ) {
 
-		var factoryMethod = undefined;
+		var factoryMethod;
 
 		switch ( interpolation ) {
 
@@ -486,7 +486,7 @@ Object.assign( THREE.KeyframeTrack, {
 
 				return THREE.StringKeyframeTrack;
 
-		};
+		}
 
 		throw new Error( "Unsupported typeName: " + typeName );
 

+ 1 - 1
src/animation/PropertyBinding.js

@@ -645,4 +645,4 @@ THREE.PropertyBinding.findNode = function( root, nodeName ) {
 
 	return null;
 
-}
+};