@esotericsoftware/spine-webgl 4.0.19 → 4.0.22
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/iife/spine-webgl.js
CHANGED
|
@@ -4238,6 +4238,22 @@ var spine = (() => {
|
|
|
4238
4238
|
if (callback)
|
|
4239
4239
|
callback(path, message);
|
|
4240
4240
|
}
|
|
4241
|
+
loadAll() {
|
|
4242
|
+
let promise = new Promise((resolve, reject) => {
|
|
4243
|
+
let check = () => {
|
|
4244
|
+
if (this.isLoadingComplete()) {
|
|
4245
|
+
if (this.hasErrors())
|
|
4246
|
+
reject(this.errors);
|
|
4247
|
+
else
|
|
4248
|
+
resolve(this);
|
|
4249
|
+
return;
|
|
4250
|
+
}
|
|
4251
|
+
requestAnimationFrame(check);
|
|
4252
|
+
};
|
|
4253
|
+
requestAnimationFrame(check);
|
|
4254
|
+
});
|
|
4255
|
+
return promise;
|
|
4256
|
+
}
|
|
4241
4257
|
setRawDataURI(path, data) {
|
|
4242
4258
|
this.downloader.rawDataUris[this.pathPrefix + path] = data;
|
|
4243
4259
|
}
|
|
@@ -5916,6 +5932,12 @@ var spine = (() => {
|
|
|
5916
5932
|
}
|
|
5917
5933
|
return null;
|
|
5918
5934
|
}
|
|
5935
|
+
getBoundsRect() {
|
|
5936
|
+
let offset = new Vector2();
|
|
5937
|
+
let size = new Vector2();
|
|
5938
|
+
this.getBounds(offset, size);
|
|
5939
|
+
return { x: offset.x, y: offset.y, width: size.x, height: size.y };
|
|
5940
|
+
}
|
|
5919
5941
|
getBounds(offset, size, temp = new Array(2)) {
|
|
5920
5942
|
if (!offset)
|
|
5921
5943
|
throw new Error("offset cannot be null.");
|