@esotericsoftware/spine-core 4.1.25 → 4.1.26

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 (90) hide show
  1. package/dist/Animation.d.ts +382 -0
  2. package/dist/Animation.js +2052 -0
  3. package/dist/AnimationState.d.ts +398 -0
  4. package/dist/AnimationState.js +1096 -0
  5. package/dist/AnimationStateData.d.ts +51 -0
  6. package/dist/AnimationStateData.js +70 -0
  7. package/dist/AssetManagerBase.d.ts +75 -0
  8. package/dist/AssetManagerBase.js +320 -0
  9. package/dist/AtlasAttachmentLoader.d.ts +53 -0
  10. package/dist/AtlasAttachmentLoader.js +95 -0
  11. package/dist/Bone.d.ts +138 -0
  12. package/dist/Bone.js +336 -0
  13. package/dist/BoneData.d.ts +72 -0
  14. package/dist/BoneData.js +80 -0
  15. package/dist/ConstraintData.d.ts +35 -0
  16. package/dist/ConstraintData.js +37 -0
  17. package/dist/Event.d.ts +44 -0
  18. package/dist/Event.js +48 -0
  19. package/dist/EventData.d.ts +41 -0
  20. package/dist/EventData.js +43 -0
  21. package/dist/IkConstraint.d.ts +64 -0
  22. package/dist/IkConstraint.js +296 -0
  23. package/dist/IkConstraintData.d.ts +56 -0
  24. package/dist/IkConstraintData.js +63 -0
  25. package/dist/PathConstraint.d.ts +71 -0
  26. package/dist/PathConstraint.js +476 -0
  27. package/dist/PathConstraintData.d.ts +82 -0
  28. package/dist/PathConstraintData.js +91 -0
  29. package/dist/Skeleton.d.ts +163 -0
  30. package/dist/Skeleton.js +588 -0
  31. package/dist/SkeletonBinary.d.ts +68 -0
  32. package/dist/SkeletonBinary.js +1172 -0
  33. package/dist/SkeletonBounds.d.ts +77 -0
  34. package/dist/SkeletonBounds.js +219 -0
  35. package/dist/SkeletonClipping.d.ts +50 -0
  36. package/dist/SkeletonClipping.js +326 -0
  37. package/dist/SkeletonData.d.ts +114 -0
  38. package/dist/SkeletonData.js +190 -0
  39. package/dist/SkeletonJson.d.ts +53 -0
  40. package/dist/SkeletonJson.js +1027 -0
  41. package/dist/Skin.d.ts +71 -0
  42. package/dist/Skin.js +201 -0
  43. package/dist/Slot.d.ts +69 -0
  44. package/dist/Slot.js +93 -0
  45. package/dist/SlotData.d.ts +57 -0
  46. package/dist/SlotData.js +64 -0
  47. package/dist/Texture.d.ts +69 -0
  48. package/dist/Texture.js +73 -0
  49. package/dist/TextureAtlas.d.ts +67 -0
  50. package/dist/TextureAtlas.js +263 -0
  51. package/dist/TransformConstraint.d.ts +60 -0
  52. package/dist/TransformConstraint.js +247 -0
  53. package/dist/TransformConstraintData.d.ts +62 -0
  54. package/dist/TransformConstraintData.js +69 -0
  55. package/dist/Triangulator.d.ts +43 -0
  56. package/dist/Triangulator.js +244 -0
  57. package/dist/Updatable.d.ts +37 -0
  58. package/dist/Updatable.js +30 -0
  59. package/dist/Utils.d.ts +168 -0
  60. package/dist/Utils.js +404 -0
  61. package/dist/attachments/Attachment.d.ts +72 -0
  62. package/dist/attachments/Attachment.js +147 -0
  63. package/dist/attachments/AttachmentLoader.d.ts +54 -0
  64. package/dist/attachments/AttachmentLoader.js +30 -0
  65. package/dist/attachments/BoundingBoxAttachment.d.ts +40 -0
  66. package/dist/attachments/BoundingBoxAttachment.js +48 -0
  67. package/dist/attachments/ClippingAttachment.d.ts +42 -0
  68. package/dist/attachments/ClippingAttachment.js +51 -0
  69. package/dist/attachments/HasTextureRegion.d.ts +44 -0
  70. package/dist/attachments/HasTextureRegion.js +30 -0
  71. package/dist/attachments/MeshAttachment.d.ts +79 -0
  72. package/dist/attachments/MeshAttachment.js +188 -0
  73. package/dist/attachments/PathAttachment.d.ts +47 -0
  74. package/dist/attachments/PathAttachment.js +59 -0
  75. package/dist/attachments/PointAttachment.d.ts +48 -0
  76. package/dist/attachments/PointAttachment.js +66 -0
  77. package/dist/attachments/RegionAttachment.d.ts +111 -0
  78. package/dist/attachments/RegionAttachment.js +215 -0
  79. package/dist/attachments/Sequence.d.ts +55 -0
  80. package/dist/attachments/Sequence.js +91 -0
  81. package/dist/attachments/index.d.ts +8 -0
  82. package/dist/attachments/index.js +9 -0
  83. package/dist/iife/spine-core.js +10703 -0
  84. package/dist/iife/spine-core.js.map +7 -0
  85. package/dist/iife/spine-core.min.js +2 -0
  86. package/dist/index.d.ts +39 -0
  87. package/dist/index.js +40 -0
  88. package/dist/polyfills.d.ts +29 -0
  89. package/dist/polyfills.js +39 -0
  90. package/package.json +1 -1
