@esotericsoftware/spine-canvas 4.0.21 → 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.
|
@@ -4197,6 +4197,22 @@ var spine = (() => {
|
|
|
4197
4197
|
if (callback)
|
|
4198
4198
|
callback(path, message);
|
|
4199
4199
|
}
|
|
4200
|
+
loadAll() {
|
|
4201
|
+
let promise = new Promise((resolve, reject) => {
|
|
4202
|
+
let check = () => {
|
|
4203
|
+
if (this.isLoadingComplete()) {
|
|
4204
|
+
if (this.hasErrors())
|
|
4205
|
+
reject(this.errors);
|
|
4206
|
+
else
|
|
4207
|
+
resolve(this);
|
|
4208
|
+
return;
|
|
4209
|
+
}
|
|
4210
|
+
requestAnimationFrame(check);
|
|
4211
|
+
};
|
|
4212
|
+
requestAnimationFrame(check);
|
|
4213
|
+
});
|
|
4214
|
+
return promise;
|
|
4215
|
+
}
|
|
4200
4216
|
setRawDataURI(path, data) {
|
|
4201
4217
|
this.downloader.rawDataUris[this.pathPrefix + path] = data;
|
|
4202
4218
|
}
|
|
@@ -5875,6 +5891,12 @@ var spine = (() => {
|
|
|
5875
5891
|
}
|
|
5876
5892
|
return null;
|
|
5877
5893
|
}
|
|
5894
|
+
getBoundsRect() {
|
|
5895
|
+
let offset = new Vector2();
|
|
5896
|
+
let size = new Vector2();
|
|
5897
|
+
this.getBounds(offset, size);
|
|
5898
|
+
return { x: offset.x, y: offset.y, width: size.x, height: size.y };
|
|
5899
|
+
}
|
|
5878
5900
|
getBounds(offset, size, temp = new Array(2)) {
|
|
5879
5901
|
if (!offset)
|
|
5880
5902
|
throw new Error("offset cannot be null.");
|