@onerjs/loaders 8.29.5 → 8.29.6
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/glTF/2.0/glTFLoader.js
CHANGED
|
@@ -328,7 +328,9 @@ export class GLTFLoader {
|
|
|
328
328
|
const material = this._gltf.materials[m];
|
|
329
329
|
const context = "/materials/" + m;
|
|
330
330
|
const babylonDrawMode = Material.TriangleFillMode;
|
|
331
|
-
|
|
331
|
+
if (!this.parent.shouldSkipMaterial?.(material)) {
|
|
332
|
+
promises.push(this._loadMaterialAsync(context, material, null, babylonDrawMode, () => { }));
|
|
333
|
+
}
|
|
332
334
|
}
|
|
333
335
|
}
|
|
334
336
|
// Restore the blocking of material dirty.
|
|
@@ -875,9 +877,11 @@ export class GLTFLoader {
|
|
|
875
877
|
}
|
|
876
878
|
else {
|
|
877
879
|
const material = ArrayItem.Get(`${context}/material`, this._gltf.materials, primitive.material);
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
880
|
+
if (!this.parent.shouldSkipMaterial?.(material)) {
|
|
881
|
+
promises.push(this._loadMaterialAsync(`/materials/${material.index}`, material, babylonMesh, babylonDrawMode, (babylonMaterial) => {
|
|
882
|
+
babylonMesh.material = babylonMaterial;
|
|
883
|
+
}));
|
|
884
|
+
}
|
|
881
885
|
}
|
|
882
886
|
}
|
|
883
887
|
promise = Promise.all(promises);
|