Explorar o código

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

Add Collada Exporter warning
Mr.doob %!s(int64=7) %!d(string=hai) anos
pai
achega
872dcb750a
Modificáronse 1 ficheiros con 10 adicións e 1 borrados
  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>'
 						: ''
 						: ''
 					) +
 					) +