simple-pixi-spine 0.1.0

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 (235) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +200 -0
  3. package/dist/simple-pixi-spine.js +37 -0
  4. package/dist/simple-pixi-spine.js.map +7 -0
  5. package/dist/simple-pixi-spine.mjs +37 -0
  6. package/dist/simple-pixi-spine.mjs.map +7 -0
  7. package/dist/types/build.d.mts +1 -0
  8. package/dist/types/bundles/pixi-spine/rollup.config.d.mts +2 -0
  9. package/dist/types/bundles/pixi-spine/src/index.d.ts +5 -0
  10. package/dist/types/packages/base/src/SpineBase.d.ts +167 -0
  11. package/dist/types/packages/base/src/SpineDebugRenderer.d.ts +60 -0
  12. package/dist/types/packages/base/src/core/AttachmentType.d.ts +12 -0
  13. package/dist/types/packages/base/src/core/BinaryInput.d.ts +18 -0
  14. package/dist/types/packages/base/src/core/IAnimation.d.ts +131 -0
  15. package/dist/types/packages/base/src/core/IConstraint.d.ts +93 -0
  16. package/dist/types/packages/base/src/core/ISkeleton.d.ts +237 -0
  17. package/dist/types/packages/base/src/core/SkeletonBoundsBase.d.ts +51 -0
  18. package/dist/types/packages/base/src/core/TextureAtlas.d.ts +41 -0
  19. package/dist/types/packages/base/src/core/TextureRegion.d.ts +55 -0
  20. package/dist/types/packages/base/src/core/Utils.d.ts +198 -0
  21. package/dist/types/packages/base/src/core/versions.d.ts +15 -0
  22. package/dist/types/packages/base/src/index.d.ts +14 -0
  23. package/dist/types/packages/base/src/settings.d.ts +19 -0
  24. package/dist/types/packages/loader-3.8/src/index.d.ts +2 -0
  25. package/dist/types/packages/loader-4.0/src/index.d.ts +2 -0
  26. package/dist/types/packages/loader-4.1/src/index.d.ts +2 -0
  27. package/dist/types/packages/loader-4.2/src/index.d.ts +2 -0
  28. package/dist/types/packages/loader-base/src/SpineLoaderAbstract.d.ts +36 -0
  29. package/dist/types/packages/loader-base/src/atlasLoader.d.ts +5 -0
  30. package/dist/types/packages/loader-base/src/index.d.ts +4 -0
  31. package/dist/types/packages/loader-uni/src/Spine.d.ts +15 -0
  32. package/dist/types/packages/loader-uni/src/SpineLoader.d.ts +10 -0
  33. package/dist/types/packages/loader-uni/src/index.d.ts +3 -0
  34. package/dist/types/packages/runtime-3.7/src/Spine.d.ts +11 -0
  35. package/dist/types/packages/runtime-3.7/src/core/Animation.d.ts +307 -0
  36. package/dist/types/packages/runtime-3.7/src/core/AnimationState.d.ts +175 -0
  37. package/dist/types/packages/runtime-3.7/src/core/AnimationStateData.d.ts +17 -0
  38. package/dist/types/packages/runtime-3.7/src/core/AtlasAttachmentLoader.d.ts +20 -0
  39. package/dist/types/packages/runtime-3.7/src/core/Bone.d.ts +58 -0
  40. package/dist/types/packages/runtime-3.7/src/core/BoneData.d.ts +19 -0
  41. package/dist/types/packages/runtime-3.7/src/core/Constraint.d.ts +7 -0
  42. package/dist/types/packages/runtime-3.7/src/core/Event.d.ts +15 -0
  43. package/dist/types/packages/runtime-3.7/src/core/EventData.d.ts +14 -0
  44. package/dist/types/packages/runtime-3.7/src/core/IkConstraint.d.ts +27 -0
  45. package/dist/types/packages/runtime-3.7/src/core/IkConstraintData.d.ts +16 -0
  46. package/dist/types/packages/runtime-3.7/src/core/PathConstraint.d.ts +36 -0
  47. package/dist/types/packages/runtime-3.7/src/core/PathConstraintData.d.ts +29 -0
  48. package/dist/types/packages/runtime-3.7/src/core/Skeleton.d.ts +88 -0
  49. package/dist/types/packages/runtime-3.7/src/core/SkeletonBounds.d.ts +8 -0
  50. package/dist/types/packages/runtime-3.7/src/core/SkeletonData.d.ts +41 -0
  51. package/dist/types/packages/runtime-3.7/src/core/SkeletonJson.d.ts +27 -0
  52. package/dist/types/packages/runtime-3.7/src/core/Skin.d.ts +16 -0
  53. package/dist/types/packages/runtime-3.7/src/core/Slot.d.ts +27 -0
  54. package/dist/types/packages/runtime-3.7/src/core/SlotData.d.ts +17 -0
  55. package/dist/types/packages/runtime-3.7/src/core/TransformConstraint.d.ts +26 -0
  56. package/dist/types/packages/runtime-3.7/src/core/TransformConstraintData.d.ts +23 -0
  57. package/dist/types/packages/runtime-3.7/src/core/Updatable.d.ts +6 -0
  58. package/dist/types/packages/runtime-3.7/src/core/VertexEffect.d.ts +10 -0
  59. package/dist/types/packages/runtime-3.7/src/core/attachments/Attachment.d.ts +30 -0
  60. package/dist/types/packages/runtime-3.7/src/core/attachments/AttachmentLoader.d.ts +24 -0
  61. package/dist/types/packages/runtime-3.7/src/core/attachments/BoundingBoxAttachment.d.ts +10 -0
  62. package/dist/types/packages/runtime-3.7/src/core/attachments/ClippingAttachment.d.ts +12 -0
  63. package/dist/types/packages/runtime-3.7/src/core/attachments/MeshAttachment.d.ts +23 -0
  64. package/dist/types/packages/runtime-3.7/src/core/attachments/PathAttachment.d.ts +13 -0
  65. package/dist/types/packages/runtime-3.7/src/core/attachments/PointAttachment.d.ts +16 -0
  66. package/dist/types/packages/runtime-3.7/src/core/attachments/RegionAttachment.d.ts +68 -0
  67. package/dist/types/packages/runtime-3.7/src/core/attachments/index.d.ts +8 -0
  68. package/dist/types/packages/runtime-3.7/src/core/vertexeffects/JitterEffect.d.ts +14 -0
  69. package/dist/types/packages/runtime-3.7/src/core/vertexeffects/SwirlEffect.d.ts +19 -0
  70. package/dist/types/packages/runtime-3.7/src/index.d.ts +28 -0
  71. package/dist/types/packages/runtime-3.8/src/Spine.d.ts +11 -0
  72. package/dist/types/packages/runtime-3.8/src/core/Animation.d.ts +400 -0
  73. package/dist/types/packages/runtime-3.8/src/core/AnimationState.d.ts +401 -0
  74. package/dist/types/packages/runtime-3.8/src/core/AnimationStateData.d.ts +17 -0
  75. package/dist/types/packages/runtime-3.8/src/core/AtlasAttachmentLoader.d.ts +20 -0
  76. package/dist/types/packages/runtime-3.8/src/core/Bone.d.ts +58 -0
  77. package/dist/types/packages/runtime-3.8/src/core/BoneData.d.ts +21 -0
  78. package/dist/types/packages/runtime-3.8/src/core/Constraint.d.ts +9 -0
  79. package/dist/types/packages/runtime-3.8/src/core/Event.d.ts +15 -0
  80. package/dist/types/packages/runtime-3.8/src/core/EventData.d.ts +14 -0
  81. package/dist/types/packages/runtime-3.8/src/core/IkConstraint.d.ts +30 -0
  82. package/dist/types/packages/runtime-3.8/src/core/IkConstraintData.d.ts +17 -0
  83. package/dist/types/packages/runtime-3.8/src/core/PathConstraint.d.ts +37 -0
  84. package/dist/types/packages/runtime-3.8/src/core/PathConstraintData.d.ts +28 -0
  85. package/dist/types/packages/runtime-3.8/src/core/Skeleton.d.ts +88 -0
  86. package/dist/types/packages/runtime-3.8/src/core/SkeletonBinary.d.ts +43 -0
  87. package/dist/types/packages/runtime-3.8/src/core/SkeletonBounds.d.ts +8 -0
  88. package/dist/types/packages/runtime-3.8/src/core/SkeletonData.d.ts +44 -0
  89. package/dist/types/packages/runtime-3.8/src/core/SkeletonJson.d.ts +27 -0
  90. package/dist/types/packages/runtime-3.8/src/core/Skin.d.ts +35 -0
  91. package/dist/types/packages/runtime-3.8/src/core/Slot.d.ts +28 -0
  92. package/dist/types/packages/runtime-3.8/src/core/SlotData.d.ts +17 -0
  93. package/dist/types/packages/runtime-3.8/src/core/TransformConstraint.d.ts +27 -0
  94. package/dist/types/packages/runtime-3.8/src/core/TransformConstraintData.d.ts +22 -0
  95. package/dist/types/packages/runtime-3.8/src/core/Updatable.d.ts +7 -0
  96. package/dist/types/packages/runtime-3.8/src/core/VertexEffect.d.ts +10 -0
  97. package/dist/types/packages/runtime-3.8/src/core/attachments/Attachment.d.ts +32 -0
  98. package/dist/types/packages/runtime-3.8/src/core/attachments/AttachmentLoader.d.ts +24 -0
  99. package/dist/types/packages/runtime-3.8/src/core/attachments/BoundingBoxAttachment.d.ts +11 -0
  100. package/dist/types/packages/runtime-3.8/src/core/attachments/ClippingAttachment.d.ts +13 -0
  101. package/dist/types/packages/runtime-3.8/src/core/attachments/MeshAttachment.d.ts +25 -0
  102. package/dist/types/packages/runtime-3.8/src/core/attachments/PathAttachment.d.ts +14 -0
  103. package/dist/types/packages/runtime-3.8/src/core/attachments/PointAttachment.d.ts +17 -0
  104. package/dist/types/packages/runtime-3.8/src/core/attachments/RegionAttachment.d.ts +69 -0
  105. package/dist/types/packages/runtime-3.8/src/core/attachments/index.d.ts +8 -0
  106. package/dist/types/packages/runtime-3.8/src/core/vertexeffects/JitterEffect.d.ts +14 -0
  107. package/dist/types/packages/runtime-3.8/src/core/vertexeffects/SwirlEffect.d.ts +19 -0
  108. package/dist/types/packages/runtime-3.8/src/index.d.ts +29 -0
  109. package/dist/types/packages/runtime-4.0/src/Spine.d.ts +11 -0
  110. package/dist/types/packages/runtime-4.0/src/core/Animation.d.ts +366 -0
  111. package/dist/types/packages/runtime-4.0/src/core/AnimationState.d.ts +369 -0
  112. package/dist/types/packages/runtime-4.0/src/core/AnimationStateData.d.ts +25 -0
  113. package/dist/types/packages/runtime-4.0/src/core/AtlasAttachmentLoader.d.ts +20 -0
  114. package/dist/types/packages/runtime-4.0/src/core/Bone.d.ts +104 -0
  115. package/dist/types/packages/runtime-4.0/src/core/BoneData.d.ts +38 -0
  116. package/dist/types/packages/runtime-4.0/src/core/ConstraintData.d.ts +9 -0
  117. package/dist/types/packages/runtime-4.0/src/core/Event.d.ts +19 -0
  118. package/dist/types/packages/runtime-4.0/src/core/EventData.d.ts +16 -0
  119. package/dist/types/packages/runtime-4.0/src/core/IkConstraint.d.ts +38 -0
  120. package/dist/types/packages/runtime-4.0/src/core/IkConstraintData.d.ts +28 -0
  121. package/dist/types/packages/runtime-4.0/src/core/PathConstraint.d.ts +45 -0
  122. package/dist/types/packages/runtime-4.0/src/core/PathConstraintData.d.ts +42 -0
  123. package/dist/types/packages/runtime-4.0/src/core/Skeleton.d.ts +149 -0
  124. package/dist/types/packages/runtime-4.0/src/core/SkeletonBinary.d.ts +28 -0
  125. package/dist/types/packages/runtime-4.0/src/core/SkeletonBounds.d.ts +8 -0
  126. package/dist/types/packages/runtime-4.0/src/core/SkeletonData.d.ts +94 -0
  127. package/dist/types/packages/runtime-4.0/src/core/SkeletonJson.d.ts +26 -0
  128. package/dist/types/packages/runtime-4.0/src/core/Skin.d.ts +47 -0
  129. package/dist/types/packages/runtime-4.0/src/core/Slot.d.ts +45 -0
  130. package/dist/types/packages/runtime-4.0/src/core/SlotData.d.ts +26 -0
  131. package/dist/types/packages/runtime-4.0/src/core/TransformConstraint.d.ts +34 -0
  132. package/dist/types/packages/runtime-4.0/src/core/TransformConstraintData.d.ts +34 -0
  133. package/dist/types/packages/runtime-4.0/src/core/Updatable.d.ts +11 -0
  134. package/dist/types/packages/runtime-4.0/src/core/VertexEffect.d.ts +10 -0
  135. package/dist/types/packages/runtime-4.0/src/core/attachments/Attachment.d.ts +52 -0
  136. package/dist/types/packages/runtime-4.0/src/core/attachments/AttachmentLoader.d.ts +24 -0
  137. package/dist/types/packages/runtime-4.0/src/core/attachments/BoundingBoxAttachment.d.ts +11 -0
  138. package/dist/types/packages/runtime-4.0/src/core/attachments/ClippingAttachment.d.ts +15 -0
  139. package/dist/types/packages/runtime-4.0/src/core/attachments/MeshAttachment.d.ts +38 -0
  140. package/dist/types/packages/runtime-4.0/src/core/attachments/PathAttachment.d.ts +20 -0
  141. package/dist/types/packages/runtime-4.0/src/core/attachments/PointAttachment.d.ts +19 -0
  142. package/dist/types/packages/runtime-4.0/src/core/attachments/RegionAttachment.d.ts +89 -0
  143. package/dist/types/packages/runtime-4.0/src/core/attachments/index.d.ts +8 -0
  144. package/dist/types/packages/runtime-4.0/src/core/vertexeffects/JitterEffect.d.ts +14 -0
  145. package/dist/types/packages/runtime-4.0/src/core/vertexeffects/SwirlEffect.d.ts +19 -0
  146. package/dist/types/packages/runtime-4.0/src/index.d.ts +29 -0
  147. package/dist/types/packages/runtime-4.1/src/Spine.d.ts +11 -0
  148. package/dist/types/packages/runtime-4.1/src/core/Animation.d.ts +386 -0
  149. package/dist/types/packages/runtime-4.1/src/core/AnimationState.d.ts +371 -0
  150. package/dist/types/packages/runtime-4.1/src/core/AnimationStateData.d.ts +25 -0
  151. package/dist/types/packages/runtime-4.1/src/core/AtlasAttachmentLoader.d.ts +17 -0
  152. package/dist/types/packages/runtime-4.1/src/core/Bone.d.ts +104 -0
  153. package/dist/types/packages/runtime-4.1/src/core/BoneData.d.ts +38 -0
  154. package/dist/types/packages/runtime-4.1/src/core/ConstraintData.d.ts +9 -0
  155. package/dist/types/packages/runtime-4.1/src/core/Event.d.ts +19 -0
  156. package/dist/types/packages/runtime-4.1/src/core/EventData.d.ts +16 -0
  157. package/dist/types/packages/runtime-4.1/src/core/IkConstraint.d.ts +38 -0
  158. package/dist/types/packages/runtime-4.1/src/core/IkConstraintData.d.ts +30 -0
  159. package/dist/types/packages/runtime-4.1/src/core/PathConstraint.d.ts +45 -0
  160. package/dist/types/packages/runtime-4.1/src/core/PathConstraintData.d.ts +44 -0
  161. package/dist/types/packages/runtime-4.1/src/core/Skeleton.d.ts +143 -0
  162. package/dist/types/packages/runtime-4.1/src/core/SkeletonBinary.d.ts +31 -0
  163. package/dist/types/packages/runtime-4.1/src/core/SkeletonBounds.d.ts +8 -0
  164. package/dist/types/packages/runtime-4.1/src/core/SkeletonData.d.ts +94 -0
  165. package/dist/types/packages/runtime-4.1/src/core/SkeletonJson.d.ts +28 -0
  166. package/dist/types/packages/runtime-4.1/src/core/Skin.d.ts +47 -0
  167. package/dist/types/packages/runtime-4.1/src/core/Slot.d.ts +44 -0
  168. package/dist/types/packages/runtime-4.1/src/core/SlotData.d.ts +26 -0
  169. package/dist/types/packages/runtime-4.1/src/core/TransformConstraint.d.ts +34 -0
  170. package/dist/types/packages/runtime-4.1/src/core/TransformConstraintData.d.ts +36 -0
  171. package/dist/types/packages/runtime-4.1/src/core/Updatable.d.ts +11 -0
  172. package/dist/types/packages/runtime-4.1/src/core/attachments/Attachment.d.ts +53 -0
  173. package/dist/types/packages/runtime-4.1/src/core/attachments/AttachmentLoader.d.ts +25 -0
  174. package/dist/types/packages/runtime-4.1/src/core/attachments/BoundingBoxAttachment.d.ts +11 -0
  175. package/dist/types/packages/runtime-4.1/src/core/attachments/ClippingAttachment.d.ts +17 -0
  176. package/dist/types/packages/runtime-4.1/src/core/attachments/MeshAttachment.d.ts +42 -0
  177. package/dist/types/packages/runtime-4.1/src/core/attachments/PathAttachment.d.ts +20 -0
  178. package/dist/types/packages/runtime-4.1/src/core/attachments/PointAttachment.d.ts +19 -0
  179. package/dist/types/packages/runtime-4.1/src/core/attachments/RegionAttachment.d.ts +82 -0
  180. package/dist/types/packages/runtime-4.1/src/core/attachments/Sequence.d.ts +35 -0
  181. package/dist/types/packages/runtime-4.1/src/core/attachments/index.d.ts +9 -0
  182. package/dist/types/packages/runtime-4.1/src/index.d.ts +26 -0
  183. package/dist/types/packages/runtime-4.2/src/Spine.d.ts +11 -0
  184. package/dist/types/packages/runtime-4.2/src/core/Animation.d.ts +544 -0
  185. package/dist/types/packages/runtime-4.2/src/core/AnimationState.d.ts +405 -0
  186. package/dist/types/packages/runtime-4.2/src/core/AnimationStateData.d.ts +25 -0
  187. package/dist/types/packages/runtime-4.2/src/core/AtlasAttachmentLoader.d.ts +20 -0
  188. package/dist/types/packages/runtime-4.2/src/core/Bone.d.ts +117 -0
  189. package/dist/types/packages/runtime-4.2/src/core/BoneData.d.ts +42 -0
  190. package/dist/types/packages/runtime-4.2/src/core/ConstraintData.d.ts +9 -0
  191. package/dist/types/packages/runtime-4.2/src/core/Event.d.ts +18 -0
  192. package/dist/types/packages/runtime-4.2/src/core/EventData.d.ts +15 -0
  193. package/dist/types/packages/runtime-4.2/src/core/IkConstraint.d.ts +40 -0
  194. package/dist/types/packages/runtime-4.2/src/core/IkConstraintData.d.ts +30 -0
  195. package/dist/types/packages/runtime-4.2/src/core/PathConstraint.d.ts +47 -0
  196. package/dist/types/packages/runtime-4.2/src/core/PathConstraintData.d.ts +62 -0
  197. package/dist/types/packages/runtime-4.2/src/core/PhysicsConstraint.d.ts +54 -0
  198. package/dist/types/packages/runtime-4.2/src/core/PhysicsConstraintData.d.ts +35 -0
  199. package/dist/types/packages/runtime-4.2/src/core/Skeleton.d.ts +160 -0
  200. package/dist/types/packages/runtime-4.2/src/core/SkeletonBinary.d.ts +43 -0
  201. package/dist/types/packages/runtime-4.2/src/core/SkeletonBounds.d.ts +51 -0
  202. package/dist/types/packages/runtime-4.2/src/core/SkeletonClipping.d.ts +38 -0
  203. package/dist/types/packages/runtime-4.2/src/core/SkeletonData.d.ts +101 -0
  204. package/dist/types/packages/runtime-4.2/src/core/SkeletonJson.d.ts +23 -0
  205. package/dist/types/packages/runtime-4.2/src/core/Skin.d.ts +49 -0
  206. package/dist/types/packages/runtime-4.2/src/core/Slot.d.ts +44 -0
  207. package/dist/types/packages/runtime-4.2/src/core/SlotData.d.ts +28 -0
  208. package/dist/types/packages/runtime-4.2/src/core/TransformConstraint.d.ts +33 -0
  209. package/dist/types/packages/runtime-4.2/src/core/TransformConstraintData.d.ts +34 -0
  210. package/dist/types/packages/runtime-4.2/src/core/Triangulator.d.ts +18 -0
  211. package/dist/types/packages/runtime-4.2/src/core/Updatable.d.ts +16 -0
  212. package/dist/types/packages/runtime-4.2/src/core/attachments/Attachment.d.ts +49 -0
  213. package/dist/types/packages/runtime-4.2/src/core/attachments/AttachmentLoader.d.ts +27 -0
  214. package/dist/types/packages/runtime-4.2/src/core/attachments/BoundingBoxAttachment.d.ts +12 -0
  215. package/dist/types/packages/runtime-4.2/src/core/attachments/ClippingAttachment.d.ts +16 -0
  216. package/dist/types/packages/runtime-4.2/src/core/attachments/MeshAttachment.d.ts +46 -0
  217. package/dist/types/packages/runtime-4.2/src/core/attachments/PathAttachment.d.ts +19 -0
  218. package/dist/types/packages/runtime-4.2/src/core/attachments/PointAttachment.d.ts +20 -0
  219. package/dist/types/packages/runtime-4.2/src/core/attachments/RegionAttachment.d.ts +80 -0
  220. package/dist/types/packages/runtime-4.2/src/core/attachments/Sequence.d.ts +35 -0
  221. package/dist/types/packages/runtime-4.2/src/core/attachments/index.d.ts +9 -0
  222. package/dist/types/packages/runtime-4.2/src/core/index.d.ts +29 -0
  223. package/dist/types/packages/runtime-4.2/src/core/polyfills.d.ts +1 -0
  224. package/dist/types/packages/runtime-4.2/src/index.d.ts +3 -0
  225. package/dist/types/src/BinaryInput.d.ts +84 -0
  226. package/dist/types/src/SkelToJson.d.ts +15 -0
  227. package/dist/types/src/SkelToJson21.d.ts +10 -0
  228. package/dist/types/src/SkelToJson34And35.d.ts +10 -0
  229. package/dist/types/src/SkelToJson36And37.d.ts +10 -0
  230. package/dist/types/src/SkelToJsonCommon.d.ts +24 -0
  231. package/dist/types/src/TextureHelper.d.ts +29 -0
  232. package/dist/types/src/VersionDetector.d.ts +28 -0
  233. package/dist/types/src/index.d.ts +80 -0
  234. package/dist/types/src/types.d.ts +161 -0
  235. package/package.json +29 -0
