@galacean/engine-spine 4.2.6 → 4.2.7

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.
Files changed (60) hide show
  1. package/dist/browser.js +1 -1
  2. package/dist/main.js +149 -575
  3. package/dist/main.js.map +1 -1
  4. package/dist/miniprogram.js +149 -575
  5. package/dist/module.js +150 -575
  6. package/dist/module.js.map +1 -1
  7. package/package.json +2 -2
  8. package/types/AntGSpineLoader.d.ts +0 -22
  9. package/types/SpineAnimation.d.ts +0 -45
  10. package/types/SpineLoader.d.ts +0 -32
  11. package/types/SpineMaterial.d.ts +0 -6
  12. package/types/SpineRenderer.d.ts +0 -38
  13. package/types/core/MeshGenerator.d.ts +0 -43
  14. package/types/core/SpineMesh.d.ts +0 -11
  15. package/types/spine-core/Animation.d.ts +0 -378
  16. package/types/spine-core/AnimationState.d.ts +0 -365
  17. package/types/spine-core/AnimationStateData.d.ts +0 -23
  18. package/types/spine-core/AssetManager.d.ts +0 -36
  19. package/types/spine-core/AtlasAttachmentLoader.d.ts +0 -23
  20. package/types/spine-core/BlendMode.d.ts +0 -7
  21. package/types/spine-core/Bone.d.ts +0 -110
  22. package/types/spine-core/BoneData.d.ts +0 -44
  23. package/types/spine-core/ConstraintData.d.ts +0 -7
  24. package/types/spine-core/Event.d.ts +0 -16
  25. package/types/spine-core/EventData.d.ts +0 -13
  26. package/types/spine-core/IkConstraint.d.ts +0 -38
  27. package/types/spine-core/IkConstraintData.d.ts +0 -26
  28. package/types/spine-core/PathConstraint.d.ts +0 -46
  29. package/types/spine-core/PathConstraintData.d.ts +0 -52
  30. package/types/spine-core/SharedAssetManager.d.ts +0 -19
  31. package/types/spine-core/Skeleton.d.ts +0 -134
  32. package/types/spine-core/SkeletonBinary.d.ts +0 -49
  33. package/types/spine-core/SkeletonBounds.d.ts +0 -48
  34. package/types/spine-core/SkeletonClipping.d.ts +0 -22
  35. package/types/spine-core/SkeletonData.d.ts +0 -89
  36. package/types/spine-core/SkeletonJson.d.ts +0 -34
  37. package/types/spine-core/Skin.d.ts +0 -43
  38. package/types/spine-core/Slot.d.ts +0 -42
  39. package/types/spine-core/SlotData.d.ts +0 -23
  40. package/types/spine-core/Texture.d.ts +0 -46
  41. package/types/spine-core/TextureAtlas.d.ts +0 -30
  42. package/types/spine-core/TransformConstraint.d.ts +0 -36
  43. package/types/spine-core/TransformConstraintData.d.ts +0 -34
  44. package/types/spine-core/Triangulator.d.ts +0 -14
  45. package/types/spine-core/Updatable.d.ts +0 -9
  46. package/types/spine-core/Utils.d.ts +0 -124
  47. package/types/spine-core/VertexEffect.d.ts +0 -7
  48. package/types/spine-core/attachments/Attachment.d.ts +0 -43
  49. package/types/spine-core/attachments/AttachmentLoader.d.ts +0 -25
  50. package/types/spine-core/attachments/AttachmentType.d.ts +0 -9
  51. package/types/spine-core/attachments/BoundingBoxAttachment.d.ts +0 -12
  52. package/types/spine-core/attachments/ClippingAttachment.d.ts +0 -14
  53. package/types/spine-core/attachments/MeshAttachment.d.ts +0 -46
  54. package/types/spine-core/attachments/PathAttachment.d.ts +0 -19
  55. package/types/spine-core/attachments/PointAttachment.d.ts +0 -20
  56. package/types/spine-core/attachments/RegionAttachment.d.ts +0 -88
  57. package/types/spine-core/polyfills.d.ts +0 -3
  58. package/types/spine-core/vertexeffects/JitterEffect.d.ts +0 -11
  59. package/types/spine-core/vertexeffects/SwirlEffect.d.ts +0 -16
  60. package/types/types.d.ts +0 -4
@@ -33,103 +33,17 @@ function _instanceof1(left, right) {
33
33
  } else return _instanceof1(left, right);
34
34
  }
35
35
 
36
+ function _type_of(obj) {
37
+ "@swc/helpers - typeof";
38
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
39
+ }
40
+
36
41
  function __decorate(decorators, target, key, desc) {
37
42
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
38
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
43
+ if ((typeof Reflect === "undefined" ? "undefined" : _type_of(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
39
44
  else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
40
45
  return c > 3 && r && Object.defineProperty(target, key, r), r;
41
46
  }
42
- function __generator(thisArg, body) {
43
- var _ = {
44
- label: 0,
45
- sent: function sent() {
46
- if (t[0] & 1) throw t[1];
47
- return t[1];
48
- },
49
- trys: [],
50
- ops: []
51
- }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
52
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
53
- return this;
54
- }), g;
55
- function verb(n) {
56
- return function(v) {
57
- return step([
58
- n,
59
- v
60
- ]);
61
- };
62
- }
63
- function step(op) {
64
- if (f) throw new TypeError("Generator is already executing.");
65
- while(g && (g = 0, op[0] && (_ = 0)), _)try {
66
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
67
- if (y = 0, t) op = [
68
- op[0] & 2,
69
- t.value
70
- ];
71
- switch(op[0]){
72
- case 0:
73
- case 1:
74
- t = op;
75
- break;
76
- case 4:
77
- _.label++;
78
- return {
79
- value: op[1],
80
- done: false
81
- };
82
- case 5:
83
- _.label++;
84
- y = op[1];
85
- op = [
86
- 0
87
- ];
88
- continue;
89
- case 7:
90
- op = _.ops.pop();
91
- _.trys.pop();
92
- continue;
93
- default:
94
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
95
- _ = 0;
96
- continue;
97
- }
98
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
99
- _.label = op[1];
100
- break;
101
- }
102
- if (op[0] === 6 && _.label < t[1]) {
103
- _.label = t[1];
104
- t = op;
105
- break;
106
- }
107
- if (t && _.label < t[2]) {
108
- _.label = t[2];
109
- _.ops.push(op);
110
- break;
111
- }
112
- if (t[2]) _.ops.pop();
113
- _.trys.pop();
114
- continue;
115
- }
116
- op = body.call(thisArg, _);
117
- } catch (e) {
118
- op = [
119
- 6,
120
- e
121
- ];
122
- y = 0;
123
- } finally{
124
- f = t = 0;
125
- }
126
- if (op[0] & 5) throw op[1];
127
- return {
128
- value: op[0] ? op[1] : void 0,
129
- done: true
130
- };
131
- }
132
- }
133
47
  typeof SuppressedError === "function" ? SuppressedError : function _SuppressedError(error, suppressed, message) {
134
48
  var e = new Error(message);
135
49
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
@@ -170,34 +84,7 @@ function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
170
84
  throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
171
85
  }
