@esotericsoftware/spine-core 4.0.11 → 4.0.15

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 (92) hide show
  1. package/dist/Animation.d.ts +363 -363
  2. package/dist/Animation.js +1949 -1949
  3. package/dist/AnimationState.d.ts +396 -396
  4. package/dist/AnimationState.js +958 -958
  5. package/dist/AnimationStateData.d.ts +51 -51
  6. package/dist/AnimationStateData.js +69 -69
  7. package/dist/AssetManagerBase.d.ts +72 -72
  8. package/dist/AssetManagerBase.js +303 -303
  9. package/dist/AtlasAttachmentLoader.d.ts +51 -51
  10. package/dist/AtlasAttachmentLoader.js +73 -73
  11. package/dist/Bone.d.ts +138 -138
  12. package/dist/Bone.js +333 -333
  13. package/dist/BoneData.d.ts +72 -72
  14. package/dist/BoneData.js +73 -73
  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 +41 -41
  19. package/dist/EventData.d.ts +41 -41
  20. package/dist/EventData.js +36 -36
  21. package/dist/IkConstraint.d.ts +64 -64
  22. package/dist/IkConstraint.js +284 -284
  23. package/dist/IkConstraintData.d.ts +54 -54
  24. package/dist/IkConstraintData.js +53 -53
  25. package/dist/PathConstraint.d.ts +71 -71
  26. package/dist/PathConstraint.js +468 -468
  27. package/dist/PathConstraintData.d.ts +80 -80
  28. package/dist/PathConstraintData.js +69 -69
  29. package/dist/Skeleton.d.ts +158 -158
  30. package/dist/Skeleton.js +570 -570
  31. package/dist/SkeletonBinary.d.ts +67 -67
  32. package/dist/SkeletonBinary.js +1093 -1093
  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 +166 -166
  39. package/dist/SkeletonJson.d.ts +51 -51
  40. package/dist/SkeletonJson.js +915 -915
  41. package/dist/Skin.d.ts +71 -71
  42. package/dist/Skin.js +200 -200
  43. package/dist/Slot.d.ts +72 -72
  44. package/dist/Slot.js +93 -93
  45. package/dist/SlotData.d.ts +57 -57
  46. package/dist/SlotData.js +54 -54
  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 +245 -245
  51. package/dist/TransformConstraint.d.ts +60 -60
  52. package/dist/TransformConstraint.js +239 -239
  53. package/dist/TransformConstraintData.d.ts +60 -60
  54. package/dist/TransformConstraintData.js +59 -59
  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 +71 -71
  64. package/dist/attachments/Attachment.js +139 -139
  65. package/dist/attachments/AttachmentLoader.d.ts +53 -53
  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 +47 -47
  71. package/dist/attachments/MeshAttachment.d.ts +74 -74
  72. package/dist/attachments/MeshAttachment.js +159 -159
  73. package/dist/attachments/PathAttachment.d.ts +47 -47
  74. package/dist/attachments/PathAttachment.js +56 -56
  75. package/dist/attachments/PointAttachment.d.ts +48 -48
  76. package/dist/attachments/PointAttachment.js +62 -62
  77. package/dist/attachments/RegionAttachment.d.ts +108 -108
  78. package/dist/attachments/RegionAttachment.js +196 -196
  79. package/dist/attachments/index.d.ts +8 -8
  80. package/dist/attachments/index.js +8 -8
  81. package/dist/iife/spine-core.js +3 -3
  82. package/dist/iife/spine-core.js.map +2 -2
  83. package/dist/iife/spine-core.min.js +1 -1
  84. package/dist/index.d.ts +42 -42
  85. package/dist/index.js +42 -42
  86. package/dist/polyfills.d.ts +29 -29
  87. package/dist/polyfills.js +38 -38
  88. package/dist/vertexeffects/JitterEffect.d.ts +39 -39
  89. package/dist/vertexeffects/JitterEffect.js +45 -45
  90. package/dist/vertexeffects/SwirlEffect.d.ts +44 -44
  91. package/dist/vertexeffects/SwirlEffect.js +60 -60
  92. package/package.json +32 -32
