@xviewer.js/core 1.0.0-alpha.42 → 1.0.0-alpha.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.js CHANGED
@@ -1065,15 +1065,17 @@ class aLoader {
1065
1065
  const mat = object.material;
1066
1066
  if (Array.isArray(mat)) mat.forEach((v)=>materials[v.name] = v);
1067
1067
  else materials[mat.name] = mat;
1068
- keys.forEach((k)=>{
1069
- let tex = mat[k];
1070
- if (tex) {
1071
- textures[tex.uuid] = tex;
1072
- }
1073
- });
1074
1068
  }
1075
- object.children.forEach((v)=>queue.push(v));
1069
+ queue.push(...object.children);
1076
1070
  }
1071
+ Object.values(materials).forEach((mat)=>{
1072
+ keys.forEach((k)=>{
1073
+ let tex = mat[k];
1074
+ if (tex) {
1075
+ textures[tex.uuid] = tex;
1076
+ }
1077
+ });
1078
+ });
1077
1079
  node.userData.meshData = {
1078
1080
  meshes,
1079
1081
  materials,
@@ -1086,6 +1088,7 @@ class aLoader {
1086
1088
  }
1087
1089
  }
1088
1090
  aLoader._texKeys = [
1091
+ "map",
1089
1092
  "alphaMap",
1090
1093
  "aoMap",
1091
1094
  "bumpMap",
@@ -1096,7 +1099,8 @@ aLoader._texKeys = [
1096
1099
  "metalnessMap",
1097
1100
  "normalMap",
1098
1101
  "roughnessMap",
1099
- "specularMap"
1102
+ "specularMap",
1103
+ "alphaMap"
1100
1104
  ];
1101
1105
 
1102
1106
  class aEXRLoader extends aLoader {