瀏覽代碼

Do not export a private class. See #9395 (#9555)

Pim Schreurs 9 年之前
父節點
當前提交
fcd6fd23b6
共有 3 個文件被更改,包括 7 次插入19 次删除
  1. 0 1
      src/Three.js
  2. 3 12
      src/animation/AnimationAction.js
  3. 4 6
      src/animation/AnimationMixer.js

+ 0 - 1
src/Three.js

@@ -114,7 +114,6 @@ export { AnimationUtils } from './animation/AnimationUtils.js';
 export { AnimationObjectGroup } from './animation/AnimationObjectGroup.js';
 export { AnimationObjectGroup } from './animation/AnimationObjectGroup.js';
 export { AnimationMixer } from './animation/AnimationMixer.js';
 export { AnimationMixer } from './animation/AnimationMixer.js';
 export { AnimationClip } from './animation/AnimationClip.js';
 export { AnimationClip } from './animation/AnimationClip.js';
-export { AnimationAction } from './animation/AnimationAction.js';
 export { Uniform } from './core/Uniform.js';
 export { Uniform } from './core/Uniform.js';
 export { InstancedBufferGeometry } from './core/InstancedBufferGeometry.js';
 export { InstancedBufferGeometry } from './core/InstancedBufferGeometry.js';
 export { BufferGeometry } from './core/BufferGeometry.js';
 export { BufferGeometry } from './core/BufferGeometry.js';

+ 3 - 12
src/animation/AnimationAction.js

@@ -11,15 +11,7 @@ import { WrapAroundEnding, ZeroCurvatureEnding, ZeroSlopeEnding, LoopPingPong, L
  *
  *
  */
  */
 
 
-function AnimationAction() {
-
-	throw new Error( "THREE.AnimationAction: " +
-			"Use mixer.clipAction for construction." );
-
-}
-
-AnimationAction._new =
-		function AnimationAction( mixer, clip, localRoot ) {
+function AnimationAction( mixer, clip, localRoot ) {
 
 
 	this._mixer = mixer;
 	this._mixer = mixer;
 	this._clip = clip;
 	this._clip = clip;
@@ -84,9 +76,9 @@ AnimationAction._new =
 
 
 };
 };
 
 
-AnimationAction._new.prototype = {
+AnimationAction.prototype = {
 
 
-	constructor: AnimationAction._new,
+	constructor: AnimationAction,
 
 
 	// State & Scheduling
 	// State & Scheduling
 
 
@@ -662,5 +654,4 @@ AnimationAction._new.prototype = {
 };
 };
 
 
 
 
-
 export { AnimationAction };
 export { AnimationAction };

+ 4 - 6
src/animation/AnimationMixer.js

@@ -70,7 +70,7 @@ Object.assign( AnimationMixer.prototype, EventDispatcher.prototype, {
 		if ( clipObject === null ) return null;
 		if ( clipObject === null ) return null;
 
 
 		// allocate all resources required to run it
 		// allocate all resources required to run it
-		var newAction = new AnimationMixer._Action( this, clipObject, optionalRoot );
+		var newAction = new AnimationAction( this, clipObject, optionalRoot );
 
 
 		this._bindAction( newAction, prototypeAction );
 		this._bindAction( newAction, prototypeAction );
 
 
@@ -275,8 +275,6 @@ Object.assign( AnimationMixer.prototype, EventDispatcher.prototype, {
 
 
 } );
 } );
 
 
-AnimationMixer._Action = AnimationAction._new;
-
 // Implementation details:
 // Implementation details:
 
 
 Object.assign( AnimationMixer.prototype, {
 Object.assign( AnimationMixer.prototype, {
@@ -426,8 +424,8 @@ Object.assign( AnimationMixer.prototype, {
 		this._actionsByClip = {};
 		this._actionsByClip = {};
 		// inside:
 		// inside:
 		// {
 		// {
-		// 		knownActions: Array< _Action >	- used as prototypes
-		// 		actionByRoot: _Action			- lookup
+		// 		knownActions: Array< AnimationAction >	- used as prototypes
+		// 		actionByRoot: AnimationAction			- lookup
 		// }
 		// }
 
 
 
 
@@ -461,7 +459,7 @@ Object.assign( AnimationMixer.prototype, {
 
 
 	},
 	},
 
 
-	// Memory management for _Action objects
+	// Memory management for AnimationAction objects
 
 
 	_isActiveAction: function( action ) {
 	_isActiveAction: function( action ) {