@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.
- package/dist/Animation.d.ts +382 -382
- package/dist/Animation.js +2058 -2031
- package/dist/AnimationState.d.ts +396 -396
- package/dist/AnimationState.js +1083 -959
- package/dist/AnimationStateData.d.ts +51 -51
- package/dist/AnimationStateData.js +72 -70
- package/dist/AssetManagerBase.d.ts +74 -72
- package/dist/AssetManagerBase.js +304 -303
- package/dist/AtlasAttachmentLoader.d.ts +53 -53
- package/dist/AtlasAttachmentLoader.js +95 -94
- package/dist/Bone.d.ts +138 -138
- package/dist/Bone.js +340 -334
- package/dist/BoneData.d.ts +72 -72
- package/dist/BoneData.js +82 -74
- package/dist/ConstraintData.d.ts +35 -35
- package/dist/ConstraintData.js +36 -36
- package/dist/Event.d.ts +44 -44
- package/dist/Event.js +49 -42
- package/dist/EventData.d.ts +41 -41
- package/dist/EventData.js +44 -37
- package/dist/IkConstraint.d.ts +64 -64
- package/dist/IkConstraint.js +291 -285
- package/dist/IkConstraintData.d.ts +54 -54
- package/dist/IkConstraintData.js +56 -54
- package/dist/PathConstraint.d.ts +71 -71
- package/dist/PathConstraint.js +475 -469
- package/dist/PathConstraintData.d.ts +80 -80
- package/dist/PathConstraintData.js +84 -70
- package/dist/Skeleton.d.ts +152 -152
- package/dist/Skeleton.js +581 -563
- package/dist/SkeletonBinary.d.ts +68 -68
- package/dist/SkeletonBinary.js +1132 -1131
- package/dist/SkeletonBounds.d.ts +77 -77
- package/dist/SkeletonBounds.js +218 -218
- package/dist/SkeletonClipping.d.ts +50 -50
- package/dist/SkeletonClipping.js +323 -323
- package/dist/SkeletonData.d.ts +114 -114
- package/dist/SkeletonData.js +190 -167
- package/dist/SkeletonJson.d.ts +53 -53
- package/dist/SkeletonJson.js +954 -953
- package/dist/Skin.d.ts +71 -71
- package/dist/Skin.js +203 -201
- package/dist/Slot.d.ts +69 -69
- package/dist/Slot.js +97 -85
- package/dist/SlotData.d.ts +57 -57
- package/dist/SlotData.js +68 -55
- package/dist/Texture.d.ts +69 -69
- package/dist/Texture.js +72 -72
- package/dist/TextureAtlas.d.ts +65 -65
- package/dist/TextureAtlas.js +267 -246
- package/dist/TransformConstraint.d.ts +60 -60
- package/dist/TransformConstraint.js +246 -240
- package/dist/TransformConstraintData.d.ts +60 -60
- package/dist/TransformConstraintData.js +62 -60
- package/dist/Triangulator.d.ts +43 -43
- package/dist/Triangulator.js +243 -243
- package/dist/Updatable.d.ts +37 -37
- package/dist/Updatable.js +29 -29
- package/dist/Utils.d.ts +168 -168
- package/dist/Utils.js +403 -403
- package/dist/VertexEffect.d.ts +35 -35
- package/dist/VertexEffect.js +29 -29
- package/dist/attachments/Attachment.d.ts +72 -72
- package/dist/attachments/Attachment.js +149 -141
- package/dist/attachments/AttachmentLoader.d.ts +54 -54
- package/dist/attachments/AttachmentLoader.js +29 -29
- package/dist/attachments/BoundingBoxAttachment.d.ts +40 -40
- package/dist/attachments/BoundingBoxAttachment.js +47 -47
- package/dist/attachments/ClippingAttachment.d.ts +42 -42
- package/dist/attachments/ClippingAttachment.js +51 -48
- package/dist/attachments/HasTextureRegion.d.ts +44 -44
- package/dist/attachments/HasTextureRegion.js +29 -29
- package/dist/attachments/MeshAttachment.d.ts +79 -79
- package/dist/attachments/MeshAttachment.js +189 -167
- package/dist/attachments/PathAttachment.d.ts +47 -47
- package/dist/attachments/PathAttachment.js +59 -57
- package/dist/attachments/PointAttachment.d.ts +48 -48
- package/dist/attachments/PointAttachment.js +66 -63
- package/dist/attachments/RegionAttachment.d.ts +111 -111
- package/dist/attachments/RegionAttachment.js +204 -199
- package/dist/attachments/Sequence.d.ts +55 -55
- package/dist/attachments/Sequence.js +90 -90
- package/dist/attachments/index.d.ts +8 -8
- package/dist/attachments/index.js +8 -8
- package/dist/iife/spine-core.js +178 -8
- package/dist/iife/spine-core.js.map +2 -2
- package/dist/iife/spine-core.min.js +2 -2
- package/dist/index.d.ts +42 -42
- package/dist/index.js +42 -42
- package/dist/polyfills.d.ts +29 -29
- package/dist/polyfills.js +38 -38
- package/dist/vertexeffects/JitterEffect.d.ts +39 -39
- package/dist/vertexeffects/JitterEffect.js +45 -45
- package/dist/vertexeffects/SwirlEffect.d.ts +44 -44
- package/dist/vertexeffects/SwirlEffect.js +60 -60
- package/package.json +32 -32
|
@@ -1,47 +1,47 @@
|
|
|
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 { Color } from "../Utils";
|
|
30
|
-
import { VertexAttachment, Attachment } from "./Attachment";
|
|
31
|
-
/** An attachment whose vertices make up a composite Bezier curve.
|
|
32
|
-
*
|
|
33
|
-
* See {@link PathConstraint} and [Paths](http://esotericsoftware.com/spine-paths) in the Spine User Guide. */
|
|
34
|
-
export declare class PathAttachment extends VertexAttachment {
|
|
35
|
-
/** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
|
|
36
|
-
lengths: Array<number>;
|
|
37
|
-
/** If true, the start and end knots are connected. */
|
|
38
|
-
closed: boolean;
|
|
39
|
-
/** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
|
|
40
|
-
* calculations are performed but calculating positions along the path is less accurate. */
|
|
41
|
-
constantSpeed: boolean;
|
|
42
|
-
/** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
|
|
43
|
-
* rendered at runtime. */
|
|
44
|
-
color: Color;
|
|
45
|
-
constructor(name: string);
|
|
46
|
-
copy(): Attachment;
|
|
47
|
-
}
|
|
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 { Color } from "../Utils";
|
|
30
|
+
import { VertexAttachment, Attachment } from "./Attachment";
|
|
31
|
+
/** An attachment whose vertices make up a composite Bezier curve.
|
|
32
|
+
*
|
|
33
|
+
* See {@link PathConstraint} and [Paths](http://esotericsoftware.com/spine-paths) in the Spine User Guide. */
|
|
34
|
+
export declare class PathAttachment extends VertexAttachment {
|
|
35
|
+
/** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
|
|
36
|
+
lengths: Array<number>;
|
|
37
|
+
/** If true, the start and end knots are connected. */
|
|
38
|
+
closed: boolean;
|
|
39
|
+
/** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
|
|
40
|
+
* calculations are performed but calculating positions along the path is less accurate. */
|
|
41
|
+
constantSpeed: boolean;
|
|
42
|
+
/** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
|
|
43
|
+
* rendered at runtime. */
|
|
44
|
+
color: Color;
|
|
45
|
+
constructor(name: string);
|
|
46
|
+
copy(): Attachment;
|
|
47
|
+
}
|
|
@@ -1,57 +1,59 @@
|
|
|
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 { Color, Utils } from "../Utils";
|
|
30
|
-
import { VertexAttachment } from "./Attachment";
|
|
31
|
-
/** An attachment whose vertices make up a composite Bezier curve.
|
|
32
|
-
*
|
|
33
|
-
* See {@link PathConstraint} and [Paths](http://esotericsoftware.com/spine-paths) in the Spine User Guide. */
|
|
34
|
-
export class PathAttachment extends VertexAttachment {
|
|
35
|
-
constructor(name) {
|
|
36
|
-
super(name);
|
|
37
|
-
/**
|
|
38
|
-
this.
|
|
39
|
-
/** If true,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
copy
|
|
50
|
-
|
|
51
|
-
copy.
|
|
52
|
-
copy.
|
|
53
|
-
copy.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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 { Color, Utils } from "../Utils";
|
|
30
|
+
import { VertexAttachment } from "./Attachment";
|
|
31
|
+
/** An attachment whose vertices make up a composite Bezier curve.
|
|
32
|
+
*
|
|
33
|
+
* See {@link PathConstraint} and [Paths](http://esotericsoftware.com/spine-paths) in the Spine User Guide. */
|
|
34
|
+
export class PathAttachment extends VertexAttachment {
|
|
35
|
+
constructor(name) {
|
|
36
|
+
super(name);
|
|
37
|
+
/** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
|
|
38
|
+
this.lengths = null;
|
|
39
|
+
/** If true, the start and end knots are connected. */
|
|
40
|
+
this.closed = false;
|
|
41
|
+
/** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
|
|
42
|
+
* calculations are performed but calculating positions along the path is less accurate. */
|
|
43
|
+
this.constantSpeed = false;
|
|
44
|
+
/** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
|
|
45
|
+
* rendered at runtime. */
|
|
46
|
+
this.color = new Color(1, 1, 1, 1);
|
|
47
|
+
}
|
|
48
|
+
copy() {
|
|
49
|
+
let copy = new PathAttachment(this.name);
|
|
50
|
+
this.copyTo(copy);
|
|
51
|
+
copy.lengths = new Array(this.lengths.length);
|
|
52
|
+
Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);
|
|
53
|
+
copy.closed = closed;
|
|
54
|
+
copy.constantSpeed = this.constantSpeed;
|
|
55
|
+
copy.color.setFromColor(this.color);
|
|
56
|
+
return copy;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUGF0aEF0dGFjaG1lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYXR0YWNobWVudHMvUGF0aEF0dGFjaG1lbnQudHMiXSwib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3ZFLElBQUksQ0FBQyxNQUFNLEdBQUcsTUFBTSxDQUFDO1FBQ3JCLElBQUksQ0FBQyxhQUFhLEdBQUcsSUFBSSxDQUFDLGFBQWEsQ0FBQztRQUN4QyxJQUFJLENBQUMsS0FBSyxDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUM7UUFDcEMsT0FBTyxJQUFJLENBQUM7SUFDYixDQUFDO0NBQ0QifQ==
|
|
@@ -1,48 +1,48 @@
|
|
|
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 { Bone } from "../Bone";
|
|
30
|
-
import { Color, Vector2 } from "../Utils";
|
|
31
|
-
import { VertexAttachment, Attachment } from "./Attachment";
|
|
32
|
-
/** An attachment which is a single point and a rotation. This can be used to spawn projectiles, particles, etc. A bone can be
|
|
33
|
-
* used in similar ways, but a PointAttachment is slightly less expensive to compute and can be hidden, shown, and placed in a
|
|
34
|
-
* skin.
|
|
35
|
-
*
|
|
36
|
-
* See [Point Attachments](http://esotericsoftware.com/spine-point-attachments) in the Spine User Guide. */
|
|
37
|
-
export declare class PointAttachment extends VertexAttachment {
|
|
38
|
-
x: number;
|
|
39
|
-
y: number;
|
|
40
|
-
rotation: number;
|
|
41
|
-
/** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
|
|
42
|
-
* are not usually rendered at runtime. */
|
|
43
|
-
color: Color;
|
|
44
|
-
constructor(name: string);
|
|
45
|
-
computeWorldPosition(bone: Bone, point: Vector2): Vector2;
|
|
46
|
-
computeWorldRotation(bone: Bone): number;
|
|
47
|
-
copy(): Attachment;
|
|
48
|
-
}
|
|
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 { Bone } from "../Bone";
|
|
30
|
+
import { Color, Vector2 } from "../Utils";
|
|
31
|
+
import { VertexAttachment, Attachment } from "./Attachment";
|
|
32
|
+
/** An attachment which is a single point and a rotation. This can be used to spawn projectiles, particles, etc. A bone can be
|
|
33
|
+
* used in similar ways, but a PointAttachment is slightly less expensive to compute and can be hidden, shown, and placed in a
|
|
34
|
+
* skin.
|
|
35
|
+
*
|
|
36
|
+
* See [Point Attachments](http://esotericsoftware.com/spine-point-attachments) in the Spine User Guide. */
|
|
37
|
+
export declare class PointAttachment extends VertexAttachment {
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
rotation: number;
|
|
41
|
+
/** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
|
|
42
|
+
* are not usually rendered at runtime. */
|
|
43
|
+
color: Color;
|
|
44
|
+
constructor(name: string);
|
|
45
|
+
computeWorldPosition(bone: Bone, point: Vector2): Vector2;
|
|
46
|
+
computeWorldRotation(bone: Bone): number;
|
|
47
|
+
copy(): Attachment;
|
|
48
|
+
}
|
|
@@ -1,63 +1,66 @@
|
|
|
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 { Color, MathUtils } from "../Utils";
|
|
30
|
-
import { VertexAttachment } from "./Attachment";
|
|
31
|
-
/** An attachment which is a single point and a rotation. This can be used to spawn projectiles, particles, etc. A bone can be
|
|
32
|
-
* used in similar ways, but a PointAttachment is slightly less expensive to compute and can be hidden, shown, and placed in a
|
|
33
|
-
* skin.
|
|
34
|
-
*
|
|
35
|
-
* See [Point Attachments](http://esotericsoftware.com/spine-point-attachments) in the Spine User Guide. */
|
|
36
|
-
export class PointAttachment extends VertexAttachment {
|
|
37
|
-
constructor(name) {
|
|
38
|
-
super(name);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
this.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
copy
|
|
59
|
-
copy.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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 { Color, MathUtils } from "../Utils";
|
|
30
|
+
import { VertexAttachment } from "./Attachment";
|
|
31
|
+
/** An attachment which is a single point and a rotation. This can be used to spawn projectiles, particles, etc. A bone can be
|
|
32
|
+
* used in similar ways, but a PointAttachment is slightly less expensive to compute and can be hidden, shown, and placed in a
|
|
33
|
+
* skin.
|
|
34
|
+
*
|
|
35
|
+
* See [Point Attachments](http://esotericsoftware.com/spine-point-attachments) in the Spine User Guide. */
|
|
36
|
+
export class PointAttachment extends VertexAttachment {
|
|
37
|
+
constructor(name) {
|
|
38
|
+
super(name);
|
|
39
|
+
this.x = 0;
|
|
40
|
+
this.y = 0;
|
|
41
|
+
this.rotation = 0;
|
|
42
|
+
/** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
|
|
43
|
+
* are not usually rendered at runtime. */
|
|
44
|
+
this.color = new Color(0.38, 0.94, 0, 1);
|
|
45
|
+
}
|
|
46
|
+
computeWorldPosition(bone, point) {
|
|
47
|
+
point.x = this.x * bone.a + this.y * bone.b + bone.worldX;
|
|
48
|
+
point.y = this.x * bone.c + this.y * bone.d + bone.worldY;
|
|
49
|
+
return point;
|
|
50
|
+
}
|
|
51
|
+
computeWorldRotation(bone) {
|
|
52
|
+
let cos = MathUtils.cosDeg(this.rotation), sin = MathUtils.sinDeg(this.rotation);
|
|
53
|
+
let x = cos * bone.a + sin * bone.b;
|
|
54
|
+
let y = cos * bone.c + sin * bone.d;
|
|
55
|
+
return Math.atan2(y, x) * MathUtils.radDeg;
|
|
56
|
+
}
|
|
57
|
+
copy() {
|
|
58
|
+
let copy = new PointAttachment(this.name);
|
|
59
|
+
copy.x = this.x;
|
|
60
|
+
copy.y = this.y;
|
|
61
|
+
copy.rotation = this.rotation;
|
|
62
|
+
copy.color.setFromColor(this.color);
|
|
63
|
+
return copy;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUG9pbnRBdHRhY2htZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2F0dGFjaG1lbnRzL1BvaW50QXR0YWNobWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OytFQTJCK0U7QUFHL0UsT0FBTyxFQUFFLEtBQUssRUFBVyxTQUFTLEVBQUUsTUFBTSxVQUFVLENBQUM7QUFDckQsT0FBTyxFQUFFLGdCQUFnQixFQUFjLE1BQU0sY0FBYyxDQUFDO0FBRTVEOzs7OzJHQUkyRztBQUMzRyxNQUFNLE9BQU8sZUFBZ0IsU0FBUSxnQkFBZ0I7SUFTcEQsWUFBYSxJQUFZO1FBQ3hCLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQztRQVRiLE1BQUMsR0FBVyxDQUFDLENBQUM7UUFDZCxNQUFDLEdBQVcsQ0FBQyxDQUFDO1FBQ2QsYUFBUSxHQUFXLENBQUMsQ0FBQztRQUVyQjtrREFDMEM7UUFDMUMsVUFBSyxHQUFHLElBQUksS0FBSyxDQUFDLElBQUksRUFBRSxJQUFJLEVBQUUsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDO0lBSXBDLENBQUM7SUFFRCxvQkFBb0IsQ0FBRSxJQUFVLEVBQUUsS0FBYztRQUMvQyxLQUFLLENBQUMsQ0FBQyxHQUFHLElBQUksQ0FBQyxDQUFDLEdBQUcs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