提交 232586ee 编写于 作者: E Erik Ritter

Set UUID (if exists) in ObjectLoader for AnimationClip

上级 68a2e812
......@@ -13,13 +13,13 @@ import { _Math } from '../math/Math.js';
* @author David Sarno / http://lighthaus.us/
*/
function AnimationClip( name, duration, tracks, uuid = _Math.generateUUID() ) {
function AnimationClip( name, duration, tracks ) {
this.name = name;
this.tracks = tracks;
this.duration = ( duration !== undefined ) ? duration : - 1;
this.uuid = uuid;
this.uuid = _Math.generateUUID();
// this means it should figure out its duration by scanning the tracks
if ( this.duration < 0 ) {
......@@ -46,7 +46,7 @@ Object.assign( AnimationClip, {
}
return new AnimationClip( json.name, json.duration, tracks, json.uuid );
return new AnimationClip( json.name, json.duration, tracks );
},
......
......@@ -458,6 +458,12 @@ Object.assign( ObjectLoader.prototype, {
var clip = AnimationClip.parse( json[ i ] );
if ( json[ i ].uuid !== undefined ) {
clip.uuid = json[ i ].uuid;
}
animations.push( clip );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册