44
55THREE . 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 ) ;
0 commit comments