@@ -0,0 +1,40 @@
1
+ import { Bone } from './Bone.js';
2
+ import { IkConstraintData } from './IkConstraintData.js';
3
+ import { Skeleton } from './Skeleton.js';
4
+ import { Updatable } from './Updatable.js';
5
+ import { Physics } from '@pixi-spine/base';
6
+ /** Stores the current pose for an IK constraint. An IK constraint adjusts the rotation of 1 or 2 constrained bones so the tip of
7
+ * the last bone is as close to the target bone as possible.
8
+ *
9
+ * See [IK constraints](http://esotericsoftware.com/spine-ik-constraints) in the Spine User Guide.
10
+ * @public
11
+ * */
12
+ export declare class IkConstraint implements Updatable {
13
+ /** The IK constraint's setup pose data. */
14
+ data: IkConstraintData;
15
+ /** The bones that will be modified by this IK constraint. */
16
+ bones: Array<Bone>;
17
+ /** The bone that is the IK target. */
18
+ target: Bone;
19
+ /** Controls the bend direction of the IK bones, either 1 or -1. */
20
+ bendDirection: number;
21
+ /** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
22
+ compress: boolean;
23
+ /** When true, if the target is out of range, the parent bone is scaled to reach it. If more than one bone is being constrained
24
+ * and the parent bone has local nonuniform scale, stretch is not applied. */
25
+ stretch: boolean;
26
+ /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
27
+ mix: number;
28
+ /** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
29
+ softness: number;
30
+ active: boolean;
31
+ constructor(data: IkConstraintData, skeleton: Skeleton);
32
+ isActive(): boolean;
33
+ setToSetupPose(): void;
34
+ update(physics: Physics): void;
35
+ /** Applies 1 bone IK. The target is specified in the world coordinate system. */
36
+ apply1(bone: Bone, targetX: number, targetY: number, compress: boolean, stretch: boolean, uniform: boolean, alpha: number): void;
37
+ /** Applies 2 bone IK. The target is specified in the world coordinate system.
38
+ * @param child A direct descendant of the parent bone. */
39
+ apply2(parent: Bone, child: Bone, targetX: number, targetY: number, bendDir: number, stretch: boolean, uniform: boolean, softness: number, alpha: number): void;
40
+ }
@@ -0,0 +1,30 @@
1
+ import { BoneData } from './BoneData.js';
2
+ import { ConstraintData } from './ConstraintData.js';
3
+ /** Stores the setup pose for an {@link IkConstraint}.
4
+ * <p>
5
+ * See [IK constraints](http://esotericsoftware.com/spine-ik-constraints) in the Spine User Guide.
6
+ * @public
7
+ * */
8
+ export declare class IkConstraintData extends ConstraintData {
9
+ /** The bones that are constrained by this IK constraint. */
10
+ bones: BoneData[];
11
+ /** The bone that is the IK target. */
12
+ private _target;
13
+ set target(boneData: BoneData);
14
+ get target(): BoneData;
15
+ /** Controls the bend direction of the IK bones, either 1 or -1. */
16
+ bendDirection: number;
17
+ /** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
18
+ compress: boolean;
19
+ /** When true, if the target is out of range, the parent bone is scaled to reach it. If more than one bone is being constrained
20
+ * and the parent bone has local nonuniform scale, stretch is not applied. */
21
+ stretch: boolean;
22
+ /** When true, only a single bone is being constrained, and {@link #getCompress()} or {@link #getStretch()} is used, the bone
23
+ * is scaled on both the X and Y axes. */
24
+ uniform: boolean;
25
+ /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
26
+ mix: number;
27
+ /** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
28
+ softness: number;
29
+ constructor(name: string);
30
+ }
@@ -0,0 +1,47 @@
1
+ import { PathAttachment } from './attachments';
2
+ import { Bone } from './Bone.js';
3
+ import { PathConstraintData } from './PathConstraintData.js';
4
+ import { Skeleton } from './Skeleton.js';
5
+ import { Slot } from './Slot.js';
6
+ import { Updatable } from './Updatable.js';
7
+ import { Physics } from '@pixi-spine/base';
8
+ /** Stores the current pose for a path constraint. A path constraint adjusts the rotation, translation, and scale of the
9
+ * constrained bones so they follow a {@link PathAttachment}.
10
+ *
11
+ * See [Path constraints](http://esotericsoftware.com/spine-path-constraints) in the Spine User Guide.
12
+ * @public
13
+ * */
14
+ export declare class PathConstraint implements Updatable {
15
+ static NONE: number;
16
+ static BEFORE: number;
17
+ static AFTER: number;
18
+ static epsilon: number;
19
+ /** The path constraint's setup pose data. */
20
+ data: PathConstraintData;
21
+ /** The bones that will be modified by this path constraint. */
22
+ bones: Array<Bone>;
23
+ /** The slot whose path attachment will be used to constrained the bones. */
24
+ target: Slot;
25
+ /** The position along the path. */
26
+ position: number;
27
+ /** The spacing between bones. */
28
+ spacing: number;
29
+ mixRotate: number;
30
+ mixX: number;
31
+ mixY: number;
32
+ spaces: number[];
33
+ positions: number[];
34
+ world: number[];
35
+ curves: number[];
36
+ lengths: number[];
37
+ segments: number[];
38
+ active: boolean;
39
+ constructor(data: PathConstraintData, skeleton: Skeleton);
40
+ isActive(): boolean;
41
+ setToSetupPose(): void;
42
+ update(physics: Physics): void;
43
+ computeWorldPositions(path: PathAttachment, spacesCount: number, tangents: boolean): number[];
44
+ addBeforePosition(p: number, temp: Array<number>, i: number, out: Array<number>, o: number): void;
45
+ addAfterPosition(p: number, temp: Array<number>, i: number, out: Array<number>, o: number): void;
46
+ addCurvePosition(p: number, x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number, out: Array<number>, o: number, tangents: boolean): void;
47
+ }
@@ -0,0 +1,62 @@
1
+ import { BoneData } from './BoneData.js';
2
+ import { ConstraintData } from './ConstraintData.js';
3
+ import { SlotData } from './SlotData.js';
4
+ /** Stores the setup pose for a {@link PathConstraint}.
5
+ *
6
+ * See [path constraints](http://esotericsoftware.com/spine-path-constraints) in the Spine User Guide.
7
+ * @public
8
+ * */
9
+ export declare class PathConstraintData extends ConstraintData {
10
+ /** The bones that will be modified by this path constraint. */
11
+ bones: BoneData[];
12
+ /** The slot whose path attachment will be used to constrained the bones. */
13
+ private _target;
14
+ set target(slotData: SlotData);
15
+ get target(): SlotData;
16
+ /** The mode for positioning the first bone on the path. */
17
+ positionMode: PositionMode;
18
+ /** The mode for positioning the bones after the first bone on the path. */
19
+ spacingMode: SpacingMode;
20
+ /** The mode for adjusting the rotation of the bones. */
21
+ rotateMode: RotateMode;
22
+ /** An offset added to the constrained bone rotation. */
23
+ offsetRotation: number;
24
+ /** The position along the path. */
25
+ position: number;
26
+ /** The spacing between bones. */
27
+ spacing: number;
28
+ mixRotate: number;
29
+ mixX: number;
30
+ mixY: number;
31
+ constructor(name: string);
32
+ }
33
+ /** Controls how the first bone is positioned along the path.
34
+ *
35
+ * See [position](http://esotericsoftware.com/spine-path-constraints#Position) in the Spine User Guide.
36
+ * @public
37
+ * */
38
+ export declare enum PositionMode {
39
+ Fixed = 0,
40
+ Percent = 1
41
+ }
42
+ /** Controls how bones after the first bone are positioned along the path.
43
+ *
44
+ * See [spacing](http://esotericsoftware.com/spine-path-constraints#Spacing) in the Spine User Guide.
45
+ * @public
46
+ * */
47
+ export declare enum SpacingMode {
48
+ Length = 0,
49
+ Fixed = 1,
50
+ Percent = 2,
51
+ Proportional = 3
52
+ }
53
+ /** Controls how bones are rotated, translated, and scaled to match the path.
54
+ *
55
+ * See [rotate mix](http://esotericsoftware.com/spine-path-constraints#Rotate-mix) in the Spine User Guide.
56
+ * @public
57
+ * */
58
+ export declare enum RotateMode {
59
+ Tangent = 0,
60
+ Chain = 1,
61
+ ChainScale = 2
62
+ }
@@ -0,0 +1,54 @@
1
+ import { Bone } from './Bone.js';
2
+ import { PhysicsConstraintData } from './PhysicsConstraintData.js';
3
+ import { Skeleton } from './Skeleton.js';
4
+ import { Updatable } from './Updatable.js';
5
+ import { Physics } from '@pixi-spine/base';
6
+ /** Stores the current pose for a physics constraint. A physics constraint applies physics to bones.
7
+ *
8
+ * See <a href="http://esotericsoftware.com/spine-physics-constraints">Physics constraints</a> in the Spine User Guide.
9
+ * @public
10
+ * */
11
+ export declare class PhysicsConstraint implements Updatable {
12
+ readonly data: PhysicsConstraintData;
13
+ private _bone;
14
+ set bone(bone: Bone);
15
+ get bone(): Bone;
16
+ inertia: number;
17
+ strength: number;
18
+ damping: number;
19
+ massInverse: number;
20
+ wind: number;
21
+ gravity: number;
22
+ mix: number;
23
+ _reset: boolean;
24
+ ux: number;
25
+ uy: number;
26
+ cx: number;
27
+ cy: number;
28
+ tx: number;
29
+ ty: number;
30
+ xOffset: number;
31
+ xVelocity: number;
32
+ yOffset: number;
33
+ yVelocity: number;
34
+ rotateOffset: number;
35
+ rotateVelocity: number;
36
+ scaleOffset: number;
37
+ scaleVelocity: number;
38
+ active: boolean;
39
+ readonly skeleton: Skeleton;
40
+ remaining: number;
41
+ lastTime: number;
42
+ constructor(data: PhysicsConstraintData, skeleton: Skeleton);
43
+ reset(): void;
44
+ setToSetupPose(): void;
45
+ isActive(): boolean;
46
+ /** Applies the constraint to the constrained bones. */
47
+ update(physics: Physics): void;
48
+ /** Translates the physics constraint so next {@link #update(Physics)} forces are applied as if the bone moved an additional
49
+ * amount in world space. */
50
+ translate(x: number, y: number): void;
51
+ /** Rotates the physics constraint so next {@link #update(Physics)} forces are applied as if the bone rotated around the
52
+ * specified point in world space. */
53
+ rotate(x: number, y: number, degrees: number): void;
54
+ }
@@ -0,0 +1,35 @@
1
+ import { BoneData } from './BoneData.js';
2
+ import { ConstraintData } from './ConstraintData.js';
3
+ /** Stores the setup pose for a {@link PhysicsConstraint}.
4
+ * <p>
5
+ * See <a href="http://esotericsoftware.com/spine-physics-constraints">Physics constraints</a> in the Spine User Guide.
6
+ * @public
7
+ * */
8
+ export declare class PhysicsConstraintData extends ConstraintData {
9
+ private _bone;
10
+ set bone(boneData: BoneData);
11
+ get bone(): BoneData;
12
+ x: number;
13
+ y: number;
14
+ rotate: number;
15
+ scaleX: number;
16
+ shearX: number;
17
+ limit: number;
18
+ step: number;
19
+ inertia: number;
20
+ strength: number;
21
+ damping: number;
22
+ massInverse: number;
23
+ wind: number;
24
+ gravity: number;
25
+ /** A percentage (0-1) that controls the mix between the constrained and unconstrained poses. */
26
+ mix: number;
27
+ inertiaGlobal: boolean;
28
+ strengthGlobal: boolean;
29
+ dampingGlobal: boolean;
30
+ massGlobal: boolean;
31
+ windGlobal: boolean;
32
+ gravityGlobal: boolean;
33
+ mixGlobal: boolean;
34
+ constructor(name: string);
35
+ }
@@ -0,0 +1,160 @@
1
+ import { Attachment } from './attachments';
2
+ import { Bone } from './Bone.js';
3
+ import { IkConstraint } from './IkConstraint.js';
4
+ import { PathConstraint } from './PathConstraint.js';
5
+ import { PhysicsConstraint } from './PhysicsConstraint.js';
6
+ import { SkeletonClipping } from './SkeletonClipping.js';
7
+ import { SkeletonData } from './SkeletonData.js';
8
+ import { Skin } from './Skin.js';
9
+ import { Slot } from './Slot.js';
10
+ import { TransformConstraint } from './TransformConstraint.js';
11
+ import { Updatable } from './Updatable.js';
12
+ import { Color, ISkeleton, Physics, Vector2 } from '@pixi-spine/base';
13
+ /** Stores the current pose for a skeleton.
14
+ *
15
+ * See [Instance objects](http://esotericsoftware.com/spine-runtime-architecture#Instance-objects) in the Spine Runtimes Guide.
16
+ * @public
17
+ * */
18
+ export declare class Skeleton implements ISkeleton<SkeletonData, Bone, Slot, Skin> {
19
+ private static quadTriangles;
20
+ static yDown: boolean;
21
+ /** The skeleton's setup pose data. */
22
+ data: SkeletonData;
23
+ /** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
24
+ bones: Array<Bone>;
25
+ /** The skeleton's slots in the setup pose draw order. */
26
+ slots: Array<Slot>;
27
+ /** The skeleton's slots in the order they should be drawn. The returned array may be modified to change the draw order. */
28
+ drawOrder: Array<Slot>;
29
+ /** The skeleton's IK constraints. */
30
+ ikConstraints: Array<IkConstraint>;
31
+ /** The skeleton's transform constraints. */
32
+ transformConstraints: Array<TransformConstraint>;
33
+ /** The skeleton's path constraints. */
34
+ pathConstraints: Array<PathConstraint>;
35
+ /** The skeleton's physics constraints. */
36
+ physicsConstraints: Array<PhysicsConstraint>;
37
+ /** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link #updateCache()}. */
38
+ _updateCache: Updatable[];
39
+ /** The skeleton's current skin. May be null. */
40
+ skin: Skin | null;
41
+ /** The color to tint all the skeleton's attachments. */
42
+ color: Color;
43
+ /** Scales the entire skeleton on the X axis. This affects all bones, even if the bone's transform mode disallows scale
44
+ * inheritance. */
45
+ scaleX: number;
46
+ /** Scales the entire skeleton on the Y axis. This affects all bones, even if the bone's transform mode disallows scale
47
+ * inheritance. */
48
+ private _scaleY;
49
+ get scaleY(): number;
50
+ set scaleY(scaleY: number);
51
+ /** Sets the skeleton X position, which is added to the root bone worldX position. */
52
+ x: number;
53
+ /** Sets the skeleton Y position, which is added to the root bone worldY position. */
54
+ y: number;
55
+ /** Returns the skeleton's time. This is used for time-based manipulations, such as {@link PhysicsConstraint}.
56
+ * <p>
57
+ * See {@link #update(float)}. */
58
+ time: number;
59
+ constructor(data: SkeletonData);
60
+ /** Caches information about bones and constraints. Must be called if the {@link #getSkin()} is modified or if bones,
61
+ * constraints, or weighted path attachments are added or removed. */
62
+ updateCache(): void;
63
+ sortIkConstraint(constraint: IkConstraint): void;
64
+ sortPathConstraint(constraint: PathConstraint): void;
65
+ sortTransformConstraint(constraint: TransformConstraint): void;
66
+ sortPathConstraintAttachment(skin: Skin, slotIndex: number, slotBone: Bone): void;
67
+ sortPathConstraintAttachmentWith(attachment: Attachment, slotBone: Bone): void;
68
+ sortPhysicsConstraint(constraint: PhysicsConstraint): void;
69
+ sortBone(bone: Bone): void;
70
+ sortReset(bones: Array<Bone>): void;
71
+ /** Updates the world transform for each bone and applies all constraints.
72
+ *
73
+ * See [World transforms](http://esotericsoftware.com/spine-runtime-skeletons#World-transforms) in the Spine
74
+ * Runtimes Guide. */
75
+ updateWorldTransform(physics: Physics): void;
76
+ updateWorldTransformWith(physics: Physics, parent: Bone): void;
77
+ /** Sets the bones, constraints, and slots to their setup pose values. */
78
+ setToSetupPose(): void;
79
+ /** Sets the bones and constraints to their setup pose values. */
80
+ setBonesToSetupPose(): void;
81
+ /** Sets the slots and draw order to their setup pose values. */
82
+ setSlotsToSetupPose(): void;
83
+ /** @returns May return null. */
84
+ getRootBone(): Bone;
85
+ /** @returns May be null. */
86
+ findBone(boneName: string): Bone;
87
+ /** @returns -1 if the bone was not found. */
88
+ findBoneIndex(boneName: string): number;
89
+ /** Finds a slot by comparing each slot's name. It is more efficient to cache the results of this method than to call it
90
+ * repeatedly.
91
+ * @returns May be null. */
92
+ findSlot(slotName: string): Slot;
93
+ /** @returns -1 if the bone was not found. */
94
+ findSlotIndex(slotName: string): number;
95
+ /** Sets a skin by name.
96
+ *
97
+ * See {@link #setSkin()}. */
98
+ setSkinByName(skinName: string): void;
99
+ /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#defaultSkin default skin}. If the
100
+ * skin is changed, {@link #updateCache()} is called.
101
+ *
102
+ * Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no
103
+ * old skin, each slot's setup mode attachment is attached from the new skin.
104
+ *
105
+ * After changing the skin, the visible attachments can be reset to those attached in the setup pose by calling
106
+ * {@link #setSlotsToSetupPose()}. Also, often {@link AnimationState#apply()} is called before the next time the
107
+ * skeleton is rendered to allow any attachment keys in the current animation(s) to hide or show attachments from the new skin.
108
+ * @param newSkin May be null. */
109
+ setSkin(newSkin: Skin): void;
110
+ /** Finds an attachment by looking in the {@link #skin} and {@link SkeletonData#defaultSkin} using the slot name and attachment
111
+ * name.
112
+ *
113
+ * See {@link #getAttachment()}.
114
+ * @returns May be null. */
115
+ getAttachmentByName(slotName: string, attachmentName: string): Attachment | null;
116
+ /** Finds an attachment by looking in the {@link #skin} and {@link SkeletonData#defaultSkin} using the slot index and
117
+ * attachment name. First the skin is checked and if the attachment was not found, the default skin is checked.
118
+ *
119
+ * See [Runtime skins](http://esotericsoftware.com/spine-runtime-skins) in the Spine Runtimes Guide.
120
+ * @returns May be null. */
121
+ getAttachment(slotIndex: number, attachmentName: string): Attachment | null;
122
+ /** A convenience method to set an attachment by finding the slot with {@link #findSlot()}, finding the attachment with
123
+ * {@link #getAttachment()}, then setting the slot's {@link Slot#attachment}.
124
+ * @param attachmentName May be null to clear the slot's attachment. */
125
+ setAttachment(slotName: string, attachmentName: string): void;
126
+ /** Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results of this method
127
+ * than to call it repeatedly.
128
+ * @return May be null. */
129
+ findIkConstraint(constraintName: string): IkConstraint;
130
+ /** Finds a transform constraint by comparing each transform constraint's name. It is more efficient to cache the results of
131
+ * this method than to call it repeatedly.
132
+ * @return May be null. */
133
+ findTransformConstraint(constraintName: string): TransformConstraint;
134
+ /** Finds a path constraint by comparing each path constraint's name. It is more efficient to cache the results of this method
135
+ * than to call it repeatedly.
136
+ * @return May be null. */
137
+ findPathConstraint(constraintName: string): PathConstraint;
138
+ /** Finds a physics constraint by comparing each physics constraint's name. It is more efficient to cache the results of this
139
+ * method than to call it repeatedly. */
140
+ findPhysicsConstraint(constraintName: string): PhysicsConstraint;
141
+ /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose as `{ x: number, y: number, width: number, height: number }`.
142
+ * Note that this method will create temporary objects which can add to garbage collection pressure. Use `getBounds()` if garbage collection is a concern. */
143
+ getBoundsRect(): {
144
+ x: number;
145
+ y: number;
146
+ width: number;
147
+ height: number;
148
+ };
149
+ /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.
150
+ * @param offset An output value, the distance from the skeleton origin to the bottom left corner of the AABB.
151
+ * @param size An output value, the width and height of the AABB.
152
+ * @param temp Working memory to temporarily store attachments' computed world vertices.
153
+ * @param clipper {@link SkeletonClipping} to use. If <code>null</code>, no clipping is applied. */
154
+ getBounds(offset: Vector2, size: Vector2, temp?: Array<number>, clipper?: SkeletonClipping | null): void;
155
+ /** Increments the skeleton's {@link #time}. */
156
+ update(delta: number): void;
157
+ physicsTranslate(x: number, y: number): void;
158
+ /** Calls {@link PhysicsConstraint#rotate(float, float, float)} for each physics constraint. */
159
+ physicsRotate(x: number, y: number, degrees: number): void;
160
+ }
@@ -0,0 +1,43 @@
1
+ import { AttachmentLoader } from './attachments/AttachmentLoader.js';
2
+ import { SkeletonData } from './SkeletonData.js';
3
+ /** Loads skeleton data in the Spine binary format.
4
+ * @public
5
+ * See [Spine binary format](http://esotericsoftware.com/spine-binary-format) and
6
+ * [JSON and binary data](http://esotericsoftware.com/spine-loading-skeleton-data#JSON-and-binary-data) in the Spine
7
+ * Runtimes Guide. */
8
+ export declare class SkeletonBinary {
9
+ /** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
10
+ * runtime than were used in Spine.
11
+ *
12
+ * See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
13
+ scale: number;
14
+ attachmentLoader: AttachmentLoader;
15
+ private linkedMeshes;
16
+ constructor(attachmentLoader: AttachmentLoader);
17
+ readSkeletonData(binary: Uint8Array | ArrayBuffer): SkeletonData;
18
+ private readSkin;
19
+ private readAttachment;
20
+ private readSequence;
21
+ private readVertices;
22
+ private readFloatArray;
23
+ private readShortArray;
24
+ private readAnimation;
25
+ }
26
+ /**
27
+ * @public
28
+ * */
29
+ export declare class BinaryInput {
30
+ strings: string[];
31
+ private index;
32
+ private buffer;
33
+ constructor(data: Uint8Array | ArrayBuffer, strings?: string[], index?: number, buffer?: DataView);
34
+ readByte(): number;
35
+ readUnsignedByte(): number;
36
+ readShort(): number;
37
+ readInt32(): number;
38
+ readInt(optimizePositive: boolean): number;
39
+ readStringRef(): string | null;
40
+ readString(): string | null;
41
+ readFloat(): number;
42
+ readBoolean(): boolean;
43
+ }
@@ -0,0 +1,51 @@
1
+ import { BoundingBoxAttachment } from './attachments/BoundingBoxAttachment.js';
2
+ import { Skeleton } from './Skeleton.js';
3
+ import { NumberArrayLike } from '@pixi-spine/base';
4
+ /** Collects each visible {@link BoundingBoxAttachment} and computes the world vertices for its polygon. The polygon vertices are
5
+ * provided along with convenience methods for doing hit detection.
6
+ * @public
7
+ * */
8
+ export declare class SkeletonBounds {
9
+ /** The left edge of the axis aligned bounding box. */
10
+ minX: number;
11
+ /** The bottom edge of the axis aligned bounding box. */
12
+ minY: number;
13
+ /** The right edge of the axis aligned bounding box. */
14
+ maxX: number;
15
+ /** The top edge of the axis aligned bounding box. */
16
+ maxY: number;
17
+ /** The visible bounding boxes. */
18
+ boundingBoxes: BoundingBoxAttachment[];
19
+ /** The world vertices for the bounding box polygons. */
20
+ polygons: NumberArrayLike[];
21
+ private polygonPool;
22
+ /** Clears any previous polygons, finds all visible bounding box attachments, and computes the world vertices for each bounding
23
+ * box's polygon.
24
+ * @param updateAabb If true, the axis aligned bounding box containing all the polygons is computed. If false, the
25
+ * SkeletonBounds AABB methods will always return true. */
26
+ update(skeleton: Skeleton, updateAabb: boolean): void;
27
+ aabbCompute(): void;
28
+ /** Returns true if the axis aligned bounding box contains the point. */
29
+ aabbContainsPoint(x: number, y: number): boolean;
30
+ /** Returns true if the axis aligned bounding box intersects the line segment. */
31
+ aabbIntersectsSegment(x1: number, y1: number, x2: number, y2: number): boolean;
32
+ /** Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds. */
33
+ aabbIntersectsSkeleton(bounds: SkeletonBounds): boolean;
34
+ /** Returns the first bounding box attachment that contains the point, or null. When doing many checks, it is usually more
35
+ * efficient to only call this method if {@link #aabbContainsPoint(float, float)} returns true. */
36
+ containsPoint(x: number, y: number): BoundingBoxAttachment | null;
37
+ /** Returns true if the polygon contains the point. */
38
+ containsPointPolygon(polygon: NumberArrayLike, x: number, y: number): boolean;
39
+ /** Returns the first bounding box attachment that contains any part of the line segment, or null. When doing many checks, it
40
+ * is usually more efficient to only call this method if {@link #aabbIntersectsSegment()} returns
41
+ * true. */
42
+ intersectsSegment(x1: number, y1: number, x2: number, y2: number): BoundingBoxAttachment;
43
+ /** Returns true if the polygon contains any part of the line segment. */
44
+ intersectsSegmentPolygon(polygon: NumberArrayLike, x1: number, y1: number, x2: number, y2: number): boolean;
45
+ /** Returns the polygon for the specified bounding box, or null. */
46
+ getPolygon(boundingBox: BoundingBoxAttachment): NumberArrayLike;
47
+ /** The width of the axis aligned bounding box. */
48
+ getWidth(): number;
49
+ /** The height of the axis aligned bounding box. */
50
+ getHeight(): number;
51
+ }
@@ -0,0 +1,38 @@
1
+ import { ClippingAttachment } from './attachments';
2
+ import { Slot } from './Slot.js';
3
+ import { Color, NumberArrayLike } from '@pixi-spine/base';
4
+ /**
5
+ * @public
6
+ */
7
+ export declare class SkeletonClipping {
8
+ private triangulator;
9
+ private clippingPolygon;
10
+ private clipOutput;
11
+ clippedVertices: number[];
12
+ clippedUVs: number[];
13
+ clippedTriangles: number[];
14
+ private scratch;
15
+ private clipAttachment;
16
+ private clippingPolygons;
17
+ clipStart(slot: Slot, clip: ClippingAttachment): number;
18
+ clipEndWithSlot(slot: Slot): void;
19
+ clipEnd(): void;
20
+ isClipping(): boolean;
21
+ /**
22
+ * @deprecated Use clipTriangles without verticesLength parameter. Mark for removal in 4.3.
23
+ */
24
+ clipTriangles(vertices: NumberArrayLike, verticesLength: number, triangles: NumberArrayLike, trianglesLength: number): void;
25
+ /**
26
+ * @deprecated Use clipTriangles without verticesLength parameter. Mark for removal in 4.3.
27
+ */
28
+ clipTriangles(vertices: NumberArrayLike, verticesLength: number, triangles: NumberArrayLike, trianglesLength: number, uvs: NumberArrayLike, light: Color, dark: Color, twoColor: boolean): void;
29
+ clipTriangles(vertices: NumberArrayLike, triangles: NumberArrayLike, trianglesLength: number): void;
30
+ clipTriangles(vertices: NumberArrayLike, triangles: NumberArrayLike, trianglesLength: number, uvs: NumberArrayLike, light: Color, dark: Color, twoColor: boolean): void;
31
+ private clipTrianglesNoRender;
32
+ private clipTrianglesRender;
33
+ clipTrianglesUnpacked(vertices: NumberArrayLike, triangles: NumberArrayLike, trianglesLength: number, uvs: NumberArrayLike): void;
34
+ /** Clips the input triangle against the convex, clockwise clipping area. If the triangle lies entirely within the clipping
35
+ * area, false is returned. The clipping area must duplicate the first vertex at the end of the vertices list. */
36
+ clip(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, clippingArea: Array<number>, output: Array<number>): boolean;
37
+ static makeClockwise(polygon: NumberArrayLike): void;
38
+ }