@mcolabs/threebox-plugin 4.0.0 → 4.0.1
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/threebox.cjs +1 -1
- package/dist/threebox.cjs.map +1 -1
- package/dist/threebox.iife.js +1 -1
- package/dist/threebox.iife.js.map +1 -1
- package/dist/threebox.js +9 -4
- package/dist/threebox.js.map +1 -1
- package/package.json +1 -1
- package/src/objects/loadObj.js +10 -4
package/dist/threebox.js
CHANGED
|
@@ -2264,10 +2264,15 @@ function loadObj(options2, cb, promise) {
|
|
|
2264
2264
|
loader = daeLoader;
|
|
2265
2265
|
break;
|
|
2266
2266
|
}
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2267
|
+
if (options2.mtl) {
|
|
2268
|
+
materialLoader.withCredentials = options2.withCredentials;
|
|
2269
|
+
materialLoader.load(options2.mtl, loadObject, () => null, (error) => {
|
|
2270
|
+
console.warn("No material file found " + error.stack);
|
|
2271
|
+
loadObject(null);
|
|
2272
|
+
});
|
|
2273
|
+
} else {
|
|
2274
|
+
loadObject(null);
|
|
2275
|
+
}
|
|
2271
2276
|
function loadObject(materials) {
|
|
2272
2277
|
if (materials && options2.type == "mtl") {
|
|
2273
2278
|
materials.preload();
|