@@ -0,0 +1,54 @@
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 { Skin } from "../Skin";
30
+ import { BoundingBoxAttachment } from "./BoundingBoxAttachment";
31
+ import { ClippingAttachment } from "./ClippingAttachment";
32
+ import { MeshAttachment } from "./MeshAttachment";
33
+ import { PathAttachment } from "./PathAttachment";
34
+ import { PointAttachment } from "./PointAttachment";
35
+ import { RegionAttachment } from "./RegionAttachment";
36
+ import { Sequence } from "./Sequence";
37
+ /** The interface which can be implemented to customize creating and populating attachments.
38
+ *
39
+ * See [Loading skeleton data](http://esotericsoftware.com/spine-loading-skeleton-data#AttachmentLoader) in the Spine
40
+ * Runtimes Guide. */
41
+ export interface AttachmentLoader {
42
+ /** @return May be null to not load an attachment. */
43
+ newRegionAttachment(skin: Skin, name: string, path: string, sequence: Sequence | null): RegionAttachment;
44
+ /** @return May be null to not load an attachment. */
45
+ newMeshAttachment(skin: Skin, name: string, path: string, sequence: Sequence | null): MeshAttachment;
46
+ /** @return May be null to not load an attachment. */
47
+ newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment;
48
+ /** @return May be null to not load an attachment */
49
+ newPathAttachment(skin: Skin, name: string): PathAttachment;
50
+ /** @return May be null to not load an attachment */
51
+ newPointAttachment(skin: Skin, name: string): PointAttachment;
52
+ /** @return May be null to not load an attachment */
53
+ newClippingAttachment(skin: Skin, name: string): ClippingAttachment;
54
+ }
@@ -0,0 +1,30 @@
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
+ export {};
30
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXR0YWNobWVudExvYWRlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hdHRhY2htZW50cy9BdHRhY2htZW50TG9hZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7K0VBMkIrRSJ9
@@ -0,0 +1,40 @@
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 with vertices that make up a polygon. Can be used for hit detection, creating physics bodies, spawning particle
32
+ * effects, and more.
33
+ *
34
+ * See {@link SkeletonBounds} and [Bounding Boxes](http://esotericsoftware.com/spine-bounding-boxes) in the Spine User
35
+ * Guide. */
36
+ export declare class BoundingBoxAttachment extends VertexAttachment {
37
+ color: Color;
38
+ constructor(name: string);
39
+ copy(): Attachment;
40
+ }
@@ -0,0 +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 { Color } from "../Utils";
30
+ import { VertexAttachment } from "./Attachment";
31
+ /** An attachment with vertices that make up a polygon. Can be used for hit detection, creating physics bodies, spawning particle
32
+ * effects, and more.
33
+ *
34
+ * See {@link SkeletonBounds} and [Bounding Boxes](http://esotericsoftware.com/spine-bounding-boxes) in the Spine User
35
+ * Guide. */
36
+ export class BoundingBoxAttachment extends VertexAttachment {
37
+ constructor(name) {
38
+ super(name);
39
+ this.color = new Color(1, 1, 1, 1);
40
+ }
41
+ copy() {
42
+ let copy = new BoundingBoxAttachment(this.name);
43
+ this.copyTo(copy);
44
+ copy.color.setFromColor(this.color);
45
+ return copy;
46
+ }
47
+ }
48
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm91bmRpbmdCb3hBdHRhY2htZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2F0dGFjaG1lbnRzL0JvdW5kaW5nQm94QXR0YWNobWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OytFQTJCK0U7QUFFL0UsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLFVBQVUsQ0FBQztBQUNqQyxPQUFPLEVBQUUsZ0JBQWdCLEVBQWMsTUFBTSxjQUFjLENBQUM7QUFFNUQ7Ozs7WUFJWTtBQUNaLE1BQU0sT0FBTyxxQkFBc0IsU0FBUSxnQkFBZ0I7SUFHMUQsWUFBYSxJQUFZO1FBQ3hCLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUhiLFVBQUssR0FBRyxJQUFJLEtBQUssQ0FBQyxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQztJQUk5QixDQUFDO0lBRUQsSUFBSTtRQUNILElBQUksSUFBSSxHQUFHLElBQUkscUJBQXFCLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO1FBQ2hELElBQUksQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLENBQUM7UUFDbEIsSUFBSSxDQUFDLEtBQUssQ0FBQyxZQUFZLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQ3BDLE9BQU8sSUFBSSxDQUFDO0lBQ2IsQ0FBQztDQUNEIn0=
@@ -0,0 +1,42 @@
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 { SlotData } from "../SlotData";
30
+ import { Color } from "../Utils";
31
+ import { VertexAttachment, Attachment } from "./Attachment";
32
+ /** An attachment with vertices that make up a polygon used for clipping the rendering of other attachments. */
33
+ export declare class ClippingAttachment extends VertexAttachment {
34
+ /** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
35
+ * the skeleton's rendering. */
36
+ endSlot: SlotData | null;
37
+ /** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
38
+ * are not usually rendered at runtime. */
39
+ color: Color;
40
+ constructor(name: string);
41
+ copy(): Attachment;
42
+ }
@@ -0,0 +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 { Color } from "../Utils";
30
+ import { VertexAttachment } from "./Attachment";
31
+ /** An attachment with vertices that make up a polygon used for clipping the rendering of other attachments. */
32
+ export class ClippingAttachment extends VertexAttachment {
33
+ constructor(name) {
34
+ super(name);
35
+ /** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
36
+ * the skeleton's rendering. */
37
+ this.endSlot = null;
38
+ // Nonessential.
39
+ /** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
40
+ * are not usually rendered at runtime. */
41
+ this.color = new Color(0.2275, 0.2275, 0.8078, 1); // ce3a3aff
42
+ }
43
+ copy() {
44
+ let copy = new ClippingAttachment(this.name);
45
+ this.copyTo(copy);
46
+ copy.endSlot = this.endSlot;
47
+ copy.color.setFromColor(this.color);
48
+ return copy;
49
+ }
50
+ }
51
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ2xpcHBpbmdBdHRhY2htZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2F0dGFjaG1lbnRzL0NsaXBwaW5nQXR0YWNobWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OytFQTJCK0U7QUFHL0UsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLFVBQVUsQ0FBQztBQUNqQyxPQUFPLEVBQUUsZ0JBQWdCLEVBQWMsTUFBTSxjQUFjLENBQUM7QUFFNUQsK0dBQStHO0FBQy9HLE1BQU0sT0FBTyxrQkFBbUIsU0FBUSxnQkFBZ0I7SUFVdkQsWUFBYSxJQUFZO1FBQ3hCLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQztRQVZiO3VDQUMrQjtRQUMvQixZQUFPLEdBQW9CLElBQUksQ0FBQztRQUVoQyxnQkFBZ0I7UUFDaEI7a0RBQzBDO1FBQzFDLFVBQUssR0FBRyxJQUFJLEtBQUssQ0FBQyxNQUFNLEVBQUUsTUFBTSxFQUFFLE1BQU0sRUFBRSxDQUFDLENBQUMsQ0FBQyxDQUFDLFdBQVc7SUFJekQsQ0FBQztJQUVELElBQUk7UUFDSCxJQUFJLElBQUksR0FBRyxJQUFJLGtCQUFrQixDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUM3QyxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxDQUFDO1FBQ2xCLElBQUksQ0FBQyxPQUFPLEdBQUcsSUFBSSxDQUFDLE9BQU8sQ0FBQztRQUM1QixJQUFJLENBQUMsS0FBSyxDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUM7UUFDcEMsT0FBTyxJQUFJLENBQUM7SUFDYixDQUFDO0NBQ0QifQ==
@@ -0,0 +1,44 @@
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 { TextureRegion } from "../Texture";
30
+ import { Color } from "../Utils";
31
+ import { Sequence } from "./Sequence";
32
+ export interface HasTextureRegion {
33
+ /** The name used to find the {@link #region()}. */
34
+ path: string;
35
+ /** The region used to draw the attachment. After setting the region or if the region's properties are changed,
36
+ * {@link #updateRegion()} must be called. */
37
+ region: TextureRegion | null;
38
+ /** Updates any values the attachment calculates using the {@link #getRegion()}. Must be called after setting the
39
+ * {@link #getRegion()} or if the region's properties are changed. */
40
+ updateRegion(): void;
41
+ /** The color to tint the attachment. */
42
+ color: Color;
43
+ sequence: Sequence | null;
44
+ }
@@ -0,0 +1,30 @@
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
+ export {};
30
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSGFzVGV4dHVyZVJlZ2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hdHRhY2htZW50cy9IYXNUZXh0dXJlUmVnaW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7K0VBMkIrRSJ9
@@ -0,0 +1,79 @@
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 { TextureRegion } from "../Texture";
30
+ import { Color, NumberArrayLike } from "../Utils";
31
+ import { VertexAttachment, Attachment } from "./Attachment";
32
+ import { HasTextureRegion } from "./HasTextureRegion";
33
+ import { Sequence } from "./Sequence";
34
+ import { Slot } from "../Slot";
35
+ /** An attachment that displays a textured mesh. A mesh has hull vertices and internal vertices within the hull. Holes are not
36
+ * supported. Each vertex has UVs (texture coordinates) and triangles are used to map an image on to the mesh.
37
+ *
38
+ * See [Mesh attachments](http://esotericsoftware.com/spine-meshes) in the Spine User Guide. */
39
+ export declare class MeshAttachment extends VertexAttachment implements HasTextureRegion {
40
+ region: TextureRegion | null;
41
+ /** The name of the texture region for this attachment. */
42
+ path: string;
43
+ /** The UV pair for each vertex, normalized within the texture region. */
44
+ regionUVs: NumberArrayLike;
45
+ /** The UV pair for each vertex, normalized within the entire texture.
46
+ *
47
+ * See {@link #updateUVs}. */
48
+ uvs: NumberArrayLike;
49
+ /** Triplets of vertex indices which describe the mesh's triangulation. */
50
+ triangles: Array<number>;
51
+ /** The color to tint the mesh. */
52
+ color: Color;
53
+ /** The width of the mesh's image. Available only when nonessential data was exported. */
54
+ width: number;
55
+ /** The height of the mesh's image. Available only when nonessential data was exported. */
56
+ height: number;
57
+ /** The number of entries at the beginning of {@link #vertices} that make up the mesh hull. */
58
+ hullLength: number;
59
+ /** Vertex index pairs describing edges for controling triangulation. Mesh triangles will never cross edges. Only available if
60
+ * nonessential data was exported. Triangulation is not performed at runtime. */
61
+ edges: Array<number>;
62
+ private parentMesh;
63
+ sequence: Sequence | null;
64
+ tempColor: Color;
65
+ constructor(name: string, path: string);
66
+ /** Calculates {@link #uvs} using the {@link #regionUVs} and region. Must be called if the region, the region's properties, or
67
+ * the {@link #regionUVs} are changed. */
68
+ updateRegion(): void;
69
+ /** The parent mesh if this is a linked mesh, else null. A linked mesh shares the {@link #bones}, {@link #vertices},
70
+ * {@link #regionUVs}, {@link #triangles}, {@link #hullLength}, {@link #edges}, {@link #width}, and {@link #height} with the
71
+ * parent mesh, but may have a different {@link #name} or {@link #path} (and therefore a different texture). */
72
+ getParentMesh(): MeshAttachment | null;
73
+ /** @param parentMesh May be null. */
74
+ setParentMesh(parentMesh: MeshAttachment): void;
75
+ copy(): Attachment;
76
+ computeWorldVertices(slot: Slot, start: number, count: number, worldVertices: NumberArrayLike, offset: number, stride: number): void;
77
+ /** Returns a new mesh with the {@link #parentMesh} set to this mesh's parent mesh, if any, else to this mesh. **/
78
+ newLinkedMesh(): MeshAttachment;
79
+ }
@@ -0,0 +1,188 @@
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 { TextureAtlasRegion } from "../TextureAtlas";
30
+ import { Color, Utils } from "../Utils";
31
+ import { VertexAttachment } from "./Attachment";
32
+ /** An attachment that displays a textured mesh. A mesh has hull vertices and internal vertices within the hull. Holes are not
33
+ * supported. Each vertex has UVs (texture coordinates) and triangles are used to map an image on to the mesh.
34
+ *
35
+ * See [Mesh attachments](http://esotericsoftware.com/spine-meshes) in the Spine User Guide. */
36
+ export class MeshAttachment extends VertexAttachment {
37
+ constructor(name, path) {
38
+ super(name);
39
+ this.region = null;
40
+ /** The UV pair for each vertex, normalized within the texture region. */
41
+ this.regionUVs = [];
42
+ /** The UV pair for each vertex, normalized within the entire texture.
43
+ *
44
+ * See {@link #updateUVs}. */
45
+ this.uvs = [];
46
+ /** Triplets of vertex indices which describe the mesh's triangulation. */
47
+ this.triangles = [];
48
+ /** The color to tint the mesh. */
49
+ this.color = new Color(1, 1, 1, 1);
50
+ /** The width of the mesh's image. Available only when nonessential data was exported. */
51
+ this.width = 0;
52
+ /** The height of the mesh's image. Available only when nonessential data was exported. */
53
+ this.height = 0;
54
+ /** The number of entries at the beginning of {@link #vertices} that make up the mesh hull. */
55
+ this.hullLength = 0;
56
+ /** Vertex index pairs describing edges for controling triangulation. Mesh triangles will never cross edges. Only available if
57
+ * nonessential data was exported. Triangulation is not performed at runtime. */
58
+ this.edges = [];
59
+ this.parentMesh = null;
60
+ this.sequence = null;
61
+ this.tempColor = new Color(0, 0, 0, 0);
62
+ this.path = path;
63
+ }
64
+ /** Calculates {@link #uvs} using the {@link #regionUVs} and region. Must be called if the region, the region's properties, or
65
+ * the {@link #regionUVs} are changed. */
66
+ updateRegion() {
67
+ if (!this.region)
68
+ throw new Error("Region not set.");
69
+ let regionUVs = this.regionUVs;
70
+ if (!this.uvs || this.uvs.length != regionUVs.length)
71
+ this.uvs = Utils.newFloatArray(regionUVs.length);
72
+ let uvs = this.uvs;
73
+ let n = this.uvs.length;
74
+ let u = this.region.u, v = this.region.v, width = 0, height = 0;
75
+ if (this.region instanceof TextureAtlasRegion) {
76
+ let region = this.region, image = region.page.texture.getImage();
77
+ let textureWidth = image.width, textureHeight = image.height;
78
+ switch (region.degrees) {
79
+ case 90:
80
+ u -= (region.originalHeight - region.offsetY - region.height) / textureWidth;
81
+ v -= (region.originalWidth - region.offsetX - region.width) / textureHeight;
82
+ width = region.originalHeight / textureWidth;
83
+ height = region.originalWidth / textureHeight;
84
+ for (let i = 0; i < n; i += 2) {
85
+ uvs[i] = u + regionUVs[i + 1] * width;
86
+ uvs[i + 1] = v + (1 - regionUVs[i]) * height;
87
+ }
88
+ return;
89
+ case 180:
90
+ u -= (region.originalWidth - region.offsetX - region.width) / textureWidth;
91
+ v -= region.offsetY / textureHeight;
92
+ width = region.originalWidth / textureWidth;
93
+ height = region.originalHeight / textureHeight;
94
+ for (let i = 0; i < n; i += 2) {
95
+ uvs[i] = u + (1 - regionUVs[i]) * width;
96
+ uvs[i + 1] = v + (1 - regionUVs[i + 1]) * height;
97
+ }
98
+ return;
99
+ case 270:
100
+ u -= region.offsetY / textureWidth;
101
+ v -= region.offsetX / textureHeight;
102
+ width = region.originalHeight / textureWidth;
103
+ height = region.originalWidth / textureHeight;
104
+ for (let i = 0; i < n; i += 2) {
105
+ uvs[i] = u + (1 - regionUVs[i + 1]) * width;
106
+ uvs[i + 1] = v + regionUVs[i] * height;
107
+ }
108
+ return;
109
+ }
110
+ u -= region.offsetX / textureWidth;
111
+ v -= (region.originalHeight - region.offsetY - region.height) / textureHeight;
112
+ width = region.originalWidth / textureWidth;
113
+ height = region.originalHeight / textureHeight;
114
+ }
115
+ else if (!this.region) {
116
+ u = v = 0;
117
+ width = height = 1;
118
+ }
119
+ else {
120
+ width = this.region.u2 - u;
121
+ height = this.region.v2 - v;
122
+ }
123
+ for (let i = 0; i < n; i += 2) {
124
+ uvs[i] = u + regionUVs[i] * width;
125
+ uvs[i + 1] = v + regionUVs[i + 1] * height;
126
+ }
127
+ }
128
+ /** The parent mesh if this is a linked mesh, else null. A linked mesh shares the {@link #bones}, {@link #vertices},
129
+ * {@link #regionUVs}, {@link #triangles}, {@link #hullLength}, {@link #edges}, {@link #width}, and {@link #height} with the
130
+ * parent mesh, but may have a different {@link #name} or {@link #path} (and therefore a different texture). */
131
+ getParentMesh() {
132
+ return this.parentMesh;
133
+ }
134
+ /** @param parentMesh May be null. */
135
+ setParentMesh(parentMesh) {
136
+ this.parentMesh = parentMesh;
137
+ if (parentMesh) {
138
+ this.bones = parentMesh.bones;
139
+ this.vertices = parentMesh.vertices;
140
+ this.worldVerticesLength = parentMesh.worldVerticesLength;
141
+ this.regionUVs = parentMesh.regionUVs;
142
+ this.triangles = parentMesh.triangles;
143
+ this.hullLength = parentMesh.hullLength;
144
+ this.worldVerticesLength = parentMesh.worldVerticesLength;
145
+ }
146
+ }
147
+ copy() {
148
+ if (this.parentMesh)
149
+ return this.newLinkedMesh();
150
+ let copy = new MeshAttachment(this.name, this.path);
151
+ copy.region = this.region;
152
+ copy.color.setFromColor(this.color);
153
+ this.copyTo(copy);
154
+ copy.regionUVs = new Array(this.regionUVs.length);
155
+ Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);
156
+ copy.uvs = new Array(this.uvs.length);
157
+ Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);
158
+ copy.triangles = new Array(this.triangles.length);
159
+ Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);
160
+ copy.hullLength = this.hullLength;
161
+ copy.sequence = this.sequence != null ? this.sequence.copy() : null;
162
+ // Nonessential.
163
+ if (this.edges) {
164
+ copy.edges = new Array(this.edges.length);
165
+ Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);
166
+ }
167
+ copy.width = this.width;
168
+ copy.height = this.height;
169
+ return copy;
170
+ }
171
+ computeWorldVertices(slot, start, count, worldVertices, offset, stride) {
172
+ if (this.sequence != null)
173
+ this.sequence.apply(slot, this);
174
+ super.computeWorldVertices(slot, start, count, worldVertices, offset, stride);
175
+ }
176
+ /** Returns a new mesh with the {@link #parentMesh} set to this mesh's parent mesh, if any, else to this mesh. **/
177
+ newLinkedMesh() {
178
+ let copy = new MeshAttachment(this.name, this.path);
179
+ copy.region = this.region;
180
+ copy.color.setFromColor(this.color);
181
+ copy.timelineAttachment = this.timelineAttachment;
182
+ copy.setParentMesh(this.parentMesh ? this.parentMesh : this);
183
+ if (copy.region != null)
184
+ copy.updateRegion();
185
+ return copy;
186
+ }
187
+ }
188
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWVzaEF0dGFjaG1lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYXR0YWNobWVudHMvTWVzaEF0dGFjaG1lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsrRUEyQitF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