@esotericsoftware/spine-core 4.1.25 → 4.1.28
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/README.md +1 -1
- package/dist/Animation.d.ts +382 -0
- package/dist/Animation.js +2052 -0
- package/dist/AnimationState.d.ts +398 -0
- package/dist/AnimationState.js +1096 -0
- package/dist/AnimationStateData.d.ts +51 -0
- package/dist/AnimationStateData.js +70 -0
- package/dist/AssetManagerBase.d.ts +75 -0
- package/dist/AssetManagerBase.js +320 -0
- package/dist/AtlasAttachmentLoader.d.ts +53 -0
- package/dist/AtlasAttachmentLoader.js +92 -0
- package/dist/Bone.d.ts +138 -0
- package/dist/Bone.js +336 -0
- package/dist/BoneData.d.ts +72 -0
- package/dist/BoneData.js +80 -0
- package/dist/ConstraintData.d.ts +35 -0
- package/dist/ConstraintData.js +37 -0
- package/dist/Event.d.ts +44 -0
- package/dist/Event.js +48 -0
- package/dist/EventData.d.ts +41 -0
- package/dist/EventData.js +43 -0
- package/dist/IkConstraint.d.ts +64 -0
- package/dist/IkConstraint.js +303 -0
- package/dist/IkConstraintData.d.ts +56 -0
- package/dist/IkConstraintData.js +63 -0
- package/dist/PathConstraint.d.ts +71 -0
- package/dist/PathConstraint.js +476 -0
- package/dist/PathConstraintData.d.ts +82 -0
- package/dist/PathConstraintData.js +91 -0
- package/dist/Skeleton.d.ts +163 -0
- package/dist/Skeleton.js +588 -0
- package/dist/SkeletonBinary.d.ts +68 -0
- package/dist/SkeletonBinary.js +1172 -0
- package/dist/SkeletonBounds.d.ts +77 -0
- package/dist/SkeletonBounds.js +219 -0
- package/dist/SkeletonClipping.d.ts +50 -0
- package/dist/SkeletonClipping.js +326 -0
- package/dist/SkeletonData.d.ts +114 -0
- package/dist/SkeletonData.js +190 -0
- package/dist/SkeletonJson.d.ts +53 -0
- package/dist/SkeletonJson.js +1027 -0
- package/dist/Skin.d.ts +71 -0
- package/dist/Skin.js +201 -0
- package/dist/Slot.d.ts +69 -0
- package/dist/Slot.js +93 -0
- package/dist/SlotData.d.ts +57 -0
- package/dist/SlotData.js +64 -0
- package/dist/Texture.d.ts +69 -0
- package/dist/Texture.js +73 -0
- package/dist/TextureAtlas.d.ts +68 -0
- package/dist/TextureAtlas.js +267 -0
- package/dist/TransformConstraint.d.ts +60 -0
- package/dist/TransformConstraint.js +247 -0
- package/dist/TransformConstraintData.d.ts +62 -0
- package/dist/TransformConstraintData.js +69 -0
- package/dist/Triangulator.d.ts +43 -0
- package/dist/Triangulator.js +244 -0
- package/dist/Updatable.d.ts +37 -0
- package/dist/Updatable.js +30 -0
- package/dist/Utils.d.ts +168 -0
- package/dist/Utils.js +404 -0
- package/dist/attachments/Attachment.d.ts +72 -0
- package/dist/attachments/Attachment.js +147 -0
- package/dist/attachments/AttachmentLoader.d.ts +54 -0
- package/dist/attachments/AttachmentLoader.js +30 -0
- package/dist/attachments/BoundingBoxAttachment.d.ts +40 -0
- package/dist/attachments/BoundingBoxAttachment.js +48 -0
- package/dist/attachments/ClippingAttachment.d.ts +42 -0
- package/dist/attachments/ClippingAttachment.js +51 -0
- package/dist/attachments/HasTextureRegion.d.ts +44 -0
- package/dist/attachments/HasTextureRegion.js +30 -0
- package/dist/attachments/MeshAttachment.d.ts +79 -0
- package/dist/attachments/MeshAttachment.js +188 -0
- package/dist/attachments/PathAttachment.d.ts +47 -0
- package/dist/attachments/PathAttachment.js +59 -0
- package/dist/attachments/PointAttachment.d.ts +48 -0
- package/dist/attachments/PointAttachment.js +66 -0
- package/dist/attachments/RegionAttachment.d.ts +110 -0
- package/dist/attachments/RegionAttachment.js +213 -0
- package/dist/attachments/Sequence.d.ts +55 -0
- package/dist/attachments/Sequence.js +91 -0
- package/dist/attachments/index.d.ts +8 -0
- package/dist/attachments/index.js +9 -0
- package/dist/iife/spine-core.js +10708 -0
- package/dist/iife/spine-core.js.map +7 -0
- package/dist/iife/spine-core.min.js +2 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.js +40 -0
- package/dist/polyfills.d.ts +29 -0
- package/dist/polyfills.js +39 -0
- package/package.json +1 -1
|
@@ -0,0 +1,190 @@
|
|
|
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 the setup pose and all of the stateless data for a skeleton.
|
|
30
|
+
*
|
|
31
|
+
* See [Data objects](http://esotericsoftware.com/spine-runtime-architecture#Data-objects) in the Spine Runtimes
|
|
32
|
+
* Guide. */
|
|
33
|
+
export class SkeletonData {
|
|
34
|
+
constructor() {
|
|
35
|
+
/** The skeleton's name, which by default is the name of the skeleton data file, if possible. May be null. */
|
|
36
|
+
this.name = null;
|
|
37
|
+
/** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
|
|
38
|
+
this.bones = new Array(); // Ordered parents first.
|
|
39
|
+
/** The skeleton's slots. */
|
|
40
|
+
this.slots = new Array(); // Setup pose draw order.
|
|
41
|
+
this.skins = new Array();
|
|
42
|
+
/** The skeleton's default skin. By default this skin contains all attachments that were not in a skin in Spine.
|
|
43
|
+
*
|
|
44
|
+
* See {@link Skeleton#getAttachmentByName()}.
|
|
45
|
+
* May be null. */
|
|
46
|
+
this.defaultSkin = null;
|
|
47
|
+
/** The skeleton's events. */
|
|
48
|
+
this.events = new Array();
|
|
49
|
+
/** The skeleton's animations. */
|
|
50
|
+
this.animations = new Array();
|
|
51
|
+
/** The skeleton's IK constraints. */
|
|
52
|
+
this.ikConstraints = new Array();
|
|
53
|
+
/** The skeleton's transform constraints. */
|
|
54
|
+
this.transformConstraints = new Array();
|
|
55
|
+
/** The skeleton's path constraints. */
|
|
56
|
+
this.pathConstraints = new Array();
|
|
57
|
+
/** The X coordinate of the skeleton's axis aligned bounding box in the setup pose. */
|
|
58
|
+
this.x = 0;
|
|
59
|
+
/** The Y coordinate of the skeleton's axis aligned bounding box in the setup pose. */
|
|
60
|
+
this.y = 0;
|
|
61
|
+
/** The width of the skeleton's axis aligned bounding box in the setup pose. */
|
|
62
|
+
this.width = 0;
|
|
63
|
+
/** The height of the skeleton's axis aligned bounding box in the setup pose. */
|
|
64
|
+
this.height = 0;
|
|
65
|
+
/** The Spine version used to export the skeleton data, or null. */
|
|
66
|
+
this.version = null;
|
|
67
|
+
/** The skeleton data hash. This value will change if any of the skeleton data has changed. May be null. */
|
|
68
|
+
this.hash = null;
|
|
69
|
+
// Nonessential
|
|
70
|
+
/** The dopesheet FPS in Spine. Available only when nonessential data was exported. */
|
|
71
|
+
this.fps = 0;
|
|
72
|
+
/** The path to the images directory as defined in Spine. Available only when nonessential data was exported. May be null. */
|
|
73
|
+
this.imagesPath = null;
|
|
74
|
+
/** The path to the audio directory as defined in Spine. Available only when nonessential data was exported. May be null. */
|
|
75
|
+
this.audioPath = null;
|
|
76
|
+
}
|
|
77
|
+
/** Finds a bone by comparing each bone's name. It is more efficient to cache the results of this method than to call it
|
|
78
|
+
* multiple times.
|
|
79
|
+
* @returns May be null. */
|
|
80
|
+
findBone(boneName) {
|
|
81
|
+
if (!boneName)
|
|
82
|
+
throw new Error("boneName cannot be null.");
|
|
83
|
+
let bones = this.bones;
|
|
84
|
+
for (let i = 0, n = bones.length; i < n; i++) {
|
|
85
|
+
let bone = bones[i];
|
|
86
|
+
if (bone.name == boneName)
|
|
87
|
+
return bone;
|
|
88
|
+
}
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
/** Finds a slot by comparing each slot's name. It is more efficient to cache the results of this method than to call it
|
|
92
|
+
* multiple times.
|
|
93
|
+
* @returns May be null. */
|
|
94
|
+
findSlot(slotName) {
|
|
95
|
+
if (!slotName)
|
|
96
|
+
throw new Error("slotName cannot be null.");
|
|
97
|
+
let slots = this.slots;
|
|
98
|
+
for (let i = 0, n = slots.length; i < n; i++) {
|
|
99
|
+
let slot = slots[i];
|
|
100
|
+
if (slot.name == slotName)
|
|
101
|
+
return slot;
|
|
102
|
+
}
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
/** Finds a skin by comparing each skin's name. It is more efficient to cache the results of this method than to call it
|
|
106
|
+
* multiple times.
|
|
107
|
+
* @returns May be null. */
|
|
108
|
+
findSkin(skinName) {
|
|
109
|
+
if (!skinName)
|
|
110
|
+
throw new Error("skinName cannot be null.");
|
|
111
|
+
let skins = this.skins;
|
|
112
|
+
for (let i = 0, n = skins.length; i < n; i++) {
|
|
113
|
+
let skin = skins[i];
|
|
114
|
+
if (skin.name == skinName)
|
|
115
|
+
return skin;
|
|
116
|
+
}
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
/** Finds an event by comparing each events's name. It is more efficient to cache the results of this method than to call it
|
|
120
|
+
* multiple times.
|
|
121
|
+
* @returns May be null. */
|
|
122
|
+
findEvent(eventDataName) {
|
|
123
|
+
if (!eventDataName)
|
|
124
|
+
throw new Error("eventDataName cannot be null.");
|
|
125
|
+
let events = this.events;
|
|
126
|
+
for (let i = 0, n = events.length; i < n; i++) {
|
|
127
|
+
let event = events[i];
|
|
128
|
+
if (event.name == eventDataName)
|
|
129
|
+
return event;
|
|
130
|
+
}
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
/** Finds an animation by comparing each animation's name. It is more efficient to cache the results of this method than to
|
|
134
|
+
* call it multiple times.
|
|
135
|
+
* @returns May be null. */
|
|
136
|
+
findAnimation(animationName) {
|
|
137
|
+
if (!animationName)
|
|
138
|
+
throw new Error("animationName cannot be null.");
|
|
139
|
+
let animations = this.animations;
|
|
140
|
+
for (let i = 0, n = animations.length; i < n; i++) {
|
|
141
|
+
let animation = animations[i];
|
|
142
|
+
if (animation.name == animationName)
|
|
143
|
+
return animation;
|
|
144
|
+
}
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
/** Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results of this method
|
|
148
|
+
* than to call it multiple times.
|
|
149
|
+
* @return May be null. */
|
|
150
|
+
findIkConstraint(constraintName) {
|
|
151
|
+
if (!constraintName)
|
|
152
|
+
throw new Error("constraintName cannot be null.");
|
|
153
|
+
let ikConstraints = this.ikConstraints;
|
|
154
|
+
for (let i = 0, n = ikConstraints.length; i < n; i++) {
|
|
155
|
+
let constraint = ikConstraints[i];
|
|
156
|
+
if (constraint.name == constraintName)
|
|
157
|
+
return constraint;
|
|
158
|
+
}
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
/** Finds a transform constraint by comparing each transform constraint's name. It is more efficient to cache the results of
|
|
162
|
+
* this method than to call it multiple times.
|
|
163
|
+
* @return May be null. */
|
|
164
|
+
findTransformConstraint(constraintName) {
|
|
165
|
+
if (!constraintName)
|
|
166
|
+
throw new Error("constraintName cannot be null.");
|
|
167
|
+
let transformConstraints = this.transformConstraints;
|
|
168
|
+
for (let i = 0, n = transformConstraints.length; i < n; i++) {
|
|
169
|
+
let constraint = transformConstraints[i];
|
|
170
|
+
if (constraint.name == constraintName)
|
|
171
|
+
return constraint;
|
|
172
|
+
}
|
|
173
|
+
return null;
|
|
174
|
+
}
|
|
175
|
+
/** Finds a path constraint by comparing each path constraint's name. It is more efficient to cache the results of this method
|
|
176
|
+
* than to call it multiple times.
|
|
177
|
+
* @return May be null. */
|
|
178
|
+
findPathConstraint(constraintName) {
|
|
179
|
+
if (!constraintName)
|
|
180
|
+
throw new Error("constraintName cannot be null.");
|
|
181
|
+
let pathConstraints = this.pathConstraints;
|
|
182
|
+
for (let i = 0, n = pathConstraints.length; i < n; i++) {
|
|
183
|
+
let constraint = pathConstraints[i];
|
|
184
|
+
if (constraint.name == constraintName)
|
|
185
|
+
return constraint;
|
|
186
|
+
}
|
|
187
|
+
return null;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2tlbGV0b25EYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL1NrZWxldG9uRGF0YS50cyJdLCJ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3BDLElBQUksVUFBVSxDQUFDLElBQUksSUFBSSxjQUFjO2dCQUFFLE9BQU8sVUFBVSxDQUFDO1NBQ3pEO1FBQ0QsT0FBTyxJQUFJLENBQUM7SUFDYixDQUFDO0NBQ0QifQ==
|
|
@@ -0,0 +1,53 @@
|
|
|
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 { VertexAttachment, Attachment } from "./attachments/Attachment";
|
|
30
|
+
import { AttachmentLoader } from "./attachments/AttachmentLoader";
|
|
31
|
+
import { SkeletonData } from "./SkeletonData";
|
|
32
|
+
import { Skin } from "./Skin";
|
|
33
|
+
import { Sequence } from "./attachments/Sequence";
|
|
34
|
+
/** Loads skeleton data in the Spine JSON format.
|
|
35
|
+
*
|
|
36
|
+
* See [Spine JSON format](http://esotericsoftware.com/spine-json-format) and
|
|
37
|
+
* [JSON and binary data](http://esotericsoftware.com/spine-loading-skeleton-data#JSON-and-binary-data) in the Spine
|
|
38
|
+
* Runtimes Guide. */
|
|
39
|
+
export declare class SkeletonJson {
|
|
40
|
+
attachmentLoader: AttachmentLoader;
|
|
41
|
+
/** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
|
|
42
|
+
* runtime than were used in Spine.
|
|
43
|
+
*
|
|
44
|
+
* See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
|
|
45
|
+
scale: number;
|
|
46
|
+
private linkedMeshes;
|
|
47
|
+
constructor(attachmentLoader: AttachmentLoader);
|
|
48
|
+
readSkeletonData(json: string | any): SkeletonData;
|
|
49
|
+
readAttachment(map: any, skin: Skin, slotIndex: number, name: string, skeletonData: SkeletonData): Attachment | null;
|
|
50
|
+
readSequence(map: any): Sequence | null;
|
|
51
|
+
readVertices(map: any, attachment: VertexAttachment, verticesLength: number): void;
|
|
52
|
+
readAnimation(map: any, name: string, skeletonData: SkeletonData): void;
|
|
53
|
+
}
|