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

Updated builds.

上级 51e49dd7
......@@ -9526,7 +9526,8 @@ THREE.JSONLoader.prototype.loadAjaxJSON = function ( context, url, callback, tex
if ( xhr.responseText ) {
var json = JSON.parse( xhr.responseText );
context.createModel( json, callback, texturePath );
var result = context.parse( json, texturePath );
callback( result.geometry, result.material );
} else {
......@@ -9574,7 +9575,7 @@ THREE.JSONLoader.prototype.loadAjaxJSON = function ( context, url, callback, tex
};
THREE.JSONLoader.prototype.createModel = function ( json, callback, texturePath ) {
THREE.JSONLoader.prototype.parse = function ( json, texturePath ) {
var scope = this,
geometry = new THREE.Geometry(),
......@@ -9905,9 +9906,16 @@ THREE.JSONLoader.prototype.createModel = function ( json, callback, texturePath
var materials = this.initMaterials( json.materials, texturePath );
if ( this.needsTangents( materials ) ) geometry.computeTangents();
if ( this.needsTangents( materials ) ) {
callback( geometry, materials );
geometry.computeTangents();
}
return {
geometry: geometry,
materials: materials
};
};
/**
......@@ -10790,7 +10798,8 @@ THREE.SceneLoader.prototype.parse = function ( json, callbackFinished, url ) {
if ( modelJson ) {
var jsonLoader = this.geometryHandlerMap[ "ascii" ][ "loaderObject" ];
jsonLoader.createModel( modelJson, create_callback_embed( geoID ), texture_path );
var model = jsonLoader.parse( modelJson, texture_path );
create_callback_embed( geoID )( model.geometry, model.material );
}
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册