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 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import '@pixi-spine/loader-uni';
2
+ import { Spine, spine38, spine40, spine41, spine42 } from '@pixi-spine/loader-uni';
3
+ export { Spine, spine38, spine40, spine41, spine42 };
4
+ export * from '@pixi-spine/base';
5
+ export { SkeletonBounds } from '@pixi-spine/runtime-4.1';
@@ -0,0 +1,167 @@
1
+ import { Rectangle, Texture, Container, Graphics, MeshSimple as SimpleMesh, Sprite, Ticker } from 'pixi.js';
2
+ import { TextureRegion } from './core/TextureRegion';
3
+ import type { IAnimationState, IAnimationStateData } from './core/IAnimation';
4
+ import type { IAttachment, IClippingAttachment, IMeshAttachment, IRegionAttachment, ISkeleton, ISkeletonData, ISlot } from './core/ISkeleton';
5
+ import type { ISpineDebugRenderer } from './SpineDebugRenderer';
6
+ /**
7
+ * @public
8
+ */
9
+ export interface ISpineDisplayObject extends Container {
10
+ region?: TextureRegion;
11
+ attachment?: IAttachment;
12
+ }
13
+ /**
14
+ * @public
15
+ */
16
+ export declare class SpineSprite extends Sprite implements ISpineDisplayObject {
17
+ region?: TextureRegion;
18
+ attachment?: IAttachment;
19
+ }
20
+ /**
21
+ * @public
22
+ */
23
+ export declare class SpineMesh extends SimpleMesh implements ISpineDisplayObject {
24
+ region?: TextureRegion;
25
+ attachment?: IAttachment;
26
+ constructor(texture: Texture, vertices?: Float32Array, uvs?: Float32Array, indices?: Uint16Array, drawMode?: number);
27
+ }
28
+ /**
29
+ * A class that enables the you to import and run your spine animations in pixi.
30
+ * The Spine animation data needs to be loaded using either the Loader or a SpineLoader before it can be used by this class
31
+ * See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source
32
+ *
33
+ * ```js
34
+ * let spineAnimation = new spine(spineData);
35
+ * ```
36
+ *
37
+ * @public
38
+ * @class
39
+ * @extends Container
40
+ * @memberof spine
41
+ * @param spineData {object} The spine data loaded from a spine atlas.
42
+ */
43
+ export declare abstract class SpineBase<Skeleton extends ISkeleton, SkeletonData extends ISkeletonData, AnimationState extends IAnimationState, AnimationStateData extends IAnimationStateData> extends Container implements GlobalMixins.Spine {
44
+ tintRgb: ArrayLike<number>;
45
+ spineData: SkeletonData;
46
+ skeleton: Skeleton;
47
+ stateData: AnimationStateData;
48
+ state: AnimationState;
49
+ slotContainers: Array<Container>;
50
+ tempClipContainers: Array<Container>;
51
+ localDelayLimit: number;
52
+ private _autoUpdate;
53
+ protected _visible: boolean;
54
+ private _debug;
55
+ get debug(): ISpineDebugRenderer;
56
+ set debug(value: ISpineDebugRenderer);
57
+ abstract createSkeleton(spineData: ISkeletonData): any;
58
+ constructor(spineData: SkeletonData);
59
+ /**
60
+ * If this flag is set to true, the spine animation will be automatically updated every
61
+ * time the object id drawn. The down side of this approach is that the delta time is
62
+ * automatically calculated and you could miss out on cool effects like slow motion,
63
+ * pause, skip ahead and the sorts. Most of these effects can be achieved even with
64
+ * autoUpdate enabled but are harder to achieve.
65
+ *
66
+ * @member {boolean}
67
+ * @memberof spine.Spine#
68
+ * @default true
69
+ */
70
+ get autoUpdate(): boolean;
71
+ set autoUpdate(value: boolean);
72
+ /**
73
+ * The tint applied to the spine object. This is a hex value. A value of 0xFFFFFF will remove any tint effect.
74
+ *
75
+ * @member {number}
76
+ * @memberof spine.Spine#
77
+ * @default 0xFFFFFF
78
+ */
79
+ get tint(): number;
80
+ set tint(value: number);
81
+ /**
82
+ * Limit value for the update dt with Spine.globalDelayLimit
83
+ * that can be overridden with localDelayLimit
84
+ * @return {number} - Maximum processed dt value for the update
85
+ */
86
+ get delayLimit(): number;
87
+ /**
88
+ * Update the spine skeleton and its animations by delta time (dt)
89
+ *
90
+ * @param dt {number} Delta time. Time by which the animation should be updated
91
+ */
92
+ update(dt: number): void;
93
+ private setSpriteRegion;
94
+ private setMeshRegion;
95
+ /**
96
+ * When autoupdate is set to yes this function is used as pixi's updateTransform function
97
+ *
98
+ * @private
99
+ */
100
+ autoUpdateTransform(ticker: Ticker): void;
101
+ /**
102
+ * Create a new sprite to be used with core.RegionAttachment
103
+ *
104
+ * @param slot {spine.Slot} The slot to which the attachment is parented
105
+ * @param attachment {spine.RegionAttachment} The attachment that the sprite will represent
106
+ * @private
107
+ */
108
+ createSprite(slot: ISlot, attachment: IRegionAttachment, defName: string): SpineSprite;
109
+ /**
110
+ * Creates a Strip from the spine data
111
+ * @param slot {spine.Slot} The slot to which the attachment is parented
112
+ * @param attachment {spine.RegionAttachment} The attachment that the sprite will represent
113
+ * @private
114
+ */
115
+ createMesh(slot: ISlot, attachment: IMeshAttachment): SpineMesh;
116
+ static clippingPolygon: Array<number>;
117
+ private tempVertices;
118
+ createGraphics(slot: ISlot, clip: IClippingAttachment): Graphics;
119
+ updateGraphics(slot: ISlot, clip: IClippingAttachment): void;
120
+ /**
121
+ * Changes texture in attachment in specific slot.
122
+ *
123
+ * PIXI runtime feature, it was made to satisfy our users.
124
+ *
125
+ * @param slotIndex {number}
126
+ * @param [texture = null] {PIXI.Texture} If null, take default (original) texture
127
+ * @param [size = null] {PIXI.Point} sometimes we need new size for region attachment, you can pass 'texture.orig' there
128
+ * @returns {boolean} Success flag
129
+ */
130
+ hackTextureBySlotIndex(slotIndex: number, texture?: Texture, size?: Rectangle): boolean;
131
+ /**
132
+ * Changes texture in attachment in specific slot.
133
+ *
134
+ * PIXI runtime feature, it was made to satisfy our users.
135
+ *
136
+ * @param slotName {string}
137
+ * @param [texture = null] {PIXI.Texture} If null, take default (original) texture
138
+ * @param [size = null] {PIXI.Point} sometimes we need new size for region attachment, you can pass 'texture.orig' there
139
+ * @returns {boolean} Success flag
140
+ */
141
+ hackTextureBySlotName(slotName: string, texture?: Texture, size?: Rectangle): boolean;
142
+ /**
143
+ * Changes texture of an attachment
144
+ *
145
+ * PIXI runtime feature, it was made to satisfy our users.
146
+ *
147
+ * @param slotName {string}
148
+ * @param attachmentName {string}
149
+ * @param [texture = null] {PIXI.Texture} If null, take default (original) texture
150
+ * @param [size = null] {PIXI.Point} sometimes we need new size for region attachment, you can pass 'texture.orig' there
151
+ * @returns {boolean} Success flag
152
+ */
153
+ hackTextureAttachment(slotName: string, attachmentName: string, texture: any, size?: Rectangle): boolean;
154
+ newContainer(): Container<import("pixi.js").ContainerChild>;
155
+ newSprite(tex: Texture): SpineSprite;
156
+ newGraphics(): Graphics;
157
+ newMesh(texture: Texture, vertices?: Float32Array, uvs?: Float32Array, indices?: Uint16Array, drawMode?: number): SpineMesh;
158
+ transformHack(): number;
159
+ /**
160
+ * Hack for pixi-display and pixi-lights. Every attachment name ending with a suffix will be added to different layer
161
+ * @param nameSuffix
162
+ * @param group
163
+ * @param outGroup
164
+ */
165
+ hackAttachmentGroups(nameSuffix: string, group: any, outGroup: any): any[][];
166
+ destroy(options?: any): void;
167
+ }
@@ -0,0 +1,60 @@
1
+ import type { IAnimationState, IAnimationStateData } from './core/IAnimation';
2
+ import type { ISkeleton, ISkeletonData } from './core/ISkeleton';
3
+ import type { SpineBase } from './SpineBase';
4
+ /**
5
+ * Make a class that extends from this interface to create your own debug renderer.
6
+ * @public
7
+ */
8
+ export interface ISpineDebugRenderer {
9
+ /**
10
+ * This will be called every frame, after the spine has been updated.
11
+ */
12
+ renderDebug(spine: SpineBase<ISkeleton, ISkeletonData, IAnimationState, IAnimationStateData>): void;
13
+ /**
14
+ * This is called when the `spine.debug` object is set to null or when the spine is destroyed.
15
+ */
16
+ unregisterSpine(spine: SpineBase<ISkeleton, ISkeletonData, IAnimationState, IAnimationStateData>): void;
17
+ /**
18
+ * This is called when the `spine.debug` object is set to a new instance of a debug renderer.
19
+ */
20
+ registerSpine(spine: SpineBase<ISkeleton, ISkeletonData, IAnimationState, IAnimationStateData>): void;
21
+ }
22
+ /**
23
+ * This is a debug renderer that uses PixiJS Graphics under the hood.
24
+ * @public
25
+ */
26
+ export declare class SpineDebugRenderer implements ISpineDebugRenderer {
27
+ private registeredSpines;
28
+ drawDebug: boolean;
29
+ drawMeshHull: boolean;
30
+ drawMeshTriangles: boolean;
31
+ drawBones: boolean;
32
+ drawPaths: boolean;
33
+ drawBoundingBoxes: boolean;
34
+ drawClipping: boolean;
35
+ drawRegionAttachments: boolean;
36
+ lineWidth: number;
37
+ regionAttachmentsColor: number;
38
+ meshHullColor: number;
39
+ meshTrianglesColor: number;
40
+ clippingPolygonColor: number;
41
+ boundingBoxesRectColor: number;
42
+ boundingBoxesPolygonColor: number;
43
+ boundingBoxesCircleColor: number;
44
+ pathsCurveColor: number;
45
+ pathsLineColor: number;
46
+ skeletonXYColor: number;
47
+ bonesColor: number;
48
+ /**
49
+ * The debug is attached by force to each spine object. So we need to create it inside the spine when we get the first update
50
+ */
51
+ registerSpine(spine: SpineBase<ISkeleton, ISkeletonData, IAnimationState, IAnimationStateData>): void;
52
+ renderDebug(spine: SpineBase<ISkeleton, ISkeletonData, IAnimationState, IAnimationStateData>): void;
53
+ private drawBonesFunc;
54
+ private drawRegionAttachmentsFunc;
55
+ private drawMeshHullAndMeshTriangles;
56
+ private drawClippingFunc;
57
+ private drawBoundingBoxesFunc;
58
+ private drawPathsFunc;
59
+ unregisterSpine(spine: SpineBase<ISkeleton, ISkeletonData, IAnimationState, IAnimationStateData>): void;
60
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @public
3
+ */
4
+ export declare enum AttachmentType {
5
+ Region = 0,
6
+ BoundingBox = 1,
7
+ Mesh = 2,
8
+ LinkedMesh = 3,
9
+ Path = 4,
10
+ Point = 5,
11
+ Clipping = 6
12
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @public
3
+ */
4
+ export declare class BinaryInput {
5
+ strings: string[];
6
+ private index;
7
+ private buffer;
8
+ constructor(data: Uint8Array, strings?: string[], index?: number, buffer?: DataView);
9
+ readByte(): number;
10
+ readUnsignedByte(): number;
11
+ readShort(): number;
12
+ readInt32(): number;
13
+ readInt(optimizePositive: boolean): number;
14
+ readStringRef(): string | null;
15
+ readString(): string | null;
16
+ readFloat(): number;
17
+ readBoolean(): boolean;
18
+ }
@@ -0,0 +1,131 @@
1
+ import type { ISkeleton, ISkeletonData } from './ISkeleton';
2
+ import type { StringMap } from './Utils';
3
+ /** Controls how a timeline value is mixed with the setup pose value or current pose value when a timeline's `alpha`
4
+ * < 1.
5
+ *
6
+ * See Timeline {@link Timeline#apply(Skeleton, float, float, Array, float, MixBlend, MixDirection)}.
7
+ * @public
8
+ * */
9
+ export declare enum MixBlend {
10
+ /** Transitions from the setup value to the timeline value (the current value is not used). Before the first key, the setup
11
+ * value is set. */
12
+ setup = 0,
13
+ /** Transitions from the current value to the timeline value. Before the first key, transitions from the current value to
14
+ * the setup value. Timelines which perform instant transitions, such as DrawOrderTimeline or
15
+ * AttachmentTimeline, use the setup value before the first key.
16
+ *
17
+ * `first` is intended for the first animations applied, not for animations layered on top of those. */
18
+ first = 1,
19
+ /** Transitions from the current value to the timeline value. No change is made before the first key (the current value is
20
+ * kept until the first key).
21
+ *
22
+ * `replace` is intended for animations layered on top of others, not for the first animations applied. */
23
+ replace = 2,
24
+ /** Transitions from the current value to the current value plus the timeline value. No change is made before the first key
25
+ * (the current value is kept until the first key).
26
+ *
27
+ * `add` is intended for animations layered on top of others, not for the first animations applied. Properties
28
+ * keyed by additive animations must be set manually or by another animation before applying the additive animations, else
29
+ * the property values will increase continually. */
30
+ add = 3
31
+ }
32
+ /** Indicates whether a timeline's `alpha` is mixing out over time toward 0 (the setup or current pose value) or
33
+ * mixing in toward 1 (the timeline's value).
34
+ *
35
+ * See Timeline {@link Timeline#apply(Skeleton, float, float, Array, float, MixBlend, MixDirection)}.
36
+ * @public
37
+ * */
38
+ export declare enum MixDirection {
39
+ mixIn = 0,
40
+ mixOut = 1
41
+ }
42
+ /**
43
+ * @public
44
+ */
45
+ export interface IAnimation<Timeline extends ITimeline = ITimeline> {
46
+ name: string;
47
+ timelines: Timeline[];
48
+ duration: number;
49
+ }
50
+ /**
51
+ * @public
52
+ */
53
+ export interface IAnimationState<AnimationStateData extends IAnimationStateData = IAnimationStateData> {
54
+ data: AnimationStateData;
55
+ tracks: ITrackEntry[];
56
+ listeners: IAnimationStateListener[];
57
+ timeScale: number;
58
+ update(dt: number): void;
59
+ apply(skeleton: ISkeleton): boolean;
60
+ setAnimation(trackIndex: number, animationName: string, loop: boolean): ITrackEntry;
61
+ addAnimation(trackIndex: number, animationName: string, loop: boolean, delay: number): ITrackEntry;
62
+ addEmptyAnimation(trackIndex: number, mixDuration: number, delay: number): ITrackEntry;
63
+ setEmptyAnimation(trackIndex: number, mixDuration: number): ITrackEntry;
64
+ setEmptyAnimations(mixDuration: number): void;
65
+ hasAnimation(animationName: string): boolean;
66
+ addListener(listener: IAnimationStateListener): void;
67
+ removeListener(listener: IAnimationStateListener): void;
68
+ clearListeners(): void;
69
+ clearTracks(): void;
70
+ clearTrack(index: number): void;
71
+ }
72
+ /**
73
+ * @public
74
+ */
75
+ export interface IAnimationStateData<SkeletonData extends ISkeletonData = ISkeletonData, Animation extends IAnimation = IAnimation> {
76
+ skeletonData: SkeletonData;
77
+ animationToMixTime: StringMap<number>;
78
+ defaultMix: number;
79
+ setMix(fromName: string, toName: string, duration: number): void;
80
+ setMixWith(from: Animation, to: Animation, duration: number): void;
81
+ getMix(from: Animation, to: Animation): number;
82
+ }
83
+ /**
84
+ * @public
85
+ */
86
+ export interface IAnimationStateListener {
87
+ start?(entry: ITrackEntry): void;
88
+ interrupt?(entry: ITrackEntry): void;
89
+ end?(entry: ITrackEntry): void;
90
+ dispose?(entry: ITrackEntry): void;
91
+ complete?(entry: ITrackEntry): void;
92
+ event?(entry: ITrackEntry, event: IEvent): void;
93
+ }
94
+ /**
95
+ * @public
96
+ */
97
+ export interface ITimeline {
98
+ }
99
+ /**
100
+ * @public
101
+ */
102
+ export interface ITrackEntry {
103
+ trackIndex: number;
104
+ loop: boolean;
105
+ animationEnd: number;
106
+ listener: IAnimationStateListener;
107
+ delay: number;
108
+ trackTime: number;
109
+ trackLast: number;
110
+ nextTrackLast: number;
111
+ trackEnd: number;
112
+ timeScale: number;
113
+ alpha: number;
114
+ mixTime: number;
115
+ mixDuration: number;
116
+ interruptAlpha: number;
117
+ totalAlpha: number;
118
+ }
119
+ /**
120
+ * @public
121
+ */
122
+ export interface IEventData {
123
+ name: string;
124
+ }
125
+ /**
126
+ * @public
127
+ */
128
+ export interface IEvent {
129
+ time: number;
130
+ data: IEventData;
131
+ }
@@ -0,0 +1,93 @@
1
+ /** Controls how the first bone is positioned along the path.
2
+ *
3
+ * See [Position mode](http://esotericsoftware.com/spine-path-constraints#Position-mode) in the Spine User Guide.
4
+ * @public
5
+ * */
6
+ export declare enum PositionMode {
7
+ Fixed = 0,
8
+ Percent = 1
9
+ }
10
+ /** Controls how bones are rotated, translated, and scaled to match the path.
11
+ *
12
+ * [Rotate mode](http://esotericsoftware.com/spine-path-constraints#Rotate-mod) in the Spine User Guide.
13
+ * @public
14
+ * */
15
+ export declare enum RotateMode {
16
+ Tangent = 0,
17
+ Chain = 1,
18
+ ChainScale = 2
19
+ }
20
+ /**
21
+ * @public
22
+ */
23
+ export interface IConstraintData {
24
+ name: string;
25
+ order: number;
26
+ }
27
+ /**
28
+ * @public
29
+ */
30
+ export interface IIkConstraint {
31
+ data: IIkConstraintData;
32
+ /** -1 | 0 | 1 */
33
+ bendDirection: number;
34
+ compress: boolean;
35
+ stretch: boolean;
36
+ /** A percentage (0-1) */
37
+ mix: number;
38
+ }
39
+ /**
40
+ * @public
41
+ */
42
+ export interface IIkConstraintData extends IConstraintData {
43
+ /** -1 | 0 | 1 */
44
+ bendDirection: number;
45
+ compress: boolean;
46
+ stretch: boolean;
47
+ uniform: boolean;
48
+ /** A percentage (0-1) */
49
+ mix: number;
50
+ }
51
+ /**
52
+ * @public
53
+ */
54
+ export interface IPathConstraint {
55
+ data: IPathConstraintData;
56
+ position: number;
57
+ spacing: number;
58
+ spaces: number[];
59
+ positions: number[];
60
+ world: number[];
61
+ curves: number[];
62
+ lengths: number[];
63
+ segments: number[];
64
+ }
65
+ /**
66
+ * @public
67
+ */
68
+ export interface IPathConstraintData extends IConstraintData {
69
+ positionMode: PositionMode;
70
+ rotateMode: RotateMode;
71
+ offsetRotation: number;
72
+ position: number;
73
+ spacing: number;
74
+ }
75
+ /**
76
+ * @public
77
+ */
78
+ export interface ITransformConstraint {
79
+ data: ITransformConstraintData;
80
+ }
81
+ /**
82
+ * @public
83
+ */
84
+ export interface ITransformConstraintData extends IConstraintData {
85
+ offsetRotation: number;
86
+ offsetX: number;
87
+ offsetY: number;
88
+ offsetScaleX: number;
89
+ offsetScaleY: number;
90
+ offsetShearY: number;
91
+ relative: boolean;
92
+ local: boolean;
93
+ }