@@ -119,7 +119,7 @@ Object.assign( THREE.AnimationClip, {
119
119
} ,
120
120
121
121
122
- CreateFromMorphTargetSequence : function ( name , morphTargetSequence , fps ) {
122
+ CreateFromMorphTargetSequence : function ( name , morphTargetSequence , fps , noLoop ) {
123
123
124
124
var numMorphTargets = morphTargetSequence . length ;
125
125
var tracks = [ ] ;
@@ -142,7 +142,7 @@ Object.assign( THREE.AnimationClip, {
142
142
143
143
// if there is a key at the first frame, duplicate it as the
144
144
// last frame as well for perfect loop.
145
- if ( times [ 0 ] === 0 ) {
145
+ if ( ! noLoop && times [ 0 ] === 0 ) {
146
146
147
147
times . push ( numMorphTargets ) ;
148
148
values . push ( values [ 0 ] ) ;
@@ -175,7 +175,7 @@ Object.assign( THREE.AnimationClip, {
175
175
176
176
} ,
177
177
178
- CreateClipsFromMorphTargetSequences : function ( morphTargets , fps ) {
178
+ CreateClipsFromMorphTargetSequences : function ( morphTargets , fps , noLoop ) {
179
179
180
180
var animationToMorphTargets = { } ;
181
181
@@ -211,7 +211,7 @@ Object.assign( THREE.AnimationClip, {
211
211
212
212
for ( var name in animationToMorphTargets ) {
213
213
214
- clips . push ( THREE . AnimationClip . CreateFromMorphTargetSequence ( name , animationToMorphTargets [ name ] , fps ) ) ;
214
+ clips . push ( THREE . AnimationClip . CreateFromMorphTargetSequence ( name , animationToMorphTargets [ name ] , fps , noLoop ) ) ;
215
215
216
216
}
217
217
0 commit comments