Kaynağa Gözat

Merge pull request #13468 from takahirox/GLTFExporterNameCheck

GLTFExporter: Compare .name with empty strings for the consistency
Mr.doob 7 yıl önce
ebeveyn
işleme
adc8d5bf70
1 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  1. 3 3
      examples/js/exporters/GLTFExporter.js

+ 3 - 3
examples/js/exporters/GLTFExporter.js

@@ -801,7 +801,7 @@ THREE.GLTFExporter.prototype = {
 
 			}
 
-			if ( material.name ) {
+			if ( material.name !== '' ) {
 
 				gltfMaterial.name = material.name;
 
@@ -1079,7 +1079,7 @@ THREE.GLTFExporter.prototype = {
 
 			}
 
-			if ( camera.name ) {
+			if ( camera.name !== '' ) {
 
 				gltfCamera.name = camera.type;
 
@@ -1401,7 +1401,7 @@ THREE.GLTFExporter.prototype = {
 
 			};
 
-			if ( scene.name ) {
+			if ( scene.name !== '' ) {
 
 				gltfScene.name = scene.name;