@galacean/engine-spine 4.2.5 → 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.
- package/dist/browser.js +1 -1
- package/dist/main.js +140 -486
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +140 -486
- package/dist/module.js +141 -486
- package/dist/module.js.map +1 -1
- package/package.json +2 -2
package/dist/miniprogram.js
CHANGED
|
@@ -44,97 +44,6 @@ function __decorate(decorators, target, key, desc) {
|
|
|
44
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;
|
|
45
45
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
46
46
|
}
|
|
47
|
-
function __generator(thisArg, body) {
|
|
48
|
-
var _ = {
|
|
49
|
-
label: 0,
|
|
50
|
-
sent: function sent() {
|
|
51
|
-
if (t[0] & 1) throw t[1];
|
|
52
|
-
return t[1];
|
|
53
|
-
},
|
|
54
|
-
trys: [],
|
|
55
|
-
ops: []
|
|
56
|
-
}, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
57
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
58
|
-
return this;
|
|
59
|
-
}), g;
|
|
60
|
-
function verb(n) {
|
|
61
|
-
return function(v) {
|
|
62
|
-
return step([
|
|
63
|
-
n,
|
|
64
|
-
v
|
|
65
|
-
]);
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
function step(op) {
|
|
69
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
70
|
-
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
71
|
-
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;
|
|
72
|
-
if (y = 0, t) op = [
|
|
73
|
-
op[0] & 2,
|
|
74
|
-
t.value
|
|
75
|
-
];
|
|
76
|
-
switch(op[0]){
|
|
77
|
-
case 0:
|
|
78
|
-
case 1:
|
|
79
|
-
t = op;
|
|
80
|
-
break;
|
|
81
|
-
case 4:
|
|
82
|
-
_.label++;
|
|
83
|
-
return {
|
|
84
|
-
value: op[1],
|
|
85
|
-
done: false
|
|
86
|
-
};
|
|
87
|
-
case 5:
|
|
88
|
-
_.label++;
|
|
89
|
-
y = op[1];
|
|
90
|
-
op = [
|
|
91
|
-
0
|
|
92
|
-
];
|
|
93
|
-
continue;
|
|
94
|
-
case 7:
|
|
95
|
-
op = _.ops.pop();
|
|
96
|
-
_.trys.pop();
|
|
97
|
-
continue;
|
|
98
|
-
default:
|
|
99
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
100
|
-
_ = 0;
|
|
101
|
-
continue;
|
|
102
|
-
}
|
|
103
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
104
|
-
_.label = op[1];
|
|
105
|
-
break;
|
|
106
|
-
}
|
|
107
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
108
|
-
_.label = t[1];
|
|
109
|
-
t = op;
|
|
110
|
-
break;
|
|
111
|
-
}
|
|
112
|
-
if (t && _.label < t[2]) {
|
|
113
|
-
_.label = t[2];
|
|
114
|
-
_.ops.push(op);
|
|
115
|
-
break;
|
|
116
|
-
}
|
|
117
|
-
if (t[2]) _.ops.pop();
|
|
118
|
-
_.trys.pop();
|
|
119
|
-
continue;
|
|
120
|
-
}
|
|
121
|
-
op = body.call(thisArg, _);
|
|
122
|
-
} catch (e) {
|
|
123
|
-
op = [
|
|
124
|
-
6,
|
|
125
|
-
e
|
|
126
|
-
];
|
|
127
|
-
y = 0;
|
|
128
|
-
} finally{
|
|
129
|
-
f = t = 0;
|
|
130
|
-
}
|
|
131
|
-
if (op[0] & 5) throw op[1];
|
|
132
|
-
return {
|
|
133
|
-
value: op[0] ? op[1] : void 0,
|
|
134
|
-
done: true
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
47
|
typeof SuppressedError === "function" ? SuppressedError : function _SuppressedError(error, suppressed, message) {
|
|
139
48
|
var e = new Error(message);
|
|
140
49
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
@@ -294,9 +203,8 @@ var Color = /*#__PURE__*/ function() {
|
|
|
294
203
|
color.g = ((value & 0x0000ff00) >>> 8) / 255;
|
|
295
204
|
color.b = (value & 0x000000ff) / 255;
|
|
296
205
|
};
|
|
297
|
-
Color.fromString = function fromString(hex
|
|
298
|
-
|
|
299
|
-
return color.setFromString(hex);
|
|
206
|
+
Color.fromString = function fromString(hex) {
|
|
207
|
+
return new Color().setFromString(hex);
|
|
300
208
|
};
|
|
301
209
|
return Color;
|
|
302
210
|
}();
|
|
@@ -2920,16 +2828,18 @@ function _create_class(Constructor, protoProps, staticProps) {
|
|
|
2920
2828
|
var finished = this.updateMixingFrom(from, delta);
|
|
2921
2829
|
from.animationLast = from.nextAnimationLast;
|
|
2922
2830
|
from.trackLast = from.nextTrackLast;
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
to.
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
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;
|
|
2931
2842
|
}
|
|
2932
|
-
return finished;
|
|
2933
2843
|
}
|
|
2934
2844
|
from.trackTime += delta * from.timeScale;
|
|
2935
2845
|
to.mixTime += delta;
|
|
@@ -3294,11 +3204,10 @@ function _create_class(Constructor, protoProps, staticProps) {
|
|
|
3294
3204
|
if (!last) {
|
|
3295
3205
|
this.setCurrent(trackIndex, entry, true);
|
|
3296
3206
|
this.queue.drain();
|
|
3297
|
-
if (delay < 0) delay = 0;
|
|
3298
3207
|
} else {
|
|
3299
3208
|
last.next = entry;
|
|
3300
3209
|
entry.previous = last;
|
|
3301
|
-
if (delay <= 0) delay
|
|
3210
|
+
if (delay <= 0) delay += last.getTrackComplete() - entry.mixDuration;
|
|
3302
3211
|
}
|
|
3303
3212
|
entry.delay = delay;
|
|
3304
3213
|
return entry;
|
|
@@ -3337,7 +3246,7 @@ function _create_class(Constructor, protoProps, staticProps) {
|
|
|
3337
3246
|
if (mixDuration === void 0) mixDuration = 0;
|
|
3338
3247
|
if (delay === void 0) delay = 0;
|
|
3339
3248
|
var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation(), false, delay);
|
|
3340
|
-
if (delay <= 0) entry.delay
|
|
3249
|
+
if (delay <= 0) entry.delay += entry.mixDuration - mixDuration;
|
|
3341
3250
|
entry.mixDuration = mixDuration;
|
|
3342
3251
|
entry.trackEnd = mixDuration;
|
|
3343
3252
|
return entry;
|
|
@@ -3591,10 +3500,7 @@ AnimationState._emptyAnimation = new Animation("<empty>", [], 0);
|
|
|
3591
3500
|
var _proto = TrackEntry.prototype;
|
|
3592
3501
|
_proto.setMixDurationWithDelay = function setMixDurationWithDelay(mixDuration, delay) {
|
|
3593
3502
|
this._mixDuration = mixDuration;
|
|
3594
|
-
if (delay <= 0)
|
|
3595
|
-
if (this.previous != null) delay = Math.max(delay + this.previous.getTrackComplete() - mixDuration, 0);
|
|
3596
|
-
else delay = 0;
|
|
3597
|
-
}
|
|
3503
|
+
if (this.previous != null && delay <= 0) delay += this.previous.getTrackComplete() - mixDuration;
|
|
3598
3504
|
this.delay = delay;
|
|
3599
3505
|
};
|
|
3600
3506
|
_proto.reset = function reset() {
|
|
@@ -3817,17 +3723,17 @@ var CURRENT = 2;
|
|
|
3817
3723
|
|
|
3818
3724
|
/******************************************************************************
|
|
3819
3725
|
* Spine Runtimes License Agreement
|
|
3820
|
-
* Last updated
|
|
3726
|
+
* Last updated July 28, 2023. Replaces all prior versions.
|
|
3821
3727
|
*
|
|
3822
|
-
* Copyright (c) 2013-
|
|
3728
|
+
* Copyright (c) 2013-2023, Esoteric Software LLC
|
|
3823
3729
|
*
|
|
3824
3730
|
* Integration of the Spine Runtimes into software or otherwise creating
|
|
3825
3731
|
* derivative works of the Spine Runtimes is permitted under the terms and
|
|
3826
3732
|
* conditions of Section 2 of the Spine Editor License Agreement:
|
|
3827
3733
|
* http://esotericsoftware.com/spine-editor-license
|
|
3828
3734
|
*
|
|
3829
|
-
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
|
3830
|
-
*
|
|
3735
|
+
* Otherwise, it is permitted to integrate the Spine Runtimes into software or
|
|
3736
|
+
* otherwise create derivative works of the Spine Runtimes (collectively,
|
|
3831
3737
|
* "Products"), provided that each user of the Products must obtain their own
|
|
3832
3738
|
* Spine Editor license and redistribution of the Products in any form must
|
|
3833
3739
|
* include this license and copyright notice.
|
|
@@ -3840,8 +3746,8 @@ var CURRENT = 2;
|
|
|
3840
3746
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
|
3841
3747
|
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
|
3842
3748
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
3843
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
3844
|
-
*
|
|
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.
|
|
3845
3751
|
*****************************************************************************/ /** Stores mix (crossfade) durations to be applied when {@link AnimationState} animations are changed. */ var AnimationStateData = /*#__PURE__*/ function() {
|
|
3846
3752
|
function AnimationStateData(skeletonData) {
|
|
3847
3753
|
this.animationToMixTime = {};
|
|
@@ -4293,7 +4199,7 @@ var TextureAtlasRegion = /*#__PURE__*/ function(TextureRegion) {
|
|
|
4293
4199
|
this.copyTo(copy);
|
|
4294
4200
|
copy.regionUVs = new Array(this.regionUVs.length);
|
|
4295
4201
|
Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);
|
|
4296
|
-
copy.uvs =
|
|
4202
|
+
copy.uvs = new Array(this.uvs.length);
|
|
4297
4203
|
Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);
|
|
4298
4204
|
copy.triangles = new Array(this.triangles.length);
|
|
4299
4205
|
Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);
|
|
@@ -4957,17 +4863,17 @@ RegionAttachment.V4 = 31;
|
|
|
4957
4863
|
|
|
4958
4864
|
/******************************************************************************
|
|
4959
4865
|
* Spine Runtimes License Agreement
|
|
4960
|
-
* Last updated
|
|
4866
|
+
* Last updated July 28, 2023. Replaces all prior versions.
|
|
4961
4867
|
*
|
|
4962
|
-
* Copyright (c) 2013-
|
|
4868
|
+
* Copyright (c) 2013-2023, Esoteric Software LLC
|
|
4963
4869
|
*
|
|
4964
4870
|
* Integration of the Spine Runtimes into software or otherwise creating
|
|
4965
4871
|
* derivative works of the Spine Runtimes is permitted under the terms and
|
|
4966
4872
|
* conditions of Section 2 of the Spine Editor License Agreement:
|
|
4967
4873
|
* http://esotericsoftware.com/spine-editor-license
|
|
4968
4874
|
*
|
|
4969
|
-
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
|
4970
|
-
*
|
|
4875
|
+
* Otherwise, it is permitted to integrate the Spine Runtimes into software or
|
|
4876
|
+
* otherwise create derivative works of the Spine Runtimes (collectively,
|
|
4971
4877
|
* "Products"), provided that each user of the Products must obtain their own
|
|
4972
4878
|
* Spine Editor license and redistribution of the Products in any form must
|
|
4973
4879
|
* include this license and copyright notice.
|
|
@@ -4980,8 +4886,8 @@ RegionAttachment.V4 = 31;
|
|
|
4980
4886
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
|
4981
4887
|
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
|
4982
4888
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
4983
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
4984
|
-
*
|
|
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.
|
|
4985
4891
|
*****************************************************************************/ /** The base class for all constraint datas. */ var ConstraintData = function ConstraintData(name, order, skinRequired) {
|
|
4986
4892
|
this.name = name;
|
|
4987
4893
|
this.order = order;
|
|
@@ -4989,46 +4895,18 @@ RegionAttachment.V4 = 31;
|
|
|
4989
4895
|
}
|
|
4990
4896
|
;
|
|
4991
4897
|
|
|
4992
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
4993
|
-
try {
|
|
4994
|
-
var info = gen[key](arg);
|
|
4995
|
-
var value = info.value;
|
|
4996
|
-
} catch (error) {
|
|
4997
|
-
reject(error);
|
|
4998
|
-
return;
|
|
4999
|
-
}
|
|
5000
|
-
if (info.done) resolve(value);
|
|
5001
|
-
else Promise.resolve(value).then(_next, _throw);
|
|
5002
|
-
}
|
|
5003
|
-
function _async_to_generator(fn) {
|
|
5004
|
-
return function() {
|
|
5005
|
-
var self = this, args = arguments;
|
|
5006
|
-
return new Promise(function(resolve, reject) {
|
|
5007
|
-
var gen = fn.apply(self, args);
|
|
5008
|
-
function _next(value) {
|
|
5009
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
5010
|
-
}
|
|
5011
|
-
function _throw(err) {
|
|
5012
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
5013
|
-
}
|
|
5014
|
-
_next(undefined);
|
|
5015
|
-
});
|
|
5016
|
-
};
|
|
5017
|
-
}
|
|
5018
|
-
|
|
5019
4898
|
var AssetManagerBase = /*#__PURE__*/ function() {
|
|
5020
|
-
function AssetManagerBase(textureLoader, pathPrefix, downloader
|
|
4899
|
+
function AssetManagerBase(textureLoader, pathPrefix, downloader) {
|
|
5021
4900
|
if (pathPrefix === void 0) pathPrefix = "";
|
|
5022
4901
|
if (downloader === void 0) downloader = new Downloader();
|
|
5023
|
-
if (cache === void 0) cache = new AssetCache();
|
|
5024
4902
|
this.pathPrefix = "";
|
|
4903
|
+
this.assets = {};
|
|
5025
4904
|
this.errors = {};
|
|
5026
4905
|
this.toLoad = 0;
|
|
5027
4906
|
this.loaded = 0;
|
|
5028
4907
|
this.textureLoader = textureLoader;
|
|
5029
4908
|
this.pathPrefix = pathPrefix;
|
|
5030
4909
|
this.downloader = downloader;
|
|
5031
|
-
this.cache = cache;
|
|
5032
4910
|
}
|
|
5033
4911
|
var _proto = AssetManagerBase.prototype;
|
|
5034
4912
|
_proto.start = function start(path) {
|
|
@@ -5038,8 +4916,7 @@ var AssetManagerBase = /*#__PURE__*/ function() {
|
|
|
5038
4916
|
_proto.success = function success(callback, path, asset) {
|
|
5039
4917
|
this.toLoad--;
|
|
5040
4918
|
this.loaded++;
|
|
5041
|
-
this.
|
|
5042
|
-
this.cache.assetsRefCount[path] = (this.cache.assetsRefCount[path] || 0) + 1;
|
|
4919
|
+
this.assets[path] = asset;
|
|
5043
4920
|
if (callback) callback(path, asset);
|
|
5044
4921
|
};
|
|
5045
4922
|
_proto.error = function error(callback, path, message) {
|
|
@@ -5071,16 +4948,10 @@ var AssetManagerBase = /*#__PURE__*/ function() {
|
|
|
5071
4948
|
if (success === void 0) success = function() {};
|
|
5072
4949
|
if (error === void 0) error = function() {};
|
|
5073
4950
|
path = this.start(path);
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
resolve(data);
|
|
5079
|
-
}, function(status, responseText) {
|
|
5080
|
-
var errorMsg = "Couldn't load binary " + path + ": status " + status + ", " + responseText;
|
|
5081
|
-
_this.error(error, path, errorMsg);
|
|
5082
|
-
reject(errorMsg);
|
|
5083
|
-
});
|
|
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);
|
|
5084
4955
|
});
|
|
5085
4956
|
};
|
|
5086
4957
|
_proto.loadText = function loadText(path, success, error) {
|
|
@@ -5099,83 +4970,46 @@ var AssetManagerBase = /*#__PURE__*/ function() {
|
|
|
5099
4970
|
if (success === void 0) success = function() {};
|
|
5100
4971
|
if (error === void 0) error = function() {};
|
|
5101
4972
|
path = this.start(path);
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
resolve(data);
|
|
5107
|
-
}, function(status, responseText) {
|
|
5108
|
-
var errorMsg = "Couldn't load JSON " + path + ": status " + status + ", " + responseText;
|
|
5109
|
-
_this.error(error, path, errorMsg);
|
|
5110
|
-
reject(errorMsg);
|
|
5111
|
-
});
|
|
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);
|
|
5112
4977
|
});
|
|
5113
4978
|
};
|
|
5114
|
-
_proto.reuseAssets = function reuseAssets(path, success, error) {
|
|
5115
|
-
var _this = this;
|
|
5116
|
-
if (success === void 0) success = function() {};
|
|
5117
|
-
if (error === void 0) error = function() {};
|
|
5118
|
-
var loadedStatus = this.cache.assetsLoaded[path];
|
|
5119
|
-
var alreadyExistsOrLoading = loadedStatus !== undefined;
|
|
5120
|
-
if (alreadyExistsOrLoading) {
|
|
5121
|
-
this.cache.assetsLoaded[path] = loadedStatus.then(function(data) {
|
|
5122
|
-
// necessary when user preloads an image into the cache.
|
|
5123
|
-
// texture loader is not avaiable in the cache, so we transform in GLTexture at first use
|
|
5124
|
-
data = _instanceof1(data, engineMiniprogramAdapter.Image) || _instanceof1(data, ImageBitmap) ? _this.textureLoader(data) : data;
|
|
5125
|
-
_this.success(success, path, data);
|
|
5126
|
-
return data;
|
|
5127
|
-
}).catch(function(errorMsg) {
|
|
5128
|
-
return _this.error(error, path, errorMsg);
|
|
5129
|
-
});
|
|
5130
|
-
}
|
|
5131
|
-
return alreadyExistsOrLoading;
|
|
5132
|
-
};
|
|
5133
4979
|
_proto.loadTexture = function loadTexture(path, success, error) {
|
|
5134
4980
|
var _this = this;
|
|
5135
4981
|
if (success === void 0) success = function() {};
|
|
5136
4982
|
if (error === void 0) error = function() {};
|
|
5137
4983
|
path = this.start(path);
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
_this.success(success, path, texture);
|
|
5168
|
-
resolve(texture);
|
|
5169
|
-
};
|
|
5170
|
-
image.onerror = function() {
|
|
5171
|
-
var errorMsg = "Couldn't load image: " + path;
|
|
5172
|
-
_this.error(error, path, errorMsg);
|
|
5173
|
-
reject(errorMsg);
|
|
5174
|
-
};
|
|
5175
|
-
if (_this.downloader.rawDataUris[path]) path = _this.downloader.rawDataUris[path];
|
|
5176
|
-
image.src = path;
|
|
5177
|
-
}
|
|
5178
|
-
});
|
|
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
|
+
}
|
|
5179
5013
|
};
|
|
5180
5014
|
_proto.loadTextureAtlas = function loadTextureAtlas(path, success, error, fileAlias) {
|
|
5181
5015
|
var _this = this;
|
|
@@ -5184,189 +5018,53 @@ var AssetManagerBase = /*#__PURE__*/ function() {
|
|
|
5184
5018
|
var index = path.lastIndexOf("/");
|
|
5185
5019
|
var parent = index >= 0 ? path.substring(0, index + 1) : "";
|
|
5186
5020
|
path = this.start(path);
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
if (
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
};
|
|
5210
|
-
var atlas = new TextureAtlas(atlasText);
|
|
5211
|
-
var toLoad = atlas.pages.length, abort = false;
|
|
5212
|
-
for(var _iterator = _create_for_of_iterator_helper_loose(atlas.pages), _step; !(_step = _iterator()).done;)_loop();
|
|
5213
|
-
} catch (e) {
|
|
5214
|
-
var errorMsg = "Couldn't parse texture atlas " + path + ": " + e.message;
|
|
5215
|
-
_this.error(error, path, errorMsg);
|
|
5216
|
-
reject(errorMsg);
|
|
5217
|
-
}
|
|
5218
|
-
}, function(status, responseText) {
|
|
5219
|
-
var errorMsg = "Couldn't load texture atlas " + path + ": status " + status + ", " + responseText;
|
|
5220
|
-
_this.error(error, path, errorMsg);
|
|
5221
|
-
reject(errorMsg);
|
|
5222
|
-
});
|
|
5223
|
-
});
|
|
5224
|
-
};
|
|
5225
|
-
_proto.loadTextureAtlasButNoTextures = function loadTextureAtlasButNoTextures(path, success, error, fileAlias) {
|
|
5226
|
-
var _this = this;
|
|
5227
|
-
if (success === void 0) success = function() {};
|
|
5228
|
-
if (error === void 0) error = function() {};
|
|
5229
|
-
path = this.start(path);
|
|
5230
|
-
if (this.reuseAssets(path, success, error)) return;
|
|
5231
|
-
this.cache.assetsLoaded[path] = new Promise(function(resolve, reject) {
|
|
5232
|
-
_this.downloader.downloadText(path, function(atlasText) {
|
|
5233
|
-
try {
|
|
5234
|
-
var atlas = new TextureAtlas(atlasText);
|
|
5235
|
-
_this.success(success, path, atlas);
|
|
5236
|
-
resolve(atlas);
|
|
5237
|
-
} catch (e) {
|
|
5238
|
-
var errorMsg = "Couldn't parse texture atlas " + path + ": " + e.message;
|
|
5239
|
-
_this.error(error, path, errorMsg);
|
|
5240
|
-
reject(errorMsg);
|
|
5241
|
-
}
|
|
5242
|
-
}, function(status, responseText) {
|
|
5243
|
-
var errorMsg = "Couldn't load texture atlas " + path + ": status " + status + ", " + responseText;
|
|
5244
|
-
_this.error(error, path, errorMsg);
|
|
5245
|
-
reject(errorMsg);
|
|
5246
|
-
});
|
|
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);
|
|
5247
5043
|
});
|
|
5248
5044
|
};
|
|
5249
|
-
// Promisified versions of load function
|
|
5250
|
-
_proto.loadBinaryAsync = function loadBinaryAsync(path) {
|
|
5251
|
-
return _async_to_generator(function() {
|
|
5252
|
-
var _this;
|
|
5253
|
-
return __generator(this, function(_state) {
|
|
5254
|
-
_this = this;
|
|
5255
|
-
return [
|
|
5256
|
-
2,
|
|
5257
|
-
new Promise(function(resolve, reject) {
|
|
5258
|
-
_this.loadBinary(path, function(_, binary) {
|
|
5259
|
-
return resolve(binary);
|
|
5260
|
-
}, function(_, message) {
|
|
5261
|
-
return reject(message);
|
|
5262
|
-
});
|
|
5263
|
-
})
|
|
5264
|
-
];
|
|
5265
|
-
});
|
|
5266
|
-
}).call(this);
|
|
5267
|
-
};
|
|
5268
|
-
_proto.loadJsonAsync = function loadJsonAsync(path) {
|
|
5269
|
-
return _async_to_generator(function() {
|
|
5270
|
-
var _this;
|
|
5271
|
-
return __generator(this, function(_state) {
|
|
5272
|
-
_this = this;
|
|
5273
|
-
return [
|
|
5274
|
-
2,
|
|
5275
|
-
new Promise(function(resolve, reject) {
|
|
5276
|
-
_this.loadJson(path, function(_, object) {
|
|
5277
|
-
return resolve(object);
|
|
5278
|
-
}, function(_, message) {
|
|
5279
|
-
return reject(message);
|
|
5280
|
-
});
|
|
5281
|
-
})
|
|
5282
|
-
];
|
|
5283
|
-
});
|
|
5284
|
-
}).call(this);
|
|
5285
|
-
};
|
|
5286
|
-
_proto.loadTextureAsync = function loadTextureAsync(path) {
|
|
5287
|
-
return _async_to_generator(function() {
|
|
5288
|
-
var _this;
|
|
5289
|
-
return __generator(this, function(_state) {
|
|
5290
|
-
_this = this;
|
|
5291
|
-
return [
|
|
5292
|
-
2,
|
|
5293
|
-
new Promise(function(resolve, reject) {
|
|
5294
|
-
_this.loadTexture(path, function(_, texture) {
|
|
5295
|
-
return resolve(texture);
|
|
5296
|
-
}, function(_, message) {
|
|
5297
|
-
return reject(message);
|
|
5298
|
-
});
|
|
5299
|
-
})
|
|
5300
|
-
];
|
|
5301
|
-
});
|
|
5302
|
-
}).call(this);
|
|
5303
|
-
};
|
|
5304
|
-
_proto.loadTextureAtlasAsync = function loadTextureAtlasAsync(path) {
|
|
5305
|
-
return _async_to_generator(function() {
|
|
5306
|
-
var _this;
|
|
5307
|
-
return __generator(this, function(_state) {
|
|
5308
|
-
_this = this;
|
|
5309
|
-
return [
|
|
5310
|
-
2,
|
|
5311
|
-
new Promise(function(resolve, reject) {
|
|
5312
|
-
_this.loadTextureAtlas(path, function(_, atlas) {
|
|
5313
|
-
return resolve(atlas);
|
|
5314
|
-
}, function(_, message) {
|
|
5315
|
-
return reject(message);
|
|
5316
|
-
});
|
|
5317
|
-
})
|
|
5318
|
-
];
|
|
5319
|
-
});
|
|
5320
|
-
}).call(this);
|
|
5321
|
-
};
|
|
5322
|
-
_proto.loadTextureAtlasButNoTexturesAsync = function loadTextureAtlasButNoTexturesAsync(path) {
|
|
5323
|
-
return _async_to_generator(function() {
|
|
5324
|
-
var _this;
|
|
5325
|
-
return __generator(this, function(_state) {
|
|
5326
|
-
_this = this;
|
|
5327
|
-
return [
|
|
5328
|
-
2,
|
|
5329
|
-
new Promise(function(resolve, reject) {
|
|
5330
|
-
_this.loadTextureAtlasButNoTextures(path, function(_, atlas) {
|
|
5331
|
-
return resolve(atlas);
|
|
5332
|
-
}, function(_, message) {
|
|
5333
|
-
return reject(message);
|
|
5334
|
-
});
|
|
5335
|
-
})
|
|
5336
|
-
];
|
|
5337
|
-
});
|
|
5338
|
-
}).call(this);
|
|
5339
|
-
};
|
|
5340
|
-
_proto.setCache = function setCache(cache) {
|
|
5341
|
-
this.cache = cache;
|
|
5342
|
-
};
|
|
5343
5045
|
_proto.get = function get(path) {
|
|
5344
|
-
return this.
|
|
5046
|
+
return this.assets[this.pathPrefix + path];
|
|
5345
5047
|
};
|
|
5346
5048
|
_proto.require = function require(path) {
|
|
5347
5049
|
path = this.pathPrefix + path;
|
|
5348
|
-
var asset = this.
|
|
5050
|
+
var asset = this.assets[path];
|
|
5349
5051
|
if (asset) return asset;
|
|
5350
5052
|
var error = this.errors[path];
|
|
5351
5053
|
throw Error("Asset not found: " + path + (error ? "\n" + error : ""));
|
|
5352
5054
|
};
|
|
5353
5055
|
_proto.remove = function remove(path) {
|
|
5354
5056
|
path = this.pathPrefix + path;
|
|
5355
|
-
var asset = this.
|
|
5057
|
+
var asset = this.assets[path];
|
|
5356
5058
|
if (asset.dispose) asset.dispose();
|
|
5357
|
-
delete this.
|
|
5358
|
-
delete this.cache.assetsRefCount[path];
|
|
5359
|
-
delete this.cache.assetsLoaded[path];
|
|
5059
|
+
delete this.assets[path];
|
|
5360
5060
|
return asset;
|
|
5361
5061
|
};
|
|
5362
5062
|
_proto.removeAll = function removeAll() {
|
|
5363
|
-
for(var
|
|
5364
|
-
var asset = this.
|
|
5063
|
+
for(var key in this.assets){
|
|
5064
|
+
var asset = this.assets[key];
|
|
5365
5065
|
if (asset.dispose) asset.dispose();
|
|
5366
5066
|
}
|
|
5367
|
-
this.
|
|
5368
|
-
this.cache.assetsLoaded = {};
|
|
5369
|
-
this.cache.assetsRefCount = {};
|
|
5067
|
+
this.assets = {};
|
|
5370
5068
|
};
|
|
5371
5069
|
_proto.isLoadingComplete = function isLoadingComplete() {
|
|
5372
5070
|
return this.toLoad == 0;
|
|
@@ -5380,12 +5078,6 @@ var AssetManagerBase = /*#__PURE__*/ function() {
|
|
|
5380
5078
|
_proto.dispose = function dispose() {
|
|
5381
5079
|
this.removeAll();
|
|
5382
5080
|
};
|
|
5383
|
-
// dispose asset only if it's not used by others
|
|
5384
|
-
_proto.disposeAsset = function disposeAsset(path) {
|
|
5385
|
-
if (--this.cache.assetsRefCount[path] === 0) {
|
|
5386
|
-
this.remove(path);
|
|
5387
|
-
}
|
|
5388
|
-
};
|
|
5389
5081
|
_proto.hasErrors = function hasErrors() {
|
|
5390
5082
|
return Object.keys(this.errors).length > 0;
|
|
5391
5083
|
};
|
|
@@ -5394,44 +5086,6 @@ var AssetManagerBase = /*#__PURE__*/ function() {
|
|
|
5394
5086
|
};
|
|
5395
5087
|
return AssetManagerBase;
|
|
5396
5088
|
}();
|
|
5397
|
-
var AssetCache = /*#__PURE__*/ function() {
|
|
5398
|
-
function AssetCache() {
|
|
5399
|
-
this.assets = {};
|
|
5400
|
-
this.assetsRefCount = {};
|
|
5401
|
-
this.assetsLoaded = {};
|
|
5402
|
-
}
|
|
5403
|
-
var _proto = AssetCache.prototype;
|
|
5404
|
-
_proto.addAsset = function addAsset(path, asset) {
|
|
5405
|
-
return _async_to_generator(function() {
|
|
5406
|
-
var _;
|
|
5407
|
-
return __generator(this, function(_state) {
|
|
5408
|
-
switch(_state.label){
|
|
5409
|
-
case 0:
|
|
5410
|
-
this.assetsLoaded[path] = Promise.resolve(asset);
|
|
5411
|
-
_ = this.assets;
|
|
5412
|
-
return [
|
|
5413
|
-
4,
|
|
5414
|
-
asset
|
|
5415
|
-
];
|
|
5416
|
-
case 1:
|
|
5417
|
-
_[path] = _state.sent();
|
|
5418
|
-
return [
|
|
5419
|
-
2
|
|
5420
|
-
];
|
|
5421
|
-
}
|
|
5422
|
-
});
|
|
5423
|
-
}).call(this);
|
|
5424
|
-
};
|
|
5425
|
-
AssetCache.getCache = function getCache(id) {
|
|
5426
|
-
var cache = AssetCache.AVAILABLE_CACHES.get(id);
|
|
5427
|
-
if (cache) return cache;
|
|
5428
|
-
var newCache = new AssetCache();
|
|
5429
|
-
AssetCache.AVAILABLE_CACHES.set(id, newCache);
|
|
5430
|
-
return newCache;
|
|
5431
|
-
};
|
|
5432
|
-
return AssetCache;
|
|
5433
|
-
}();
|
|
5434
|
-
AssetCache.AVAILABLE_CACHES = new Map();
|
|
5435
5089
|
var Downloader = /*#__PURE__*/ function() {
|
|
5436
5090
|
function Downloader() {
|
|
5437
5091
|
this.callbacks = {};
|
|
@@ -5471,11 +5125,10 @@ var Downloader = /*#__PURE__*/ function() {
|
|
|
5471
5125
|
_proto.downloadText = function downloadText(url, success, error) {
|
|
5472
5126
|
var _this = this;
|
|
5473
5127
|
if (this.start(url, success, error)) return;
|
|
5474
|
-
|
|
5475
|
-
// we assume if a "." is included in a raw data uri, it is used to rewrite an asset URL
|
|
5476
|
-
if (rawDataUri && !rawDataUri.includes(".")) {
|
|
5128
|
+
if (this.rawDataUris[url]) {
|
|
5477
5129
|
try {
|
|
5478
|
-
|
|
5130
|
+
var dataUri = this.rawDataUris[url];
|
|
5131
|
+
this.finish(url, 200, this.dataUriToString(dataUri));
|
|
5479
5132
|
} catch (e) {
|
|
5480
5133
|
this.finish(url, 400, JSON.stringify(e));
|
|
5481
5134
|
}
|
|
@@ -5483,7 +5136,7 @@ var Downloader = /*#__PURE__*/ function() {
|
|
|
5483
5136
|
}
|
|
5484
5137
|
var request = new engineMiniprogramAdapter.XMLHttpRequest();
|
|
5485
5138
|
request.overrideMimeType("text/html");
|
|
5486
|
-
request.open("GET",
|
|
5139
|
+
request.open("GET", url, true);
|
|
5487
5140
|
var done = function() {
|
|
5488
5141
|
_this.finish(url, request.status, request.responseText);
|
|
5489
5142
|
};
|
|
@@ -5499,18 +5152,17 @@ var Downloader = /*#__PURE__*/ function() {
|
|
|
5499
5152
|
_proto.downloadBinary = function downloadBinary(url, success, error) {
|
|
5500
5153
|
var _this = this;
|
|
5501
5154
|
if (this.start(url, success, error)) return;
|
|
5502
|
-
|
|
5503
|
-
// we assume if a "." is included in a raw data uri, it is used to rewrite an asset URL
|
|
5504
|
-
if (rawDataUri && !rawDataUri.includes(".")) {
|
|
5155
|
+
if (this.rawDataUris[url]) {
|
|
5505
5156
|
try {
|
|
5506
|
-
|
|
5157
|
+
var dataUri = this.rawDataUris[url];
|
|
5158
|
+
this.finish(url, 200, this.dataUriToUint8Array(dataUri));
|
|
5507
5159
|
} catch (e) {
|
|
5508
5160
|
this.finish(url, 400, JSON.stringify(e));
|
|
5509
5161
|
}
|
|
5510
5162
|
return;
|
|
5511
5163
|
}
|
|
5512
5164
|
var request = new engineMiniprogramAdapter.XMLHttpRequest();
|
|
5513
|
-
request.open("GET",
|
|
5165
|
+
request.open("GET", url, true);
|
|
5514
5166
|
request.responseType = "arraybuffer";
|
|
5515
5167
|
var onerror = function() {
|
|
5516
5168
|
_this.finish(url, request.status, request.response);
|
|
@@ -5548,17 +5200,17 @@ var Downloader = /*#__PURE__*/ function() {
|
|
|
5548
5200
|
|
|
5549
5201
|
/******************************************************************************
|
|
5550
5202
|
* Spine Runtimes License Agreement
|
|
5551
|
-
* Last updated
|
|
5203
|
+
* Last updated July 28, 2023. Replaces all prior versions.
|
|
5552
5204
|
*
|
|
5553
|
-
* Copyright (c) 2013-
|
|
5205
|
+
* Copyright (c) 2013-2023, Esoteric Software LLC
|
|
5554
5206
|
*
|
|
5555
5207
|
* Integration of the Spine Runtimes into software or otherwise creating
|
|
5556
5208
|
* derivative works of the Spine Runtimes is permitted under the terms and
|
|
5557
5209
|
* conditions of Section 2 of the Spine Editor License Agreement:
|
|
5558
5210
|
* http://esotericsoftware.com/spine-editor-license
|
|
5559
5211
|
*
|
|
5560
|
-
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
|
5561
|
-
*
|
|
5212
|
+
* Otherwise, it is permitted to integrate the Spine Runtimes into software or
|
|
5213
|
+
* otherwise create derivative works of the Spine Runtimes (collectively,
|
|
5562
5214
|
* "Products"), provided that each user of the Products must obtain their own
|
|
5563
5215
|
* Spine Editor license and redistribution of the Products in any form must
|
|
5564
5216
|
* include this license and copyright notice.
|
|
@@ -5571,8 +5223,8 @@ var Downloader = /*#__PURE__*/ function() {
|
|
|
5571
5223
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
|
5572
5224
|
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
|
5573
5225
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
5574
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
5575
|
-
*
|
|
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.
|
|
5576
5228
|
*****************************************************************************/ /** Stores the current pose values for an {@link Event}.
|
|
5577
5229
|
*
|
|
5578
5230
|
* See Timeline {@link Timeline#apply()},
|
|
@@ -5592,17 +5244,17 @@ var Downloader = /*#__PURE__*/ function() {
|
|
|
5592
5244
|
|
|
5593
5245
|
/******************************************************************************
|
|
5594
5246
|
* Spine Runtimes License Agreement
|
|
5595
|
-
* Last updated
|
|
5247
|
+
* Last updated July 28, 2023. Replaces all prior versions.
|
|
5596
5248
|
*
|
|
5597
|
-
* Copyright (c) 2013-
|
|
5249
|
+
* Copyright (c) 2013-2023, Esoteric Software LLC
|
|
5598
5250
|
*
|
|
5599
5251
|
* Integration of the Spine Runtimes into software or otherwise creating
|
|
5600
5252
|
* derivative works of the Spine Runtimes is permitted under the terms and
|
|
5601
5253
|
* conditions of Section 2 of the Spine Editor License Agreement:
|
|
5602
5254
|
* http://esotericsoftware.com/spine-editor-license
|
|
5603
5255
|
*
|
|
5604
|
-
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
|
5605
|
-
*
|
|
5256
|
+
* Otherwise, it is permitted to integrate the Spine Runtimes into software or
|
|
5257
|
+
* otherwise create derivative works of the Spine Runtimes (collectively,
|
|
5606
5258
|
* "Products"), provided that each user of the Products must obtain their own
|
|
5607
5259
|
* Spine Editor license and redistribution of the Products in any form must
|
|
5608
5260
|
* include this license and copyright notice.
|
|
@@ -5615,8 +5267,8 @@ var Downloader = /*#__PURE__*/ function() {
|
|
|
5615
5267
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
|
5616
5268
|
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
|
5617
5269
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
5618
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
5619
|
-
*
|
|
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.
|
|
5620
5272
|
*****************************************************************************/ /** Stores the setup pose values for an {@link Event}.
|
|
5621
5273
|
*
|
|
5622
5274
|
* See [Events](http://esotericsoftware.com/spine-events) in the Spine User Guide. */ var EventData = function EventData(name) {
|
|
@@ -6476,7 +6128,7 @@ PathConstraint.epsilon = 0.00001;
|
|
|
6476
6128
|
}
|
|
6477
6129
|
if (a >= t) {
|
|
6478
6130
|
d = Math.pow(this.damping, 60 * t);
|
|
6479
|
-
var m = this.massInverse * t, e = this.strength, w = this.wind * f
|
|
6131
|
+
var m = this.massInverse * t, e = this.strength, w = this.wind * f, g = (Skeleton.yDown ? -this.gravity : this.gravity) * f;
|
|
6480
6132
|
do {
|
|
6481
6133
|
if (x) {
|
|
6482
6134
|
this.xVelocity += (w - this.xOffset * e) * m;
|
|
@@ -7318,10 +6970,10 @@ PathConstraint.epsilon = 0.00001;
|
|
|
7318
6970
|
})) != null ? _this_physicsConstraints_find : null;
|
|
7319
6971
|
};
|
|
7320
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 }`.
|
|
7321
|
-
* 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(
|
|
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() {
|
|
7322
6974
|
var offset = new Vector2();
|
|
7323
6975
|
var size = new Vector2();
|
|
7324
|
-
this.getBounds(offset, size
|
|
6976
|
+
this.getBounds(offset, size);
|
|
7325
6977
|
return {
|
|
7326
6978
|
x: offset.x,
|
|
7327
6979
|
y: offset.y,
|
|
@@ -7450,17 +7102,17 @@ Skeleton.yDown = false;
|
|
|
7450
7102
|
|
|
7451
7103
|
/******************************************************************************
|
|
7452
7104
|
* Spine Runtimes License Agreement
|
|
7453
|
-
* Last updated
|
|
7105
|
+
* Last updated July 28, 2023. Replaces all prior versions.
|
|
7454
7106
|
*
|
|
7455
|
-
* Copyright (c) 2013-
|
|
7107
|
+
* Copyright (c) 2013-2023, Esoteric Software LLC
|
|
7456
7108
|
*
|
|
7457
7109
|
* Integration of the Spine Runtimes into software or otherwise creating
|
|
7458
7110
|
* derivative works of the Spine Runtimes is permitted under the terms and
|
|
7459
7111
|
* conditions of Section 2 of the Spine Editor License Agreement:
|
|
7460
7112
|
* http://esotericsoftware.com/spine-editor-license
|
|
7461
7113
|
*
|
|
7462
|
-
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
|
7463
|
-
*
|
|
7114
|
+
* Otherwise, it is permitted to integrate the Spine Runtimes into software or
|
|
7115
|
+
* otherwise create derivative works of the Spine Runtimes (collectively,
|
|
7464
7116
|
* "Products"), provided that each user of the Products must obtain their own
|
|
7465
7117
|
* Spine Editor license and redistribution of the Products in any form must
|
|
7466
7118
|
* include this license and copyright notice.
|
|
@@ -7473,16 +7125,18 @@ Skeleton.yDown = false;
|
|
|
7473
7125
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
|
7474
7126
|
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
|
7475
7127
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
7476
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
7477
|
-
*
|
|
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.
|
|
7478
7130
|
*****************************************************************************/ /** Stores the setup pose and all of the stateless data for a skeleton.
|
|
7479
7131
|
*
|
|
7480
7132
|
* See [Data objects](http://esotericsoftware.com/spine-runtime-architecture#Data-objects) in the Spine Runtimes
|
|
7481
7133
|
* Guide. */ var SkeletonData = /*#__PURE__*/ function() {
|
|
7482
7134
|
function SkeletonData() {
|
|
7483
7135
|
/** The skeleton's name, which by default is the name of the skeleton data file, if possible. May be null. */ this.name = null;
|
|
7484
|
-
/** The skeleton's bones, sorted parent first. The root bone is always the first bone. */ this.bones = new Array()
|
|
7485
|
-
|
|
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
|
+
;
|
|
7486
7140
|
this.skins = new Array();
|
|
7487
7141
|
/** The skeleton's default skin. By default this skin contains all attachments that were not in a skin in Spine.
|
|
7488
7142
|
*
|
|
@@ -7625,7 +7279,8 @@ Skeleton.yDown = false;
|
|
|
7625
7279
|
this.attachments = new Array();
|
|
7626
7280
|
this.bones = Array();
|
|
7627
7281
|
this.constraints = new Array();
|
|
7628
|
-
/** 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)
|
|
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
|
+
;
|
|
7629
7284
|
if (!name) throw new Error("name cannot be null.");
|
|
7630
7285
|
this.name = name;
|
|
7631
7286
|
}
|
|
@@ -10783,17 +10438,17 @@ function getValue(map, property, defaultValue) {
|
|
|
10783
10438
|
|
|
10784
10439
|
/******************************************************************************
|
|
10785
10440
|
* Spine Runtimes License Agreement
|
|
10786
|
-
* Last updated
|
|
10441
|
+
* Last updated July 28, 2023. Replaces all prior versions.
|
|
10787
10442
|
*
|
|
10788
|
-
* Copyright (c) 2013-
|
|
10443
|
+
* Copyright (c) 2013-2023, Esoteric Software LLC
|
|
10789
10444
|
*
|
|
10790
10445
|
* Integration of the Spine Runtimes into software or otherwise creating
|
|
10791
10446
|
* derivative works of the Spine Runtimes is permitted under the terms and
|
|
10792
10447
|
* conditions of Section 2 of the Spine Editor License Agreement:
|
|
10793
10448
|
* http://esotericsoftware.com/spine-editor-license
|
|
10794
10449
|
*
|
|
10795
|
-
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
|
10796
|
-
*
|
|
10450
|
+
* Otherwise, it is permitted to integrate the Spine Runtimes into software or
|
|
10451
|
+
* otherwise create derivative works of the Spine Runtimes (collectively,
|
|
10797
10452
|
* "Products"), provided that each user of the Products must obtain their own
|
|
10798
10453
|
* Spine Editor license and redistribution of the Products in any form must
|
|
10799
10454
|
* include this license and copyright notice.
|
|
@@ -10806,8 +10461,8 @@ function getValue(map, property, defaultValue) {
|
|
|
10806
10461
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
|
10807
10462
|
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
|
10808
10463
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
10809
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
10810
|
-
*
|
|
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.
|
|
10811
10466
|
*****************************************************************************/ (function() {
|
|
10812
10467
|
if (typeof Math.fround === "undefined") {
|
|
10813
10468
|
Math.fround = function(array) {
|
|
@@ -12060,7 +11715,7 @@ for(var key in RendererObject){
|
|
|
12060
11715
|
for(var key1 in LoaderObject){
|
|
12061
11716
|
miniprogram.Loader.registerClass(key1, LoaderObject[key1]);
|
|
12062
11717
|
}
|
|
12063
|
-
var version = "4.2.
|
|
11718
|
+
var version = "4.2.7";
|
|
12064
11719
|
console.log("Galacean spine version: " + version);
|
|
12065
11720
|
|
|
12066
11721
|
exports.AlphaTimeline = AlphaTimeline;
|
|
@@ -12068,7 +11723,6 @@ exports.Animation = Animation;
|
|
|
12068
11723
|
exports.AnimationState = AnimationState;
|
|
12069
11724
|
exports.AnimationStateAdapter = AnimationStateAdapter;
|
|
12070
11725
|
exports.AnimationStateData = AnimationStateData;
|
|
12071
|
-
exports.AssetCache = AssetCache;
|
|
12072
11726
|
exports.AssetManagerBase = AssetManagerBase;
|
|
12073
11727
|
exports.AtlasAttachmentLoader = AtlasAttachmentLoader;
|
|
12074
11728
|
exports.Attachment = Attachment;
|