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

Updated JSONLoader to allow material-less data.

上级 12220727
...@@ -419,17 +419,22 @@ THREE.JSONLoader.prototype.parse = function ( json, texturePath ) { ...@@ -419,17 +419,22 @@ THREE.JSONLoader.prototype.parse = function ( json, texturePath ) {
}; };
var materials = this.initMaterials( json.materials, texturePath ); if ( json.materials === undefined ) {
if ( this.needsTangents( materials ) ) { return { geometry: geometry };
geometry.computeTangents(); } else {
} var materials = this.initMaterials( json.materials, texturePath );
return { if ( this.needsTangents( materials ) ) {
geometry: geometry,
materials: materials geometry.computeTangents();
};
}
return { geometry: geometry, materials: materials };
}
}; };
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册