You can customize how attachments are configured when loading the skeleton data using an AttachmentLoader:
你可以自定义在使用 AttachmentLoader 加载骨架数据时如何配置附件。
Loading Skeleton Data - Spine Runtimes Guide
Usually AtlasAttachmentLoader is used, which finds the region and sets it on the attachment. You can provide your own AttachmentLoader which does not set a region. The attachment cannot be drawn until its region is set. It would work like this:
1) You load an atlas that doesn't contain all images for the skeleton.
2) Load your skeleton data and only configure attachments with the regions you have.
3) Later, for example before showing a new skin, you load an atlas that has regions for that skin, and set the region for the skin's attachments, then you set the skin on the skeleton.
通常使用 AtlasAttachmentLoader ,它可以找到区域并将其设置在附件上。你可以提供你自己的 AttachmentLoader ,它不设置区域。在区域被设置之前,附件不能被绘制。它的工作方式是这样的。
1) 你加载一个不包含所有骨架图像的图集。
2) 加载你的骨架数据,只用你拥有的区域来配置附件。
3) 稍后,例如在展示一个新的皮肤之前,你加载一个有该皮肤区域的图集,并为该皮肤的附件设置区域,然后你在骨架上设置该皮肤。
The above is how the Spine Runtimes work. I am not familiar with how pixi.js has integrated the Spine Runtimes. You may need to customize the pixi.js part if it is not flexible enough, but the Spine Runtimes are designed to do what you want.
以上是Spine Runtimes的工作方式。我不熟悉pixi.js是如何整合Spine Runtimes的。如果pixi.js部分不够灵活,你可能需要定制它,但Spine Runtimes的设计是为了做你想做的。