Skip to content

Commit 036147e

Browse files
committed
geometry/object.clips -> geometry/object.animation
1 parent cedf004 commit 036147e

39 files changed

Lines changed: 2824 additions & 2887 deletions

examples/js/BlendCharacter.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
THREE.BlendCharacter = function () {
66

7-
this.clips = {};
7+
this.animations = {};
88
this.weightSchedule = [];
99
this.warpSchedule = [];
1010

@@ -23,10 +23,10 @@ THREE.BlendCharacter = function () {
2323
scope.mixer = new THREE.AnimationMixer( scope );
2424

2525
// Create the animations
26-
for ( var i = 0; i < geometry.clips.length; ++ i ) {
26+
for ( var i = 0; i < geometry.animations.length; ++ i ) {
2727

28-
var animName = geometry.clips[ i ].name;
29-
scope.clips[ animName ] = geometry.clips[ i ];
28+
var animName = geometry.animations[ i ].name;
29+
scope.animations[ animName ] = geometry.animations[ i ];
3030

3131
}
3232

@@ -47,16 +47,16 @@ THREE.BlendCharacter = function () {
4747

4848
this.mixer.removeAllActions();
4949

50-
this.mixer.play( new THREE.AnimationAction( this.clips[ animName ] ) );
50+
this.mixer.play( new THREE.AnimationAction( this.animations[ animName ] ) );
5151

5252
};
5353

5454
this.crossfade = function( fromAnimName, toAnimName, duration ) {
5555

5656
this.mixer.removeAllActions();
5757

58-
var fromAction = new THREE.AnimationAction( this.clips[ fromAnimName ] );
59-
var toAction = new THREE.AnimationAction( this.clips[ toAnimName ] );
58+
var fromAction = new THREE.AnimationAction( this.animations[ fromAnimName ] );
59+
var toAction = new THREE.AnimationAction( this.animations[ toAnimName ] );
6060

6161
this.mixer.play( fromAction );
6262
this.mixer.play( toAction );
@@ -69,8 +69,8 @@ THREE.BlendCharacter = function () {
6969

7070
this.mixer.removeAllActions();
7171

72-
var fromAction = new THREE.AnimationAction( this.clips[ fromAnimName ] );
73-
var toAction = new THREE.AnimationAction( this.clips[ toAnimName ] );
72+
var fromAction = new THREE.AnimationAction( this.animations[ fromAnimName ] );
73+
var toAction = new THREE.AnimationAction( this.animations[ toAnimName ] );
7474

7575
this.mixer.play( fromAction );
7676
this.mixer.play( toAction );

examples/js/MD2Character.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ THREE.MD2Character = function () {
5656
scope.meshBody = mesh;
5757

5858
scope.meshBody.clipOffset = 0;
59-
scope.activeAnimationClipName = mesh.geometry.clips[0].name;
59+
scope.activeAnimationClipName = mesh.geometry.animations[0].name;
6060

6161
scope.mixer = new THREE.AnimationMixer( mesh );
6262

@@ -158,7 +158,7 @@ THREE.MD2Character = function () {
158158
this.meshBody.activeAction = null;
159159
}
160160

161-
var clip = THREE.AnimationClip.findByName( this.meshBody.geometry.clips, clipName );
161+
var clip = THREE.AnimationClip.findByName( this.meshBody.geometry.animations, clipName );
162162
if( clip ) {
163163

164164
var action = new THREE.AnimationAction( clip, this.mixer.time ).setLocalRoot( this.meshBody );
@@ -187,7 +187,7 @@ THREE.MD2Character = function () {
187187
this.meshWeapon.activeAction = null;
188188
}
189189

190-
var clip = THREE.AnimationClip.findByName( this.meshWeapon.geometry.clips, clipName );
190+
var clip = THREE.AnimationClip.findByName( this.meshWeapon.geometry.animations, clipName );
191191
if( clip ) {
192192

193193
var action = new THREE.AnimationAction( clip ).syncWith( this.meshBody.activeAction ).setLocalRoot( this.meshWeapon );

examples/js/MorphAnimMesh.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ THREE.MorphAnimMesh.prototype.playAnimation = function ( label, fps ) {
3636

3737
}
3838

39-
var clip = THREE.AnimationClip.findByName( this.geometry.clips, label );
39+
var clip = THREE.AnimationClip.findByName( this.geometry.animations, label );
4040

4141
if ( clip ) {
4242

@@ -47,7 +47,7 @@ THREE.MorphAnimMesh.prototype.playAnimation = function ( label, fps ) {
4747

4848
} else {
4949

50-
throw new Error( 'THREE.MorphAnimMesh: clips[' + label + '] undefined in .playAnimation()' );
50+
throw new Error( 'THREE.MorphAnimMesh: animations[' + label + '] undefined in .playAnimation()' );
5151

5252
}
5353

examples/js/UCSCharacter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ THREE.UCSCharacter = function() {
5555
mesh.castShadow = true;
5656
mesh.receiveShadow = true;
5757

58-
scope.mixer.addAction( new THREE.AnimationAction( geometry.clips[0] ).setLocalRoot( mesh ) );
58+
scope.mixer.addAction( new THREE.AnimationAction( geometry.animations[0] ).setLocalRoot( mesh ) );
5959

6060
scope.setSkin( 0 );
6161

examples/js/loaders/MD2Loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ THREE.MD2Loader.prototype = {
305305

306306
}
307307

308-
geometry.clips = THREE.AnimationClip.CreateClipsFromMorphTargetSequences( geometry.morphTargets, 10 )
308+
geometry.animations = THREE.AnimationClip.CreateClipsFromMorphTargetSequences( geometry.morphTargets, 10 )
309309

310310
console.timeEnd( 'MD2Loader' );
311311

0 commit comments

Comments
 (0)