172
86
 
173
- /******************************************************************************
174
- * Spine Runtimes License Agreement
175
- * Last updated April 5, 2025. Replaces all prior versions.
176
- *
177
- * Copyright (c) 2013-2025, Esoteric Software LLC
178
- *
179
- * Integration of the Spine Runtimes into software or otherwise creating
180
- * derivative works of the Spine Runtimes is permitted under the terms and
181
- * conditions of Section 2 of the Spine Editor License Agreement:
182
- * http://esotericsoftware.com/spine-editor-license
183
- *
184
- * Otherwise, it is permitted to integrate the Spine Runtimes into software
185
- * or otherwise create derivative works of the Spine Runtimes (collectively,
186
- * "Products"), provided that each user of the Products must obtain their own
187
- * Spine Editor license and redistribution of the Products in any form must
188
- * include this license and copyright notice.
189
- *
190
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
191
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
192
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
193
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
194
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
195
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
196
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
197
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
198
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
199
- * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
200
- *****************************************************************************/ var IntSet = /*#__PURE__*/ function() {
87
+ var IntSet = /*#__PURE__*/ function() {
201
88
  function IntSet() {
202
89
  this.array = new Array();
203
90
  }
@@ -316,9 +203,8 @@ var Color = /*#__PURE__*/ function() {
316
203
  color.g = ((value & 0x0000ff00) >>> 8) / 255;
317
204
  color.b = (value & 0x000000ff) / 255;
318
205
  };
319
- Color.fromString = function fromString(hex, color) {
320
- if (color === void 0) color = new Color();
321
- return color.setFromString(hex);
206
+ Color.fromString = function fromString(hex) {
207
+ return new Color().setFromString(hex);
322
208
  };
323
209
  return Color;
324
210
  }();
@@ -2942,16 +2828,18 @@ function _create_class(Constructor, protoProps, staticProps) {
2942
2828
  var finished = this.updateMixingFrom(from, delta);
2943
2829
  from.animationLast = from.nextAnimationLast;
2944
2830
  from.trackLast = from.nextTrackLast;
2945
- // The from entry was applied at least once and the mix is complete.
2946
- if (to.nextTrackLast != -1 && to.mixTime >= to.mixDuration) {
2947
- // Mixing is complete for all entries before the from entry or the mix is instantaneous.
2948
- if (from.totalAlpha == 0 || to.mixDuration == 0) {
2949
- to.mixingFrom = from.mixingFrom;
2950
- if (from.mixingFrom != null) from.mixingFrom.mixingTo = to;
2951
- to.interruptAlpha = from.interruptAlpha;
2952
- this.queue.end(from);
2831
+ if (to.nextTrackLast != -1) {
2832
+ var discard = to.mixTime == 0 && from.mixTime == 0; // Discard the from entry when neither have advanced yet.
2833
+ if (to.mixTime >= to.mixDuration || discard) {
2834
+ // Require totalAlpha == 0 to ensure mixing is complete or the transition is a single frame or discarded.
2835
+ if (from.totalAlpha == 0 || to.mixDuration == 0 || discard) {
2836
+ to.mixingFrom = from.mixingFrom;
2837
+ if (from.mixingFrom != null) from.mixingFrom.mixingTo = to;
2838
+ to.interruptAlpha = from.interruptAlpha;
2839
+ this.queue.end(from);
2840
+ }
2841
+ return finished;
2953
2842
  }
2954
- return finished;
2955
2843
  }
2956
2844
  from.trackTime += delta * from.timeScale;
2957
2845
  to.mixTime += delta;
@@ -3316,11 +3204,10 @@ function _create_class(Constructor, protoProps, staticProps) {
3316
3204
  if (!last) {
3317
3205
  this.setCurrent(trackIndex, entry, true);
3318
3206
  this.queue.drain();
3319
- if (delay < 0) delay = 0;
3320
3207
  } else {
3321
3208
  last.next = entry;
3322
3209
  entry.previous = last;
3323
- if (delay <= 0) delay = Math.max(delay + last.getTrackComplete() - entry.mixDuration, 0);
3210
+ if (delay <= 0) delay += last.getTrackComplete() - entry.mixDuration;
3324
3211
  }
3325
3212
  entry.delay = delay;
3326
3213
  return entry;
@@ -3359,7 +3246,7 @@ function _create_class(Constructor, protoProps, staticProps) {
3359
3246
  if (mixDuration === void 0) mixDuration = 0;
3360
3247
  if (delay === void 0) delay = 0;
3361
3248
  var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation(), false, delay);
3362
- if (delay <= 0) entry.delay = Math.max(entry.delay + entry.mixDuration - mixDuration, 0);
3249
+ if (delay <= 0) entry.delay += entry.mixDuration - mixDuration;
3363
3250
  entry.mixDuration = mixDuration;
3364
3251
  entry.trackEnd = mixDuration;
3365
3252
  return entry;
@@ -3613,10 +3500,7 @@ AnimationState._emptyAnimation = new Animation("<empty>", [], 0);
3613
3500
  var _proto = TrackEntry.prototype;
3614
3501
  _proto.setMixDurationWithDelay = function setMixDurationWithDelay(mixDuration, delay) {
3615
3502
  this._mixDuration = mixDuration;
3616
- if (delay <= 0) {
3617
- if (this.previous != null) delay = Math.max(delay + this.previous.getTrackComplete() - mixDuration, 0);
3618
- else delay = 0;
3619
- }
3503
+ if (this.previous != null && delay <= 0) delay += this.previous.getTrackComplete() - mixDuration;
3620
3504
  this.delay = delay;
3621
3505
  };
3622
3506
  _proto.reset = function reset() {
@@ -3839,17 +3723,17 @@ var CURRENT = 2;
3839
3723
 
3840
3724
  /******************************************************************************
3841
3725
  * Spine Runtimes License Agreement
3842
- * Last updated April 5, 2025. Replaces all prior versions.
3726
+ * Last updated July 28, 2023. Replaces all prior versions.
3843
3727
  *
3844
- * Copyright (c) 2013-2025, Esoteric Software LLC
3728
+ * Copyright (c) 2013-2023, Esoteric Software LLC
3845
3729
  *
3846
3730
  * Integration of the Spine Runtimes into software or otherwise creating
3847
3731
  * derivative works of the Spine Runtimes is permitted under the terms and
3848
3732
  * conditions of Section 2 of the Spine Editor License Agreement:
3849
3733
  * http://esotericsoftware.com/spine-editor-license
3850
3734
  *
3851
- * Otherwise, it is permitted to integrate the Spine Runtimes into software
3852
- * or otherwise create derivative works of the Spine Runtimes (collectively,
3735
+ * Otherwise, it is permitted to integrate the Spine Runtimes into software or
3736
+ * otherwise create derivative works of the Spine Runtimes (collectively,
3853
3737
  * "Products"), provided that each user of the Products must obtain their own
3854
3738
  * Spine Editor license and redistribution of the Products in any form must
3855
3739
  * include this license and copyright notice.
@@ -3862,8 +3746,8 @@ var CURRENT = 2;
3862
3746
  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
3863
3747
  * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
3864
3748
  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3865
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
3866
- * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3749
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
3750
+ * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3867
3751
  *****************************************************************************/ /** Stores mix (crossfade) durations to be applied when {@link AnimationState} animations are changed. */ var AnimationStateData = /*#__PURE__*/ function() {
3868
3752
  function AnimationStateData(skeletonData) {
3869
3753
  this.animationToMixTime = {};
@@ -3944,34 +3828,7 @@ var CURRENT = 2;
3944
3828
  }
3945
3829
  (VertexAttachment);
3946
3830
 
3947
- /******************************************************************************
3948
- * Spine Runtimes License Agreement
3949
- * Last updated April 5, 2025. Replaces all prior versions.
3950
- *
3951
- * Copyright (c) 2013-2025, Esoteric Software LLC
3952
- *
3953
- * Integration of the Spine Runtimes into software or otherwise creating
3954
- * derivative works of the Spine Runtimes is permitted under the terms and
3955
- * conditions of Section 2 of the Spine Editor License Agreement:
3956
- * http://esotericsoftware.com/spine-editor-license
3957
- *
3958
- * Otherwise, it is permitted to integrate the Spine Runtimes into software
3959
- * or otherwise create derivative works of the Spine Runtimes (collectively,
3960
- * "Products"), provided that each user of the Products must obtain their own
3961
- * Spine Editor license and redistribution of the Products in any form must
3962
- * include this license and copyright notice.
3963
- *
3964
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
3965
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3966
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3967
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
3968
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3969
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
3970
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
3971
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3972
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
3973
- * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3974
- *****************************************************************************/ var Texture = /*#__PURE__*/ function() {
3831
+ var Texture = /*#__PURE__*/ function() {
3975
3832
  function Texture(image) {
3976
3833
  this._image = image;
3977
3834
  }
@@ -4342,7 +4199,7 @@ var TextureAtlasRegion = /*#__PURE__*/ function(TextureRegion) {
4342
4199
  this.copyTo(copy);
4343
4200
  copy.regionUVs = new Array(this.regionUVs.length);
4344
4201
  Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);
4345
- copy.uvs = _instanceof1(this.uvs, Float32Array) ? Utils.newFloatArray(this.uvs.length) : new Array(this.uvs.length);
4202
+ copy.uvs = new Array(this.uvs.length);
4346
4203
  Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);
4347
4204
  copy.triangles = new Array(this.triangles.length);
4348
4205
  Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);
@@ -5006,17 +4863,17 @@ RegionAttachment.V4 = 31;
5006
4863
 
5007
4864
  /******************************************************************************
5008
4865
  * Spine Runtimes License Agreement
5009
- * Last updated April 5, 2025. Replaces all prior versions.
4866
+ * Last updated July 28, 2023. Replaces all prior versions.
5010
4867
  *
5011
- * Copyright (c) 2013-2025, Esoteric Software LLC
4868
+ * Copyright (c) 2013-2023, Esoteric Software LLC
5012
4869
  *
5013
4870
  * Integration of the Spine Runtimes into software or otherwise creating
5014
4871
  * derivative works of the Spine Runtimes is permitted under the terms and
5015
4872
  * conditions of Section 2 of the Spine Editor License Agreement:
5016
4873
  * http://esotericsoftware.com/spine-editor-license
5017
4874
  *
5018
- * Otherwise, it is permitted to integrate the Spine Runtimes into software
5019
- * or otherwise create derivative works of the Spine Runtimes (collectively,
4875
+ * Otherwise, it is permitted to integrate the Spine Runtimes into software or
4876
+ * otherwise create derivative works of the Spine Runtimes (collectively,
5020
4877
  * "Products"), provided that each user of the Products must obtain their own
5021
4878
  * Spine Editor license and redistribution of the Products in any form must
5022
4879
  * include this license and copyright notice.
@@ -5029,8 +4886,8 @@ RegionAttachment.V4 = 31;
5029
4886
  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
5030
4887
  * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
5031
4888
  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
5032
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
5033
- * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4889
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
4890
+ * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5034
4891
  *****************************************************************************/ /** The base class for all constraint datas. */ var ConstraintData = function ConstraintData(name, order, skinRequired) {
5035
4892
  this.name = name;
5036
4893
  this.order = order;
@@ -5038,46 +4895,18 @@ RegionAttachment.V4 = 31;
5038
4895
  }
5039
4896
  ;
5040
4897
 
5041
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
5042
- try {
5043
- var info = gen[key](arg);
5044
- var value = info.value;
5045
- } catch (error) {
5046
- reject(error);
5047
- return;
5048
- }
5049
- if (info.done) resolve(value);
5050
- else Promise.resolve(value).then(_next, _throw);
5051
- }
5052
- function _async_to_generator(fn) {
5053
- return function() {
5054
- var self = this, args = arguments;
5055
- return new Promise(function(resolve, reject) {
5056
- var gen = fn.apply(self, args);
5057
- function _next(value) {
5058
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
5059
- }
5060
- function _throw(err) {
5061
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
5062
- }
5063
- _next(undefined);
5064
- });
5065
- };
5066
- }
5067
-
5068
4898
  var AssetManagerBase = /*#__PURE__*/ function() {
5069
- function AssetManagerBase(textureLoader, pathPrefix, downloader, cache) {
4899
+ function AssetManagerBase(textureLoader, pathPrefix, downloader) {
5070
4900
  if (pathPrefix === void 0) pathPrefix = "";
5071
4901
  if (downloader === void 0) downloader = new Downloader();
5072
- if (cache === void 0) cache = new AssetCache();
5073
4902
  this.pathPrefix = "";
4903
+ this.assets = {};
5074
4904
  this.errors = {};
5075
4905
  this.toLoad = 0;
5076
4906
  this.loaded = 0;
5077
4907
  this.textureLoader = textureLoader;
5078
4908
  this.pathPrefix = pathPrefix;
5079
4909
  this.downloader = downloader;
5080
- this.cache = cache;
5081
4910
  }
5082
4911
  var _proto = AssetManagerBase.prototype;
5083
4912
  _proto.start = function start(path) {
@@ -5087,8 +4916,7 @@ var AssetManagerBase = /*#__PURE__*/ function() {
5087
4916
  _proto.success = function success(callback, path, asset) {
5088
4917
  this.toLoad--;
5089
4918
  this.loaded++;
5090
- this.cache.assets[path] = asset;
5091
- this.cache.assetsRefCount[path] = (this.cache.assetsRefCount[path] || 0) + 1;
4919
+ this.assets[path] = asset;
5092
4920
  if (callback) callback(path, asset);
5093
4921
  };
5094
4922
  _proto.error = function error(callback, path, message) {
@@ -5120,16 +4948,10 @@ var AssetManagerBase = /*#__PURE__*/ function() {
5120
4948
  if (success === void 0) success = function() {};
5121
4949
  if (error === void 0) error = function() {};
5122
4950
  path = this.start(path);
5123
- if (this.reuseAssets(path, success, error)) return;
5124
- this.cache.assetsLoaded[path] = new Promise(function(resolve, reject) {
5125
- _this.downloader.downloadBinary(path, function(data) {
5126
- _this.success(success, path, data);
5127
- resolve(data);
5128
- }, function(status, responseText) {
5129
- var errorMsg = "Couldn't load binary " + path + ": status " + status + ", " + responseText;
5130
- _this.error(error, path, errorMsg);
5131
- reject(errorMsg);
5132
- });
4951
+ this.downloader.downloadBinary(path, function(data) {
4952
+ _this.success(success, path, data);
4953
+ }, function(status, responseText) {
4954
+ _this.error(error, path, "Couldn't load binary " + path + ": status " + status + ", " + responseText);
5133
4955
  });
5134
4956
  };
5135
4957
  _proto.loadText = function loadText(path, success, error) {
@@ -5148,83 +4970,46 @@ var AssetManagerBase = /*#__PURE__*/ function() {
5148
4970
  if (success === void 0) success = function() {};
5149
4971
  if (error === void 0) error = function() {};
5150
4972
  path = this.start(path);
5151
- if (this.reuseAssets(path, success, error)) return;
5152
- this.cache.assetsLoaded[path] = new Promise(function(resolve, reject) {
5153
- _this.downloader.downloadJson(path, function(data) {
5154
- _this.success(success, path, data);
5155
- resolve(data);
5156
- }, function(status, responseText) {
5157
- var errorMsg = "Couldn't load JSON " + path + ": status " + status + ", " + responseText;
5158
- _this.error(error, path, errorMsg);
5159
- reject(errorMsg);
5160
- });
4973
+ this.downloader.downloadJson(path, function(data) {
4974
+ _this.success(success, path, data);
4975
+ }, function(status, responseText) {
4976
+ _this.error(error, path, "Couldn't load JSON " + path + ": status " + status + ", " + responseText);
5161
4977
  });
5162
4978
  };
5163
- _proto.reuseAssets = function reuseAssets(path, success, error) {
5164
- var _this = this;
5165
- if (success === void 0) success = function() {};
5166
- if (error === void 0) error = function() {};
5167
- var loadedStatus = this.cache.assetsLoaded[path];
5168
- var alreadyExistsOrLoading = loadedStatus !== undefined;
5169
- if (alreadyExistsOrLoading) {
5170
- this.cache.assetsLoaded[path] = loadedStatus.then(function(data) {
5171
- // necessary when user preloads an image into the cache.
5172
- // texture loader is not avaiable in the cache, so we transform in GLTexture at first use
5173
- data = _instanceof1(data, engineMiniprogramAdapter.Image) || _instanceof1(data, ImageBitmap) ? _this.textureLoader(data) : data;
5174
- _this.success(success, path, data);
5175
- return data;
5176
- }).catch(function(errorMsg) {
5177
- return _this.error(error, path, errorMsg);
5178
- });
5179
- }
5180
- return alreadyExistsOrLoading;
5181
- };
5182
4979
  _proto.loadTexture = function loadTexture(path, success, error) {
5183
4980
  var _this = this;
5184
4981
  if (success === void 0) success = function() {};
5185
4982
  if (error === void 0) error = function() {};
5186
4983
  path = this.start(path);
5187
- if (this.reuseAssets(path, success, error)) return;
5188
- this.cache.assetsLoaded[path] = new Promise(function(resolve, reject) {
5189
- var isBrowser = !!(typeof engineMiniprogramAdapter.window !== 'undefined' && typeof engineMiniprogramAdapter.navigator !== 'undefined' && engineMiniprogramAdapter.window.document);
5190
- var isWebWorker = !isBrowser; // && typeof importScripts !== 'undefined';
5191
- if (isWebWorker) {
5192
- fetch(path, {
5193
- mode: "cors"
5194
- }).then(function(response) {
5195
- if (response.ok) return response.blob();
5196
- var errorMsg = "Couldn't load image: " + path;
5197
- _this.error(error, path, "Couldn't load image: " + path);
5198
- reject(errorMsg);
5199
- }).then(function(blob) {
5200
- return blob ? createImageBitmap(blob, {
5201
- premultiplyAlpha: "none",
5202
- colorSpaceConversion: "none"
5203
- }) : null;
5204
- }).then(function(bitmap) {
5205
- if (bitmap) {
5206
- var texture = _this.createTexture(path, bitmap);
5207
- _this.success(success, path, texture);
5208
- resolve(texture);
5209
- }
5210
- });
5211
- } else {
5212
- var image = new engineMiniprogramAdapter.Image();
5213
- image.crossOrigin = "anonymous";
5214
- image.onload = function() {
5215
- var texture = _this.createTexture(path, image);
5216
- _this.success(success, path, texture);
5217
- resolve(texture);
5218
- };
5219
- image.onerror = function() {
5220
- var errorMsg = "Couldn't load image: " + path;
5221
- _this.error(error, path, errorMsg);
5222
- reject(errorMsg);
5223
- };
5224
- if (_this.downloader.rawDataUris[path]) path = _this.downloader.rawDataUris[path];
5225
- image.src = path;
5226
- }
5227
- });
4984
+ var isBrowser = !!(typeof engineMiniprogramAdapter.window !== 'undefined' && typeof engineMiniprogramAdapter.navigator !== 'undefined' && engineMiniprogramAdapter.window.document);
4985
+ var isWebWorker = !isBrowser; // && typeof importScripts !== 'undefined';
4986
+ if (isWebWorker) {
4987
+ fetch(path, {
4988
+ mode: "cors"
4989
+ }).then(function(response) {
4990
+ if (response.ok) return response.blob();
4991
+ _this.error(error, path, "Couldn't load image: " + path);
4992
+ return null;
4993
+ }).then(function(blob) {
4994
+ return blob ? createImageBitmap(blob, {
4995
+ premultiplyAlpha: "none",
4996
+ colorSpaceConversion: "none"
4997
+ }) : null;
4998
+ }).then(function(bitmap) {
4999
+ if (bitmap) _this.success(success, path, _this.textureLoader(bitmap));
5000
+ });
5001
+ } else {
5002
+ var image = new engineMiniprogramAdapter.Image();
5003
+ image.crossOrigin = "anonymous";
5004
+ image.onload = function() {
5005
+ _this.success(success, path, _this.textureLoader(image));
5006
+ };
5007
+ image.onerror = function() {
5008
+ _this.error(error, path, "Couldn't load image: " + path);
5009
+ };
5010
+ if (this.downloader.rawDataUris[path]) path = this.downloader.rawDataUris[path];
5011
+ image.src = path;
5012
+ }
5228
5013
  };
5229
5014
  _proto.loadTextureAtlas = function loadTextureAtlas(path, success, error, fileAlias) {
5230
5015
  var _this = this;
@@ -5233,189 +5018,53 @@ var AssetManagerBase = /*#__PURE__*/ function() {
5233
5018
  var index = path.lastIndexOf("/");
5234
5019
  var parent = index >= 0 ? path.substring(0, index + 1) : "";
5235
5020
  path = this.start(path);
5236
- if (this.reuseAssets(path, success, error)) return;
5237
- this.cache.assetsLoaded[path] = new Promise(function(resolve, reject) {
5238
- _this.downloader.downloadText(path, function(atlasText) {
5239
- try {
5240
- var _loop = function() {
5241
- var page = _step.value;
5242
- _this.loadTexture(!fileAlias ? parent + page.name : fileAlias[page.name], function(imagePath, texture) {
5243
- if (!abort) {
5244
- page.setTexture(texture);
5245
- if (--toLoad == 0) {
5246
- _this.success(success, path, atlas);
5247
- resolve(atlas);
5248
- }
5249
- }
5250
- }, function(imagePath, message) {
5251
- if (!abort) {
5252
- var errorMsg = "Couldn't load texture " + path + " page image: " + imagePath;
5253
- _this.error(error, path, errorMsg);
5254
- reject(errorMsg);
5255
- }
5256
- abort = true;
5257
- });
5258
- };
5259
- var atlas = _this.createTextureAtlas(path, atlasText);
5260
- var toLoad = atlas.pages.length, abort = false;
5261
- for(var _iterator = _create_for_of_iterator_helper_loose(atlas.pages), _step; !(_step = _iterator()).done;)_loop();
5262
- } catch (e) {
5263
- var errorMsg = "Couldn't parse texture atlas " + path + ": " + e.message;
5264
- _this.error(error, path, errorMsg);
5265
- reject(errorMsg);
5266
- }
5267
- }, function(status, responseText) {
5268
- var errorMsg = "Couldn't load texture atlas " + path + ": status " + status + ", " + responseText;
5269
- _this.error(error, path, errorMsg);
5270
- reject(errorMsg);
5271
- });
5272
- });
5273
- };
5274
- _proto.loadTextureAtlasButNoTextures = function loadTextureAtlasButNoTextures(path, success, error, fileAlias) {
5275
- var _this = this;
5276
- if (success === void 0) success = function() {};
5277
- if (error === void 0) error = function() {};
5278
- path = this.start(path);
5279
- if (this.reuseAssets(path, success, error)) return;
5280
- this.cache.assetsLoaded[path] = new Promise(function(resolve, reject) {
5281
- _this.downloader.downloadText(path, function(atlasText) {
5282
- try {
5283
- var atlas = _this.createTextureAtlas(path, atlasText);
5284
- _this.success(success, path, atlas);
5285
- resolve(atlas);
5286
- } catch (e) {
5287
- var errorMsg = "Couldn't parse texture atlas " + path + ": " + e.message;
5288
- _this.error(error, path, errorMsg);
5289
- reject(errorMsg);
5290
- }
5291
- }, function(status, responseText) {
5292
- var errorMsg = "Couldn't load texture atlas " + path + ": status " + status + ", " + responseText;
5293
- _this.error(error, path, errorMsg);
5294
- reject(errorMsg);
5295
- });
5021
+ this.downloader.downloadText(path, function(atlasText) {
5022
+ try {
5023
+ var _loop = function() {
5024
+ var page = _step.value;
5025
+ _this.loadTexture(!fileAlias ? parent + page.name : fileAlias[page.name], function(imagePath, texture) {
5026
+ if (!abort) {
5027
+ page.setTexture(texture);
5028
+ if (--toLoad == 0) _this.success(success, path, atlas);
5029
+ }
5030
+ }, function(imagePath, message) {
5031
+ if (!abort) _this.error(error, path, "Couldn't load texture atlas " + path + " page image: " + imagePath);
5032
+ abort = true;
5033
+ });
5034
+ };
5035
+ var atlas = new TextureAtlas(atlasText);
5036
+ var toLoad = atlas.pages.length, abort = false;
5037
+ for(var _iterator = _create_for_of_iterator_helper_loose(atlas.pages), _step; !(_step = _iterator()).done;)_loop();
5038
+ } catch (e) {
5039
+ _this.error(error, path, "Couldn't parse texture atlas " + path + ": " + e.message);
5040
+ }
5041
+ }, function(status, responseText) {
5042
+ _this.error(error, path, "Couldn't load texture atlas " + path + ": status " + status + ", " + responseText);
5296
5043
  });
5297
5044
  };
5298
- // Promisified versions of load function
5299
- _proto.loadBinaryAsync = function loadBinaryAsync(path) {
5300
- return _async_to_generator(function() {
5301
- var _this;
5302
- return __generator(this, function(_state) {
5303
- _this = this;
5304
- return [
5305
- 2,
5306
- new Promise(function(resolve, reject) {
5307
- _this.loadBinary(path, function(_, binary) {
5308
- return resolve(binary);
5309
- }, function(_, message) {
5310
- return reject(message);
5311
- });
5312
- })
5313
- ];
5314
- });
5315
- }).call(this);
5316
- };
5317
- _proto.loadJsonAsync = function loadJsonAsync(path) {
5318
- return _async_to_generator(function() {
5319
- var _this;
5320
- return __generator(this, function(_state) {
5321
- _this = this;
5322
- return [
5323
- 2,
5324
- new Promise(function(resolve, reject) {
5325
- _this.loadJson(path, function(_, object) {
5326
- return resolve(object);
5327
- }, function(_, message) {
5328
- return reject(message);
5329
- });
5330
- })
5331
- ];
5332
- });
5333
- }).call(this);
5334
- };
5335
- _proto.loadTextureAsync = function loadTextureAsync(path) {
5336
- return _async_to_generator(function() {
5337
- var _this;
5338
- return __generator(this, function(_state) {
5339
- _this = this;
5340
- return [
5341
- 2,
5342
- new Promise(function(resolve, reject) {
5343
- _this.loadTexture(path, function(_, texture) {
5344
- return resolve(texture);
5345
- }, function(_, message) {
5346
- return reject(message);
5347
- });
5348
- })
5349
- ];
5350
- });
5351
- }).call(this);
5352
- };
5353
- _proto.loadTextureAtlasAsync = function loadTextureAtlasAsync(path) {
5354
- return _async_to_generator(function() {
5355
- var _this;
5356
- return __generator(this, function(_state) {
5357
- _this = this;
5358
- return [
5359
- 2,
5360
- new Promise(function(resolve, reject) {
5361
- _this.loadTextureAtlas(path, function(_, atlas) {
5362
- return resolve(atlas);
5363
- }, function(_, message) {
5364
- return reject(message);
5365
- });
5366
- })
5367
- ];
5368
- });
5369
- }).call(this);
5370
- };
5371
- _proto.loadTextureAtlasButNoTexturesAsync = function loadTextureAtlasButNoTexturesAsync(path) {
5372
- return _async_to_generator(function() {
5373
- var _this;
5374
- return __generator(this, function(_state) {
5375
- _this = this;
5376
- return [
5377
- 2,
5378
- new Promise(function(resolve, reject) {
5379
- _this.loadTextureAtlasButNoTextures(path, function(_, atlas) {
5380
- return resolve(atlas);
5381
- }, function(_, message) {
5382
- return reject(message);
5383
- });
5384
- })
5385
- ];
5386
- });
5387
- }).call(this);
5388
- };
5389
- _proto.setCache = function setCache(cache) {
5390
- this.cache = cache;
5391
- };
5392
5045
  _proto.get = function get(path) {
5393
- return this.cache.assets[this.pathPrefix + path];
5046
+ return this.assets[this.pathPrefix + path];
5394
5047
  };
5395
5048
  _proto.require = function require(path) {
5396
5049
  path = this.pathPrefix + path;
5397
- var asset = this.cache.assets[path];
5050
+ var asset = this.assets[path];
5398
5051
  if (asset) return asset;
5399
5052
  var error = this.errors[path];
5400
5053
  throw Error("Asset not found: " + path + (error ? "\n" + error : ""));
5401
5054
  };
5402
5055
  _proto.remove = function remove(path) {
5403
5056
  path = this.pathPrefix + path;
5404
- var asset = this.cache.assets[path];
5057
+ var asset = this.assets[path];
5405
5058
  if (asset.dispose) asset.dispose();
5406
- delete this.cache.assets[path];
5407
- delete this.cache.assetsRefCount[path];
5408
- delete this.cache.assetsLoaded[path];
5059
+ delete this.assets[path];
5409
5060
  return asset;
5410
5061
  };
5411
5062
  _proto.removeAll = function removeAll() {
5412
- for(var path in this.cache.assets){
5413
- var asset = this.cache.assets[path];
5063
+ for(var key in this.assets){
5064
+ var asset = this.assets[key];
5414
5065
  if (asset.dispose) asset.dispose();
5415
5066
  }
5416
- this.cache.assets = {};
5417
- this.cache.assetsLoaded = {};
5418
- this.cache.assetsRefCount = {};
5067
+ this.assets = {};
5419
5068
  };
5420
5069
  _proto.isLoadingComplete = function isLoadingComplete() {
5421
5070
  return this.toLoad == 0;
@@ -5429,89 +5078,14 @@ var AssetManagerBase = /*#__PURE__*/ function() {
5429
5078
  _proto.dispose = function dispose() {
5430
5079
  this.removeAll();
5431
5080
  };
5432
- // dispose asset only if it's not used by others
5433
- _proto.disposeAsset = function disposeAsset(path) {
5434
- var asset = this.cache.assets[path];
5435
- if (_instanceof1(asset, TextureAtlas)) {
5436
- asset.dispose();
5437
- return;
5438
- }
5439
- this.disposeAssetInternal(path);
5440
- };
5441
5081
  _proto.hasErrors = function hasErrors() {
5442
5082
  return Object.keys(this.errors).length > 0;
5443
5083
  };
5444
5084
  _proto.getErrors = function getErrors() {
5445
5085
  return this.errors;
5446
5086
  };
5447
- _proto.disposeAssetInternal = function disposeAssetInternal(path) {
5448
- if (this.cache.assetsRefCount[path] > 0 && --this.cache.assetsRefCount[path] === 0) {
5449
- return this.remove(path);
5450
- }
5451
- };
5452
- _proto.createTextureAtlas = function createTextureAtlas(path, atlasText) {
5453
- var _this = this;
5454
- var atlas = new TextureAtlas(atlasText);
5455
- atlas.dispose = function() {
5456
- if (_this.cache.assetsRefCount[path] <= 0) return;
5457
- _this.disposeAssetInternal(path);
5458
- for(var _iterator = _create_for_of_iterator_helper_loose(atlas.pages), _step; !(_step = _iterator()).done;){
5459
- var page = _step.value;
5460
- var _page_texture;
5461
- (_page_texture = page.texture) == null ? void 0 : _page_texture.dispose();
5462
- }
5463
- };
5464
- return atlas;
5465
- };
5466
- _proto.createTexture = function createTexture(path, image) {
5467
- var _this = this;
5468
- var texture = this.textureLoader(image);
5469
- var textureDispose = texture.dispose.bind(texture);
5470
- texture.dispose = function() {
5471
- if (_this.disposeAssetInternal(path)) textureDispose();
5472
- };
5473
- return texture;
5474
- };
5475
5087
  return AssetManagerBase;
5476
5088
  }();
5477
- var AssetCache = /*#__PURE__*/ function() {
5478
- function AssetCache() {
5479
- this.assets = {};
5480
- this.assetsRefCount = {};
5481
- this.assetsLoaded = {};
5482
- }
5483
- var _proto = AssetCache.prototype;
5484
- _proto.addAsset = function addAsset(path, asset) {
5485
- return _async_to_generator(function() {
5486
- var _;
5487
- return __generator(this, function(_state) {
5488
- switch(_state.label){
5489
- case 0:
5490
- this.assetsLoaded[path] = Promise.resolve(asset);
5491
- _ = this.assets;
5492
- return [
5493
- 4,
5494
- asset
5495
- ];
5496
- case 1:
5497
- _[path] = _state.sent();
5498
- return [
5499
- 2
5500
- ];
5501
- }
5502
- });
5503
- }).call(this);
5504
- };
5505
- AssetCache.getCache = function getCache(id) {
5506
- var cache = AssetCache.AVAILABLE_CACHES.get(id);
5507
- if (cache) return cache;
5508
- var newCache = new AssetCache();
5509
- AssetCache.AVAILABLE_CACHES.set(id, newCache);
5510
- return newCache;
5511
- };
5512
- return AssetCache;
5513
- }();
5514
- AssetCache.AVAILABLE_CACHES = new Map();
5515
5089
  var Downloader = /*#__PURE__*/ function() {
5516
5090
  function Downloader() {
5517
5091
  this.callbacks = {};
@@ -5551,11 +5125,10 @@ var Downloader = /*#__PURE__*/ function() {
5551
5125
  _proto.downloadText = function downloadText(url, success, error) {
5552
5126
  var _this = this;
5553
5127
  if (this.start(url, success, error)) return;
5554
- var rawDataUri = this.rawDataUris[url];
5555
- // we assume if a "." is included in a raw data uri, it is used to rewrite an asset URL
5556
- if (rawDataUri && !rawDataUri.includes(".")) {
5128
+ if (this.rawDataUris[url]) {
5557
5129
  try {
5558
- this.finish(url, 200, this.dataUriToString(rawDataUri));
5130
+ var dataUri = this.rawDataUris[url];
5131
+ this.finish(url, 200, this.dataUriToString(dataUri));
5559
5132
  } catch (e) {
5560
5133
  this.finish(url, 400, JSON.stringify(e));
5561
5134
  }
@@ -5563,7 +5136,7 @@ var Downloader = /*#__PURE__*/ function() {
5563
5136
  }
5564
5137
  var request = new engineMiniprogramAdapter.XMLHttpRequest();
5565
5138
  request.overrideMimeType("text/html");
5566
- request.open("GET", rawDataUri ? rawDataUri : url, true);
5139
+ request.open("GET", url, true);
5567
5140
  var done = function() {
5568
5141
  _this.finish(url, request.status, request.responseText);
5569
5142
  };
@@ -5579,18 +5152,17 @@ var Downloader = /*#__PURE__*/ function() {
5579
5152
  _proto.downloadBinary = function downloadBinary(url, success, error) {
5580
5153
  var _this = this;
5581
5154
  if (this.start(url, success, error)) return;
5582
- var rawDataUri = this.rawDataUris[url];
5583
- // we assume if a "." is included in a raw data uri, it is used to rewrite an asset URL
5584
- if (rawDataUri && !rawDataUri.includes(".")) {
5155
+ if (this.rawDataUris[url]) {
5585
5156
  try {
5586
- this.finish(url, 200, this.dataUriToUint8Array(rawDataUri));
5157
+ var dataUri = this.rawDataUris[url];
5158
+ this.finish(url, 200, this.dataUriToUint8Array(dataUri));
5587
5159
  } catch (e) {
5588
5160
  this.finish(url, 400, JSON.stringify(e));
5589
5161
  }
5590
5162
  return;
5591
5163
  }
5592
5164
  var request = new engineMiniprogramAdapter.XMLHttpRequest();
5593
- request.open("GET", rawDataUri ? rawDataUri : url, true);
5165
+ request.open("GET", url, true);
5594
5166
  request.responseType = "arraybuffer";
5595
5167
  var onerror = function() {
5596
5168
  _this.finish(url, request.status, request.response);
@@ -5628,17 +5200,17 @@ var Downloader = /*#__PURE__*/ function() {
5628
5200
 
5629
5201
  /******************************************************************************
5630
5202
  * Spine Runtimes License Agreement
5631
- * Last updated April 5, 2025. Replaces all prior versions.
5203
+ * Last updated July 28, 2023. Replaces all prior versions.
5632
5204
  *
5633
- * Copyright (c) 2013-2025, Esoteric Software LLC
5205
+ * Copyright (c) 2013-2023, Esoteric Software LLC
5634
5206
  *
5635
5207
  * Integration of the Spine Runtimes into software or otherwise creating
5636
5208
  * derivative works of the Spine Runtimes is permitted under the terms and
5637
5209
  * conditions of Section 2 of the Spine Editor License Agreement:
5638
5210
  * http://esotericsoftware.com/spine-editor-license
5639
5211
  *
5640
- * Otherwise, it is permitted to integrate the Spine Runtimes into software
5641
- * or otherwise create derivative works of the Spine Runtimes (collectively,
5212
+ * Otherwise, it is permitted to integrate the Spine Runtimes into software or
5213
+ * otherwise create derivative works of the Spine Runtimes (collectively,
5642
5214
  * "Products"), provided that each user of the Products must obtain their own
5643
5215
  * Spine Editor license and redistribution of the Products in any form must
5644
5216
  * include this license and copyright notice.
@@ -5651,8 +5223,8 @@ var Downloader = /*#__PURE__*/ function() {
5651
5223
  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
5652
5224
  * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
5653
5225
  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
5654
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
5655
- * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5226
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
5227
+ * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5656
5228
  *****************************************************************************/ /** Stores the current pose values for an {@link Event}.
5657
5229
  *
5658
5230
  * See Timeline {@link Timeline#apply()},
@@ -5672,17 +5244,17 @@ var Downloader = /*#__PURE__*/ function() {
5672
5244
 
5673
5245
  /******************************************************************************
5674
5246
  * Spine Runtimes License Agreement
5675
- * Last updated April 5, 2025. Replaces all prior versions.
5247
+ * Last updated July 28, 2023. Replaces all prior versions.
5676
5248
  *
5677
- * Copyright (c) 2013-2025, Esoteric Software LLC
5249
+ * Copyright (c) 2013-2023, Esoteric Software LLC
5678
5250
  *
5679
5251
  * Integration of the Spine Runtimes into software or otherwise creating
5680
5252
  * derivative works of the Spine Runtimes is permitted under the terms and
5681
5253
  * conditions of Section 2 of the Spine Editor License Agreement:
5682
5254
  * http://esotericsoftware.com/spine-editor-license
5683
5255
  *
5684
- * Otherwise, it is permitted to integrate the Spine Runtimes into software
5685
- * or otherwise create derivative works of the Spine Runtimes (collectively,
5256
+ * Otherwise, it is permitted to integrate the Spine Runtimes into software or
5257
+ * otherwise create derivative works of the Spine Runtimes (collectively,
5686
5258
  * "Products"), provided that each user of the Products must obtain their own
5687
5259
  * Spine Editor license and redistribution of the Products in any form must
5688
5260
  * include this license and copyright notice.
@@ -5695,8 +5267,8 @@ var Downloader = /*#__PURE__*/ function() {
5695
5267
  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
5696
5268
  * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
5697
5269
  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
5698
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
5699
- * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5270
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
5271
+ * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5700
5272
  *****************************************************************************/ /** Stores the setup pose values for an {@link Event}.
5701
5273
  *
5702
5274
  * See [Events](http://esotericsoftware.com/spine-events) in the Spine User Guide. */ var EventData = function EventData(name) {
@@ -6556,7 +6128,7 @@ PathConstraint.epsilon = 0.00001;
6556
6128
  }
6557
6129
  if (a >= t) {
6558
6130
  d = Math.pow(this.damping, 60 * t);
6559
- var m = this.massInverse * t, e = this.strength, w = this.wind * f * skeleton.scaleX, g = this.gravity * f * skeleton.scaleY;
6131
+ var m = this.massInverse * t, e = this.strength, w = this.wind * f, g = (Skeleton.yDown ? -this.gravity : this.gravity) * f;
6560
6132
  do {
6561
6133
  if (x) {
6562
6134
  this.xVelocity += (w - this.xOffset * e) * m;
@@ -7398,10 +6970,10 @@ PathConstraint.epsilon = 0.00001;
7398
6970
  })) != null ? _this_physicsConstraints_find : null;
7399
6971
  };
7400
6972
  /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose as `{ x: number, y: number, width: number, height: number }`.
7401
- * Note that this method will create temporary objects which can add to garbage collection pressure. Use `getBounds()` if garbage collection is a concern. */ _proto.getBoundsRect = function getBoundsRect(clipper) {
6973
+ * Note that this method will create temporary objects which can add to garbage collection pressure. Use `getBounds()` if garbage collection is a concern. */ _proto.getBoundsRect = function getBoundsRect() {
7402
6974
  var offset = new Vector2();
7403
6975
  var size = new Vector2();
7404
- this.getBounds(offset, size, undefined, clipper);
6976
+ this.getBounds(offset, size);
7405
6977
  return {
7406
6978
  x: offset.x,
7407
6979
  y: offset.y,
@@ -7530,17 +7102,17 @@ Skeleton.yDown = false;
7530
7102
 
7531
7103
  /******************************************************************************
7532
7104
  * Spine Runtimes License Agreement
7533
- * Last updated April 5, 2025. Replaces all prior versions.
7105
+ * Last updated July 28, 2023. Replaces all prior versions.
7534
7106
  *
7535
- * Copyright (c) 2013-2025, Esoteric Software LLC
7107
+ * Copyright (c) 2013-2023, Esoteric Software LLC
7536
7108
  *
7537
7109
  * Integration of the Spine Runtimes into software or otherwise creating
7538
7110
  * derivative works of the Spine Runtimes is permitted under the terms and
7539
7111
  * conditions of Section 2 of the Spine Editor License Agreement:
7540
7112
  * http://esotericsoftware.com/spine-editor-license
7541
7113
  *
7542
- * Otherwise, it is permitted to integrate the Spine Runtimes into software
7543
- * or otherwise create derivative works of the Spine Runtimes (collectively,
7114
+ * Otherwise, it is permitted to integrate the Spine Runtimes into software or
7115
+ * otherwise create derivative works of the Spine Runtimes (collectively,
7544
7116
  * "Products"), provided that each user of the Products must obtain their own
7545
7117
  * Spine Editor license and redistribution of the Products in any form must
7546
7118
  * include this license and copyright notice.
@@ -7553,16 +7125,18 @@ Skeleton.yDown = false;
7553
7125
  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
7554
7126
  * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
7555
7127
  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
7556
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
7557
- * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7128
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
7129
+ * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7558
7130
  *****************************************************************************/ /** Stores the setup pose and all of the stateless data for a skeleton.
7559
7131
  *
7560
7132
  * See [Data objects](http://esotericsoftware.com/spine-runtime-architecture#Data-objects) in the Spine Runtimes
7561
7133
  * Guide. */ var SkeletonData = /*#__PURE__*/ function() {
7562
7134
  function SkeletonData() {
7563
7135
  /** The skeleton's name, which by default is the name of the skeleton data file, if possible. May be null. */ this.name = null;
7564
- /** The skeleton's bones, sorted parent first. The root bone is always the first bone. */ this.bones = new Array(); // Ordered parents first.
7565
- /** The skeleton's slots in the setup pose draw order. */ this.slots = new Array(); // Setup pose draw order.
7136
+ /** The skeleton's bones, sorted parent first. The root bone is always the first bone. */ this.bones = new Array() // Ordered parents first.
7137
+ ;
7138
+ /** The skeleton's slots in the setup pose draw order. */ this.slots = new Array() // Setup pose draw order.
7139
+ ;
7566
7140
  this.skins = new Array();
7567
7141
  /** The skeleton's default skin. By default this skin contains all attachments that were not in a skin in Spine.
7568
7142
  *
@@ -7705,7 +7279,8 @@ Skeleton.yDown = false;
7705
7279
  this.attachments = new Array();
7706
7280
  this.bones = Array();
7707
7281
  this.constraints = new Array();
7708
- /** The color of the skin as it was in Spine, or a default color if nonessential data was not exported. */ this.color = new Color(0.99607843, 0.61960787, 0.30980393, 1); // fe9e4fff
7282
+ /** The color of the skin as it was in Spine, or a default color if nonessential data was not exported. */ this.color = new Color(0.99607843, 0.61960787, 0.30980393, 1) // fe9e4fff
7283
+ ;
7709
7284
  if (!name) throw new Error("name cannot be null.");
7710
7285
  this.name = name;
7711
7286
  }
@@ -10863,17 +10438,17 @@ function getValue(map, property, defaultValue) {
10863
10438
 
10864
10439
  /******************************************************************************
10865
10440
  * Spine Runtimes License Agreement
10866
- * Last updated April 5, 2025. Replaces all prior versions.
10441
+ * Last updated July 28, 2023. Replaces all prior versions.
10867
10442
  *
10868
- * Copyright (c) 2013-2025, Esoteric Software LLC
10443
+ * Copyright (c) 2013-2023, Esoteric Software LLC
10869
10444
  *
10870
10445
  * Integration of the Spine Runtimes into software or otherwise creating
10871
10446
  * derivative works of the Spine Runtimes is permitted under the terms and
10872
10447
  * conditions of Section 2 of the Spine Editor License Agreement:
10873
10448
  * http://esotericsoftware.com/spine-editor-license
10874
10449
  *
10875
- * Otherwise, it is permitted to integrate the Spine Runtimes into software
10876
- * or otherwise create derivative works of the Spine Runtimes (collectively,
10450
+ * Otherwise, it is permitted to integrate the Spine Runtimes into software or
10451
+ * otherwise create derivative works of the Spine Runtimes (collectively,
10877
10452
  * "Products"), provided that each user of the Products must obtain their own
10878
10453
  * Spine Editor license and redistribution of the Products in any form must
10879
10454
  * include this license and copyright notice.
@@ -10886,8 +10461,8 @@ function getValue(map, property, defaultValue) {
10886
10461
  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
10887
10462
  * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
10888
10463
  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
10889
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
10890
- * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10464
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
10465
+ * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10891
10466
  *****************************************************************************/ (function() {
10892
10467
  if (typeof Math.fround === "undefined") {
10893
10468
  Math.fround = function(array) {
@@ -12119,7 +11694,7 @@ var SpineAtlasLoader = /*#__PURE__*/ function(Loader) {
12119
11694
  SpineAtlasLoader = __decorate([
12120
11695
  miniprogram.resourceLoader("SpineAtlas", [
12121
11696
  "atlas"
12122
- ], false)
11697
+ ])
12123
11698
  ], SpineAtlasLoader);
12124
11699
 
12125
11700
  var LoaderObject = /*#__PURE__*/Object.freeze({
@@ -12140,7 +11715,7 @@ for(var key in RendererObject){
12140
11715
  for(var key1 in LoaderObject){
12141
11716
  miniprogram.Loader.registerClass(key1, LoaderObject[key1]);
12142
11717
  }
12143
- var version = "4.2.6";
11718
+ var version = "4.2.7";
12144
11719
  console.log("Galacean spine version: " + version);
12145
11720
 
12146
11721
  exports.AlphaTimeline = AlphaTimeline;
@@ -12148,7 +11723,6 @@ exports.Animation = Animation;
12148
11723
  exports.AnimationState = AnimationState;
12149
11724
  exports.AnimationStateAdapter = AnimationStateAdapter;
12150
11725
  exports.AnimationStateData = AnimationStateData;
12151
- exports.AssetCache = AssetCache;
12152
11726
  exports.AssetManagerBase = AssetManagerBase;
12153
11727
  exports.AtlasAttachmentLoader = AtlasAttachmentLoader;
12154
11728
  exports.Attachment = Attachment;