提交 e8b91d4d 编写于 作者: M Mr.doob

FBXLoader: Clean up.

上级 761911df
......@@ -48,9 +48,7 @@
} else {
scope.textureBasePath = scope.extractUrlBase( url );
parser = new FBXParser();
var nodes = parser.parse( text );
onLoad( scope.parse( nodes ) );
onLoad( scope.parse( text ) );
}
......@@ -108,10 +106,16 @@
};
THREE.FBXLoader.prototype.parse = function ( allNodes ) {
THREE.FBXLoader.prototype.parse = function ( text ) {
var scope = this;
console.time( 'FBXLoader' );
console.time( 'FBXLoader: TextParser' );
var allNodes = new FBXParser().parse( text );
console.timeEnd( 'FBXLoader: TextParser' );
console.time( 'FBXLoader: ObjectParser' );
scope.hierarchy = ( new Bones() ).parseHierarchy( allNodes );
scope.weights = ( new Weights() ).parse( allNodes, scope.hierarchy );
......@@ -147,7 +151,7 @@
}
console.timeEnd( 'FBXLoader: total' );
console.timeEnd( 'FBXLoader' );
return container;
};
......@@ -742,16 +746,12 @@
// ----------parse ---------------------------------------------------
parse: function ( text ) {
console.time( 'FBXLoader: total' );
this.currentIndent = 0;
this.allNodes = new FBXNodes();
this.nodeStack = [];
this.currentProp = [];
this.currentPropName = '';
console.time( 'FBXLoader: TextParser' );
var split = text.split( "\n" );
for ( var line in split ) {
......@@ -825,10 +825,8 @@
}
console.timeEnd( 'FBXLoader: TextParser' );
return this.allNodes;
},
parseNodeBegin: function ( line, nodeName, nodeAttrs ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册