From 9179c9b65572417ff962cb55e4c80aba53650dbd Mon Sep 17 00:00:00 2001 From: Yomotsu Date: Fri, 9 Nov 2018 03:19:12 +0900 Subject: [PATCH] cleanup extra tabs --- src/animation/AnimationAction.js | 36 +++++++++++++------------ src/animation/AnimationMixer.js | 4 +-- src/animation/AnimationObjectGroup.js | 38 +++++++++++++-------------- src/animation/AnimationUtils.js | 4 +-- src/animation/PropertyBinding.js | 9 +++---- 5 files changed, 45 insertions(+), 46 deletions(-) diff --git a/src/animation/AnimationAction.js b/src/animation/AnimationAction.js index 25fa11737a..129128b426 100644 --- a/src/animation/AnimationAction.js +++ b/src/animation/AnimationAction.js @@ -36,13 +36,13 @@ function AnimationAction( mixer, clip, localRoot ) { this._interpolantSettings = interpolantSettings; - this._interpolants = interpolants; // bound by the mixer + this._interpolants = interpolants; // bound by the mixer // inside: PropertyMixer (managed by the mixer) this._propertyBindings = new Array( nTracks ); - this._cacheIndex = null; // for the memory manager - this._byClipCacheIndex = null; // for the memory manager + this._cacheIndex = null; // for the memory manager + this._byClipCacheIndex = null; // for the memory manager this._timeScaleInterpolant = null; this._weightInterpolant = null; @@ -64,15 +64,15 @@ function AnimationAction( mixer, clip, localRoot ) { this.weight = 1; this._effectiveWeight = 1; - this.repetitions = Infinity; // no. of repetitions when looping + this.repetitions = Infinity; // no. of repetitions when looping - this.paused = false; // true -> zero effective time scale - this.enabled = true; // false -> zero effective weight + this.paused = false; // true -> zero effective time scale + this.enabled = true; // false -> zero effective weight - this.clampWhenFinished = false; // keep feeding the last frame? + this.clampWhenFinished = false;// keep feeding the last frame? - this.zeroSlopeAtStart = true; // for smooth interpolation w/o separate - this.zeroSlopeAtEnd = true; // clips for start, loop and end + this.zeroSlopeAtStart = true;// for smooth interpolation w/o separate + this.zeroSlopeAtEnd = true;// clips for start, loop and end } @@ -101,9 +101,9 @@ Object.assign( AnimationAction.prototype, { this.paused = false; this.enabled = true; - this.time = 0; // restart clip - this._loopCount = - 1; // forget previous loops - this._startTime = null; // forget scheduling + this.time = 0; // restart clip + this._loopCount = - 1;// forget previous loops + this._startTime = null;// forget scheduling return this.stopFading().stopWarping(); @@ -112,7 +112,7 @@ Object.assign( AnimationAction.prototype, { isRunning: function () { return this.enabled && ! this.paused && this.timeScale !== 0 && - this._startTime === null && this._mixer._isActiveAction( this ); + this._startTime === null && this._mixer._isActiveAction( this ); }, @@ -613,8 +613,8 @@ Object.assign( AnimationAction.prototype, { if ( pingPong ) { - settings.endingStart = ZeroSlopeEnding; - settings.endingEnd = ZeroSlopeEnding; + settings.endingStart = ZeroSlopeEnding; + settings.endingEnd = ZeroSlopeEnding; } else { @@ -659,8 +659,10 @@ Object.assign( AnimationAction.prototype, { var times = interpolant.parameterPositions, values = interpolant.sampleValues; - times[ 0 ] = now; values[ 0 ] = weightNow; - times[ 1 ] = now + duration; values[ 1 ] = weightThen; + times[ 0 ] = now; + values[ 0 ] = weightNow; + times[ 1 ] = now + duration; + values[ 1 ] = weightThen; return this; diff --git a/src/animation/AnimationMixer.js b/src/animation/AnimationMixer.js index 76d03ac6bf..5a32df593f 100644 --- a/src/animation/AnimationMixer.js +++ b/src/animation/AnimationMixer.js @@ -176,8 +176,8 @@ AnimationMixer.prototype = Object.assign( Object.create( EventDispatcher.prototy this._actionsByClip = {}; // inside: // { - // knownActions: Array< AnimationAction > - used as prototypes - // actionByRoot: AnimationAction - lookup + // knownActions: Array< AnimationAction > - used as prototypes + // actionByRoot: AnimationAction - lookup // } diff --git a/src/animation/AnimationObjectGroup.js b/src/animation/AnimationObjectGroup.js index 5ede85964b..7f6309006f 100644 --- a/src/animation/AnimationObjectGroup.js +++ b/src/animation/AnimationObjectGroup.js @@ -7,27 +7,27 @@ import { _Math } from '../math/Math.js'; * * Usage: * - * - Add objects you would otherwise pass as 'root' to the - * constructor or the .clipAction method of AnimationMixer. + * - Add objects you would otherwise pass as 'root' to the + * constructor or the .clipAction method of AnimationMixer. * - * - Instead pass this object as 'root'. + * - Instead pass this object as 'root'. * - * - You can also add and remove objects later when the mixer - * is running. + * - You can also add and remove objects later when the mixer + * is running. * * Note: * - * Objects of this class appear as one object to the mixer, - * so cache control of the individual objects must be done - * on the group. + * Objects of this class appear as one object to the mixer, + * so cache control of the individual objects must be done + * on the group. * * Limitation: * - * - The animated properties must be compatible among the - * all objects in the group. + * - The animated properties must be compatible among the + * all objects in the group. * - * - A single property can either be controlled through a - * target group or directly, but not both. + * - A single property can either be controlled through a + * target group or directly, but not both. * * @author tschw */ @@ -39,11 +39,11 @@ function AnimationObjectGroup() { // cached objects followed by the active ones this._objects = Array.prototype.slice.call( arguments ); - this.nCachedObjects_ = 0; // threshold + this.nCachedObjects_ = 0; // threshold // note: read by PropertyBinding.Composite var indices = {}; - this._indicesByUUID = indices; // for bookkeeping + this._indicesByUUID = indices; // for bookkeeping for ( var i = 0, n = arguments.length; i !== n; ++ i ) { @@ -51,10 +51,10 @@ function AnimationObjectGroup() { } - this._paths = []; // inside: string - this._parsedPaths = []; // inside: { we don't care, here } - this._bindings = []; // inside: Array< PropertyBinding > - this._bindingsIndicesByPath = {}; // inside: indices in these arrays + this._paths = []; // inside: string + this._parsedPaths = []; // inside: { we don't care, here } + this._bindings = []; // inside: Array< PropertyBinding > + this._bindingsIndicesByPath = {}; // inside: indices in these arrays var scope = this; @@ -162,7 +162,7 @@ Object.assign( AnimationObjectGroup.prototype, { } else if ( objects[ index ] !== knownObject ) { console.error( 'THREE.AnimationObjectGroup: Different objects with the same UUID ' + - 'detected. Clean the caches or recreate your infrastructure when reloading scenes.' ); + 'detected. Clean the caches or recreate your infrastructure when reloading scenes.' ); } // else the object is already where we want it to be diff --git a/src/animation/AnimationUtils.js b/src/animation/AnimationUtils.js index 07b6892d71..0b2dace21e 100644 --- a/src/animation/AnimationUtils.js +++ b/src/animation/AnimationUtils.js @@ -25,7 +25,7 @@ var AnimationUtils = { convertArray: function ( array, type, forceClone ) { if ( ! array || // let 'undefined' and 'null' pass - ! forceClone && array.constructor === type ) return array; + ! forceClone && array.constructor === type ) return array; if ( typeof type.BYTES_PER_ELEMENT === 'number' ) { @@ -40,7 +40,7 @@ var AnimationUtils = { isTypedArray: function ( object ) { return ArrayBuffer.isView( object ) && - ! ( object instanceof DataView ); + ! ( object instanceof DataView ); }, diff --git a/src/animation/PropertyBinding.js b/src/animation/PropertyBinding.js index d9fe7449d2..4e89bd3e27 100644 --- a/src/animation/PropertyBinding.js +++ b/src/animation/PropertyBinding.js @@ -38,8 +38,7 @@ Object.assign( Composite.prototype, { var bindings = this._bindings; - for ( var i = this._targetGroup.nCachedObjects_, - n = bindings.length; i !== n; ++ i ) { + for ( var i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) { bindings[ i ].setValue( array, offset ); @@ -51,8 +50,7 @@ Object.assign( Composite.prototype, { var bindings = this._bindings; - for ( var i = this._targetGroup.nCachedObjects_, - n = bindings.length; i !== n; ++ i ) { + for ( var i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) { bindings[ i ].bind(); @@ -64,8 +62,7 @@ Object.assign( Composite.prototype, { var bindings = this._bindings; - for ( var i = this._targetGroup.nCachedObjects_, - n = bindings.length; i !== n; ++ i ) { + for ( var i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) { bindings[ i ].unbind(); -- GitLab