瀏覽代碼

Updated examples builds.

Mr.doob 3 年之前
父節點
當前提交
1bb26d7dbf
共有 2 個文件被更改,包括 17 次插入1 次删除
  1. 1 1
      examples/js/exporters/GLTFExporter.js
  2. 16 0
      examples/js/loaders/3MFLoader.js

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

@@ -631,7 +631,7 @@
 			const occlusion = material.aoMap?.image;
 			const roughness = material.roughnessMap?.image;
 			const metalness = material.metalnessMap?.image;
-			if ( occlusion === roughness && roughness === metalness ) return occlusion;
+			if ( occlusion === roughness && roughness === metalness ) return material.aoMap;
 
 			if ( occlusion || roughness || metalness ) {
 

+ 16 - 0
examples/js/loaders/3MFLoader.js

@@ -1010,6 +1010,16 @@
 
 				}
 
+				if ( objectData.name ) {
+
+					for ( let i = 0; i < meshes.length; i ++ ) {
+
+						meshes[ i ].name = objectData.name;
+
+					}
+
+				}
+
 				return meshes;
 
 			}
@@ -1219,6 +1229,12 @@
 
 				}
 
+				if ( objectData.name ) {
+
+					objects[ objectData.id ].name = objectData.name;
+
+				}
+
 			}
 
 			function buildObjects( data3mf ) {