Skip to content

Commit fcd6fd2

Browse files
sirxemicmrdoob
authored andcommitted
Do not export a private class. See mrdoob#9395 (mrdoob#9555)
1 parent fac4709 commit fcd6fd2

File tree

3 files changed

+7
-19
lines changed

3 files changed

+7
-19
lines changed

src/Three.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ export { AnimationUtils } from './animation/AnimationUtils.js';
114114
export { AnimationObjectGroup } from './animation/AnimationObjectGroup.js';
115115
export { AnimationMixer } from './animation/AnimationMixer.js';
116116
export { AnimationClip } from './animation/AnimationClip.js';
117-
export { AnimationAction } from './animation/AnimationAction.js';
118117
export { Uniform } from './core/Uniform.js';
119118
export { InstancedBufferGeometry } from './core/InstancedBufferGeometry.js';
120119
export { BufferGeometry } from './core/BufferGeometry.js';

src/animation/AnimationAction.js

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,7 @@ import { WrapAroundEnding, ZeroCurvatureEnding, ZeroSlopeEnding, LoopPingPong, L
1111
*
1212
*/
1313

14-
function AnimationAction() {
15-
16-
throw new Error( "THREE.AnimationAction: " +
17-
"Use mixer.clipAction for construction." );
18-
19-
}
20-
21-
AnimationAction._new =
22-
function AnimationAction( mixer, clip, localRoot ) {
14+
function AnimationAction( mixer, clip, localRoot ) {
2315

2416
this._mixer = mixer;
2517
this._clip = clip;
@@ -84,9 +76,9 @@ AnimationAction._new =
8476

8577
};
8678

87-
AnimationAction._new.prototype = {
79+
AnimationAction.prototype = {
8880

89-
constructor: AnimationAction._new,
81+
constructor: AnimationAction,
9082

9183
// State & Scheduling
9284

@@ -662,5 +654,4 @@ AnimationAction._new.prototype = {
662654
};
663655

664656

665-
666657
export { AnimationAction };

src/animation/AnimationMixer.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Object.assign( AnimationMixer.prototype, EventDispatcher.prototype, {
7070
if ( clipObject === null ) return null;
7171

7272
// allocate all resources required to run it
73-
var newAction = new AnimationMixer._Action( this, clipObject, optionalRoot );
73+
var newAction = new AnimationAction( this, clipObject, optionalRoot );
7474

7575
this._bindAction( newAction, prototypeAction );
7676

@@ -275,8 +275,6 @@ Object.assign( AnimationMixer.prototype, EventDispatcher.prototype, {
275275

276276
} );
277277

278-
AnimationMixer._Action = AnimationAction._new;
279-
280278
// Implementation details:
281279

282280
Object.assign( AnimationMixer.prototype, {
@@ -426,8 +424,8 @@ Object.assign( AnimationMixer.prototype, {
426424
this._actionsByClip = {};
427425
// inside:
428426
// {
429-
// knownActions: Array< _Action > - used as prototypes
430-
// actionByRoot: _Action - lookup
427+
// knownActions: Array< AnimationAction > - used as prototypes
428+
// actionByRoot: AnimationAction - lookup
431429
// }
432430

433431

@@ -461,7 +459,7 @@ Object.assign( AnimationMixer.prototype, {
461459

462460
},
463461

464-
// Memory management for _Action objects
462+
// Memory management for AnimationAction objects
465463

466464
_isActiveAction: function( action ) {
467465

0 commit comments

Comments
 (0)