@galacean/engine-spine 4.2.5 → 4.2.6
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 +96 -16
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +96 -16
- package/dist/module.js +96 -16
- package/dist/module.js.map +1 -1
- package/package.json +1 -1
- package/types/AntGSpineLoader.d.ts +22 -0
- package/types/SpineAnimation.d.ts +45 -0
- package/types/SpineLoader.d.ts +32 -0
- package/types/SpineMaterial.d.ts +6 -0
- package/types/SpineRenderer.d.ts +38 -0
- package/types/core/MeshGenerator.d.ts +43 -0
- package/types/core/SpineMesh.d.ts +11 -0
- package/types/spine-core/Animation.d.ts +378 -0
- package/types/spine-core/AnimationState.d.ts +365 -0
- package/types/spine-core/AnimationStateData.d.ts +23 -0
- package/types/spine-core/AssetManager.d.ts +36 -0
- package/types/spine-core/AtlasAttachmentLoader.d.ts +23 -0
- package/types/spine-core/BlendMode.d.ts +7 -0
- package/types/spine-core/Bone.d.ts +110 -0
- package/types/spine-core/BoneData.d.ts +44 -0
- package/types/spine-core/ConstraintData.d.ts +7 -0
- package/types/spine-core/Event.d.ts +16 -0
- package/types/spine-core/EventData.d.ts +13 -0
- package/types/spine-core/IkConstraint.d.ts +38 -0
- package/types/spine-core/IkConstraintData.d.ts +26 -0
- package/types/spine-core/PathConstraint.d.ts +46 -0
- package/types/spine-core/PathConstraintData.d.ts +52 -0
- package/types/spine-core/SharedAssetManager.d.ts +19 -0
- package/types/spine-core/Skeleton.d.ts +134 -0
- package/types/spine-core/SkeletonBinary.d.ts +49 -0
- package/types/spine-core/SkeletonBounds.d.ts +48 -0
- package/types/spine-core/SkeletonClipping.d.ts +22 -0
- package/types/spine-core/SkeletonData.d.ts +89 -0
- package/types/spine-core/SkeletonJson.d.ts +34 -0
- package/types/spine-core/Skin.d.ts +43 -0
- package/types/spine-core/Slot.d.ts +42 -0
- package/types/spine-core/SlotData.d.ts +23 -0
- package/types/spine-core/Texture.d.ts +46 -0
- package/types/spine-core/TextureAtlas.d.ts +30 -0
- package/types/spine-core/TransformConstraint.d.ts +36 -0
- package/types/spine-core/TransformConstraintData.d.ts +34 -0
- package/types/spine-core/Triangulator.d.ts +14 -0
- package/types/spine-core/Updatable.d.ts +9 -0
- package/types/spine-core/Utils.d.ts +124 -0
- package/types/spine-core/VertexEffect.d.ts +7 -0
- package/types/spine-core/attachments/Attachment.d.ts +43 -0
- package/types/spine-core/attachments/AttachmentLoader.d.ts +25 -0
- package/types/spine-core/attachments/AttachmentType.d.ts +9 -0
- package/types/spine-core/attachments/BoundingBoxAttachment.d.ts +12 -0
- package/types/spine-core/attachments/ClippingAttachment.d.ts +14 -0
- package/types/spine-core/attachments/MeshAttachment.d.ts +46 -0
- package/types/spine-core/attachments/PathAttachment.d.ts +19 -0
- package/types/spine-core/attachments/PointAttachment.d.ts +20 -0
- package/types/spine-core/attachments/RegionAttachment.d.ts +88 -0
- package/types/spine-core/polyfills.d.ts +3 -0
- package/types/spine-core/vertexeffects/JitterEffect.d.ts +11 -0
- package/types/spine-core/vertexeffects/SwirlEffect.d.ts +16 -0
- package/types/types.d.ts +4 -0
package/dist/main.js
CHANGED
|
@@ -32,14 +32,9 @@ function _instanceof1(left, right) {
|
|
|
32
32
|
} else return _instanceof1(left, right);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
function _type_of(obj) {
|
|
36
|
-
"@swc/helpers - typeof";
|
|
37
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
35
|
function __decorate(decorators, target, key, desc) {
|
|
41
36
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
42
|
-
if (
|
|
37
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
43
38
|
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;
|
|
44
39
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
45
40
|
}
|
|
@@ -174,7 +169,34 @@ function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
|
|
|
174
169
|
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
175
170
|
}
|
|
176
171
|
|
|
177
|
-
|
|
172
|
+
/******************************************************************************
|
|
173
|
+
* Spine Runtimes License Agreement
|
|
174
|
+
* Last updated April 5, 2025. Replaces all prior versions.
|
|
175
|
+
*
|
|
176
|
+
* Copyright (c) 2013-2025, Esoteric Software LLC
|
|
177
|
+
*
|
|
178
|
+
* Integration of the Spine Runtimes into software or otherwise creating
|
|
179
|
+
* derivative works of the Spine Runtimes is permitted under the terms and
|
|
180
|
+
* conditions of Section 2 of the Spine Editor License Agreement:
|
|
181
|
+
* http://esotericsoftware.com/spine-editor-license
|
|
182
|
+
*
|
|
183
|
+
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
|
184
|
+
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
|
185
|
+
* "Products"), provided that each user of the Products must obtain their own
|
|
186
|
+
* Spine Editor license and redistribution of the Products in any form must
|
|
187
|
+
* include this license and copyright notice.
|
|
188
|
+
*
|
|
189
|
+
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
|
190
|
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
191
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
192
|
+
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
|
193
|
+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
194
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
|
195
|
+
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
|
196
|
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
197
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
198
|
+
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
199
|
+
*****************************************************************************/ var IntSet = /*#__PURE__*/ function() {
|
|
178
200
|
function IntSet() {
|
|
179
201
|
this.array = new Array();
|
|
180
202
|
}
|
|
@@ -3921,7 +3943,34 @@ var CURRENT = 2;
|
|
|
3921
3943
|
}
|
|
3922
3944
|
(VertexAttachment);
|
|
3923
3945
|
|
|
3924
|
-
|
|
3946
|
+
/******************************************************************************
|
|
3947
|
+
* Spine Runtimes License Agreement
|
|
3948
|
+
* Last updated April 5, 2025. Replaces all prior versions.
|
|
3949
|
+
*
|
|
3950
|
+
* Copyright (c) 2013-2025, Esoteric Software LLC
|
|
3951
|
+
*
|
|
3952
|
+
* Integration of the Spine Runtimes into software or otherwise creating
|
|
3953
|
+
* derivative works of the Spine Runtimes is permitted under the terms and
|
|
3954
|
+
* conditions of Section 2 of the Spine Editor License Agreement:
|
|
3955
|
+
* http://esotericsoftware.com/spine-editor-license
|
|
3956
|
+
*
|
|
3957
|
+
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
|
3958
|
+
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
|
3959
|
+
* "Products"), provided that each user of the Products must obtain their own
|
|
3960
|
+
* Spine Editor license and redistribution of the Products in any form must
|
|
3961
|
+
* include this license and copyright notice.
|
|
3962
|
+
*
|
|
3963
|
+
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
|
3964
|
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
3965
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
3966
|
+
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
|
3967
|
+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
3968
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
|
3969
|
+
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
|
3970
|
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
3971
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
3972
|
+
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
3973
|
+
*****************************************************************************/ var Texture = /*#__PURE__*/ function() {
|
|
3925
3974
|
function Texture(image) {
|
|
3926
3975
|
this._image = image;
|
|
3927
3976
|
}
|
|
@@ -5153,7 +5202,7 @@ var AssetManagerBase = /*#__PURE__*/ function() {
|
|
|
5153
5202
|
}) : null;
|
|
5154
5203
|
}).then(function(bitmap) {
|
|
5155
5204
|
if (bitmap) {
|
|
5156
|
-
var texture = _this.
|
|
5205
|
+
var texture = _this.createTexture(path, bitmap);
|
|
5157
5206
|
_this.success(success, path, texture);
|
|
5158
5207
|
resolve(texture);
|
|
5159
5208
|
}
|
|
@@ -5162,7 +5211,7 @@ var AssetManagerBase = /*#__PURE__*/ function() {
|
|
|
5162
5211
|
var image = new Image();
|
|
5163
5212
|
image.crossOrigin = "anonymous";
|
|
5164
5213
|
image.onload = function() {
|
|
5165
|
-
var texture = _this.
|
|
5214
|
+
var texture = _this.createTexture(path, image);
|
|
5166
5215
|
_this.success(success, path, texture);
|
|
5167
5216
|
resolve(texture);
|
|
5168
5217
|
};
|
|
@@ -5206,7 +5255,7 @@ var AssetManagerBase = /*#__PURE__*/ function() {
|
|
|
5206
5255
|
abort = true;
|
|
5207
5256
|
});
|
|
5208
5257
|
};
|
|
5209
|
-
var atlas =
|
|
5258
|
+
var atlas = _this.createTextureAtlas(path, atlasText);
|
|
5210
5259
|
var toLoad = atlas.pages.length, abort = false;
|
|
5211
5260
|
for(var _iterator = _create_for_of_iterator_helper_loose(atlas.pages), _step; !(_step = _iterator()).done;)_loop();
|
|
5212
5261
|
} catch (e) {
|
|
@@ -5230,7 +5279,7 @@ var AssetManagerBase = /*#__PURE__*/ function() {
|
|
|
5230
5279
|
this.cache.assetsLoaded[path] = new Promise(function(resolve, reject) {
|
|
5231
5280
|
_this.downloader.downloadText(path, function(atlasText) {
|
|
5232
5281
|
try {
|
|
5233
|
-
var atlas =
|
|
5282
|
+
var atlas = _this.createTextureAtlas(path, atlasText);
|
|
5234
5283
|
_this.success(success, path, atlas);
|
|
5235
5284
|
resolve(atlas);
|
|
5236
5285
|
} catch (e) {
|
|
@@ -5381,9 +5430,12 @@ var AssetManagerBase = /*#__PURE__*/ function() {
|
|
|
5381
5430
|
};
|
|
5382
5431
|
// dispose asset only if it's not used by others
|
|
5383
5432
|
_proto.disposeAsset = function disposeAsset(path) {
|
|
5384
|
-
|
|
5385
|
-
|
|
5433
|
+
var asset = this.cache.assets[path];
|
|
5434
|
+
if (_instanceof1(asset, TextureAtlas)) {
|
|
5435
|
+
asset.dispose();
|
|
5436
|
+
return;
|
|
5386
5437
|
}
|
|
5438
|
+
this.disposeAssetInternal(path);
|
|
5387
5439
|
};
|
|
5388
5440
|
_proto.hasErrors = function hasErrors() {
|
|
5389
5441
|
return Object.keys(this.errors).length > 0;
|
|
@@ -5391,6 +5443,34 @@ var AssetManagerBase = /*#__PURE__*/ function() {
|
|
|
5391
5443
|
_proto.getErrors = function getErrors() {
|
|
5392
5444
|
return this.errors;
|
|
5393
5445
|
};
|
|
5446
|
+
_proto.disposeAssetInternal = function disposeAssetInternal(path) {
|
|
5447
|
+
if (this.cache.assetsRefCount[path] > 0 && --this.cache.assetsRefCount[path] === 0) {
|
|
5448
|
+
return this.remove(path);
|
|
5449
|
+
}
|
|
5450
|
+
};
|
|
5451
|
+
_proto.createTextureAtlas = function createTextureAtlas(path, atlasText) {
|
|
5452
|
+
var _this = this;
|
|
5453
|
+
var atlas = new TextureAtlas(atlasText);
|
|
5454
|
+
atlas.dispose = function() {
|
|
5455
|
+
if (_this.cache.assetsRefCount[path] <= 0) return;
|
|
5456
|
+
_this.disposeAssetInternal(path);
|
|
5457
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(atlas.pages), _step; !(_step = _iterator()).done;){
|
|
5458
|
+
var page = _step.value;
|
|
5459
|
+
var _page_texture;
|
|
5460
|
+
(_page_texture = page.texture) == null ? void 0 : _page_texture.dispose();
|
|
5461
|
+
}
|
|
5462
|
+
};
|
|
5463
|
+
return atlas;
|
|
5464
|
+
};
|
|
5465
|
+
_proto.createTexture = function createTexture(path, image) {
|
|
5466
|
+
var _this = this;
|
|
5467
|
+
var texture = this.textureLoader(image);
|
|
5468
|
+
var textureDispose = texture.dispose.bind(texture);
|
|
5469
|
+
texture.dispose = function() {
|
|
5470
|
+
if (_this.disposeAssetInternal(path)) textureDispose();
|
|
5471
|
+
};
|
|
5472
|
+
return texture;
|
|
5473
|
+
};
|
|
5394
5474
|
return AssetManagerBase;
|
|
5395
5475
|
}();
|
|
5396
5476
|
var AssetCache = /*#__PURE__*/ function() {
|
|
@@ -12038,7 +12118,7 @@ var SpineAtlasLoader = /*#__PURE__*/ function(Loader) {
|
|
|
12038
12118
|
SpineAtlasLoader = __decorate([
|
|
12039
12119
|
engine.resourceLoader("SpineAtlas", [
|
|
12040
12120
|
"atlas"
|
|
12041
|
-
])
|
|
12121
|
+
], false)
|
|
12042
12122
|
], SpineAtlasLoader);
|
|
12043
12123
|
|
|
12044
12124
|
var LoaderObject = /*#__PURE__*/Object.freeze({
|
|
@@ -12059,7 +12139,7 @@ for(var key in RendererObject){
|
|
|
12059
12139
|
for(var key1 in LoaderObject){
|
|
12060
12140
|
engine.Loader.registerClass(key1, LoaderObject[key1]);
|
|
12061
12141
|
}
|
|
12062
|
-
var version = "4.2.
|
|
12142
|
+
var version = "4.2.6";
|
|
12063
12143
|
console.log("Galacean spine version: " + version);
|
|
12064
12144
|
|
|
12065
12145
|
exports.AlphaTimeline = AlphaTimeline;
|