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.
- package/LICENSE +21 -0
- package/README.md +200 -0
- package/dist/simple-pixi-spine.js +37 -0
- package/dist/simple-pixi-spine.js.map +7 -0
- package/dist/simple-pixi-spine.mjs +37 -0
- package/dist/simple-pixi-spine.mjs.map +7 -0
- package/dist/types/build.d.mts +1 -0
- package/dist/types/bundles/pixi-spine/rollup.config.d.mts +2 -0
- package/dist/types/bundles/pixi-spine/src/index.d.ts +5 -0
- package/dist/types/packages/base/src/SpineBase.d.ts +167 -0
- package/dist/types/packages/base/src/SpineDebugRenderer.d.ts +60 -0
- package/dist/types/packages/base/src/core/AttachmentType.d.ts +12 -0
- package/dist/types/packages/base/src/core/BinaryInput.d.ts +18 -0
- package/dist/types/packages/base/src/core/IAnimation.d.ts +131 -0
- package/dist/types/packages/base/src/core/IConstraint.d.ts +93 -0
- package/dist/types/packages/base/src/core/ISkeleton.d.ts +237 -0
- package/dist/types/packages/base/src/core/SkeletonBoundsBase.d.ts +51 -0
- package/dist/types/packages/base/src/core/TextureAtlas.d.ts +41 -0
- package/dist/types/packages/base/src/core/TextureRegion.d.ts +55 -0
- package/dist/types/packages/base/src/core/Utils.d.ts +198 -0
- package/dist/types/packages/base/src/core/versions.d.ts +15 -0
- package/dist/types/packages/base/src/index.d.ts +14 -0
- package/dist/types/packages/base/src/settings.d.ts +19 -0
- package/dist/types/packages/loader-3.8/src/index.d.ts +2 -0
- package/dist/types/packages/loader-4.0/src/index.d.ts +2 -0
- package/dist/types/packages/loader-4.1/src/index.d.ts +2 -0
- package/dist/types/packages/loader-4.2/src/index.d.ts +2 -0
- package/dist/types/packages/loader-base/src/SpineLoaderAbstract.d.ts +36 -0
- package/dist/types/packages/loader-base/src/atlasLoader.d.ts +5 -0
- package/dist/types/packages/loader-base/src/index.d.ts +4 -0
- package/dist/types/packages/loader-uni/src/Spine.d.ts +15 -0
- package/dist/types/packages/loader-uni/src/SpineLoader.d.ts +10 -0
- package/dist/types/packages/loader-uni/src/index.d.ts +3 -0
- package/dist/types/packages/runtime-3.7/src/Spine.d.ts +11 -0
- package/dist/types/packages/runtime-3.7/src/core/Animation.d.ts +307 -0
- package/dist/types/packages/runtime-3.7/src/core/AnimationState.d.ts +175 -0
- package/dist/types/packages/runtime-3.7/src/core/AnimationStateData.d.ts +17 -0
- package/dist/types/packages/runtime-3.7/src/core/AtlasAttachmentLoader.d.ts +20 -0
- package/dist/types/packages/runtime-3.7/src/core/Bone.d.ts +58 -0
- package/dist/types/packages/runtime-3.7/src/core/BoneData.d.ts +19 -0
- package/dist/types/packages/runtime-3.7/src/core/Constraint.d.ts +7 -0
- package/dist/types/packages/runtime-3.7/src/core/Event.d.ts +15 -0
- package/dist/types/packages/runtime-3.7/src/core/EventData.d.ts +14 -0
- package/dist/types/packages/runtime-3.7/src/core/IkConstraint.d.ts +27 -0
- package/dist/types/packages/runtime-3.7/src/core/IkConstraintData.d.ts +16 -0
- package/dist/types/packages/runtime-3.7/src/core/PathConstraint.d.ts +36 -0
- package/dist/types/packages/runtime-3.7/src/core/PathConstraintData.d.ts +29 -0
- package/dist/types/packages/runtime-3.7/src/core/Skeleton.d.ts +88 -0
- package/dist/types/packages/runtime-3.7/src/core/SkeletonBounds.d.ts +8 -0
- package/dist/types/packages/runtime-3.7/src/core/SkeletonData.d.ts +41 -0
- package/dist/types/packages/runtime-3.7/src/core/SkeletonJson.d.ts +27 -0
- package/dist/types/packages/runtime-3.7/src/core/Skin.d.ts +16 -0
- package/dist/types/packages/runtime-3.7/src/core/Slot.d.ts +27 -0
- package/dist/types/packages/runtime-3.7/src/core/SlotData.d.ts +17 -0
- package/dist/types/packages/runtime-3.7/src/core/TransformConstraint.d.ts +26 -0
- package/dist/types/packages/runtime-3.7/src/core/TransformConstraintData.d.ts +23 -0
- package/dist/types/packages/runtime-3.7/src/core/Updatable.d.ts +6 -0
- package/dist/types/packages/runtime-3.7/src/core/VertexEffect.d.ts +10 -0
- package/dist/types/packages/runtime-3.7/src/core/attachments/Attachment.d.ts +30 -0
- package/dist/types/packages/runtime-3.7/src/core/attachments/AttachmentLoader.d.ts +24 -0
- package/dist/types/packages/runtime-3.7/src/core/attachments/BoundingBoxAttachment.d.ts +10 -0
- package/dist/types/packages/runtime-3.7/src/core/attachments/ClippingAttachment.d.ts +12 -0
- package/dist/types/packages/runtime-3.7/src/core/attachments/MeshAttachment.d.ts +23 -0
- package/dist/types/packages/runtime-3.7/src/core/attachments/PathAttachment.d.ts +13 -0
- package/dist/types/packages/runtime-3.7/src/core/attachments/PointAttachment.d.ts +16 -0
- package/dist/types/packages/runtime-3.7/src/core/attachments/RegionAttachment.d.ts +68 -0
- package/dist/types/packages/runtime-3.7/src/core/attachments/index.d.ts +8 -0
- package/dist/types/packages/runtime-3.7/src/core/vertexeffects/JitterEffect.d.ts +14 -0
- package/dist/types/packages/runtime-3.7/src/core/vertexeffects/SwirlEffect.d.ts +19 -0
- package/dist/types/packages/runtime-3.7/src/index.d.ts +28 -0
- package/dist/types/packages/runtime-3.8/src/Spine.d.ts +11 -0
- package/dist/types/packages/runtime-3.8/src/core/Animation.d.ts +400 -0
- package/dist/types/packages/runtime-3.8/src/core/AnimationState.d.ts +401 -0
- package/dist/types/packages/runtime-3.8/src/core/AnimationStateData.d.ts +17 -0
- package/dist/types/packages/runtime-3.8/src/core/AtlasAttachmentLoader.d.ts +20 -0
- package/dist/types/packages/runtime-3.8/src/core/Bone.d.ts +58 -0
- package/dist/types/packages/runtime-3.8/src/core/BoneData.d.ts +21 -0
- package/dist/types/packages/runtime-3.8/src/core/Constraint.d.ts +9 -0
- package/dist/types/packages/runtime-3.8/src/core/Event.d.ts +15 -0
- package/dist/types/packages/runtime-3.8/src/core/EventData.d.ts +14 -0
- package/dist/types/packages/runtime-3.8/src/core/IkConstraint.d.ts +30 -0
- package/dist/types/packages/runtime-3.8/src/core/IkConstraintData.d.ts +17 -0
- package/dist/types/packages/runtime-3.8/src/core/PathConstraint.d.ts +37 -0
- package/dist/types/packages/runtime-3.8/src/core/PathConstraintData.d.ts +28 -0
- package/dist/types/packages/runtime-3.8/src/core/Skeleton.d.ts +88 -0
- package/dist/types/packages/runtime-3.8/src/core/SkeletonBinary.d.ts +43 -0
- package/dist/types/packages/runtime-3.8/src/core/SkeletonBounds.d.ts +8 -0
- package/dist/types/packages/runtime-3.8/src/core/SkeletonData.d.ts +44 -0
- package/dist/types/packages/runtime-3.8/src/core/SkeletonJson.d.ts +27 -0
- package/dist/types/packages/runtime-3.8/src/core/Skin.d.ts +35 -0
- package/dist/types/packages/runtime-3.8/src/core/Slot.d.ts +28 -0
- package/dist/types/packages/runtime-3.8/src/core/SlotData.d.ts +17 -0
- package/dist/types/packages/runtime-3.8/src/core/TransformConstraint.d.ts +27 -0
- package/dist/types/packages/runtime-3.8/src/core/TransformConstraintData.d.ts +22 -0
- package/dist/types/packages/runtime-3.8/src/core/Updatable.d.ts +7 -0
- package/dist/types/packages/runtime-3.8/src/core/VertexEffect.d.ts +10 -0
- package/dist/types/packages/runtime-3.8/src/core/attachments/Attachment.d.ts +32 -0
- package/dist/types/packages/runtime-3.8/src/core/attachments/AttachmentLoader.d.ts +24 -0
- package/dist/types/packages/runtime-3.8/src/core/attachments/BoundingBoxAttachment.d.ts +11 -0
- package/dist/types/packages/runtime-3.8/src/core/attachments/ClippingAttachment.d.ts +13 -0
- package/dist/types/packages/runtime-3.8/src/core/attachments/MeshAttachment.d.ts +25 -0
- package/dist/types/packages/runtime-3.8/src/core/attachments/PathAttachment.d.ts +14 -0
- package/dist/types/packages/runtime-3.8/src/core/attachments/PointAttachment.d.ts +17 -0
- package/dist/types/packages/runtime-3.8/src/core/attachments/RegionAttachment.d.ts +69 -0
- package/dist/types/packages/runtime-3.8/src/core/attachments/index.d.ts +8 -0
- package/dist/types/packages/runtime-3.8/src/core/vertexeffects/JitterEffect.d.ts +14 -0
- package/dist/types/packages/runtime-3.8/src/core/vertexeffects/SwirlEffect.d.ts +19 -0
- package/dist/types/packages/runtime-3.8/src/index.d.ts +29 -0
- package/dist/types/packages/runtime-4.0/src/Spine.d.ts +11 -0
- package/dist/types/packages/runtime-4.0/src/core/Animation.d.ts +366 -0
- package/dist/types/packages/runtime-4.0/src/core/AnimationState.d.ts +369 -0
- package/dist/types/packages/runtime-4.0/src/core/AnimationStateData.d.ts +25 -0
- package/dist/types/packages/runtime-4.0/src/core/AtlasAttachmentLoader.d.ts +20 -0
- package/dist/types/packages/runtime-4.0/src/core/Bone.d.ts +104 -0
- package/dist/types/packages/runtime-4.0/src/core/BoneData.d.ts +38 -0
- package/dist/types/packages/runtime-4.0/src/core/ConstraintData.d.ts +9 -0
- package/dist/types/packages/runtime-4.0/src/core/Event.d.ts +19 -0
- package/dist/types/packages/runtime-4.0/src/core/EventData.d.ts +16 -0
- package/dist/types/packages/runtime-4.0/src/core/IkConstraint.d.ts +38 -0
- package/dist/types/packages/runtime-4.0/src/core/IkConstraintData.d.ts +28 -0
- package/dist/types/packages/runtime-4.0/src/core/PathConstraint.d.ts +45 -0
- package/dist/types/packages/runtime-4.0/src/core/PathConstraintData.d.ts +42 -0
- package/dist/types/packages/runtime-4.0/src/core/Skeleton.d.ts +149 -0
- package/dist/types/packages/runtime-4.0/src/core/SkeletonBinary.d.ts +28 -0
- package/dist/types/packages/runtime-4.0/src/core/SkeletonBounds.d.ts +8 -0
- package/dist/types/packages/runtime-4.0/src/core/SkeletonData.d.ts +94 -0
- package/dist/types/packages/runtime-4.0/src/core/SkeletonJson.d.ts +26 -0
- package/dist/types/packages/runtime-4.0/src/core/Skin.d.ts +47 -0
- package/dist/types/packages/runtime-4.0/src/core/Slot.d.ts +45 -0
- package/dist/types/packages/runtime-4.0/src/core/SlotData.d.ts +26 -0
- package/dist/types/packages/runtime-4.0/src/core/TransformConstraint.d.ts +34 -0
- package/dist/types/packages/runtime-4.0/src/core/TransformConstraintData.d.ts +34 -0
- package/dist/types/packages/runtime-4.0/src/core/Updatable.d.ts +11 -0
- package/dist/types/packages/runtime-4.0/src/core/VertexEffect.d.ts +10 -0
- package/dist/types/packages/runtime-4.0/src/core/attachments/Attachment.d.ts +52 -0
- package/dist/types/packages/runtime-4.0/src/core/attachments/AttachmentLoader.d.ts +24 -0
- package/dist/types/packages/runtime-4.0/src/core/attachments/BoundingBoxAttachment.d.ts +11 -0
- package/dist/types/packages/runtime-4.0/src/core/attachments/ClippingAttachment.d.ts +15 -0
- package/dist/types/packages/runtime-4.0/src/core/attachments/MeshAttachment.d.ts +38 -0
- package/dist/types/packages/runtime-4.0/src/core/attachments/PathAttachment.d.ts +20 -0
- package/dist/types/packages/runtime-4.0/src/core/attachments/PointAttachment.d.ts +19 -0
- package/dist/types/packages/runtime-4.0/src/core/attachments/RegionAttachment.d.ts +89 -0
- package/dist/types/packages/runtime-4.0/src/core/attachments/index.d.ts +8 -0
- package/dist/types/packages/runtime-4.0/src/core/vertexeffects/JitterEffect.d.ts +14 -0
- package/dist/types/packages/runtime-4.0/src/core/vertexeffects/SwirlEffect.d.ts +19 -0
- package/dist/types/packages/runtime-4.0/src/index.d.ts +29 -0
- package/dist/types/packages/runtime-4.1/src/Spine.d.ts +11 -0
- package/dist/types/packages/runtime-4.1/src/core/Animation.d.ts +386 -0
- package/dist/types/packages/runtime-4.1/src/core/AnimationState.d.ts +371 -0
- package/dist/types/packages/runtime-4.1/src/core/AnimationStateData.d.ts +25 -0
- package/dist/types/packages/runtime-4.1/src/core/AtlasAttachmentLoader.d.ts +17 -0
- package/dist/types/packages/runtime-4.1/src/core/Bone.d.ts +104 -0
- package/dist/types/packages/runtime-4.1/src/core/BoneData.d.ts +38 -0
- package/dist/types/packages/runtime-4.1/src/core/ConstraintData.d.ts +9 -0
- package/dist/types/packages/runtime-4.1/src/core/Event.d.ts +19 -0
- package/dist/types/packages/runtime-4.1/src/core/EventData.d.ts +16 -0
- package/dist/types/packages/runtime-4.1/src/core/IkConstraint.d.ts +38 -0
- package/dist/types/packages/runtime-4.1/src/core/IkConstraintData.d.ts +30 -0
- package/dist/types/packages/runtime-4.1/src/core/PathConstraint.d.ts +45 -0
- package/dist/types/packages/runtime-4.1/src/core/PathConstraintData.d.ts +44 -0
- package/dist/types/packages/runtime-4.1/src/core/Skeleton.d.ts +143 -0
- package/dist/types/packages/runtime-4.1/src/core/SkeletonBinary.d.ts +31 -0
- package/dist/types/packages/runtime-4.1/src/core/SkeletonBounds.d.ts +8 -0
- package/dist/types/packages/runtime-4.1/src/core/SkeletonData.d.ts +94 -0
- package/dist/types/packages/runtime-4.1/src/core/SkeletonJson.d.ts +28 -0
- package/dist/types/packages/runtime-4.1/src/core/Skin.d.ts +47 -0
- package/dist/types/packages/runtime-4.1/src/core/Slot.d.ts +44 -0
- package/dist/types/packages/runtime-4.1/src/core/SlotData.d.ts +26 -0
- package/dist/types/packages/runtime-4.1/src/core/TransformConstraint.d.ts +34 -0
- package/dist/types/packages/runtime-4.1/src/core/TransformConstraintData.d.ts +36 -0
- package/dist/types/packages/runtime-4.1/src/core/Updatable.d.ts +11 -0
- package/dist/types/packages/runtime-4.1/src/core/attachments/Attachment.d.ts +53 -0
- package/dist/types/packages/runtime-4.1/src/core/attachments/AttachmentLoader.d.ts +25 -0
- package/dist/types/packages/runtime-4.1/src/core/attachments/BoundingBoxAttachment.d.ts +11 -0
- package/dist/types/packages/runtime-4.1/src/core/attachments/ClippingAttachment.d.ts +17 -0
- package/dist/types/packages/runtime-4.1/src/core/attachments/MeshAttachment.d.ts +42 -0
- package/dist/types/packages/runtime-4.1/src/core/attachments/PathAttachment.d.ts +20 -0
- package/dist/types/packages/runtime-4.1/src/core/attachments/PointAttachment.d.ts +19 -0
- package/dist/types/packages/runtime-4.1/src/core/attachments/RegionAttachment.d.ts +82 -0
- package/dist/types/packages/runtime-4.1/src/core/attachments/Sequence.d.ts +35 -0
- package/dist/types/packages/runtime-4.1/src/core/attachments/index.d.ts +9 -0
- package/dist/types/packages/runtime-4.1/src/index.d.ts +26 -0
- package/dist/types/packages/runtime-4.2/src/Spine.d.ts +11 -0
- package/dist/types/packages/runtime-4.2/src/core/Animation.d.ts +544 -0
- package/dist/types/packages/runtime-4.2/src/core/AnimationState.d.ts +405 -0
- package/dist/types/packages/runtime-4.2/src/core/AnimationStateData.d.ts +25 -0
- package/dist/types/packages/runtime-4.2/src/core/AtlasAttachmentLoader.d.ts +20 -0
- package/dist/types/packages/runtime-4.2/src/core/Bone.d.ts +117 -0
- package/dist/types/packages/runtime-4.2/src/core/BoneData.d.ts +42 -0
- package/dist/types/packages/runtime-4.2/src/core/ConstraintData.d.ts +9 -0
- package/dist/types/packages/runtime-4.2/src/core/Event.d.ts +18 -0
- package/dist/types/packages/runtime-4.2/src/core/EventData.d.ts +15 -0
- package/dist/types/packages/runtime-4.2/src/core/IkConstraint.d.ts +40 -0
- package/dist/types/packages/runtime-4.2/src/core/IkConstraintData.d.ts +30 -0
- package/dist/types/packages/runtime-4.2/src/core/PathConstraint.d.ts +47 -0
- package/dist/types/packages/runtime-4.2/src/core/PathConstraintData.d.ts +62 -0
- package/dist/types/packages/runtime-4.2/src/core/PhysicsConstraint.d.ts +54 -0
- package/dist/types/packages/runtime-4.2/src/core/PhysicsConstraintData.d.ts +35 -0
- package/dist/types/packages/runtime-4.2/src/core/Skeleton.d.ts +160 -0
- package/dist/types/packages/runtime-4.2/src/core/SkeletonBinary.d.ts +43 -0
- package/dist/types/packages/runtime-4.2/src/core/SkeletonBounds.d.ts +51 -0
- package/dist/types/packages/runtime-4.2/src/core/SkeletonClipping.d.ts +38 -0
- package/dist/types/packages/runtime-4.2/src/core/SkeletonData.d.ts +101 -0
- package/dist/types/packages/runtime-4.2/src/core/SkeletonJson.d.ts +23 -0
- package/dist/types/packages/runtime-4.2/src/core/Skin.d.ts +49 -0
- package/dist/types/packages/runtime-4.2/src/core/Slot.d.ts +44 -0
- package/dist/types/packages/runtime-4.2/src/core/SlotData.d.ts +28 -0
- package/dist/types/packages/runtime-4.2/src/core/TransformConstraint.d.ts +33 -0
- package/dist/types/packages/runtime-4.2/src/core/TransformConstraintData.d.ts +34 -0
- package/dist/types/packages/runtime-4.2/src/core/Triangulator.d.ts +18 -0
- package/dist/types/packages/runtime-4.2/src/core/Updatable.d.ts +16 -0
- package/dist/types/packages/runtime-4.2/src/core/attachments/Attachment.d.ts +49 -0
- package/dist/types/packages/runtime-4.2/src/core/attachments/AttachmentLoader.d.ts +27 -0
- package/dist/types/packages/runtime-4.2/src/core/attachments/BoundingBoxAttachment.d.ts +12 -0
- package/dist/types/packages/runtime-4.2/src/core/attachments/ClippingAttachment.d.ts +16 -0
- package/dist/types/packages/runtime-4.2/src/core/attachments/MeshAttachment.d.ts +46 -0
- package/dist/types/packages/runtime-4.2/src/core/attachments/PathAttachment.d.ts +19 -0
- package/dist/types/packages/runtime-4.2/src/core/attachments/PointAttachment.d.ts +20 -0
- package/dist/types/packages/runtime-4.2/src/core/attachments/RegionAttachment.d.ts +80 -0
- package/dist/types/packages/runtime-4.2/src/core/attachments/Sequence.d.ts +35 -0
- package/dist/types/packages/runtime-4.2/src/core/attachments/index.d.ts +9 -0
- package/dist/types/packages/runtime-4.2/src/core/index.d.ts +29 -0
- package/dist/types/packages/runtime-4.2/src/core/polyfills.d.ts +1 -0
- package/dist/types/packages/runtime-4.2/src/index.d.ts +3 -0
- package/dist/types/src/BinaryInput.d.ts +84 -0
- package/dist/types/src/SkelToJson.d.ts +15 -0
- package/dist/types/src/SkelToJson21.d.ts +10 -0
- package/dist/types/src/SkelToJson34And35.d.ts +10 -0
- package/dist/types/src/SkelToJson36And37.d.ts +10 -0
- package/dist/types/src/SkelToJsonCommon.d.ts +24 -0
- package/dist/types/src/TextureHelper.d.ts +29 -0
- package/dist/types/src/VersionDetector.d.ts +28 -0
- package/dist/types/src/index.d.ts +80 -0
- package/dist/types/src/types.d.ts +161 -0
- package/package.json +29 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { IHasTextureRegion, ISequence, TextureRegion } from '@pixi-spine/base';
|
|
2
|
+
import type { Slot } from '../Slot.js';
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare class Sequence implements ISequence {
|
|
7
|
+
private static _nextID;
|
|
8
|
+
id: number;
|
|
9
|
+
regions: TextureRegion[];
|
|
10
|
+
start: number;
|
|
11
|
+
digits: number;
|
|
12
|
+
/** The index of the region to show for the setup pose. */
|
|
13
|
+
setupIndex: number;
|
|
14
|
+
constructor(count: number);
|
|
15
|
+
copy(): Sequence;
|
|
16
|
+
apply(slot: Slot, attachment: IHasTextureRegion): void;
|
|
17
|
+
getPath(basePath: string, index: number): string;
|
|
18
|
+
private static nextID;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @public
|
|
22
|
+
* */
|
|
23
|
+
export declare enum SequenceMode {
|
|
24
|
+
hold = 0,
|
|
25
|
+
once = 1,
|
|
26
|
+
loop = 2,
|
|
27
|
+
pingpong = 3,
|
|
28
|
+
onceReverse = 4,
|
|
29
|
+
loopReverse = 5,
|
|
30
|
+
pingpongReverse = 6
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @public
|
|
34
|
+
* */
|
|
35
|
+
export declare const SequenceModeValues: SequenceMode[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './Attachment.js';
|
|
2
|
+
export * from './AttachmentLoader.js';
|
|
3
|
+
export * from './BoundingBoxAttachment.js';
|
|
4
|
+
export * from './ClippingAttachment.js';
|
|
5
|
+
export * from './MeshAttachment.js';
|
|
6
|
+
export * from './PathAttachment.js';
|
|
7
|
+
export * from './PointAttachment.js';
|
|
8
|
+
export * from './RegionAttachment.js';
|
|
9
|
+
export * from './Sequence.js';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export * from './Animation.js';
|
|
2
|
+
export * from './AnimationState.js';
|
|
3
|
+
export * from './AnimationStateData.js';
|
|
4
|
+
export * from './AtlasAttachmentLoader.js';
|
|
5
|
+
export * from './Bone.js';
|
|
6
|
+
export * from './BoneData.js';
|
|
7
|
+
export * from './ConstraintData.js';
|
|
8
|
+
export * from './Event.js';
|
|
9
|
+
export * from './EventData.js';
|
|
10
|
+
export * from './IkConstraint.js';
|
|
11
|
+
export * from './IkConstraintData.js';
|
|
12
|
+
export * from './PathConstraint.js';
|
|
13
|
+
export * from './PathConstraintData.js';
|
|
14
|
+
export * from './PhysicsConstraint.js';
|
|
15
|
+
export * from './PhysicsConstraintData.js';
|
|
16
|
+
export * from './polyfills.js';
|
|
17
|
+
export * from './Skeleton.js';
|
|
18
|
+
export * from './SkeletonBinary.js';
|
|
19
|
+
export * from './SkeletonBounds.js';
|
|
20
|
+
export * from './SkeletonClipping.js';
|
|
21
|
+
export * from './SkeletonData.js';
|
|
22
|
+
export * from './SkeletonJson.js';
|
|
23
|
+
export * from './Skin.js';
|
|
24
|
+
export * from './Slot.js';
|
|
25
|
+
export * from './SlotData.js';
|
|
26
|
+
export * from './TransformConstraint.js';
|
|
27
|
+
export * from './TransformConstraintData.js';
|
|
28
|
+
export * from './Triangulator.js';
|
|
29
|
+
export * from './Updatable.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spine 二进制骨骼文件 (.skel) 数据流读取辅助类
|
|
3
|
+
*/
|
|
4
|
+
export declare class BinaryInput {
|
|
5
|
+
index: number;
|
|
6
|
+
buffer: DataView;
|
|
7
|
+
strings: string[];
|
|
8
|
+
/**
|
|
9
|
+
* @param buffer - 二进制文件 Buffer 数据
|
|
10
|
+
*/
|
|
11
|
+
constructor(buffer: ArrayBuffer);
|
|
12
|
+
/**
|
|
13
|
+
* 读取 1 字节无符号整数
|
|
14
|
+
*/
|
|
15
|
+
readByte(): number;
|
|
16
|
+
/**
|
|
17
|
+
* 读取 1 字节有符号整数
|
|
18
|
+
*/
|
|
19
|
+
readSByte(): number;
|
|
20
|
+
/**
|
|
21
|
+
* 读取 2 字节有符号短整数 (Big-Endian)
|
|
22
|
+
*/
|
|
23
|
+
readShort(): number;
|
|
24
|
+
/**
|
|
25
|
+
* 读取 4 字节有符号整数 (Big-Endian)
|
|
26
|
+
*/
|
|
27
|
+
readInt32(): number;
|
|
28
|
+
/**
|
|
29
|
+
* 读取可变长度整数 (Varint)
|
|
30
|
+
* @param optimizePositive - 是否优化正数
|
|
31
|
+
*/
|
|
32
|
+
readVarint(optimizePositive: boolean): number;
|
|
33
|
+
/**
|
|
34
|
+
* 读取 RGBA 颜色对象
|
|
35
|
+
*/
|
|
36
|
+
readColor(): {
|
|
37
|
+
r: number;
|
|
38
|
+
g: number;
|
|
39
|
+
b: number;
|
|
40
|
+
a: number;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* 读取十六进制颜色字符串 (例如 "ffffffff")
|
|
44
|
+
*/
|
|
45
|
+
readColorHex(): string;
|
|
46
|
+
/**
|
|
47
|
+
* 读取引用的字符串
|
|
48
|
+
*/
|
|
49
|
+
readStringRef(): string | null;
|
|
50
|
+
/**
|
|
51
|
+
* 读取 UTF-8 编码的字符串
|
|
52
|
+
*/
|
|
53
|
+
readString(): string | null;
|
|
54
|
+
/**
|
|
55
|
+
* 读取 4 字节单精度浮点数 (Big-Endian)
|
|
56
|
+
*/
|
|
57
|
+
readFloat(): number;
|
|
58
|
+
/**
|
|
59
|
+
* 读取 Spine 2.1 版本特定的 4 字节单精度浮点数
|
|
60
|
+
*/
|
|
61
|
+
readFloat21(): number;
|
|
62
|
+
/**
|
|
63
|
+
* 读取布尔值
|
|
64
|
+
*/
|
|
65
|
+
readBoolean(): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* 读取可变长度整数数组
|
|
68
|
+
*/
|
|
69
|
+
readIntArray(): number[];
|
|
70
|
+
/**
|
|
71
|
+
* 读取关键帧贝塞尔曲线参数
|
|
72
|
+
* @returns - 'stepped' 或 [cx1, cy1, cx2, cy2]
|
|
73
|
+
*/
|
|
74
|
+
readCurve(): 'stepped' | number[] | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* 读取单精度浮点数数组
|
|
77
|
+
* @param n - 数组长度,如未提供则自数据流中读取长度
|
|
78
|
+
*/
|
|
79
|
+
readFloatArray(n?: number): number[];
|
|
80
|
+
/**
|
|
81
|
+
* 读取短整数数组 (2字节 Big-Endian)
|
|
82
|
+
*/
|
|
83
|
+
readShortArray(): number[];
|
|
84
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { readSkeletonData21 } from './SkelToJson21';
|
|
2
|
+
import { readSkeletonData34And35 } from './SkelToJson34And35';
|
|
3
|
+
import { readSkeletonData36And37 } from './SkelToJson36And37';
|
|
4
|
+
import { SpineSkeletonData } from './types';
|
|
5
|
+
export { readSkeletonData21, readSkeletonData34And35, readSkeletonData36And37 };
|
|
6
|
+
/**
|
|
7
|
+
* 将骨架数据从遗留版本格式规范化升级为 v3.8 标准 JSON 结构
|
|
8
|
+
* @param obj - 原始遗留版本 JSON 结构对象
|
|
9
|
+
* @returns 转换后的 3.8 标准对象
|
|
10
|
+
*/
|
|
11
|
+
export declare function normalizeTo38(obj: SpineSkeletonData): SpineSkeletonData;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated 请使用 normalizeTo38 代替
|
|
14
|
+
*/
|
|
15
|
+
export declare function spine36To38(obj: SpineSkeletonData): SpineSkeletonData;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SpineSkeletonData } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Spine v2.0/v2.1 二进制数据解析模块
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* 从二进制数据解析为 v2.0/v2.1 JSON 结构对象
|
|
7
|
+
* @param binary - 二进制字节数据
|
|
8
|
+
* @returns JSON 结构对象
|
|
9
|
+
*/
|
|
10
|
+
export declare function readSkeletonData21(binary: ArrayBuffer): SpineSkeletonData;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SpineSkeletonData } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Spine v3.4/v3.5 二进制数据解析模块
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* 从二进制数据解析为 v3.4/v3.5 JSON 结构对象
|
|
7
|
+
* @param binary - 二进制字节数据
|
|
8
|
+
* @returns JSON 结构对象
|
|
9
|
+
*/
|
|
10
|
+
export declare function readSkeletonData34And35(binary: ArrayBuffer): SpineSkeletonData;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SpineSkeletonData } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Spine v3.6/v3.7 二进制数据解析模块
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* 从二进制数据解析为 v3.6/v3.7 JSON 结构对象
|
|
7
|
+
* @param binary - 二进制字节数据
|
|
8
|
+
* @returns JSON 结构对象
|
|
9
|
+
*/
|
|
10
|
+
export declare function readSkeletonData36And37(binary: ArrayBuffer): SpineSkeletonData;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BinaryInput } from './BinaryInput';
|
|
2
|
+
import { SpineSkeletonData, AttachmentData, SkinData } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Spine 各个版本解析器共用的公共底层读取与解析函数
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* 读取顶点权重与坐标数据
|
|
8
|
+
*/
|
|
9
|
+
export declare function readVertices(input: BinaryInput, attachment: AttachmentData, vertexCount: number): void;
|
|
10
|
+
/**
|
|
11
|
+
* 解析单个 Attachment 数据 (v3.4 - v3.7)
|
|
12
|
+
*/
|
|
13
|
+
export declare function readAttachment(input: BinaryInput, attachmentName: string, skeletonData: SpineSkeletonData, nonessential: boolean): AttachmentData;
|
|
14
|
+
/**
|
|
15
|
+
* 解析单个 Skin 数据 (v3.4 - v3.7)
|
|
16
|
+
*/
|
|
17
|
+
export declare function readSkin(input: BinaryInput, skeletonData: SpineSkeletonData, nonessential: boolean): SkinData | null;
|
|
18
|
+
/**
|
|
19
|
+
* 解析动画数据 (v3.4 - v3.7)
|
|
20
|
+
*/
|
|
21
|
+
export declare function readAnimation(input: BinaryInput, skeletonData: SpineSkeletonData, skins: {
|
|
22
|
+
name: string;
|
|
23
|
+
data: SkinData | null;
|
|
24
|
+
}[], version?: number): any;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 纹理与图像数据处理辅助模块
|
|
3
|
+
*/
|
|
4
|
+
export declare const INV_ALPHA_TABLE: Float32Array;
|
|
5
|
+
/**
|
|
6
|
+
* 判断 RGBA 数组是否为预乘 Alpha 格式
|
|
7
|
+
* @param imageData - RGBA 像素数据字节数组
|
|
8
|
+
* @param tolerance - 容差范围值
|
|
9
|
+
*/
|
|
10
|
+
export declare function isPremultipliedAlpha(imageData: Uint8Array | Uint8ClampedArray, tolerance?: number): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* 探测 PIXI BaseTexture 是否为预乘纹理
|
|
13
|
+
* @param baseTexture - PIXI.BaseTexture 实例或相关包装对象
|
|
14
|
+
*/
|
|
15
|
+
export declare function isPremultiplied(baseTexture: any): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* 图像重采样:将 RGBA 缓冲数据调整为目标尺寸(双线性插值或临近插值采样)
|
|
18
|
+
* @param buffer - 原始 RGBA 数据缓冲
|
|
19
|
+
* @param oldW - 原始宽度
|
|
20
|
+
* @param oldH - 原始高度
|
|
21
|
+
* @param newW - 目标宽度
|
|
22
|
+
* @param newH - 目标高度
|
|
23
|
+
*/
|
|
24
|
+
export declare function resizeRgbaBuffer(buffer: Uint8Array, oldW: number, oldH: number, newW: number, newH: number): Uint8Array;
|
|
25
|
+
/**
|
|
26
|
+
* 将预乘 Alpha (Premultiplied Alpha) 还原为直色 Alpha (Straight Alpha)
|
|
27
|
+
* @param rgbaArray - 原始 RGBA 缓冲数组
|
|
28
|
+
*/
|
|
29
|
+
export declare function premultipliedToStraight(rgbaArray: Uint8Array | Uint8ClampedArray): Uint8Array;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { VersionConfig } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Spine 资源版本映射配置与检测模块
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Spine 版本映射配置
|
|
7
|
+
* 用于定义原始版本、目标解析版本以及转换处理器
|
|
8
|
+
*/
|
|
9
|
+
export declare const versionMap: Record<number, VersionConfig>;
|
|
10
|
+
/**
|
|
11
|
+
* 将 Uint8Array 转换为字符串
|
|
12
|
+
* @param u8Arr - 二进制字节数组
|
|
13
|
+
* @param encoding - 编码格式,默认为 'ascii'
|
|
14
|
+
*/
|
|
15
|
+
export declare function uint8ArrayToString(u8Arr: Uint8Array, encoding?: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* 判断字符串或对象是否符合 Spine 版本特征,并返回标准化版本号 (如 "38")
|
|
18
|
+
* @param str - 待检测的字符串或 JSON 对象
|
|
19
|
+
*/
|
|
20
|
+
export declare function isVersion(str: any): string | null;
|
|
21
|
+
/**
|
|
22
|
+
* 从二进制或 JSON 数据中自动识别 Spine 编辑器版本
|
|
23
|
+
*/
|
|
24
|
+
export declare function detectSpineVersion({ data, type, fallbackVersion, }: {
|
|
25
|
+
data: ArrayBuffer | string;
|
|
26
|
+
type: 'skel' | 'json';
|
|
27
|
+
fallbackVersion?: string;
|
|
28
|
+
}): string | null;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 显式注册 PIXI 实例,以便在非浏览器/无全局 window 的环境下运行(如 SSR 或单元测试)
|
|
3
|
+
* @param pixi - PIXI 实例
|
|
4
|
+
*/
|
|
5
|
+
export declare function registerPIXI(pixi: any): void;
|
|
6
|
+
/**
|
|
7
|
+
* 获取当前的 PIXI 实例
|
|
8
|
+
*/
|
|
9
|
+
export declare function getPIXI(): any;
|
|
10
|
+
import { normalizeTo38, spine36To38, readSkeletonData36And37, readSkeletonData34And35, readSkeletonData21 } from './SkelToJson';
|
|
11
|
+
import { detectSpineVersion, isVersion, versionMap } from './VersionDetector';
|
|
12
|
+
import { TextureInfo, TextureData, MemorySpineSource } from './types';
|
|
13
|
+
export { normalizeTo38, spine36To38, readSkeletonData36And37, readSkeletonData34And35, readSkeletonData21 };
|
|
14
|
+
export { detectSpineVersion, isVersion, versionMap };
|
|
15
|
+
/**
|
|
16
|
+
* 获取文件目录路径
|
|
17
|
+
* @param src - 文件路径
|
|
18
|
+
* @returns 目录路径,以 '/' 结尾
|
|
19
|
+
*/
|
|
20
|
+
export declare function getFileDirectory(src: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* 解析 Atlas 文本以获取纹理信息列表
|
|
23
|
+
* @param atlasData - Atlas 文本内容
|
|
24
|
+
*/
|
|
25
|
+
export declare function getTextureAtlasInfo(atlasData: string): TextureInfo[];
|
|
26
|
+
/**
|
|
27
|
+
* 提取骨骼、图集和纹理的完整访问路径
|
|
28
|
+
* @param src - 资源来源路径或配置对象
|
|
29
|
+
* @param options - 配置项
|
|
30
|
+
*/
|
|
31
|
+
export declare function getSpineSrc(src: any, options?: any): any;
|
|
32
|
+
/**
|
|
33
|
+
* 构造纹理加载信息列表
|
|
34
|
+
* @param atlasData - Atlas 文本
|
|
35
|
+
* @param textureBasePath - 纹理基础目录路径
|
|
36
|
+
*/
|
|
37
|
+
export declare function prepareTextureData(atlasData: string, textureBasePath: string): TextureData[];
|
|
38
|
+
/**
|
|
39
|
+
* 基于原生 XMLHttpRequest (AJAX) 请求文件
|
|
40
|
+
* @param url - 目标 URL
|
|
41
|
+
* @param responseType - 响应数据类型 (text, arraybuffer)
|
|
42
|
+
* @param options - 配置参数,如 onProgress
|
|
43
|
+
*/
|
|
44
|
+
export declare function loadFile(url: string, responseType?: string, options?: any): Promise<{
|
|
45
|
+
data: any;
|
|
46
|
+
status: number;
|
|
47
|
+
}>;
|
|
48
|
+
/**
|
|
49
|
+
* 核心解析方法:绑定纹理并调用对应版本的 Spine SDK 进行解析
|
|
50
|
+
* @param config
|
|
51
|
+
*/
|
|
52
|
+
export declare function readSpineSpineData(config: any): Promise<any>;
|
|
53
|
+
/**
|
|
54
|
+
* 数据预处理:执行版本检测、格式转换(skel -> json)以及跨版本兼容处理
|
|
55
|
+
* @param params
|
|
56
|
+
*/
|
|
57
|
+
export declare function processSpineData(params: any): Promise<any>;
|
|
58
|
+
/**
|
|
59
|
+
* 外部加载入口函数,支持加载网络 URL 路径或直接加载内存中的预拉取数据对象
|
|
60
|
+
* @param src - 路径字符串、结构化的路径对象,或者 MemorySpineSource 内存资源对象
|
|
61
|
+
* @param options - 配置项
|
|
62
|
+
*/
|
|
63
|
+
export declare function load(src: string | object | MemorySpineSource, options?: any): Promise<any>;
|
|
64
|
+
/**
|
|
65
|
+
* 实例化 Spine 对象并附加调试渲染器
|
|
66
|
+
* @param spineData - 由 load 方法返回的已处理数据对象
|
|
67
|
+
*/
|
|
68
|
+
export declare function spine(spineData: any): any;
|
|
69
|
+
declare let SimplePixiSpine: {
|
|
70
|
+
load: typeof load;
|
|
71
|
+
spine: typeof spine;
|
|
72
|
+
loadFile: typeof loadFile;
|
|
73
|
+
detectSpineVersion: typeof detectSpineVersion;
|
|
74
|
+
isVersion: typeof isVersion;
|
|
75
|
+
versionMap: Record<number, import("./types").VersionConfig>;
|
|
76
|
+
registerPIXI: typeof registerPIXI;
|
|
77
|
+
getPIXI: typeof getPIXI;
|
|
78
|
+
normalizeTo38: typeof normalizeTo38;
|
|
79
|
+
};
|
|
80
|
+
export default SimplePixiSpine;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
export interface VersionConfig {
|
|
2
|
+
target: string;
|
|
3
|
+
handler: 'readSkeletonData21' | 'readSkeletonData34And35' | 'readSkeletonData36And37' | null;
|
|
4
|
+
}
|
|
5
|
+
export interface SkeletonInfo {
|
|
6
|
+
hash: string;
|
|
7
|
+
spine: string;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
fps?: number;
|
|
11
|
+
images?: string;
|
|
12
|
+
audio?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface BoneData {
|
|
15
|
+
name: string;
|
|
16
|
+
parent: string | null;
|
|
17
|
+
rotation?: number;
|
|
18
|
+
x?: number;
|
|
19
|
+
y?: number;
|
|
20
|
+
scaleX?: number;
|
|
21
|
+
scaleY?: number;
|
|
22
|
+
shearX?: number;
|
|
23
|
+
shearY?: number;
|
|
24
|
+
length?: number;
|
|
25
|
+
transform?: string;
|
|
26
|
+
inheritRotation?: boolean;
|
|
27
|
+
inheritScale?: boolean;
|
|
28
|
+
color?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface SlotData {
|
|
31
|
+
name: string;
|
|
32
|
+
bone: string;
|
|
33
|
+
color?: string;
|
|
34
|
+
dark?: string;
|
|
35
|
+
attachment?: string;
|
|
36
|
+
blend?: 'normal' | 'additive' | 'multiply' | 'screen';
|
|
37
|
+
}
|
|
38
|
+
export interface IkConstraintData {
|
|
39
|
+
name: string;
|
|
40
|
+
order?: number;
|
|
41
|
+
bones: string[];
|
|
42
|
+
target: string;
|
|
43
|
+
mix: number;
|
|
44
|
+
bendPositive: boolean;
|
|
45
|
+
compress?: boolean;
|
|
46
|
+
stretch?: boolean;
|
|
47
|
+
uniform?: boolean;
|
|
48
|
+
}
|
|
49
|
+
export interface TransformConstraintData {
|
|
50
|
+
name: string;
|
|
51
|
+
order?: number;
|
|
52
|
+
bones: string[];
|
|
53
|
+
target: string;
|
|
54
|
+
local?: boolean;
|
|
55
|
+
relative?: boolean;
|
|
56
|
+
rotation: number;
|
|
57
|
+
x: number;
|
|
58
|
+
y: number;
|
|
59
|
+
scaleX: number;
|
|
60
|
+
scaleY: number;
|
|
61
|
+
shearY: number;
|
|
62
|
+
rotateMix: number;
|
|
63
|
+
translateMix: number;
|
|
64
|
+
scaleMix: number;
|
|
65
|
+
shearMix: number;
|
|
66
|
+
}
|
|
67
|
+
export interface PathConstraintData {
|
|
68
|
+
name: string;
|
|
69
|
+
order?: number;
|
|
70
|
+
bones: string[];
|
|
71
|
+
target: string;
|
|
72
|
+
positionMode: 'fixed' | 'percent';
|
|
73
|
+
spacingMode: 'length' | 'fixed' | 'percent';
|
|
74
|
+
rotateMode: 'tangent' | 'chain' | 'chainScale';
|
|
75
|
+
rotation: number;
|
|
76
|
+
position: number;
|
|
77
|
+
spacing: number;
|
|
78
|
+
rotateMix: number;
|
|
79
|
+
translateMix: number;
|
|
80
|
+
}
|
|
81
|
+
export interface AttachmentData {
|
|
82
|
+
name?: string;
|
|
83
|
+
type?: 'region' | 'boundingbox' | 'mesh' | 'linkedmesh' | 'path' | 'point' | 'clipping';
|
|
84
|
+
path?: string;
|
|
85
|
+
rotation?: number;
|
|
86
|
+
x?: number;
|
|
87
|
+
y?: number;
|
|
88
|
+
scaleX?: number;
|
|
89
|
+
scaleY?: number;
|
|
90
|
+
width?: number;
|
|
91
|
+
height?: number;
|
|
92
|
+
color?: string;
|
|
93
|
+
vertexCount?: number;
|
|
94
|
+
vertices?: number[];
|
|
95
|
+
verticesCount?: number;
|
|
96
|
+
bonesCount?: number;
|
|
97
|
+
uvs?: number[];
|
|
98
|
+
triangles?: number[];
|
|
99
|
+
hull?: number;
|
|
100
|
+
edges?: number[];
|
|
101
|
+
skin?: string;
|
|
102
|
+
parent?: string;
|
|
103
|
+
inheritDeform?: boolean;
|
|
104
|
+
closed?: boolean;
|
|
105
|
+
constantSpeed?: boolean;
|
|
106
|
+
lengths?: number[];
|
|
107
|
+
end?: string;
|
|
108
|
+
}
|
|
109
|
+
export interface SkinData {
|
|
110
|
+
[slotName: string]: {
|
|
111
|
+
[attachmentName: string]: AttachmentData;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
export interface EventData {
|
|
115
|
+
intValue?: number;
|
|
116
|
+
floatValue?: number;
|
|
117
|
+
stringValue?: string;
|
|
118
|
+
audioPath?: string;
|
|
119
|
+
volume?: number;
|
|
120
|
+
balance?: number;
|
|
121
|
+
}
|
|
122
|
+
export interface SpineSkeletonData {
|
|
123
|
+
skeleton?: SkeletonInfo;
|
|
124
|
+
bones?: BoneData[];
|
|
125
|
+
slots?: SlotData[];
|
|
126
|
+
ik?: IkConstraintData[];
|
|
127
|
+
transform?: TransformConstraintData[];
|
|
128
|
+
path?: PathConstraintData[];
|
|
129
|
+
skins?: {
|
|
130
|
+
[skinName: string]: SkinData;
|
|
131
|
+
} | SkinData[];
|
|
132
|
+
events?: {
|
|
133
|
+
[eventName: string]: EventData;
|
|
134
|
+
};
|
|
135
|
+
animations?: {
|
|
136
|
+
[animationName: string]: any;
|
|
137
|
+
};
|
|
138
|
+
defaultSkin?: SkinData;
|
|
139
|
+
}
|
|
140
|
+
export interface TextureInfo {
|
|
141
|
+
name: string;
|
|
142
|
+
width: number;
|
|
143
|
+
height: number;
|
|
144
|
+
}
|
|
145
|
+
export interface TextureData {
|
|
146
|
+
name: string;
|
|
147
|
+
src?: string;
|
|
148
|
+
data?: Uint8Array | ArrayBuffer;
|
|
149
|
+
width?: number;
|
|
150
|
+
height?: number;
|
|
151
|
+
texture?: any;
|
|
152
|
+
}
|
|
153
|
+
export interface MemorySpineSource {
|
|
154
|
+
skeletonData: ArrayBuffer | string | object;
|
|
155
|
+
atlasData: string;
|
|
156
|
+
textureData?: TextureData[];
|
|
157
|
+
texturePath?: string;
|
|
158
|
+
version?: string;
|
|
159
|
+
path?: string[];
|
|
160
|
+
atlasPath?: string;
|
|
161
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "simple-pixi-spine",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Unified spine-pixi runtime with SimplePixiSpine wrapper built using Esbuild",
|
|
5
|
+
"main": "./dist/simple-pixi-spine.js",
|
|
6
|
+
"module": "./dist/simple-pixi-spine.mjs",
|
|
7
|
+
"types": "./dist/types/src/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/types/src/index.d.ts",
|
|
11
|
+
"import": "./dist/simple-pixi-spine.mjs",
|
|
12
|
+
"require": "./dist/simple-pixi-spine.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "node build.mjs && tsc"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"pixi.js": "^8.2.3"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@esotericsoftware/spine-pixi-v8": "^4.2.53",
|
|
26
|
+
"esbuild": "^0.19.11",
|
|
27
|
+
"typescript": "5.4.2"
|
|
28
|
+
}
|
|
29
|
+
}
|