Pārlūkot izejas kodu

Merge pull request #15527 from gkjohnson/collada-exporter-warning

Add Collada Exporter warning
Mr.doob 6 gadi atpakaļ
vecāks
revīzija
872dcb750a
1 mainītis faili ar 10 papildinājumiem un 1 dzēšanām
  1. 10 1
      examples/js/exporters/ColladaExporter.js

+ 10 - 1
examples/js/exporters/ColladaExporter.js

@@ -359,6 +359,15 @@ THREE.ColladaExporter.prototype = {
 
 
 					type = 'constant';
 					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 emissive = m.emissive ? m.emissive : new THREE.Color( 0, 0, 0 );
@@ -427,7 +436,7 @@ THREE.ColladaExporter.prototype = {
 								`<float sid="shininess">${ shininess }</float>`
 								`<float sid="shininess">${ shininess }</float>`
 						) +
 						) +
 
 
-						'</shininess>' 
+						'</shininess>'
 						: ''
 						: ''
 					) +
 					) +