@@ -1,57 +1,57 @@
1
- /******************************************************************************
2
- * Spine Runtimes License Agreement
3
- * Last updated January 1, 2020. Replaces all prior versions.
4
- *
5
- * Copyright (c) 2013-2020, 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
- /** If true, the start and end knots are connected. */
38
- this.closed = false;
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
- this.constantSpeed = false;
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
- this.color = new Color(1, 1, 1, 1);
45
- }
46
- copy() {
47
- let copy = new PathAttachment(this.name);
48
- this.copyTo(copy);
49
- copy.lengths = new Array(this.lengths.length);
50
- Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);
51
- copy.closed = closed;
52
- copy.constantSpeed = this.constantSpeed;
53
- copy.color.setFromColor(this.color);
54
- return copy;
55
- }
56
- }
1
+ /******************************************************************************
2
+ * Spine Runtimes License Agreement
3
+ * Last updated January 1, 2020. Replaces all prior versions.
4
+ *
5
+ * Copyright (c) 2013-2020, 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
+ /** If true, the start and end knots are connected. */
38
+ this.closed = false;
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
+ this.constantSpeed = false;
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
+ this.color = new Color(1, 1, 1, 1);
45
+ }
46
+ copy() {
47
+ let copy = new PathAttachment(this.name);
48
+ this.copyTo(copy);
49
+ copy.lengths = new Array(this.lengths.length);
50
+ Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);
51
+ copy.closed = closed;
52
+ copy.constantSpeed = this.constantSpeed;
53
+ copy.color.setFromColor(this.color);
54
+ return copy;
55
+ }
56
+ }
57
57
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUGF0aEF0dGFjaG1lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYXR0YWNobWVudHMvUGF0aEF0dGFjaG1lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsrRUEyQitFO0FBRS9FLE9BQU8sRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLE1BQU0sVUFBVSxDQUFDO0FBQ3hDLE9BQU8sRUFBRSxnQkFBZ0IsRUFBYyxNQUFNLGNBQWMsQ0FBQztBQUU1RDs7OEdBRThHO0FBQzlHLE1BQU0sT0FBTyxjQUFlLFNBQVEsZ0JBQWdCO0lBZ0JuRCxZQUFhLElBQVk7UUFDeEIsS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFDO1FBWmIsc0RBQXNEO1FBQ3RELFdBQU0sR0FBRyxLQUFLLENBQUM7UUFFZjttR0FDMkY7UUFDM0Ysa0JBQWEsR0FBRyxLQUFLLENBQUM7UUFFdEI7a0NBQzBCO1FBQzFCLFVBQUssR0FBRyxJQUFJLEtBQUssQ0FBQyxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQztJQUk5QixDQUFDO0lBRUQsSUFBSTtRQUNILElBQUksSUFBSSxHQUFHLElBQUksY0FBYyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUN6QyxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxDQUFDO1FBQ2xCLElBQUksQ0FBQyxPQUFPLEdBQUcsSUFBSSxLQUFLLENBQVMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUN0RCxLQUFLLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxPQUFPLEVBQUUsQ0FBQyxFQUFFLElBQUksQ0FBQyxPQUFPLEVBQUUsQ0FBQyxFQUFFLElBQUksQ0FBQyxPQUFPLENBQUMsTUFBTSxDQUFDLENBQUM7UUFDdkUsSUFBSSxDQUFDLE1BQU0sR0FBRyxNQUFNLENBQUM7UUFDckIsSUFBSSxDQUFDLGFBQWEsR0FBRyxJQUFJLENBQUMsYUFBYSxDQUFDO1FBQ3hDLElBQUksQ0FBQyxLQUFLLENBQUMsWUFBWSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUNwQyxPQUFPLElBQUksQ0FBQztJQUNiLENBQUM7Q0FDRCJ9
@@ -1,48 +1,48 @@
1
- /******************************************************************************
2
- * Spine Runtimes License Agreement
3
- * Last updated January 1, 2020. Replaces all prior versions.
4
- *
5
- * Copyright (c) 2013-2020, 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 January 1, 2020. Replaces all prior versions.
4
+ *
5
+ * Copyright (c) 2013-2020, 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,63 @@
1
- /******************************************************************************
2
- * Spine Runtimes License Agreement
3
- * Last updated January 1, 2020. Replaces all prior versions.
4
- *
5
- * Copyright (c) 2013-2020, 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
- /** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
40
- * are not usually rendered at runtime. */
41
- this.color = new Color(0.38, 0.94, 0, 1);
42
- }
43
- computeWorldPosition(bone, point) {
44
- point.x = this.x * bone.a + this.y * bone.b + bone.worldX;
45
- point.y = this.x * bone.c + this.y * bone.d + bone.worldY;
46
- return point;
47
- }
48
- computeWorldRotation(bone) {
49
- let cos = MathUtils.cosDeg(this.rotation), sin = MathUtils.sinDeg(this.rotation);
50
- let x = cos * bone.a + sin * bone.b;
51
- let y = cos * bone.c + sin * bone.d;
52
- return Math.atan2(y, x) * MathUtils.radDeg;
53
- }
54
- copy() {
55
- let copy = new PointAttachment(this.name);
56
- copy.x = this.x;
57
- copy.y = this.y;
58
- copy.rotation = this.rotation;
59
- copy.color.setFromColor(this.color);
60
- return copy;
61
- }
62
- }
1
+ /******************************************************************************
2
+ * Spine Runtimes License Agreement
3
+ * Last updated January 1, 2020. Replaces all prior versions.
4
+ *
5
+ * Copyright (c) 2013-2020, 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
+ /** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
40
+ * are not usually rendered at runtime. */
41
+ this.color = new Color(0.38, 0.94, 0, 1);
42
+ }
43
+ computeWorldPosition(bone, point) {
44
+ point.x = this.x * bone.a + this.y * bone.b + bone.worldX;
45
+ point.y = this.x * bone.c + this.y * bone.d + bone.worldY;
46
+ return point;
47
+ }
48
+ computeWorldRotation(bone) {
49
+ let cos = MathUtils.cosDeg(this.rotation), sin = MathUtils.sinDeg(this.rotation);
50
+ let x = cos * bone.a + sin * bone.b;
51
+ let y = cos * bone.c + sin * bone.d;
52
+ return Math.atan2(y, x) * MathUtils.radDeg;
53
+ }
54
+ copy() {
55
+ let copy = new PointAttachment(this.name);
56
+ copy.x = this.x;
57
+ copy.y = this.y;
58
+ copy.rotation = this.rotation;
59
+ copy.color.setFromColor(this.color);
60
+ return copy;
61
+ }
62
+ }
63
63
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUG9pbnRBdHRhY2htZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2F0dGFjaG1lbnRzL1BvaW50QXR0YWNobWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OytFQTJCK0U7QUFHL0UsT0FBTyxFQUFFLEtBQUssRUFBVyxTQUFTLEVBQUUsTUFBTSxVQUFVLENBQUM7QUFDckQsT0FBTyxFQUFFLGdCQUFnQixFQUFjLE1BQU0sY0FBYyxDQUFDO0FBRTVEOzs7OzJHQUkyRztBQUMzRyxNQUFNLE9BQU8sZUFBZ0IsU0FBUSxnQkFBZ0I7SUFPcEQsWUFBYSxJQUFZO1FBQ3hCLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUxiO2tEQUMwQztRQUMxQyxVQUFLLEdBQUcsSUFBSSxLQUFLLENBQUMsSUFBSSxFQUFFLElBQUksRUFBRSxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7SUFJcEMsQ0FBQztJQUVELG9CQUFvQixDQUFFLElBQVUsRUFBRSxLQUFjO1FBQy9DLEtBQUssQ0FBQyxDQUFDLEdBQUcsSUFBSSxDQUFDLENBQUMsR0FBRyxJQUFJLENBQUMsQ0FBQyxHQUFHLElBQUksQ0FBQyxDQUFDLEdBQUcsSUFBSSxDQUFDLENBQUMsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDO1FBQzFELEtBQUssQ0FBQyxDQUFDLEdBQUcsSUFBSSxDQUFDLENBQUMsR0FBRyxJQUFJLENBQUMsQ0FBQyxHQUFHLElBQUksQ0FBQyxDQUFDLEdBQUcsSUFBSSxDQUFDLENBQUMsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDO1FBQzFELE9BQU8sS0FBSyxDQUFDO0lBQ2QsQ0FBQztJQUVELG9CQUFvQixDQUFFLElBQVU7UUFDL0IsSUFBSSxHQUFHLEdBQUcsU0FBUyxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDLEVBQUUsR0FBRyxHQUFHLFNBQVMsQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxDQUFDO1FBQ2pGLElBQUksQ0FBQyxHQUFHLEdBQUcsR0FBRyxJQUFJLENBQUMsQ0FBQyxHQUFHLEdBQUcsR0FBRyxJQUFJLENBQUMsQ0FBQyxDQUFDO1FBQ3BDLElBQUksQ0FBQyxHQUFHLEdBQUcsR0FBRyxJQUFJLENBQUMsQ0FBQyxHQUFHLEdBQUcsR0FBRyxJQUFJLENBQUMsQ0FBQyxDQUFDO1FBQ3BDLE9BQU8sSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLEdBQUcsU0FBUyxDQUFDLE1BQU0sQ0FBQztJQUM1QyxDQUFDO0lBRUQsSUFBSTtRQUNILElBQUksSUFBSSxHQUFHLElBQUksZUFBZSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUMxQyxJQUFJLENBQUMsQ0FBQyxHQUFHLElBQUksQ0FBQyxDQUFDLENBQUM7UUFDaEIsSUFBSSxDQUFDLENBQUMsR0FBRyxJQUFJLENBQUMsQ0FBQyxDQUFDO1FBQ2hCLElBQUksQ0FBQyxRQUFRLEdBQUcsSUFBSSxDQUFDLFFBQVEsQ0FBQztRQUM5QixJQUFJLENBQUMsS0FBSyxDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUM7UUFDcEMsT0FBTyxJQUFJLENBQUM7SUFDYixDQUFDO0NBQ0QifQ==
@@ -1,108 +1,108 @@
1
- /******************************************************************************
2
- * Spine Runtimes License Agreement
3
- * Last updated January 1, 2020. Replaces all prior versions.
4
- *
5
- * Copyright (c) 2013-2020, 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 { TextureRegion } from "../Texture";
31
- import { Color, NumberArrayLike } from "../Utils";
32
- import { Attachment } from "./Attachment";
33
- /** An attachment that displays a textured quadrilateral.
34
- *
35
- * See [Region attachments](http://esotericsoftware.com/spine-regions) in the Spine User Guide. */
36
- export declare class RegionAttachment extends Attachment {
37
- /** The local x translation. */
38
- x: number;
39
- /** The local y translation. */
40
- y: number;
41
- /** The local scaleX. */
42
- scaleX: number;
43
- /** The local scaleY. */
44
- scaleY: number;
45
- /** The local rotation. */
46
- rotation: number;
47
- /** The width of the region attachment in Spine. */
48
- width: number;
49
- /** The height of the region attachment in Spine. */
50
- height: number;
51
- /** The color to tint the region attachment. */
52
- color: Color;
53
- /** The name of the texture region for this attachment. */
54
- path: string;
55
- rendererObject: any;
56
- region: TextureRegion;
57
- /** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
58
- *
59
- * See {@link #updateOffset()}. */
60
- offset: NumberArrayLike;
61
- uvs: NumberArrayLike;
62
- tempColor: Color;
63
- constructor(name: string);
64
- /** Calculates the {@link #offset} using the region settings. Must be called after changing region settings. */
65
- updateOffset(): void;
66
- setRegion(region: TextureRegion): void;
67
- /** Transforms the attachment's four vertices to world coordinates.
68
- *
69
- * See [World transforms](http://esotericsoftware.com/spine-runtime-skeletons#World-transforms) in the Spine
70
- * Runtimes Guide.
71
- * @param worldVertices The output world vertices. Must have a length >= `offset` + 8.
72
- * @param offset The `worldVertices` index to begin writing values.
73
- * @param stride The number of `worldVertices` entries between the value pairs written. */
74
- computeWorldVertices(bone: Bone, worldVertices: NumberArrayLike, offset: number, stride: number): void;
75
- copy(): Attachment;
76
- static X1: number;
77
- static Y1: number;
78
- static C1R: number;
79
- static C1G: number;
80
- static C1B: number;
81
- static C1A: number;
82
- static U1: number;
83
- static V1: number;
84
- static X2: number;
85
- static Y2: number;
86
- static C2R: number;
87
- static C2G: number;
88
- static C2B: number;
89
- static C2A: number;
90
- static U2: number;
91
- static V2: number;
92
- static X3: number;
93
- static Y3: number;
94
- static C3R: number;
95
- static C3G: number;
96
- static C3B: number;
97
- static C3A: number;
98
- static U3: number;
99
- static V3: number;
100
- static X4: number;
101
- static Y4: number;
102
- static C4R: number;
103
- static C4G: number;
104
- static C4B: number;
105
- static C4A: number;
106
- static U4: number;
107
- static V4: number;
108
- }
1
+ /******************************************************************************
2
+ * Spine Runtimes License Agreement
3
+ * Last updated January 1, 2020. Replaces all prior versions.
4
+ *
5
+ * Copyright (c) 2013-2020, 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 { TextureRegion } from "../Texture";
31
+ import { Color, NumberArrayLike } from "../Utils";
32
+ import { Attachment } from "./Attachment";
33
+ /** An attachment that displays a textured quadrilateral.
34
+ *
35
+ * See [Region attachments](http://esotericsoftware.com/spine-regions) in the Spine User Guide. */
36
+ export declare class RegionAttachment extends Attachment {
37
+ /** The local x translation. */
38
+ x: number;
39
+ /** The local y translation. */
40
+ y: number;
41
+ /** The local scaleX. */
42
+ scaleX: number;
43
+ /** The local scaleY. */
44
+ scaleY: number;
45
+ /** The local rotation. */
46
+ rotation: number;
47
+ /** The width of the region attachment in Spine. */
48
+ width: number;
49
+ /** The height of the region attachment in Spine. */
50
+ height: number;
51
+ /** The color to tint the region attachment. */
52
+ color: Color;
53
+ /** The name of the texture region for this attachment. */
54
+ path: string;
55
+ rendererObject: any;
56
+ region: TextureRegion;
57
+ /** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
58
+ *
59
+ * See {@link #updateOffset()}. */
60
+ offset: NumberArrayLike;
61
+ uvs: NumberArrayLike;
62
+ tempColor: Color;
63
+ constructor(name: string);
64
+ /** Calculates the {@link #offset} using the region settings. Must be called after changing region settings. */
65
+ updateOffset(): void;
66
+ setRegion(region: TextureRegion): void;
67
+ /** Transforms the attachment's four vertices to world coordinates.
68
+ *
69
+ * See [World transforms](http://esotericsoftware.com/spine-runtime-skeletons#World-transforms) in the Spine
70
+ * Runtimes Guide.
71
+ * @param worldVertices The output world vertices. Must have a length >= `offset` + 8.
72
+ * @param offset The `worldVertices` index to begin writing values.
73
+ * @param stride The number of `worldVertices` entries between the value pairs written. */
74
+ computeWorldVertices(bone: Bone, worldVertices: NumberArrayLike, offset: number, stride: number): void;
75
+ copy(): Attachment;
76
+ static X1: number;
77
+ static Y1: number;
78
+ static C1R: number;
79
+ static C1G: number;
80
+ static C1B: number;
81
+ static C1A: number;
82
+ static U1: number;
83
+ static V1: number;
84
+ static X2: number;
85
+ static Y2: number;
86
+ static C2R: number;
87
+ static C2G: number;
88
+ static C2B: number;
89
+ static C2A: number;
90
+ static U2: number;
91
+ static V2: number;
92
+ static X3: number;
93
+ static Y3: number;
94
+ static C3R: number;
95
+ static C3G: number;
96
+ static C3B: number;
97
+ static C3A: number;
98
+ static U3: number;
99
+ static V3: number;
100
+ static X4: number;
101
+ static Y4: number;
102
+ static C4R: number;
103
+ static C4G: number;
104
+ static C4B: number;
105
+ static C4A: number;
106
+ static U4: number;
107
+ static V4: number;
108
+ }