zincjs 1.13.1 → 1.13.2
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/build/zinc.frontend.js +1 -1
- package/build/zinc.js +4 -4
- package/build/zinc.js.map +1 -1
- package/package.json +1 -1
- package/src/loaders/JSONLoader.js +12 -4
- package/src/sceneLoader.js +2 -2
package/package.json
CHANGED
|
@@ -92,10 +92,18 @@ Object.assign( JSONLoader.prototype, {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
if (scope && scope.parse) {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
try {
|
|
96
|
+
var object = scope.parse( json, texturePath );
|
|
97
|
+
onLoad( object.geometry, object.materials );
|
|
98
|
+
} catch (e) {
|
|
99
|
+
console.error("The loader has encountered aon loading the geometry");
|
|
100
|
+
console.error(e);
|
|
101
|
+
if (onError) {
|
|
102
|
+
onError({responseURL: url});
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
99
107
|
}, onProgress, onError );
|
|
100
108
|
|
|
101
109
|
},
|
package/src/sceneLoader.js
CHANGED
|
@@ -60,7 +60,7 @@ exports.SceneLoader = function (sceneIn) {
|
|
|
60
60
|
return xhr => {
|
|
61
61
|
this.toBeDownloaded = this.toBeDownloaded - 1;
|
|
62
62
|
errorDownload = true;
|
|
63
|
-
console.error(`There is an issue with external resource
|
|
63
|
+
console.error(`There is an issue with external resource ${xhr?.responseURL ? ": " + xhr?.responseURL: ""}.`);
|
|
64
64
|
const payload = {
|
|
65
65
|
type: "Error",
|
|
66
66
|
xhr
|
|
@@ -122,7 +122,7 @@ exports.SceneLoader = function (sceneIn) {
|
|
|
122
122
|
if (finishCallback != undefined && (typeof finishCallback == 'function'))
|
|
123
123
|
finishCallback();
|
|
124
124
|
} else {
|
|
125
|
-
this.onError();
|
|
125
|
+
(this.onError(finishCallback))({responseURL: url});
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
}
|