UNPKG

pixi-dragonbones-runtime

Version:
3 lines (2 loc) 722 B
import{BaseObject as s}from"../core/BaseObject.mjs";import"../core/DragonBones.mjs";class t extends s{constructor(){super(...arguments),this.displays={}}static toString(){return"[class dragonBones.SkinData]"}_onClear(){for(let s in this.displays){const t=this.displays[s];for(const s of t)null!==s&&s.returnToPool();delete this.displays[s]}this.name="",this.parent=null}addDisplay(s,t){s in this.displays||(this.displays[s]=[]),null!==t&&(t.parent=this);this.displays[s].push(t)}getDisplay(s,t){const i=this.getDisplays(s);if(null!==i)for(const s of i)if(null!==s&&s.name===t)return s;return null}getDisplays(s){return s in this.displays?this.displays[s]:null}}export{t as SkinData}; //# sourceMappingURL=SkinData.mjs.map