Răsfoiți Sursa

Add warning when exporting if a texture map is used with mesh basic material

Garrett Johnson 6 ani în urmă
părinte
comite
9d2b42060e
1 a modificat fișierele cu 11 adăugiri și 2 ștergeri
  1. 11 2
      examples/js/exporters/ColladaExporter.js

+ 11 - 2
examples/js/exporters/ColladaExporter.js

@@ -359,7 +359,16 @@ THREE.ColladaExporter.prototype = {
 
 					type = 'constant';
 
-				}
+                    if ( m.map !== null ) {
+
+                        // The Collada spec does not support diffuse texture maps with the
+                        // constant shader type.
+                        // mrdoob/three.js#15469
+                        console.warn( 'ColladaExporter: Texture maps not supported with MeshBasicMaterial.' );
+
+                    }
+
+                }
 
 				var emissive = m.emissive ? m.emissive : new THREE.Color( 0, 0, 0 );
 				var diffuse = m.color ? m.color : new THREE.Color( 0, 0, 0 );
@@ -427,7 +436,7 @@ THREE.ColladaExporter.prototype = {
 								`<float sid="shininess">${ shininess }</float>`
 						) +
 
-						'</shininess>' 
+						'</shininess>'
 						: ''
 					) +