@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.js CHANGED
@@ -2264,10 +2264,15 @@ function loadObj(options2, cb, promise) {
2264
2264
  loader = daeLoader;
2265
2265
  break;
2266
2266
  }
2267
- materialLoader.withCredentials = options2.withCredentials;
2268
- materialLoader.load(options2.mtl, loadObject, () => null, (error) => {
2269
- console.warn("No material file found " + error.stack);
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();