提交 9179c9b6 编写于 作者: Y Yomotsu

cleanup extra tabs

上级 1a560a34
......@@ -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;
......
......@@ -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
// }
......
......@@ -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
......
......@@ -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 );
},
......
......@@ -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();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册