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,53 @@
|
|
|
1
|
+
import { AttachmentType } from '@pixi-spine/base';
|
|
2
|
+
import type { IAttachment, NumberArrayLike } from '@pixi-spine/base';
|
|
3
|
+
import type { Slot } from '../Slot';
|
|
4
|
+
/**
|
|
5
|
+
* The base class for all attachments.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare abstract class Attachment implements IAttachment {
|
|
9
|
+
name: string;
|
|
10
|
+
type: AttachmentType;
|
|
11
|
+
constructor(name: string);
|
|
12
|
+
abstract copy(): Attachment;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Base class for an attachment with vertices that are transformed by one or more bones and can be deformed by a slot's
|
|
16
|
+
* {@link Slot#deform}.
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
export declare abstract class VertexAttachment extends Attachment {
|
|
20
|
+
private static nextID;
|
|
21
|
+
/** The unique ID for this attachment. */
|
|
22
|
+
id: number;
|
|
23
|
+
/** The bones which affect the {@link #getVertices()}. The array entries are, for each vertex, the number of bones affecting
|
|
24
|
+
* the vertex followed by that many bone indices, which is the index of the bone in {@link Skeleton#bones}. Will be null
|
|
25
|
+
* if this attachment has no weights. */
|
|
26
|
+
bones: Array<number> | null;
|
|
27
|
+
/** The vertex positions in the bone's coordinate system. For a non-weighted attachment, the values are `x,y`
|
|
28
|
+
* entries for each vertex. For a weighted attachment, the values are `x,y,weight` entries for each bone affecting
|
|
29
|
+
* each vertex. */
|
|
30
|
+
vertices: NumberArrayLike;
|
|
31
|
+
/** The maximum number of world vertex values that can be output by
|
|
32
|
+
* {@link #computeWorldVertices()} using the `count` parameter. */
|
|
33
|
+
worldVerticesLength: number;
|
|
34
|
+
/** Timelines for the timeline attachment are also applied to this attachment.
|
|
35
|
+
* May be null if no attachment-specific timelines should be applied. */
|
|
36
|
+
timelineAttachment: Attachment;
|
|
37
|
+
constructor(name: string);
|
|
38
|
+
computeWorldVerticesOld(slot: Slot, worldVertices: ArrayLike<number>): void;
|
|
39
|
+
/** Transforms the attachment's local {@link #vertices} to world coordinates. If the slot's {@link Slot#deform} is
|
|
40
|
+
* not empty, it is used to deform the vertices.
|
|
41
|
+
*
|
|
42
|
+
* See [World transforms](http://esotericsoftware.com/spine-runtime-skeletons#World-transforms) in the Spine
|
|
43
|
+
* Runtimes Guide.
|
|
44
|
+
* @param start The index of the first {@link #vertices} value to transform. Each vertex has 2 values, x and y.
|
|
45
|
+
* @param count The number of world vertex values to output. Must be <= {@link #worldVerticesLength} - `start`.
|
|
46
|
+
* @param worldVertices The output world vertices. Must have a length >= `offset` + `count` *
|
|
47
|
+
* `stride` / 2.
|
|
48
|
+
* @param offset The `worldVertices` index to begin writing values.
|
|
49
|
+
* @param stride The number of `worldVertices` entries between the value pairs written. */
|
|
50
|
+
computeWorldVertices(slot: Slot, start: number, count: number, worldVertices: NumberArrayLike, offset: number, stride: number): void;
|
|
51
|
+
/** Does not copy id (generated) or name (set on construction). **/
|
|
52
|
+
copyTo(attachment: VertexAttachment): void;
|
|
53
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Skin } from '../Skin';
|
|
2
|
+
import type { RegionAttachment } from './RegionAttachment';
|
|
3
|
+
import type { MeshAttachment } from './MeshAttachment';
|
|
4
|
+
import type { BoundingBoxAttachment } from './BoundingBoxAttachment';
|
|
5
|
+
import type { PathAttachment } from './PathAttachment';
|
|
6
|
+
import type { PointAttachment } from './PointAttachment';
|
|
7
|
+
import type { ClippingAttachment } from './ClippingAttachment';
|
|
8
|
+
import type { Sequence } from './Sequence';
|
|
9
|
+
/**
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export interface AttachmentLoader {
|
|
13
|
+
/** @return May be null to not load an attachment. */
|
|
14
|
+
newRegionAttachment(skin: Skin, name: string, path: string, sequence: Sequence | null): RegionAttachment;
|
|
15
|
+
/** @return May be null to not load an attachment. */
|
|
16
|
+
newMeshAttachment(skin: Skin, name: string, path: string, sequence: Sequence | null): MeshAttachment;
|
|
17
|
+
/** @return May be null to not load an attachment. */
|
|
18
|
+
newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment;
|
|
19
|
+
/** @return May be null to not load an attachment */
|
|
20
|
+
newPathAttachment(skin: Skin, name: string): PathAttachment;
|
|
21
|
+
/** @return May be null to not load an attachment */
|
|
22
|
+
newPointAttachment(skin: Skin, name: string): PointAttachment;
|
|
23
|
+
/** @return May be null to not load an attachment */
|
|
24
|
+
newClippingAttachment(skin: Skin, name: string): ClippingAttachment;
|
|
25
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Attachment, VertexAttachment } from './Attachment';
|
|
2
|
+
import { AttachmentType, Color } from '@pixi-spine/base';
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare class BoundingBoxAttachment extends VertexAttachment {
|
|
7
|
+
type: AttachmentType;
|
|
8
|
+
color: Color;
|
|
9
|
+
constructor(name: string);
|
|
10
|
+
copy(): Attachment;
|
|
11
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Attachment, VertexAttachment } from './Attachment';
|
|
2
|
+
import { AttachmentType, Color, IClippingAttachment } from '@pixi-spine/base';
|
|
3
|
+
import type { SlotData } from '../SlotData';
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare class ClippingAttachment extends VertexAttachment implements IClippingAttachment {
|
|
8
|
+
type: AttachmentType;
|
|
9
|
+
/** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
|
|
10
|
+
* the skeleton's rendering. */
|
|
11
|
+
endSlot: SlotData | null;
|
|
12
|
+
/** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
|
|
13
|
+
* are not usually rendered at runtime. */
|
|
14
|
+
color: Color;
|
|
15
|
+
constructor(name: string);
|
|
16
|
+
copy(): Attachment;
|
|
17
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Attachment, VertexAttachment } from './Attachment';
|
|
2
|
+
import { AttachmentType, Color, IMeshAttachment, IHasTextureRegion, NumberArrayLike, TextureRegion } from '@pixi-spine/base';
|
|
3
|
+
import type { Sequence } from './Sequence';
|
|
4
|
+
import type { Slot } from '../Slot';
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare class MeshAttachment extends VertexAttachment implements IMeshAttachment, IHasTextureRegion {
|
|
9
|
+
type: AttachmentType;
|
|
10
|
+
region: TextureRegion | null;
|
|
11
|
+
/** The name of the texture region for this attachment. */
|
|
12
|
+
path: string;
|
|
13
|
+
/** The UV pair for each vertex, normalized within the texture region. */
|
|
14
|
+
regionUVs: Float32Array;
|
|
15
|
+
/** Triplets of vertex indices which describe the mesh's triangulation. */
|
|
16
|
+
triangles: Array<number>;
|
|
17
|
+
/** The color to tint the mesh. */
|
|
18
|
+
color: Color;
|
|
19
|
+
/** The width of the mesh's image. Available only when nonessential data was exported. */
|
|
20
|
+
width: number;
|
|
21
|
+
/** The height of the mesh's image. Available only when nonessential data was exported. */
|
|
22
|
+
height: number;
|
|
23
|
+
/** The number of entries at the beginning of {@link #vertices} that make up the mesh hull. */
|
|
24
|
+
hullLength: number;
|
|
25
|
+
/** Vertex index pairs describing edges for controling triangulation. Mesh triangles will never cross edges. Only available if
|
|
26
|
+
* nonessential data was exported. Triangulation is not performed at runtime. */
|
|
27
|
+
edges: Array<number>;
|
|
28
|
+
private parentMesh;
|
|
29
|
+
sequence: Sequence | null;
|
|
30
|
+
tempColor: Color;
|
|
31
|
+
constructor(name: string, path: string);
|
|
32
|
+
/** The parent mesh if this is a linked mesh, else null. A linked mesh shares the {@link #bones}, {@link #vertices},
|
|
33
|
+
* {@link #regionUVs}, {@link #triangles}, {@link #hullLength}, {@link #edges}, {@link #width}, and {@link #height} with the
|
|
34
|
+
* parent mesh, but may have a different {@link #name} or {@link #path} (and therefore a different texture). */
|
|
35
|
+
getParentMesh(): MeshAttachment;
|
|
36
|
+
/** @param parentMesh May be null. */
|
|
37
|
+
setParentMesh(parentMesh: MeshAttachment): void;
|
|
38
|
+
copy(): Attachment;
|
|
39
|
+
computeWorldVertices(slot: Slot, start: number, count: number, worldVertices: NumberArrayLike, offset: number, stride: number): void;
|
|
40
|
+
/** Returns a new mesh with the {@link #parentMesh} set to this mesh's parent mesh, if any, else to this mesh. **/
|
|
41
|
+
newLinkedMesh(): MeshAttachment;
|
|
42
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Attachment, VertexAttachment } from './Attachment';
|
|
2
|
+
import { AttachmentType, Color } from '@pixi-spine/base';
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare class PathAttachment extends VertexAttachment {
|
|
7
|
+
type: AttachmentType;
|
|
8
|
+
/** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
|
|
9
|
+
lengths: Array<number>;
|
|
10
|
+
/** If true, the start and end knots are connected. */
|
|
11
|
+
closed: boolean;
|
|
12
|
+
/** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
|
|
13
|
+
* calculations are performed but calculating positions along the path is less accurate. */
|
|
14
|
+
constantSpeed: boolean;
|
|
15
|
+
/** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
|
|
16
|
+
* rendered at runtime. */
|
|
17
|
+
color: Color;
|
|
18
|
+
constructor(name: string);
|
|
19
|
+
copy(): Attachment;
|
|
20
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Attachment, VertexAttachment } from './Attachment';
|
|
2
|
+
import { AttachmentType, Color, Vector2 } from '@pixi-spine/base';
|
|
3
|
+
import type { Bone } from '../Bone';
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare class PointAttachment extends VertexAttachment {
|
|
8
|
+
type: AttachmentType;
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
rotation: number;
|
|
12
|
+
/** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
|
|
13
|
+
* are not usually rendered at runtime. */
|
|
14
|
+
color: Color;
|
|
15
|
+
constructor(name: string);
|
|
16
|
+
computeWorldPosition(bone: Bone, point: Vector2): Vector2;
|
|
17
|
+
computeWorldRotation(bone: Bone): number;
|
|
18
|
+
copy(): Attachment;
|
|
19
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { Attachment } from './Attachment';
|
|
2
|
+
import { AttachmentType, NumberArrayLike, Color, TextureRegion, IHasTextureRegion, IRegionAttachment } from '@pixi-spine/base';
|
|
3
|
+
import type { Sequence } from './Sequence';
|
|
4
|
+
import type { Slot } from '../Slot';
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare class RegionAttachment extends Attachment implements IRegionAttachment, IHasTextureRegion {
|
|
9
|
+
type: AttachmentType;
|
|
10
|
+
/** The local x translation. */
|
|
11
|
+
x: number;
|
|
12
|
+
/** The local y translation. */
|
|
13
|
+
y: number;
|
|
14
|
+
/** The local scaleX. */
|
|
15
|
+
scaleX: number;
|
|
16
|
+
/** The local scaleY. */
|
|
17
|
+
scaleY: number;
|
|
18
|
+
/** The local rotation. */
|
|
19
|
+
rotation: number;
|
|
20
|
+
/** The width of the region attachment in Spine. */
|
|
21
|
+
width: number;
|
|
22
|
+
/** The height of the region attachment in Spine. */
|
|
23
|
+
height: number;
|
|
24
|
+
/** The color to tint the region attachment. */
|
|
25
|
+
color: Color;
|
|
26
|
+
/** The name of the texture region for this attachment. */
|
|
27
|
+
path: string;
|
|
28
|
+
private rendererObject;
|
|
29
|
+
region: TextureRegion | null;
|
|
30
|
+
sequence: Sequence | null;
|
|
31
|
+
/** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
|
|
32
|
+
*
|
|
33
|
+
* See {@link #updateOffset()}. */
|
|
34
|
+
offset: NumberArrayLike;
|
|
35
|
+
uvs: NumberArrayLike;
|
|
36
|
+
tempColor: Color;
|
|
37
|
+
constructor(name: string, path: string);
|
|
38
|
+
/** Calculates the {@link #offset} using the region settings. Must be called after changing region settings. */
|
|
39
|
+
updateRegion(): void;
|
|
40
|
+
/** Transforms the attachment's four vertices to world coordinates. If the attachment has a {@link #sequence}, the region may
|
|
41
|
+
* be changed.
|
|
42
|
+
* <p>
|
|
43
|
+
* See <a href="http://esotericsoftware.com/spine-runtime-skeletons#World-transforms">World transforms</a> in the Spine
|
|
44
|
+
* Runtimes Guide.
|
|
45
|
+
* @param worldVertices The output world vertices. Must have a length >= <code>offset</code> + 8.
|
|
46
|
+
* @param offset The <code>worldVertices</code> index to begin writing values.
|
|
47
|
+
* @param stride The number of <code>worldVertices</code> entries between the value pairs written. */
|
|
48
|
+
computeWorldVertices(slot: Slot, worldVertices: NumberArrayLike, offset: number, stride: number): void;
|
|
49
|
+
copy(): Attachment;
|
|
50
|
+
static X1: number;
|
|
51
|
+
static Y1: number;
|
|
52
|
+
static C1R: number;
|
|
53
|
+
static C1G: number;
|
|
54
|
+
static C1B: number;
|
|
55
|
+
static C1A: number;
|
|
56
|
+
static U1: number;
|
|
57
|
+
static V1: number;
|
|
58
|
+
static X2: number;
|
|
59
|
+
static Y2: number;
|
|
60
|
+
static C2R: number;
|
|
61
|
+
static C2G: number;
|
|
62
|
+
static C2B: number;
|
|
63
|
+
static C2A: number;
|
|
64
|
+
static U2: number;
|
|
65
|
+
static V2: number;
|
|
66
|
+
static X3: number;
|
|
67
|
+
static Y3: number;
|
|
68
|
+
static C3R: number;
|
|
69
|
+
static C3G: number;
|
|
70
|
+
static C3B: number;
|
|
71
|
+
static C3A: number;
|
|
72
|
+
static U3: number;
|
|
73
|
+
static V3: number;
|
|
74
|
+
static X4: number;
|
|
75
|
+
static Y4: number;
|
|
76
|
+
static C4R: number;
|
|
77
|
+
static C4G: number;
|
|
78
|
+
static C4B: number;
|
|
79
|
+
static C4A: number;
|
|
80
|
+
static U4: number;
|
|
81
|
+
static V4: number;
|
|
82
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { TextureRegion, IHasTextureRegion, ISequence } from '@pixi-spine/base';
|
|
2
|
+
import type { Slot } from '../Slot';
|
|
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';
|
|
2
|
+
export * from './AttachmentLoader';
|
|
3
|
+
export * from './BoundingBoxAttachment';
|
|
4
|
+
export * from './ClippingAttachment';
|
|
5
|
+
export * from './MeshAttachment';
|
|
6
|
+
export * from './PathAttachment';
|
|
7
|
+
export * from './PointAttachment';
|
|
8
|
+
export * from './RegionAttachment';
|
|
9
|
+
export * from './Sequence';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export * from './core/attachments';
|
|
2
|
+
export * from './core/Animation';
|
|
3
|
+
export * from './core/AnimationState';
|
|
4
|
+
export * from './core/AnimationStateData';
|
|
5
|
+
export * from './core/AtlasAttachmentLoader';
|
|
6
|
+
export * from './core/Bone';
|
|
7
|
+
export * from './core/BoneData';
|
|
8
|
+
export * from './core/ConstraintData';
|
|
9
|
+
export * from './core/Event';
|
|
10
|
+
export * from './core/EventData';
|
|
11
|
+
export * from './core/IkConstraint';
|
|
12
|
+
export * from './core/IkConstraintData';
|
|
13
|
+
export * from './core/PathConstraint';
|
|
14
|
+
export * from './core/PathConstraintData';
|
|
15
|
+
export * from './core/Skeleton';
|
|
16
|
+
export * from './core/SkeletonBinary';
|
|
17
|
+
export * from './core/SkeletonBounds';
|
|
18
|
+
export * from './core/SkeletonData';
|
|
19
|
+
export * from './core/SkeletonJson';
|
|
20
|
+
export * from './core/Skin';
|
|
21
|
+
export * from './core/Slot';
|
|
22
|
+
export * from './core/SlotData';
|
|
23
|
+
export * from './core/TransformConstraint';
|
|
24
|
+
export * from './core/TransformConstraintData';
|
|
25
|
+
export * from './core/Updatable';
|
|
26
|
+
export * from './Spine';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AnimationState } from './core/AnimationState';
|
|
2
|
+
import { AnimationStateData } from './core/AnimationStateData';
|
|
3
|
+
import { Skeleton } from './core/Skeleton';
|
|
4
|
+
import { SpineBase } from '@pixi-spine/base';
|
|
5
|
+
import type { SkeletonData } from './core/SkeletonData';
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export declare class Spine extends SpineBase<Skeleton, SkeletonData, AnimationState, AnimationStateData> {
|
|
10
|
+
createSkeleton(spineData: SkeletonData): void;
|
|
11
|
+
}
|