@esotericsoftware/spine-core 4.1.2 → 4.1.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.
Files changed (96) hide show
  1. package/dist/Animation.d.ts +382 -382
  2. package/dist/Animation.js +2058 -2031
  3. package/dist/AnimationState.d.ts +396 -396
  4. package/dist/AnimationState.js +1083 -959
  5. package/dist/AnimationStateData.d.ts +51 -51
  6. package/dist/AnimationStateData.js +72 -70
  7. package/dist/AssetManagerBase.d.ts +74 -72
  8. package/dist/AssetManagerBase.js +304 -303
  9. package/dist/AtlasAttachmentLoader.d.ts +53 -53
  10. package/dist/AtlasAttachmentLoader.js +95 -94
  11. package/dist/Bone.d.ts +138 -138
  12. package/dist/Bone.js +340 -334
  13. package/dist/BoneData.d.ts +72 -72
  14. package/dist/BoneData.js +82 -74
  15. package/dist/ConstraintData.d.ts +35 -35
  16. package/dist/ConstraintData.js +36 -36
  17. package/dist/Event.d.ts +44 -44
  18. package/dist/Event.js +49 -42
  19. package/dist/EventData.d.ts +41 -41
  20. package/dist/EventData.js +44 -37
  21. package/dist/IkConstraint.d.ts +64 -64
  22. package/dist/IkConstraint.js +291 -285
  23. package/dist/IkConstraintData.d.ts +54 -54
  24. package/dist/IkConstraintData.js +56 -54
  25. package/dist/PathConstraint.d.ts +71 -71
  26. package/dist/PathConstraint.js +475 -469
  27. package/dist/PathConstraintData.d.ts +80 -80
  28. package/dist/PathConstraintData.js +84 -70
  29. package/dist/Skeleton.d.ts +152 -152
  30. package/dist/Skeleton.js +581 -563
  31. package/dist/SkeletonBinary.d.ts +68 -68
  32. package/dist/SkeletonBinary.js +1132 -1131
  33. package/dist/SkeletonBounds.d.ts +77 -77
  34. package/dist/SkeletonBounds.js +218 -218
  35. package/dist/SkeletonClipping.d.ts +50 -50
  36. package/dist/SkeletonClipping.js +323 -323
  37. package/dist/SkeletonData.d.ts +114 -114
  38. package/dist/SkeletonData.js +190 -167
  39. package/dist/SkeletonJson.d.ts +53 -53
  40. package/dist/SkeletonJson.js +954 -953
  41. package/dist/Skin.d.ts +71 -71
  42. package/dist/Skin.js +203 -201
  43. package/dist/Slot.d.ts +69 -69
  44. package/dist/Slot.js +97 -85
  45. package/dist/SlotData.d.ts +57 -57
  46. package/dist/SlotData.js +68 -55
  47. package/dist/Texture.d.ts +69 -69
  48. package/dist/Texture.js +72 -72
  49. package/dist/TextureAtlas.d.ts +65 -65
  50. package/dist/TextureAtlas.js +267 -246
  51. package/dist/TransformConstraint.d.ts +60 -60
  52. package/dist/TransformConstraint.js +246 -240
  53. package/dist/TransformConstraintData.d.ts +60 -60
  54. package/dist/TransformConstraintData.js +62 -60
  55. package/dist/Triangulator.d.ts +43 -43
  56. package/dist/Triangulator.js +243 -243
  57. package/dist/Updatable.d.ts +37 -37
  58. package/dist/Updatable.js +29 -29
  59. package/dist/Utils.d.ts +168 -168
  60. package/dist/Utils.js +403 -403
  61. package/dist/VertexEffect.d.ts +35 -35
  62. package/dist/VertexEffect.js +29 -29
  63. package/dist/attachments/Attachment.d.ts +72 -72
  64. package/dist/attachments/Attachment.js +149 -141
  65. package/dist/attachments/AttachmentLoader.d.ts +54 -54
  66. package/dist/attachments/AttachmentLoader.js +29 -29
  67. package/dist/attachments/BoundingBoxAttachment.d.ts +40 -40
  68. package/dist/attachments/BoundingBoxAttachment.js +47 -47
  69. package/dist/attachments/ClippingAttachment.d.ts +42 -42
  70. package/dist/attachments/ClippingAttachment.js +51 -48
  71. package/dist/attachments/HasTextureRegion.d.ts +44 -44
  72. package/dist/attachments/HasTextureRegion.js +29 -29
  73. package/dist/attachments/MeshAttachment.d.ts +79 -79
  74. package/dist/attachments/MeshAttachment.js +189 -167
  75. package/dist/attachments/PathAttachment.d.ts +47 -47
  76. package/dist/attachments/PathAttachment.js +59 -57
  77. package/dist/attachments/PointAttachment.d.ts +48 -48
  78. package/dist/attachments/PointAttachment.js +66 -63
  79. package/dist/attachments/RegionAttachment.d.ts +111 -111
  80. package/dist/attachments/RegionAttachment.js +204 -199
  81. package/dist/attachments/Sequence.d.ts +55 -55
  82. package/dist/attachments/Sequence.js +90 -90
  83. package/dist/attachments/index.d.ts +8 -8
  84. package/dist/attachments/index.js +8 -8
  85. package/dist/iife/spine-core.js +178 -8
  86. package/dist/iife/spine-core.js.map +2 -2
  87. package/dist/iife/spine-core.min.js +2 -2
  88. package/dist/index.d.ts +42 -42
  89. package/dist/index.js +42 -42
  90. package/dist/polyfills.d.ts +29 -29
  91. package/dist/polyfills.js +38 -38
  92. package/dist/vertexeffects/JitterEffect.d.ts +39 -39
  93. package/dist/vertexeffects/JitterEffect.js +45 -45
  94. package/dist/vertexeffects/SwirlEffect.d.ts +44 -44
  95. package/dist/vertexeffects/SwirlEffect.js +60 -60
  96. package/package.json +32 -32
