Explorar el Código

GLTFExporter: Avoid error on materials without emissive

Don McCurdy hace 5 años
padre
commit
4059f232c5
Se han modificado 2 ficheros con 2 adiciones y 10 borrados
  1. 1 5
      examples/js/exporters/GLTFExporter.js
  2. 1 5
      examples/jsm/exporters/GLTFExporter.js

+ 1 - 5
examples/js/exporters/GLTFExporter.js

@@ -1019,11 +1019,7 @@ THREE.GLTFExporter.prototype = {
 
 			}
 
-			if ( material.isMeshBasicMaterial ||
-				material.isLineBasicMaterial ||
-				material.isPointsMaterial ) {
-
-			} else {
+			if ( material.emissive ) {
 
 				// emissiveFactor
 				var emissive = material.emissive.clone().multiplyScalar( material.emissiveIntensity ).toArray();

+ 1 - 5
examples/jsm/exporters/GLTFExporter.js

@@ -1041,11 +1041,7 @@ GLTFExporter.prototype = {
 
 			}
 
-			if ( material.isMeshBasicMaterial ||
-				material.isLineBasicMaterial ||
-				material.isPointsMaterial ) {
-
-			} else {
+			if ( material.emissive ) {
 
 				// emissiveFactor
 				var emissive = material.emissive.clone().multiplyScalar( material.emissiveIntensity ).toArray();