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.

Potentially problematic release.


This version of simple-pixi-spine might be problematic. Click here for more details.

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,401 @@
1
+ import { IAnimationState, IAnimationStateListener, ITrackEntry, MixBlend, Pool, IntSet } from '@pixi-spine/base';
2
+ import { Animation, AttachmentTimeline, Timeline } from './Animation';
3
+ import type { AnimationStateData } from './AnimationStateData';
4
+ import type { Event } from './Event';
5
+ import type { Skeleton } from './Skeleton';
6
+ import type { Slot } from './Slot';
7
+ /** Applies animations over time, queues animations for later playback, mixes (crossfading) between animations, and applies
8
+ * multiple animations on top of each other (layering).
9
+ *
10
+ * See [Applying Animations](http://esotericsoftware.com/spine-applying-animations/) in the Spine Runtimes Guide. */
11
+ /**
12
+ * @public
13
+ */
14
+ export declare class AnimationState implements IAnimationState<AnimationStateData> {
15
+ static emptyAnimation: Animation;
16
+ /** 1. A previously applied timeline has set this property.
17
+ *
18
+ * Result: Mix from the current pose to the timeline pose. */
19
+ static SUBSEQUENT: number;
20
+ /** 1. This is the first timeline to set this property.
21
+ * 2. The next track entry applied after this one does not have a timeline to set this property.
22
+ *
23
+ * Result: Mix from the setup pose to the timeline pose. */
24
+ static FIRST: number;
25
+ /** 1) A previously applied timeline has set this property.<br>
26
+ * 2) The next track entry to be applied does have a timeline to set this property.<br>
27
+ * 3) The next track entry after that one does not have a timeline to set this property.<br>
28
+ * Result: Mix from the current pose to the timeline pose, but do not mix out. This avoids "dipping" when crossfading
29
+ * animations that key the same property. A subsequent timeline will set this property using a mix. */
30
+ static HOLD_SUBSEQUENT: number;
31
+ /** 1) This is the first timeline to set this property.<br>
32
+ * 2) The next track entry to be applied does have a timeline to set this property.<br>
33
+ * 3) The next track entry after that one does not have a timeline to set this property.<br>
34
+ * Result: Mix from the setup pose to the timeline pose, but do not mix out. This avoids "dipping" when crossfading animations
35
+ * that key the same property. A subsequent timeline will set this property using a mix. */
36
+ static HOLD_FIRST: number;
37
+ /** 1. This is the first timeline to set this property.
38
+ * 2. The next track entry to be applied does have a timeline to set this property.
39
+ * 3. The next track entry after that one does have a timeline to set this property.
40
+ * 4. timelineHoldMix stores the first subsequent track entry that does not have a timeline to set this property.
41
+ *
42
+ * Result: The same as HOLD except the mix percentage from the timelineHoldMix track entry is used. This handles when more than
43
+ * 2 track entries in a row have a timeline that sets the same property.
44
+ *
45
+ * Eg, A -> B -> C -> D where A, B, and C have a timeline setting same property, but D does not. When A is applied, to avoid
46
+ * "dipping" A is not mixed out, however D (the first entry that doesn't set the property) mixing in is used to mix out A
47
+ * (which affects B and C). Without using D to mix out, A would be applied fully until mixing completes, then snap into
48
+ * place. */
49
+ static HOLD_MIX: number;
50
+ static SETUP: number;
51
+ static CURRENT: number;
52
+ /** The AnimationStateData to look up mix durations. */
53
+ data: AnimationStateData;
54
+ /** The list of tracks that currently have animations, which may contain null entries. */
55
+ tracks: TrackEntry[];
56
+ /** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower
57
+ * or faster. Defaults to 1.
58
+ *
59
+ * See TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */
60
+ timeScale: number;
61
+ unkeyedState: number;
62
+ events: Event[];
63
+ listeners: AnimationStateListener[];
64
+ queue: EventQueue;
65
+ propertyIDs: IntSet;
66
+ animationsChanged: boolean;
67
+ trackEntryPool: Pool<TrackEntry>;
68
+ constructor(data: AnimationStateData);
69
+ /** Increments each track entry {@link TrackEntry#trackTime()}, setting queued animations as current if needed. */
70
+ update(delta: number): void;
71
+ /** Returns true when all mixing from entries are complete. */
72
+ updateMixingFrom(to: TrackEntry, delta: number): boolean;
73
+ /** Poses the skeleton using the track entry animations. There are no side effects other than invoking listeners, so the
74
+ * animation state can be applied to multiple skeletons to pose them identically.
75
+ * @returns True if any animations were applied. */
76
+ apply(skeleton: Skeleton): boolean;
77
+ applyMixingFrom(to: TrackEntry, skeleton: Skeleton, blend: MixBlend): number;
78
+ applyAttachmentTimeline(timeline: AttachmentTimeline, skeleton: Skeleton, time: number, blend: MixBlend, attachments: boolean): void;
79
+ setAttachment(skeleton: Skeleton, slot: Slot, attachmentName: string, attachments: boolean): void;
80
+ applyRotateTimeline(timeline: Timeline, skeleton: Skeleton, time: number, alpha: number, blend: MixBlend, timelinesRotation: Array<number>, i: number, firstFrame: boolean): void;
81
+ queueEvents(entry: TrackEntry, animationTime: number): void;
82
+ /** Removes all animations from all tracks, leaving skeletons in their current pose.
83
+ *
84
+ * It may be desired to use {@link AnimationState#setEmptyAnimation()} to mix the skeletons back to the setup pose,
85
+ * rather than leaving them in their current pose. */
86
+ clearTracks(): void;
87
+ /** Removes all animations from the track, leaving skeletons in their current pose.
88
+ *
89
+ * It may be desired to use {@link AnimationState#setEmptyAnimation()} to mix the skeletons back to the setup pose,
90
+ * rather than leaving them in their current pose. */
91
+ clearTrack(trackIndex: number): void;
92
+ setCurrent(index: number, current: TrackEntry, interrupt: boolean): void;
93
+ /** Sets an animation by name.
94
+ *
95
+ * {@link #setAnimationWith(}. */
96
+ setAnimation(trackIndex: number, animationName: string, loop: boolean): TrackEntry;
97
+ /** Sets the current animation for a track, discarding any queued animations. If the formerly current track entry was never
98
+ * applied to a skeleton, it is replaced (not mixed from).
99
+ * @param loop If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its
100
+ * duration. In either case {@link TrackEntry#trackEnd} determines when the track is cleared.
101
+ * @returns A track entry to allow further customization of animation playback. References to the track entry must not be kept
102
+ * after the {@link AnimationStateListener#dispose()} event occurs. */
103
+ setAnimationWith(trackIndex: number, animation: Animation, loop: boolean): TrackEntry;
104
+ /** Queues an animation by name.
105
+ *
106
+ * See {@link #addAnimationWith()}. */
107
+ addAnimation(trackIndex: number, animationName: string, loop: boolean, delay: number): TrackEntry;
108
+ /** Adds an animation to be played after the current or last queued animation for a track. If the track is empty, it is
109
+ * equivalent to calling {@link #setAnimationWith()}.
110
+ * @param delay If > 0, sets {@link TrackEntry#delay}. If <= 0, the delay set is the duration of the previous track entry
111
+ * minus any mix duration (from the {@link AnimationStateData}) plus the specified `delay` (ie the mix
112
+ * ends at (`delay` = 0) or before (`delay` < 0) the previous track entry duration). If the
113
+ * previous entry is looping, its next loop completion is used instead of its duration.
114
+ * @returns A track entry to allow further customization of animation playback. References to the track entry must not be kept
115
+ * after the {@link AnimationStateListener#dispose()} event occurs. */
116
+ addAnimationWith(trackIndex: number, animation: Animation, loop: boolean, delay: number): TrackEntry;
117
+ /** Sets an empty animation for a track, discarding any queued animations, and sets the track entry's
118
+ * {@link TrackEntry#mixduration}. An empty animation has no timelines and serves as a placeholder for mixing in or out.
119
+ *
120
+ * Mixing out is done by setting an empty animation with a mix duration using either {@link #setEmptyAnimation()},
121
+ * {@link #setEmptyAnimations()}, or {@link #addEmptyAnimation()}. Mixing to an empty animation causes
122
+ * the previous animation to be applied less and less over the mix duration. Properties keyed in the previous animation
123
+ * transition to the value from lower tracks or to the setup pose value if no lower tracks key the property. A mix duration of
124
+ * 0 still mixes out over one frame.
125
+ *
126
+ * Mixing in is done by first setting an empty animation, then adding an animation using
127
+ * {@link #addAnimation()} and on the returned track entry, set the
128
+ * {@link TrackEntry#setMixDuration()}. Mixing from an empty animation causes the new animation to be applied more and
129
+ * more over the mix duration. Properties keyed in the new animation transition from the value from lower tracks or from the
130
+ * setup pose value if no lower tracks key the property to the value keyed in the new animation. */
131
+ setEmptyAnimation(trackIndex: number, mixDuration: number): TrackEntry;
132
+ /** Adds an empty animation to be played after the current or last queued animation for a track, and sets the track entry's
133
+ * {@link TrackEntry#mixDuration}. If the track is empty, it is equivalent to calling
134
+ * {@link #setEmptyAnimation()}.
135
+ *
136
+ * See {@link #setEmptyAnimation()}.
137
+ * @param delay If > 0, sets {@link TrackEntry#delay}. If <= 0, the delay set is the duration of the previous track entry
138
+ * minus any mix duration plus the specified `delay` (ie the mix ends at (`delay` = 0) or
139
+ * before (`delay` < 0) the previous track entry duration). If the previous entry is looping, its next
140
+ * loop completion is used instead of its duration.
141
+ * @return A track entry to allow further customization of animation playback. References to the track entry must not be kept
142
+ * after the {@link AnimationStateListener#dispose()} event occurs. */
143
+ addEmptyAnimation(trackIndex: number, mixDuration: number, delay: number): TrackEntry;
144
+ /** Sets an empty animation for every track, discarding any queued animations, and mixes to it over the specified mix
145
+ * duration. */
146
+ setEmptyAnimations(mixDuration: number): void;
147
+ expandToIndex(index: number): TrackEntry;
148
+ /** @param last May be null. */
149
+ trackEntry(trackIndex: number, animation: Animation, loop: boolean, last: TrackEntry): TrackEntry;
150
+ disposeNext(entry: TrackEntry): void;
151
+ _animationsChanged(): void;
152
+ computeHold(entry: TrackEntry): void;
153
+ /** Returns the track entry for the animation currently playing on the track, or null if no animation is currently playing. */
154
+ getCurrent(trackIndex: number): TrackEntry;
155
+ /** Adds a listener to receive events for all track entries. */
156
+ addListener(listener: AnimationStateListener): void;
157
+ /** Removes the listener added with {@link #addListener()}. */
158
+ removeListener(listener: AnimationStateListener): void;
159
+ /** Removes all listeners added with {@link #addListener()}. */
160
+ clearListeners(): void;
161
+ /** Discards all listener notifications that have not yet been delivered. This can be useful to call from an
162
+ * {@link AnimationStateListener} when it is known that further notifications that may have been already queued for delivery
163
+ * are not wanted because new animations are being set. */
164
+ clearListenerNotifications(): void;
165
+ onComplete: (trackIndex: number, loopCount: number) => any;
166
+ onEvent: (trackIndex: number, event: Event) => any;
167
+ onStart: (trackIndex: number) => any;
168
+ onEnd: (trackIndex: number) => any;
169
+ private static deprecatedWarning1;
170
+ setAnimationByName(trackIndex: number, animationName: string, loop: boolean): void;
171
+ private static deprecatedWarning2;
172
+ addAnimationByName(trackIndex: number, animationName: string, loop: boolean, delay: number): void;
173
+ private static deprecatedWarning3;
174
+ hasAnimation(animationName: string): boolean;
175
+ hasAnimationByName(animationName: string): boolean;
176
+ }
177
+ /** Stores settings and other state for the playback of an animation on an {@link AnimationState} track.
178
+ *
179
+ * References to a track entry must not be kept after the {@link AnimationStateListener#dispose()} event occurs. */
180
+ /**
181
+ * @public
182
+ */
183
+ export declare class TrackEntry implements ITrackEntry {
184
+ /** The animation to apply for this track entry. */
185
+ animation: Animation;
186
+ /** The animation queued to start after this animation, or null. `next` makes up a linked list. */
187
+ next: TrackEntry;
188
+ /** The track entry for the previous animation when mixing from the previous animation to this animation, or null if no
189
+ * mixing is currently occuring. When mixing from multiple animations, `mixingFrom` makes up a linked list. */
190
+ mixingFrom: TrackEntry;
191
+ /** The track entry for the next animation when mixing from this animation to the next animation, or null if no mixing is
192
+ * currently occuring. When mixing to multiple animations, `mixingTo` makes up a linked list. */
193
+ mixingTo: TrackEntry;
194
+ /** The listener for events generated by this track entry, or null.
195
+ *
196
+ * A track entry returned from {@link AnimationState#setAnimation()} is already the current animation
197
+ * for the track, so the track entry listener {@link AnimationStateListener#start()} will not be called. */
198
+ listener: AnimationStateListener;
199
+ /** The index of the track where this track entry is either current or queued.
200
+ *
201
+ * See {@link AnimationState#getCurrent()}. */
202
+ trackIndex: number;
203
+ /** If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its
204
+ * duration. */
205
+ loop: boolean;
206
+ /** If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead
207
+ * of being mixed out.
208
+ *
209
+ * When mixing between animations that key the same property, if a lower track also keys that property then the value will
210
+ * briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0%
211
+ * while the second animation mixes from 0% to 100%. Setting `holdPrevious` to true applies the first animation
212
+ * at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which
213
+ * keys the property, only when a higher track also keys the property.
214
+ *
215
+ * Snapping will occur if `holdPrevious` is true and this animation does not key all the same properties as the
216
+ * previous animation. */
217
+ holdPrevious: boolean;
218
+ /** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
219
+ * `eventThreshold`, event timelines are applied while this animation is being mixed out. Defaults to 0, so event
220
+ * timelines are not applied while this animation is being mixed out. */
221
+ eventThreshold: number;
222
+ /** When the mix percentage ({@link #mixtime} / {@link #mixDuration}) is less than the
223
+ * `attachmentThreshold`, attachment timelines are applied while this animation is being mixed out. Defaults to
224
+ * 0, so attachment timelines are not applied while this animation is being mixed out. */
225
+ attachmentThreshold: number;
226
+ /** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
227
+ * `drawOrderThreshold`, draw order timelines are applied while this animation is being mixed out. Defaults to 0,
228
+ * so draw order timelines are not applied while this animation is being mixed out. */
229
+ drawOrderThreshold: number;
230
+ /** Seconds when this animation starts, both initially and after looping. Defaults to 0.
231
+ *
232
+ * When changing the `animationStart` time, it often makes sense to set {@link #animationLast} to the same
233
+ * value to prevent timeline keys before the start time from triggering. */
234
+ animationStart: number;
235
+ /** Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will
236
+ * loop back to {@link #animationStart} at this time. Defaults to the animation {@link Animation#duration}. */
237
+ animationEnd: number;
238
+ /** The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this
239
+ * animation is applied, event timelines will fire all events between the `animationLast` time (exclusive) and
240
+ * `animationTime` (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation
241
+ * is applied. */
242
+ animationLast: number;
243
+ nextAnimationLast: number;
244
+ /** Seconds to postpone playing the animation. When this track entry is the current track entry, `delay`
245
+ * postpones incrementing the {@link #trackTime}. When this track entry is queued, `delay` is the time from
246
+ * the start of the previous animation to when this track entry will become the current track entry (ie when the previous
247
+ * track entry {@link TrackEntry#trackTime} >= this track entry's `delay`).
248
+ *
249
+ * {@link #timeScale} affects the delay. */
250
+ delay: number;
251
+ /** Current time in seconds this track entry has been the current track entry. The track time determines
252
+ * {@link #animationTime}. The track time can be set to start the animation at a time other than 0, without affecting
253
+ * looping. */
254
+ trackTime: number;
255
+ trackLast: number;
256
+ nextTrackLast: number;
257
+ /** The track time in seconds when this animation will be removed from the track. Defaults to the highest possible float
258
+ * value, meaning the animation will be applied until a new animation is set or the track is cleared. If the track end time
259
+ * is reached, no other animations are queued for playback, and mixing from any previous animations is complete, then the
260
+ * properties keyed by the animation are set to the setup pose and the track is cleared.
261
+ *
262
+ * It may be desired to use {@link AnimationState#addEmptyAnimation()} rather than have the animation
263
+ * abruptly cease being applied. */
264
+ trackEnd: number;
265
+ /** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or
266
+ * faster. Defaults to 1.
267
+ *
268
+ * {@link #mixTime} is not affected by track entry time scale, so {@link #mixDuration} may need to be adjusted to
269
+ * match the animation speed.
270
+ *
271
+ * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
272
+ * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, assuming time scale to be 1. If
273
+ * the time scale is not 1, the delay may need to be adjusted.
274
+ *
275
+ * See AnimationState {@link AnimationState#timeScale} for affecting all animations. */
276
+ timeScale: number;
277
+ /** Values < 1 mix this animation with the skeleton's current pose (usually the pose resulting from lower tracks). Defaults
278
+ * to 1, which overwrites the skeleton's current pose with this animation.
279
+ *
280
+ * Typically track 0 is used to completely pose the skeleton, then alpha is used on higher tracks. It doesn't make sense to
281
+ * use alpha on track 0 if the skeleton pose is from the last frame render. */
282
+ alpha: number;
283
+ /** Seconds from 0 to the {@link #getMixDuration()} when mixing from the previous animation to this animation. May be
284
+ * slightly more than `mixDuration` when the mix is complete. */
285
+ mixTime: number;
286
+ /** Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData
287
+ * {@link AnimationStateData#getMix()} based on the animation before this animation (if any).
288
+ *
289
+ * A mix duration of 0 still mixes out over one frame to provide the track entry being mixed out a chance to revert the
290
+ * properties it was animating.
291
+ *
292
+ * The `mixDuration` can be set manually rather than use the value from
293
+ * {@link AnimationStateData#getMix()}. In that case, the `mixDuration` can be set for a new
294
+ * track entry only before {@link AnimationState#update(float)} is first called.
295
+ *
296
+ * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
297
+ * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, not a mix duration set
298
+ * afterward. */
299
+ mixDuration: number;
300
+ interruptAlpha: number;
301
+ totalAlpha: number;
302
+ /** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which
303
+ * replaces the values from the lower tracks with the animation values. {@link MixBlend#add} adds the animation values to
304
+ * the values from the lower tracks.
305
+ *
306
+ * The `mixBlend` can be set for a new track entry only before {@link AnimationState#apply()} is first
307
+ * called. */
308
+ mixBlend: MixBlend;
309
+ timelineMode: number[];
310
+ timelineHoldMix: TrackEntry[];
311
+ timelinesRotation: number[];
312
+ reset(): void;
313
+ /** Uses {@link #trackTime} to compute the `animationTime`, which is between {@link #animationStart}
314
+ * and {@link #animationEnd}. When the `trackTime` is 0, the `animationTime` is equal to the
315
+ * `animationStart` time. */
316
+ getAnimationTime(): number;
317
+ setAnimationLast(animationLast: number): void;
318
+ /** Returns true if at least one loop has been completed.
319
+ *
320
+ * See {@link AnimationStateListener#complete()}. */
321
+ isComplete(): boolean;
322
+ /** Resets the rotation directions for mixing this entry's rotate timelines. This can be useful to avoid bones rotating the
323
+ * long way around when using {@link #alpha} and starting animations on other tracks.
324
+ *
325
+ * Mixing with {@link MixBlend#replace} involves finding a rotation between two others, which has two possible solutions:
326
+ * the short way or the long way around. The two rotations likely change over time, so which direction is the short or long
327
+ * way also changes. If the short way was always chosen, bones would flip to the other side when that direction became the
328
+ * long way. TrackEntry chooses the short way the first time it is applied and remembers that direction. */
329
+ resetRotationDirections(): void;
330
+ onComplete: (trackIndex: number, loopCount: number) => any;
331
+ onEvent: (trackIndex: number, event: Event) => any;
332
+ onStart: (trackIndex: number) => any;
333
+ onEnd: (trackIndex: number) => any;
334
+ private static deprecatedWarning1;
335
+ private static deprecatedWarning2;
336
+ get time(): number;
337
+ set time(value: number);
338
+ get endTime(): number;
339
+ set endTime(value: number);
340
+ loopsCount(): number;
341
+ }
342
+ /**
343
+ * @public
344
+ */
345
+ export declare class EventQueue {
346
+ objects: Array<any>;
347
+ drainDisabled: boolean;
348
+ animState: AnimationState;
349
+ constructor(animState: AnimationState);
350
+ start(entry: TrackEntry): void;
351
+ interrupt(entry: TrackEntry): void;
352
+ end(entry: TrackEntry): void;
353
+ dispose(entry: TrackEntry): void;
354
+ complete(entry: TrackEntry): void;
355
+ event(entry: TrackEntry, event: Event): void;
356
+ private static deprecatedWarning1;
357
+ deprecateStuff(): boolean;
358
+ drain(): void;
359
+ clear(): void;
360
+ }
361
+ /**
362
+ * @public
363
+ */
364
+ export declare enum EventType {
365
+ start = 0,
366
+ interrupt = 1,
367
+ end = 2,
368
+ dispose = 3,
369
+ complete = 4,
370
+ event = 5
371
+ }
372
+ /**
373
+ * @public
374
+ */
375
+ export interface AnimationStateListener extends IAnimationStateListener {
376
+ /** Invoked when this entry has been set as the current entry. */
377
+ start?(entry: TrackEntry): void;
378
+ /** Invoked when another entry has replaced this entry as the current entry. This entry may continue being applied for
379
+ * mixing. */
380
+ interrupt?(entry: TrackEntry): void;
381
+ /** Invoked when this entry is no longer the current entry and will never be applied again. */
382
+ end?(entry: TrackEntry): void;
383
+ /** Invoked when this entry will be disposed. This may occur without the entry ever being set as the current entry.
384
+ * References to the entry should not be kept after dispose is called, as it may be destroyed or reused. */
385
+ dispose?(entry: TrackEntry): void;
386
+ /** Invoked every time this entry's animation completes a loop. */
387
+ complete?(entry: TrackEntry): void;
388
+ /** Invoked when this entry's animation triggers an event. */
389
+ event?(entry: TrackEntry, event: Event): void;
390
+ }
391
+ /**
392
+ * @public
393
+ */
394
+ export declare abstract class AnimationStateAdapter implements AnimationStateListener {
395
+ start(entry: TrackEntry): void;
396
+ interrupt(entry: TrackEntry): void;
397
+ end(entry: TrackEntry): void;
398
+ dispose(entry: TrackEntry): void;
399
+ complete(entry: TrackEntry): void;
400
+ event(entry: TrackEntry, event: Event): void;
401
+ }
@@ -0,0 +1,17 @@
1
+ import type { SkeletonData } from './SkeletonData';
2
+ import type { IAnimation, IAnimationStateData, StringMap } from '@pixi-spine/base';
3
+ import type { Animation } from './Animation';
4
+ /**
5
+ * @public
6
+ */
7
+ export declare class AnimationStateData implements IAnimationStateData<SkeletonData, Animation> {
8
+ skeletonData: SkeletonData;
9
+ animationToMixTime: StringMap<number>;
10
+ defaultMix: number;
11
+ constructor(skeletonData: SkeletonData);
12
+ setMix(fromName: string, toName: string, duration: number): void;
13
+ private static deprecatedWarning1;
14
+ setMixByName(fromName: string, toName: string, duration: number): void;
15
+ setMixWith(from: IAnimation, to: IAnimation, duration: number): void;
16
+ getMix(from: IAnimation, to: IAnimation): number;
17
+ }
@@ -0,0 +1,20 @@
1
+ import { AttachmentLoader, RegionAttachment, MeshAttachment, BoundingBoxAttachment, PathAttachment, PointAttachment, ClippingAttachment } from './attachments';
2
+ import type { TextureAtlas } from '@pixi-spine/base';
3
+ import type { Skin } from './Skin';
4
+ /**
5
+ * @public
6
+ */
7
+ export declare class AtlasAttachmentLoader implements AttachmentLoader {
8
+ atlas: TextureAtlas;
9
+ constructor(atlas: TextureAtlas);
10
+ /** @return May be null to not load an attachment. */
11
+ newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment;
12
+ /** @return May be null to not load an attachment. */
13
+ newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment;
14
+ /** @return May be null to not load an attachment. */
15
+ newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment;
16
+ /** @return May be null to not load an attachment */
17
+ newPathAttachment(skin: Skin, name: string): PathAttachment;
18
+ newPointAttachment(skin: Skin, name: string): PointAttachment;
19
+ newClippingAttachment(skin: Skin, name: string): ClippingAttachment;
20
+ }
@@ -0,0 +1,58 @@
1
+ import { Matrix } from 'pixi.js';
2
+ import type { Updatable } from './Updatable';
3
+ import type { BoneData } from './BoneData';
4
+ import type { Skeleton } from './Skeleton';
5
+ import { IBone, Vector2 } from '@pixi-spine/base';
6
+ /**
7
+ * @public
8
+ */
9
+ export declare class Bone implements Updatable, IBone {
10
+ matrix: Matrix;
11
+ get worldX(): number;
12
+ get worldY(): number;
13
+ data: BoneData;
14
+ skeleton: Skeleton;
15
+ parent: Bone;
16
+ children: Bone[];
17
+ x: number;
18
+ y: number;
19
+ rotation: number;
20
+ scaleX: number;
21
+ scaleY: number;
22
+ shearX: number;
23
+ shearY: number;
24
+ ax: number;
25
+ ay: number;
26
+ arotation: number;
27
+ ascaleX: number;
28
+ ascaleY: number;
29
+ ashearX: number;
30
+ ashearY: number;
31
+ appliedValid: boolean;
32
+ sorted: boolean;
33
+ active: boolean;
34
+ /** @param parent May be null. */
35
+ constructor(data: BoneData, skeleton: Skeleton, parent: Bone);
36
+ isActive(): boolean;
37
+ /** Same as {@link #updateWorldTransform()}. This method exists for Bone to implement {@link Updatable}. */
38
+ update(): void;
39
+ /** Computes the world transform using the parent bone and this bone's local transform. */
40
+ updateWorldTransform(): void;
41
+ /** Computes the world transform using the parent bone and the specified local transform. */
42
+ updateWorldTransformWith(x: number, y: number, rotation: number, scaleX: number, scaleY: number, shearX: number, shearY: number): void;
43
+ setToSetupPose(): void;
44
+ getWorldRotationX(): number;
45
+ getWorldRotationY(): number;
46
+ getWorldScaleX(): number;
47
+ getWorldScaleY(): number;
48
+ /** Computes the individual applied transform values from the world transform. This can be useful to perform processing using
49
+ * the applied transform after the world transform has been modified directly (eg, by a constraint).
50
+ * <p>
51
+ * Some information is ambiguous in the world transform, such as -1,-1 scale versus 180 rotation. */
52
+ updateAppliedTransform(): void;
53
+ worldToLocal(world: Vector2): Vector2;
54
+ localToWorld(local: Vector2): Vector2;
55
+ worldToLocalRotation(worldRotation: number): number;
56
+ localToWorldRotation(localRotation: number): number;
57
+ rotateWorld(degrees: number): void;
58
+ }
@@ -0,0 +1,21 @@
1
+ import { Color, TransformMode } from '@pixi-spine/base';
2
+ /**
3
+ * @public
4
+ */
5
+ export declare class BoneData {
6
+ index: number;
7
+ name: string;
8
+ parent: BoneData;
9
+ length: number;
10
+ x: number;
11
+ y: number;
12
+ rotation: number;
13
+ scaleX: number;
14
+ scaleY: number;
15
+ shearX: number;
16
+ shearY: number;
17
+ transformMode: TransformMode;
18
+ skinRequired: boolean;
19
+ color: Color;
20
+ constructor(index: number, name: string, parent: BoneData);
21
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @public
3
+ */
4
+ export declare abstract class ConstraintData {
5
+ name: string;
6
+ order: number;
7
+ skinRequired: boolean;
8
+ constructor(name: string, order: number, skinRequired: boolean);
9
+ }
@@ -0,0 +1,15 @@
1
+ import type { EventData } from './EventData';
2
+ import type { IEvent } from '@pixi-spine/base';
3
+ /**
4
+ * @public
5
+ */
6
+ export declare class Event implements IEvent {
7
+ data: EventData;
8
+ intValue: number;
9
+ floatValue: number;
10
+ stringValue: string;
11
+ time: number;
12
+ volume: number;
13
+ balance: number;
14
+ constructor(time: number, data: EventData);
15
+ }
@@ -0,0 +1,14 @@
1
+ import type { IEventData } from '@pixi-spine/base';
2
+ /**
3
+ * @public
4
+ */
5
+ export declare class EventData implements IEventData {
6
+ name: string;
7
+ intValue: number;
8
+ floatValue: number;
9
+ stringValue: string;
10
+ audioPath: string;
11
+ volume: number;
12
+ balance: number;
13
+ constructor(name: string);
14
+ }
@@ -0,0 +1,30 @@
1
+ import type { Updatable } from './Updatable';
2
+ import type { IkConstraintData } from './IkConstraintData';
3
+ import type { Bone } from './Bone';
4
+ import type { Skeleton } from './Skeleton';
5
+ import { IIkConstraint } from '@pixi-spine/base';
6
+ /**
7
+ * @public
8
+ */
9
+ export declare class IkConstraint implements IIkConstraint, Updatable {
10
+ data: IkConstraintData;
11
+ bones: Array<Bone>;
12
+ target: Bone;
13
+ bendDirection: number;
14
+ compress: boolean;
15
+ stretch: boolean;
16
+ mix: number;
17
+ softness: number;
18
+ active: boolean;
19
+ constructor(data: IkConstraintData, skeleton: Skeleton);
20
+ isActive(): boolean;
21
+ apply(): void;
22
+ update(): void;
23
+ /** Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified in the world
24
+ * coordinate system. */
25
+ apply1(bone: Bone, targetX: number, targetY: number, compress: boolean, stretch: boolean, uniform: boolean, alpha: number): void;
26
+ /** Adjusts the parent and child bone rotations so the tip of the child is as close to the target position as possible. The
27
+ * target is specified in the world coordinate system.
28
+ * @param child A direct descendant of the parent bone. */
29
+ apply2(parent: Bone, child: Bone, targetX: number, targetY: number, bendDir: number, stretch: boolean, softness: number, alpha: number): void;
30
+ }
@@ -0,0 +1,17 @@
1
+ import { ConstraintData } from './Constraint';
2
+ import type { BoneData } from './BoneData';
3
+ import type { IIkConstraintData } from '@pixi-spine/base';
4
+ /**
5
+ * @public
6
+ */
7
+ export declare class IkConstraintData extends ConstraintData implements IIkConstraintData {
8
+ bones: BoneData[];
9
+ target: BoneData;
10
+ bendDirection: number;
11
+ compress: boolean;
12
+ stretch: boolean;
13
+ uniform: boolean;
14
+ mix: number;
15
+ softness: number;
16
+ constructor(name: string);
17
+ }
@@ -0,0 +1,37 @@
1
+ import { PathAttachment } from "./attachments";
2
+ import { Updatable } from "./Updatable";
3
+ import { PathConstraintData } from "./PathConstraintData";
4
+ import { Bone } from "./Bone";
5
+ import { Slot } from "./Slot";
6
+ import { Skeleton } from "./Skeleton";
7
+ /**
8
+ * @public
9
+ */
10
+ export declare class PathConstraint implements Updatable {
11
+ static NONE: number;
12
+ static BEFORE: number;
13
+ static AFTER: number;
14
+ static epsilon: number;
15
+ data: PathConstraintData;
16
+ bones: Array<Bone>;
17
+ target: Slot;
18
+ position: number;
19
+ spacing: number;
20
+ rotateMix: number;
21
+ translateMix: number;
22
+ spaces: number[];
23
+ positions: number[];
24
+ world: number[];
25
+ curves: number[];
26
+ lengths: number[];
27
+ segments: number[];
28
+ active: boolean;
29
+ constructor(data: PathConstraintData, skeleton: Skeleton);
30
+ isActive(): boolean;
31
+ apply(): void;
32
+ update(): void;
33
+ computeWorldPositions(path: PathAttachment, spacesCount: number, tangents: boolean, percentPosition: boolean, percentSpacing: boolean): number[];
34
+ addBeforePosition(p: number, temp: Array<number>, i: number, out: Array<number>, o: number): void;
35
+ addAfterPosition(p: number, temp: Array<number>, i: number, out: Array<number>, o: number): void;
36
+ 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;
37
+ }