@@ -1,51 +1,51 @@
1
- /******************************************************************************
2
- * Spine Runtimes License Agreement
3
- * Last updated September 24, 2021. Replaces all prior versions.
4
- *
5
- * Copyright (c) 2013-2021, Esoteric Software LLC
6
- *
7
- * Integration of the Spine Runtimes into software or otherwise creating
8
- * derivative works of the Spine Runtimes is permitted under the terms and
9
- * conditions of Section 2 of the Spine Editor License Agreement:
10
- * http://esotericsoftware.com/spine-editor-license
11
- *
12
- * Otherwise, it is permitted to integrate the Spine Runtimes into software
13
- * or otherwise create derivative works of the Spine Runtimes (collectively,
14
- * "Products"), provided that each user of the Products must obtain their own
15
- * Spine Editor license and redistribution of the Products in any form must
16
- * include this license and copyright notice.
17
- *
18
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27
- * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
- *****************************************************************************/
29
- import { Animation } from "./Animation";
30
- import { SkeletonData } from "./SkeletonData";
31
- import { StringMap } from "./Utils";
32
- /** Stores mix (crossfade) durations to be applied when {@link AnimationState} animations are changed. */
33
- export declare class AnimationStateData {
34
- /** The SkeletonData to look up animations when they are specified by name. */
35
- skeletonData: SkeletonData;
36
- animationToMixTime: StringMap<number>;
37
- /** The mix duration to use when no mix duration has been defined between two animations. */
38
- defaultMix: number;
39
- constructor(skeletonData: SkeletonData);
40
- /** Sets a mix duration by animation name.
41
- *
42
- * See {@link #setMixWith()}. */
43
- setMix(fromName: string, toName: string, duration: number): void;
44
- /** Sets the mix duration when changing from the specified animation to the other.
45
- *
46
- * See {@link TrackEntry#mixDuration}. */
47
- setMixWith(from: Animation, to: Animation, duration: number): void;
48
- /** Returns the mix duration to use when changing from the specified animation to the other, or the {@link #defaultMix} if
49
- * no mix duration has been set. */
50
- getMix(from: Animation, to: Animation): number;
51
- }
1
+ /******************************************************************************
2
+ * Spine Runtimes License Agreement
3
+ * Last updated September 24, 2021. Replaces all prior versions.
4
+ *
5
+ * Copyright (c) 2013-2021, Esoteric Software LLC
6
+ *
7
+ * Integration of the Spine Runtimes into software or otherwise creating
8
+ * derivative works of the Spine Runtimes is permitted under the terms and
9
+ * conditions of Section 2 of the Spine Editor License Agreement:
10
+ * http://esotericsoftware.com/spine-editor-license
11
+ *
12
+ * Otherwise, it is permitted to integrate the Spine Runtimes into software
13
+ * or otherwise create derivative works of the Spine Runtimes (collectively,
14
+ * "Products"), provided that each user of the Products must obtain their own
15
+ * Spine Editor license and redistribution of the Products in any form must
16
+ * include this license and copyright notice.
17
+ *
18
+ * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24
+ * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27
+ * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+ *****************************************************************************/
29
+ import { Animation } from "./Animation";
30
+ import { SkeletonData } from "./SkeletonData";
31
+ import { StringMap } from "./Utils";
32
+ /** Stores mix (crossfade) durations to be applied when {@link AnimationState} animations are changed. */
33
+ export declare class AnimationStateData {
34
+ /** The SkeletonData to look up animations when they are specified by name. */
35
+ skeletonData: SkeletonData;
36
+ animationToMixTime: StringMap<number>;
37
+ /** The mix duration to use when no mix duration has been defined between two animations. */
38
+ defaultMix: number;
39
+ constructor(skeletonData: SkeletonData);
40
+ /** Sets a mix duration by animation name.
41
+ *
42
+ * See {@link #setMixWith()}. */
43
+ setMix(fromName: string, toName: string, duration: number): void;
44
+ /** Sets the mix duration when changing from the specified animation to the other.
45
+ *
46
+ * See {@link TrackEntry#mixDuration}. */
47
+ setMixWith(from: Animation, to: Animation, duration: number): void;
48
+ /** Returns the mix duration to use when changing from the specified animation to the other, or the {@link #defaultMix} if
49
+ * no mix duration has been set. */
50
+ getMix(from: Animation, to: Animation): number;
51
+ }
@@ -1,70 +1,72 @@
1
- /******************************************************************************
2
- * Spine Runtimes License Agreement
3
- * Last updated September 24, 2021. Replaces all prior versions.
4
- *
5
- * Copyright (c) 2013-2021, Esoteric Software LLC
6
- *
7
- * Integration of the Spine Runtimes into software or otherwise creating
8
- * derivative works of the Spine Runtimes is permitted under the terms and
9
- * conditions of Section 2 of the Spine Editor License Agreement:
10
- * http://esotericsoftware.com/spine-editor-license
11
- *
12
- * Otherwise, it is permitted to integrate the Spine Runtimes into software
13
- * or otherwise create derivative works of the Spine Runtimes (collectively,
14
- * "Products"), provided that each user of the Products must obtain their own
15
- * Spine Editor license and redistribution of the Products in any form must
16
- * include this license and copyright notice.
17
- *
18
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27
- * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
- *****************************************************************************/
29
- /** Stores mix (crossfade) durations to be applied when {@link AnimationState} animations are changed. */
30
- export class AnimationStateData {
31
- constructor(skeletonData) {
32
- this.animationToMixTime = {};
33
- /** The mix duration to use when no mix duration has been defined between two animations. */
34
- this.defaultMix = 0;
35
- if (!skeletonData)
36
- throw new Error("skeletonData cannot be null.");
37
- this.skeletonData = skeletonData;
38
- }
39
- /** Sets a mix duration by animation name.
40
- *
41
- * See {@link #setMixWith()}. */
42
- setMix(fromName, toName, duration) {
43
- let from = this.skeletonData.findAnimation(fromName);
44
- if (!from)
45
- throw new Error("Animation not found: " + fromName);
46
- let to = this.skeletonData.findAnimation(toName);
47
- if (!to)
48
- throw new Error("Animation not found: " + toName);
49
- this.setMixWith(from, to, duration);
50
- }
51
- /** Sets the mix duration when changing from the specified animation to the other.
52
- *
53
- * See {@link TrackEntry#mixDuration}. */
54
- setMixWith(from, to, duration) {
55
- if (!from)
56
- throw new Error("from cannot be null.");
57
- if (!to)
58
- throw new Error("to cannot be null.");
59
- let key = from.name + "." + to.name;
60
- this.animationToMixTime[key] = duration;
61
- }
62
- /** Returns the mix duration to use when changing from the specified animation to the other, or the {@link #defaultMix} if
63
- * no mix duration has been set. */
64
- getMix(from, to) {
65
- let key = from.name + "." + to.name;
66
- let value = this.animationToMixTime[key];
67
- return value === undefined ? this.defaultMix : value;
68
- }
69
- }
70
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQW5pbWF0aW9uU3RhdGVEYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL0FuaW1hdGlvblN0YXRlRGF0YS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OytFQTJCK0U7QUFPL0UseUdBQ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JQUFJLEtBQUssQ0FBQyxvQkFBb0IsQ0FBQyxDQUFDO1FBQy9DLElBQUksR0FBRyxHQUFHLElBQUksQ0FBQyxJQUFJLEdBQUcsR0FBRyxHQUFHLEVBQUUsQ0FBQyxJQUFJLENBQUM7UUFDcEMsSUFBSSxDQUFDLGtCQUFrQixDQUFDLEdBQUcsQ0FBQyxHQUFHLFFBQVEsQ0FBQztJQUN6QyxDQUFDO0lBRUQ7d0NBQ29DO0lBQ3BDLE1BQU0sQ0FBRSxJQUFlLEVBQUUsRUFBYTtRQUNyQyxJQUFJLEdBQUcsR0FBRyxJQUFJLENBQUMsSUFBSSxHQUFHLEdBQUcsR0FBRyxFQUFFLENBQUMsSUFBSSxDQUFDO1FBQ3BDLElBQUksS0FBSyxHQUFHLElBQUksQ0FBQyxrQkFBa0IsQ0FBQyxHQUFHLENBQUMsQ0FBQztRQUN6QyxPQUFPLEtBQUssS0FBSyxTQUFTLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQztJQUN0RCxDQUFDO0NBQ0QifQ==
1
+ /******************************************************************************
2
+ * Spine Runtimes License Agreement
3
+ * Last updated September 24, 2021. Replaces all prior versions.
4
+ *
5
+ * Copyright (c) 2013-2021, Esoteric Software LLC
6
+ *
7
+ * Integration of the Spine Runtimes into software or otherwise creating
8
+ * derivative works of the Spine Runtimes is permitted under the terms and
9
+ * conditions of Section 2 of the Spine Editor License Agreement:
10
+ * http://esotericsoftware.com/spine-editor-license
11
+ *
12
+ * Otherwise, it is permitted to integrate the Spine Runtimes into software
13
+ * or otherwise create derivative works of the Spine Runtimes (collectively,
14
+ * "Products"), provided that each user of the Products must obtain their own
15
+ * Spine Editor license and redistribution of the Products in any form must
16
+ * include this license and copyright notice.
17
+ *
18
+ * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24
+ * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27
+ * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+ *****************************************************************************/
29
+ /** Stores mix (crossfade) durations to be applied when {@link AnimationState} animations are changed. */
30
+ export class AnimationStateData {
31
+ constructor(skeletonData) {
32
+ /** The SkeletonData to look up animations when they are specified by name. */
33
+ this.skeletonData = null;
34
+ this.animationToMixTime = {};
35
+ /** The mix duration to use when no mix duration has been defined between two animations. */
36
+ this.defaultMix = 0;
37
+ if (!skeletonData)
38
+ throw new Error("skeletonData cannot be null.");
39
+ this.skeletonData = skeletonData;
40
+ }
41
+ /** Sets a mix duration by animation name.
42
+ *
43
+ * See {@link #setMixWith()}. */
44
+ setMix(fromName, toName, duration) {
45
+ let from = this.skeletonData.findAnimation(fromName);
46
+ if (!from)
47
+ throw new Error("Animation not found: " + fromName);
48
+ let to = this.skeletonData.findAnimation(toName);
49
+ if (!to)
50
+ throw new Error("Animation not found: " + toName);
51
+ this.setMixWith(from, to, duration);
52
+ }
53
+ /** Sets the mix duration when changing from the specified animation to the other.
54
+ *
55
+ * See {@link TrackEntry#mixDuration}. */
56
+ setMixWith(from, to, duration) {
57
+ if (!from)
58
+ throw new Error("from cannot be null.");
59
+ if (!to)
60
+ throw new Error("to cannot be null.");
61
+ let key = from.name + "." + to.name;
62
+ this.animationToMixTime[key] = duration;
63
+ }
64
+ /** Returns the mix duration to use when changing from the specified animation to the other, or the {@link #defaultMix} if
65
+ * no mix duration has been set. */
66
+ getMix(from, to) {
67
+ let key = from.name + "." + to.name;
68
+ let value = this.animationToMixTime[key];
69
+ return value === undefined ? this.defaultMix : value;
70
+ }
71
+ }
72
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQW5pbWF0aW9uU3RhdGVEYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL0FuaW1hdGlvblN0YXRlRGF0YS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OytFQTJCK0U7QUFPL0UseUdBQXlHO0FBQ3pHLE1BQU0sT0FBTyxrQkFBa0I7SUFTOUIsWUFBYSxZQUEwQjtRQVJ2Qyw4RUFBOEU7UUFDOUUsaUJBQVksR0FBaUIsSUFBSSxDQUFDO1FBRWxDLHVCQUFrQixHQUFzQixFQUFFLENBQUM7UUFFM0MsNEZBQTRGO1FBQzVGLGVBQVUsR0FBRyxDQUFDLENBQUM7UUFHZCxJQUFJLENBQUMsWUFBWTtZQUFFLE1BQU0sSUFBSSxLQUFLLENBQUMsOEJBQThCLENBQUMsQ0FBQztRQUNuRSxJQUFJLENBQUMsWUFBWSxHQUFHLFlBQVksQ0FBQztJQUNsQyxDQUFDO0lBRUQ7O29DQUVnQztJQUNoQyxNQUFNLENBQUUsUUFBZ0IsRUFBRSxNQUFjLEVBQUUsUUFBZ0I7UUFDekQsSUFBSSxJQUFJLEdBQUcsSUFBSSxDQUFDLFlBQVksQ0FBQyxhQUFhLENBQUMsUUFBUSxDQUFDLENBQUM7UUFDckQsSUFBSSxDQUFDL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UFDLENBQUMsSUFBSSxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDO0lBQ3RELENBQUM7Q0FDRCJ9
@@ -1,72 +1,74 @@
1
- /******************************************************************************
2
- * Spine Runtimes License Agreement
3
- * Last updated September 24, 2021. Replaces all prior versions.
4
- *
5
- * Copyright (c) 2013-2021, Esoteric Software LLC
6
- *
7
- * Integration of the Spine Runtimes into software or otherwise creating
8
- * derivative works of the Spine Runtimes is permitted under the terms and
9
- * conditions of Section 2 of the Spine Editor License Agreement:
10
- * http://esotericsoftware.com/spine-editor-license
11
- *
12
- * Otherwise, it is permitted to integrate the Spine Runtimes into software
13
- * or otherwise create derivative works of the Spine Runtimes (collectively,
14
- * "Products"), provided that each user of the Products must obtain their own
15
- * Spine Editor license and redistribution of the Products in any form must
16
- * include this license and copyright notice.
17
- *
18
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27
- * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
- *****************************************************************************/
29
- import { Texture } from "./Texture";
30
- import { TextureAtlas } from "./TextureAtlas";
31
- import { Disposable, StringMap } from "./Utils";
32
- export declare class AssetManagerBase implements Disposable {
33
- private pathPrefix;
34
- private textureLoader;
35
- private downloader;
36
- private assets;
37
- private errors;
38
- private toLoad;
39
- private loaded;
40
- constructor(textureLoader: (image: HTMLImageElement | ImageBitmap) => Texture, pathPrefix?: string, downloader?: Downloader);
41
- private start;
42
- private success;
43
- private error;
44
- setRawDataURI(path: string, data: string): void;
45
- loadBinary(path: string, success?: (path: string, binary: Uint8Array) => void, error?: (path: string, message: string) => void): void;
46
- loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, message: string) => void): void;
47
- loadJson(path: string, success?: (path: string, object: object) => void, error?: (path: string, message: string) => void): void;
48
- loadTexture(path: string, success?: (path: string, texture: Texture) => void, error?: (path: string, message: string) => void): void;
49
- loadTextureAtlas(path: string, success?: (path: string, atlas: TextureAtlas) => void, error?: (path: string, message: string) => void): void;
50
- get(path: string): any;
51
- require(path: string): any;
52
- remove(path: string): any;
53
- removeAll(): void;
54
- isLoadingComplete(): boolean;
55
- getToLoad(): number;
56
- getLoaded(): number;
57
- dispose(): void;
58
- hasErrors(): boolean;
59
- getErrors(): StringMap<string>;
60
- }
61
- export declare class Downloader {
62
- private callbacks;
63
- rawDataUris: StringMap<string>;
64
- dataUriToString(dataUri: string): string;
65
- base64ToUint8Array(base64: string): Uint8Array;
66
- dataUriToUint8Array(dataUri: string): Uint8Array;
67
- downloadText(url: string, success: (data: string) => void, error: (status: number, responseText: string) => void): void;
68
- downloadJson(url: string, success: (data: object) => void, error: (status: number, responseText: string) => void): void;
69
- downloadBinary(url: string, success: (data: Uint8Array) => void, error: (status: number, responseText: string) => void): void;
70
- private start;
71
- private finish;
72
- }
1
+ /******************************************************************************
2
+ * Spine Runtimes License Agreement
3
+ * Last updated September 24, 2021. Replaces all prior versions.
4
+ *
5
+ * Copyright (c) 2013-2021, Esoteric Software LLC
6
+ *
7
+ * Integration of the Spine Runtimes into software or otherwise creating
8
+ * derivative works of the Spine Runtimes is permitted under the terms and
9
+ * conditions of Section 2 of the Spine Editor License Agreement:
10
+ * http://esotericsoftware.com/spine-editor-license
11
+ *
12
+ * Otherwise, it is permitted to integrate the Spine Runtimes into software
13
+ * or otherwise create derivative works of the Spine Runtimes (collectively,
14
+ * "Products"), provided that each user of the Products must obtain their own
15
+ * Spine Editor license and redistribution of the Products in any form must
16
+ * include this license and copyright notice.
17
+ *
18
+ * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24
+ * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27
+ * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+ *****************************************************************************/
29
+ import { Texture } from "./Texture";
30
+ import { TextureAtlas } from "./TextureAtlas";
31
+ import { Disposable, StringMap } from "./Utils";
32
+ export declare class AssetManagerBase implements Disposable {
33
+ private pathPrefix;
34
+ private textureLoader;
35
+ private downloader;
36
+ private assets;
37
+ private errors;
38
+ private toLoad;
39
+ private loaded;
40
+ constructor(textureLoader: (image: HTMLImageElement | ImageBitmap) => Texture, pathPrefix?: string, downloader?: Downloader);
41
+ private start;
42
+ private success;
43
+ private error;
44
+ setRawDataURI(path: string, data: string): void;
45
+ loadBinary(path: string, success?: (path: string, binary: Uint8Array) => void, error?: (path: string, message: string) => void): void;
46
+ loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, message: string) => void): void;
47
+ loadJson(path: string, success?: (path: string, object: object) => void, error?: (path: string, message: string) => void): void;
48
+ loadTexture(path: string, success?: (path: string, texture: Texture) => void, error?: (path: string, message: string) => void): void;
49
+ loadTextureAtlas(path: string, success?: (path: string, atlas: TextureAtlas) => void, error?: (path: string, message: string) => void, fileAlias?: {
50
+ [keyword: string]: string;
51
+ }): void;
52
+ get(path: string): any;
53
+ require(path: string): any;
54
+ remove(path: string): any;
55
+ removeAll(): void;
56
+ isLoadingComplete(): boolean;
57
+ getToLoad(): number;
58
+ getLoaded(): number;
59
+ dispose(): void;
60
+ hasErrors(): boolean;
61
+ getErrors(): StringMap<string>;
62
+ }
63
+ export declare class Downloader {
64
+ private callbacks;
65
+ rawDataUris: StringMap<string>;
66
+ dataUriToString(dataUri: string): string;
67
+ base64ToUint8Array(base64: string): Uint8Array;
68
+ dataUriToUint8Array(dataUri: string): Uint8Array;
69
+ downloadText(url: string, success: (data: string) => void, error: (status: number, responseText: string) => void): void;
70
+ downloadJson(url: string, success: (data: object) => void, error: (status: number, responseText: string) => void): void;
71
+ downloadBinary(url: string, success: (data: Uint8Array) => void, error: (status: number, responseText: string) => void): void;
72
+ private start;
73
+ private finish;
74
+ }