{"version":3,"file":"PathAttachment.mjs","sources":["../../../src/core/attachments/PathAttachment.ts"],"sourcesContent":["import { Attachment, VertexAttachment } from './Attachment';\nimport { AttachmentType, Color, Utils } from '@pixi-spine/base';\n\n/**\n * @public\n */\nexport class PathAttachment extends VertexAttachment {\n    type = AttachmentType.Path;\n\n    /** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */\n    lengths: Array<number> = [];\n\n    /** If true, the start and end knots are connected. */\n    closed = false;\n\n    /** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer\n     * calculations are performed but calculating positions along the path is less accurate. */\n    constantSpeed = false;\n\n    /** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually\n     * rendered at runtime. */\n    color = new Color(1, 1, 1, 1);\n\n    constructor(name: string) {\n        super(name);\n    }\n\n    copy(): Attachment {\n        const copy = new PathAttachment(this.name);\n\n        this.copyTo(copy);\n        copy.lengths = new Array<number>(this.lengths.length);\n        Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\n        copy.closed = closed;\n        copy.constantSpeed = this.constantSpeed;\n        copy.color.setFromColor(this.color);\n\n        return copy;\n    }\n}\n"],"names":[],"mappings":";;;AAMO,MAAM,uBAAuB,gBAAiB,CAAA;AAAA,EAiBjD,YAAY,IAAc,EAAA;AACtB,IAAA,KAAA,CAAM,IAAI,CAAA,CAAA;AAjBd,IAAA,IAAA,CAAA,IAAA,GAAO,cAAe,CAAA,IAAA,CAAA;AAGtB;AAAA,IAAA,IAAA,CAAA,OAAA,GAAyB,EAAC,CAAA;AAG1B;AAAA,IAAS,IAAA,CAAA,MAAA,GAAA,KAAA,CAAA;AAIT;AAAA;AAAA,IAAgB,IAAA,CAAA,aAAA,GAAA,KAAA,CAAA;AAIhB;AAAA;AAAA,IAAA,IAAA,CAAA,KAAA,GAAQ,IAAI,KAAA,CAAM,CAAG,EAAA,CAAA,EAAG,GAAG,CAAC,CAAA,CAAA;AAAA,GAI5B;AAAA,EAEA,IAAmB,GAAA;AACf,IAAA,MAAM,IAAO,GAAA,IAAI,cAAe,CAAA,IAAA,CAAK,IAAI,CAAA,CAAA;AAEzC,IAAA,IAAA,CAAK,OAAO,IAAI,CAAA,CAAA;AAChB,IAAA,IAAA,CAAK,OAAU,GAAA,IAAI,KAAc,CAAA,IAAA,CAAK,QAAQ,MAAM,CAAA,CAAA;AACpD,IAAM,KAAA,CAAA,SAAA,CAAU,KAAK,OAAS,EAAA,CAAA,EAAG,KAAK,OAAS,EAAA,CAAA,EAAG,IAAK,CAAA,OAAA,CAAQ,MAAM,CAAA,CAAA;AACrE,IAAA,IAAA,CAAK,MAAS,GAAA,MAAA,CAAA;AACd,IAAA,IAAA,CAAK,gBAAgB,IAAK,CAAA,aAAA,CAAA;AAC1B,IAAK,IAAA,CAAA,KAAA,CAAM,YAAa,CAAA,IAAA,CAAK,KAAK,CAAA,CAAA;AAElC,IAAO,OAAA,IAAA,CAAA;AAAA,GACX;AACJ;;;;"}