|
@@ -119,7 +119,7 @@ Object.assign( THREE.AnimationClip, {
|
|
|
},
|
|
|
|
|
|
|
|
|
- CreateFromMorphTargetSequence: function( name, morphTargetSequence, fps ) {
|
|
|
+ CreateFromMorphTargetSequence: function( name, morphTargetSequence, fps, noLoop ) {
|
|
|
|
|
|
var numMorphTargets = morphTargetSequence.length;
|
|
|
var tracks = [];
|
|
@@ -142,7 +142,7 @@ Object.assign( THREE.AnimationClip, {
|
|
|
|
|
|
// if there is a key at the first frame, duplicate it as the
|
|
|
// last frame as well for perfect loop.
|
|
|
- if ( times[ 0 ] === 0 ) {
|
|
|
+ if ( ! noLoop && times[ 0 ] === 0 ) {
|
|
|
|
|
|
times.push( numMorphTargets );
|
|
|
values.push( values[ 0 ] );
|
|
@@ -175,7 +175,7 @@ Object.assign( THREE.AnimationClip, {
|
|
|
|
|
|
},
|
|
|
|
|
|
- CreateClipsFromMorphTargetSequences: function( morphTargets, fps ) {
|
|
|
+ CreateClipsFromMorphTargetSequences: function( morphTargets, fps, noLoop ) {
|
|
|
|
|
|
var animationToMorphTargets = {};
|
|
|
|
|
@@ -211,7 +211,7 @@ Object.assign( THREE.AnimationClip, {
|
|
|
|
|
|
for ( var name in animationToMorphTargets ) {
|
|
|
|
|
|
- clips.push( THREE.AnimationClip.CreateFromMorphTargetSequence( name, animationToMorphTargets[ name ], fps ) );
|
|
|
+ clips.push( THREE.AnimationClip.CreateFromMorphTargetSequence( name, animationToMorphTargets[ name ], fps, noLoop ) );
|
|
|
|
|
|
}
|
|
|
|