diff --git a/packages/base/src/core/ISkeleton.ts b/packages/base/src/core/ISkeleton.ts index 1063e75d..b3afb47f 100644 --- a/packages/base/src/core/ISkeleton.ts +++ b/packages/base/src/core/ISkeleton.ts @@ -1,5 +1,5 @@ import {AttachmentType} from './AttachmentType'; -import type {Color, Vector2} from './Utils'; +import type {Color, Vector2, Map} from './Utils'; import type {TextureRegion} from './TextureRegion'; import type {Matrix} from '@pixi/math'; @@ -12,6 +12,18 @@ export interface IBone { matrix: Matrix; } +/** + * @public + */ +export interface ISkin { + name: string; + attachments: Array>; + + setAttachment (slotIndex: number, name: string, attachment: IAttachment): void; + getAttachment (slotIndex: number, name: string): IAttachment | null; + attachAll (skeleton: ISkeleton, oldSkin: ISkin): void; +} + /** * @public */ @@ -93,10 +105,12 @@ export interface ISlot { /** * @public */ -export interface ISkeleton { +export interface ISkeleton { bones: Bone[] slots: Slot[] drawOrder: Slot[] + skin: Skin; + data: ISkeletonData; updateWorldTransform (): void; setToSetupPose (): void; findSlotIndex (slotName: string): number; @@ -104,6 +118,8 @@ export interface ISkeleton