提交 0f4602cb 编写于 作者: M Mugen87

GLTFExporter: Ensure no empty material arrays.

上级 c8484d0e
......@@ -896,16 +896,16 @@ THREE.GLTFExporter.prototype = {
}
if ( ! outputJSON.materials ) {
if ( material.isShaderMaterial ) {
outputJSON.materials = [];
console.warn( 'GLTFExporter: THREE.ShaderMaterial not supported.' );
return null;
}
if ( material.isShaderMaterial && ! material.isGLTFSpecularGlossinessMaterial ) {
if ( ! outputJSON.materials ) {
console.warn( 'GLTFExporter: THREE.ShaderMaterial not supported.' );
return null;
outputJSON.materials = [];
}
......
......@@ -918,16 +918,16 @@ GLTFExporter.prototype = {
}
if ( ! outputJSON.materials ) {
if ( material.isShaderMaterial ) {
outputJSON.materials = [];
console.warn( 'GLTFExporter: THREE.ShaderMaterial not supported.' );
return null;
}
if ( material.isShaderMaterial && ! material.isGLTFSpecularGlossinessMaterial ) {
if ( ! outputJSON.materials ) {
console.warn( 'GLTFExporter: THREE.ShaderMaterial not supported.' );
return null;
outputJSON.materials = [];
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册