From 701f405eeecb39e92e06c871f13bcc68d3cdeed8 Mon Sep 17 00:00:00 2001 From: Ivan Popelyshev Date: Mon, 5 Apr 2021 01:28:40 +0300 Subject: [PATCH] new build, 2.1.13 --- dist/pixi-spine.js | 3 +++ dist/pixi-spine.js.map | 2 +- package.json | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dist/pixi-spine.js b/dist/pixi-spine.js index d11c497a..14b25e35 100644 --- a/dist/pixi-spine.js +++ b/dist/pixi-spine.js @@ -8421,6 +8421,9 @@ var pixi_spine; slotContainer.addChild(slot.currentGraphics); } this.updateGraphics(slot, attachment); + slotContainer.alpha = 1.0; + slotContainer.visible = true; + continue; } else { slotContainer.visible = false; diff --git a/dist/pixi-spine.js.map b/dist/pixi-spine.js.map index 29c6ae74..191d0334 100644 --- a/dist/pixi-spine.js.map +++ b/dist/pixi-spine.js.map @@ -1 +1 @@ -{"version":3,"file":"pixi-spine.js","sourceRoot":"","sources":["../src/core/Animation.ts","../src/core/AnimationState.ts","../src/core/AnimationStateData.ts","../src/core/AtlasAttachmentLoader.ts","../src/core/BlendMode.ts","../src/core/Bone.ts","../src/core/BoneData.ts","../src/core/Constraint.ts","../src/core/Event.ts","../src/core/EventData.ts","../src/core/IkConstraint.ts","../src/core/IkConstraintData.ts","../src/core/PathConstraint.ts","../src/core/PathConstraintData.ts","../src/core/Skeleton.ts","../src/core/SkeletonBinary.ts","../src/core/SkeletonBounds.ts","../src/core/SkeletonClipping.ts","../src/core/SkeletonData.ts","../src/core/SkeletonJson.ts","../src/core/Skin.ts","../src/core/Slot.ts","../src/core/SlotData.ts","../src/core/Texture.ts","../src/core/TextureAtlas.ts","../src/core/TransformConstraint.ts","../src/core/TransformConstraintData.ts","../src/core/Triangulator.ts","../src/core/Updatable.ts","../src/core/Utils.ts","../src/core/VertexEffect.ts","../src/core/attachments/Attachment.ts","../src/core/attachments/AttachmentLoader.ts","../src/core/attachments/AttachmentType.ts","../src/core/attachments/BoundingBoxAttachment.ts","../src/core/attachments/ClippingAttachment.ts","../src/core/attachments/MeshAttachment.ts","../src/core/attachments/PathAttachment.ts","../src/core/attachments/PointAttachment.ts","../src/core/attachments/RegionAttachment.ts","../src/core/vertexeffects/JitterEffect.ts","../src/core/vertexeffects/SwirlEffect.ts","../src/polyfills.ts","../src/Spine.ts","../src/exporter.ts","../src/loaders.ts"],"names":[],"mappings":";;;;;;;;;;;;;AA6BA,IAAU,UAAU,CAs/CnB;AAt/CD,WAAU,UAAU;IAAC,IAAA,IAAI,CAs/CxB;IAt/CoB,WAAA,IAAI;QAGrB;YASI,mBAAa,IAAY,EAAE,SAA0B,EAAE,QAAgB;gBACnE,IAAI,IAAI,IAAI,IAAI;oBAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;gBAC1D,IAAI,SAAS,IAAI,IAAI;oBAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;gBACpE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;gBACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;gBAC3B,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;gBACtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE;oBACrC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC,GAAG,IAAI,CAAC;gBAC1D,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAC7B,CAAC;YAED,+BAAW,GAAX,UAAa,EAAU;gBACnB,OAAO,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC;YACxC,CAAC;YAOD,yBAAK,GAAL,UAAO,QAAkB,EAAE,QAAgB,EAAE,IAAY,EAAE,IAAa,EAAE,MAAoB,EAAE,KAAa,EAAE,KAAe,EAAE,SAAuB;gBACnJ,IAAI,QAAQ,IAAI,IAAI;oBAAE,MAAM,IAA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ACH,CAAC,CAAC,CAAC;aACN;QACL,CAAC,CAAA;IACL,CAAC;IA7Be,6BAAkB,qBA6BjC,CAAA;IAED,SAAgB,sBAAsB,CAAC,OAAY,EAAE,WAAgB;QACjE,IAAI,OAAO,IAAI,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE;YAC9D,OAAO,IAAI,GAAG,CAAC;SAClB;QACD,OAAO,UAAU,IAAS,EAAE,QAAa;YACrC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC;QACvD,CAAC,CAAA;IACL,CAAC;IAPe,iCAAsB,yBAOrC,CAAA;IAED,SAAgB,iBAAiB,CAAC,KAA2D;QACzF,OAAO,UAAU,IAAS,EAAE,QAAa;YACrC,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,SAAS,CAAQ,CAAC;YAClD,IAAI,IAAI,IAAI,IAAI,CAAC,WAAW;gBACxB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;;gBAE3B,QAAQ,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC,CAAA;IACL,CAAC;IARe,4BAAiB,oBAQhC,CAAA;IAED,IAAI,IAAI,CAAC,MAAM,EAAE;QACb,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;KAC3C;AACL,CAAC,EApLS,UAAU,KAAV,UAAU,QAoLnB","sourcesContent":["/******************************************************************************\r\n * Spine Runtimes License Agreement\r\n * Last updated May 1, 2019. Replaces all prior versions.\r\n *\r\n * Copyright (c) 2013-2019, Esoteric Software LLC\r\n *\r\n * Integration of the Spine Runtimes into software or otherwise creating\r\n * derivative works of the Spine Runtimes is permitted under the terms and\r\n * conditions of Section 2 of the Spine Editor License Agreement:\r\n * http://esotericsoftware.com/spine-editor-license\r\n *\r\n * Otherwise, it is permitted to integrate the Spine Runtimes into software\r\n * or otherwise create derivative works of the Spine Runtimes (collectively,\r\n * \"Products\"), provided that each user of the Products must obtain their own\r\n * Spine Editor license and redistribution of the Products in any form must\r\n * include this license and copyright notice.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY EXPRESS\r\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\r\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN\r\n * NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY DIRECT, INDIRECT,\r\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r\n * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS\r\n * INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY\r\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r\n * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n\r\n /** A simple container for a list of timelines and a name. */\r\n export class Animation {\r\n /** The animation's name, which is unique across all animations in the skeleton. */\r\n name: string;\r\n timelines: Array;\r\n timelineIds: Array;\r\n\r\n /** The duration of the animation in seconds, which is the highest time of all keys in the timeline. */\r\n duration: number;\r\n\r\n constructor (name: string, timelines: Array, duration: number) {\r\n if (name == null) throw new Error(\"name cannot be null.\");\r\n if (timelines == null) throw new Error(\"timelines cannot be null.\");\r\n this.name = name;\r\n this.timelines = timelines;\r\n this.timelineIds = [];\r\n for (var i = 0; i < timelines.length; i++)\r\n this.timelineIds[timelines[i].getPropertyId()] = true;\r\n this.duration = duration;\r\n }\r\n\r\n hasTimeline (id: number) {\r\n return this.timelineIds[id] == true;\r\n }\r\n\r\n /** Applies all the animation's timelines to the specified skeleton.\r\n *\r\n * See Timeline {@link Timeline#apply(Skeleton, float, float, Array, float, MixBlend, MixDirection)}.\r\n * @param loop If true, the animation repeats after {@link #getDuration()}.\r\n * @param events May be null to ignore fired events. */\r\n apply (skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\r\n\r\n if (loop && this.duration != 0) {\r\n time %= this.duration;\r\n if (lastTime > 0) lastTime %= this.duration;\r\n }\r\n\r\n let timelines = this.timelines;\r\n for (let i = 0, n = timelines.length; i < n; i++)\r\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\r\n }\r\n\r\n /** @param target After the first and before the last value.\r\n * @returns index of first value greater than the target. */\r\n static binarySearch (values: ArrayLike, target: number, step: number = 1) {\r\n let low = 0;\r\n let high = values.length / step - 2;\r\n if (high == 0) return step;\r\n let current = high >>> 1;\r\n while (true) {\r\n if (values[(current + 1) * step] <= target)\r\n low = current + 1;\r\n else\r\n high = current;\r\n if (low == high) return (low + 1) * step;\r\n current = (low + high) >>> 1;\r\n }\r\n }\r\n\r\n static linearSearch (values: ArrayLike, target: number, step: number) {\r\n for (let i = 0, last = values.length - step; i <= last; i += step)\r\n if (values[i] > target) return i;\r\n return -1;\r\n }\r\n }\r\n\r\n /** The interface for all timelines. */\r\n export interface Timeline {\r\n /** Applies this timeline to the skeleton.\r\n * @param skeleton The skeleton the timeline is being applied to. This provides access to the bones, slots, and other\r\n * skeleton components the timeline may change.\r\n * @param lastTime The time this timeline was last applied. Timelines such as {@link EventTimeline}} trigger only at specific\r\n * times rather than every frame. In that case, the timeline triggers everything between `lastTime`\r\n * (exclusive) and `time` (inclusive).\r\n * @param time The time within the animation. Most timelines find the key before and the key after this time so they can\r\n * interpolate between the keys.\r\n * @param events If any events are fired, they are added to this list. Can be null to ignore fired events or if the timeline\r\n * does not fire events.\r\n * @param alpha 0 applies the current or setup value (depending on `blend`). 1 applies the timeline value.\r\n * Between 0 and 1 applies a value between the current or setup value and the timeline value. By adjusting\r\n * `alpha` over time, an animation can be mixed in or out. `alpha` can also be useful to\r\n * apply animations on top of each other (layering).\r\n * @param blend Controls how mixing is applied when `alpha` < 1.\r\n * @param direction Indicates whether the timeline is mixing in or out. Used by timelines which perform instant transitions,\r\n * such as {@link DrawOrderTimeline} or {@link AttachmentTimeline}. */\r\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void;\r\n\r\n /** Uniquely encodes both the type of this timeline and the skeleton property that it affects. */\r\n getPropertyId (): number;\r\n }\r\n\r\n /** Controls how a timeline value is mixed with the setup pose value or current pose value when a timeline's `alpha`\r\n * < 1.\r\n *\r\n * See Timeline {@link Timeline#apply(Skeleton, float, float, Array, float, MixBlend, MixDirection)}. */\r\n export enum MixBlend {\r\n /** Transitions from the setup value to the timeline value (the current value is not used). Before the first key, the setup\r\n * value is set. */\r\n setup,\r\n /** Transitions from the current value to the timeline value. Before the first key, transitions from the current value to\r\n * the setup value. Timelines which perform instant transitions, such as {@link DrawOrderTimeline} or\r\n * {@link AttachmentTimeline}, use the setup value before the first key.\r\n *\r\n * `first` is intended for the first animations applied, not for animations layered on top of those. */\r\n first,\r\n /** Transitions from the current value to the timeline value. No change is made before the first key (the current value is\r\n * kept until the first key).\r\n *\r\n * `replace` is intended for animations layered on top of others, not for the first animations applied. */\r\n replace,\r\n /** Transitions from the current value to the current value plus the timeline value. No change is made before the first key\r\n * (the current value is kept until the first key).\r\n *\r\n * `add` is intended for animations layered on top of others, not for the first animations applied. Properties\r\n * keyed by additive animations must be set manually or by another animation before applying the additive animations, else\r\n * the property values will increase continually. */\r\n add\r\n }\r\n\r\n /** Indicates whether a timeline's `alpha` is mixing out over time toward 0 (the setup or current pose value) or\r\n * mixing in toward 1 (the timeline's value).\r\n *\r\n * See Timeline {@link Timeline#apply(Skeleton, float, float, Array, float, MixBlend, MixDirection)}. */\r\n export enum MixDirection {\r\n mixIn, mixOut\r\n }\r\n\r\n export enum TimelineType {\r\n rotate, translate, scale, shear,\r\n attachment, color, deform,\r\n event, drawOrder,\r\n ikConstraint, transformConstraint,\r\n pathConstraintPosition, pathConstraintSpacing, pathConstraintMix,\r\n twoColor\r\n }\r\n\r\n /** The base class for timelines that use interpolation between key frame values. */\r\n export abstract class CurveTimeline implements Timeline {\r\n static LINEAR = 0; static STEPPED = 1; static BEZIER = 2;\r\n static BEZIER_SIZE = 10 * 2 - 1;\r\n\r\n private curves: ArrayLike; // type, x, y, ...\r\n\r\n abstract getPropertyId(): number;\r\n\r\n constructor (frameCount: number) {\r\n if (frameCount <= 0) throw new Error(\"frameCount must be > 0: \" + frameCount);\r\n this.curves = Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\r\n }\r\n\r\n /** The number of key frames for this timeline. */\r\n getFrameCount () {\r\n return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\r\n }\r\n\r\n /** Sets the specified key frame to linear interpolation. */\r\n setLinear (frameIndex: number) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\r\n }\r\n\r\n /** Sets the specified key frame to stepped interpolation. */\r\n setStepped (frameIndex: number) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\r\n }\r\n\r\n /** Returns the interpolation type for the specified key frame.\r\n * @returns Linear is 0, stepped is 1, Bezier is 2. */\r\n getCurveType (frameIndex: number): number {\r\n let index = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n if (index == this.curves.length) return CurveTimeline.LINEAR;\r\n let type = this.curves[index];\r\n if (type == CurveTimeline.LINEAR) return CurveTimeline.LINEAR;\r\n if (type == CurveTimeline.STEPPED) return CurveTimeline.STEPPED;\r\n return CurveTimeline.BEZIER;\r\n }\r\n\r\n /** Sets the specified key frame to Bezier interpolation. `cx1` and `cx2` are from 0 to 1,\r\n * representing the percent of time between the two key frames. `cy1` and `cy2` are the percent of the\r\n * difference between the key frame's values. */\r\n setCurve (frameIndex: number, cx1: number, cy1: number, cx2: number, cy2: number) {\r\n let tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\r\n let dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\r\n let ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\r\n let dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\r\n\r\n let i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n let curves = this.curves;\r\n curves[i++] = CurveTimeline.BEZIER;\r\n\r\n let x = dfx, y = dfy;\r\n for (let n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n curves[i] = x;\r\n curves[i + 1] = y;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n x += dfx;\r\n y += dfy;\r\n }\r\n }\r\n\r\n /** Returns the interpolated percentage for the specified key frame and linear percentage. */\r\n getCurvePercent (frameIndex: number, percent: number) {\r\n percent = MathUtils.clamp(percent, 0, 1);\r\n let curves = this.curves;\r\n let i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n let type = curves[i];\r\n if (type == CurveTimeline.LINEAR) return percent;\r\n if (type == CurveTimeline.STEPPED) return 0;\r\n i++;\r\n let x = 0;\r\n for (let start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n x = curves[i];\r\n if (x >= percent) {\r\n let prevX: number, prevY: number;\r\n if (i == start) {\r\n prevX = 0;\r\n prevY = 0;\r\n } else {\r\n prevX = curves[i - 2];\r\n prevY = curves[i - 1];\r\n }\r\n return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\r\n }\r\n }\r\n let y = curves[i - 1];\r\n return y + (1 - y) * (percent - x) / (1 - x); // Last point is 1,1.\r\n }\r\n\r\n abstract apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void;\r\n }\r\n\r\n /** Changes a bone's local {@link Bone#rotation}. */\r\n export class RotateTimeline extends CurveTimeline {\r\n static ENTRIES = 2;\r\n static PREV_TIME = -2; static PREV_ROTATION = -1;\r\n static ROTATION = 1;\r\n\r\n /** The index of the bone in {@link Skeleton#bones} that will be changed. */\r\n boneIndex: number;\r\n\r\n /** The time in seconds and rotation in degrees for each key frame. */\r\n frames: ArrayLike; // time, degrees, ...\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount << 1);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.rotate << 24) + this.boneIndex;\r\n }\r\n\r\n /** Sets the time and angle of the specified keyframe. */\r\n setFrame (frameIndex: number, time: number, degrees: number) {\r\n frameIndex <<= 1;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active) return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n return;\r\n case MixBlend.first:\r\n let r = bone.data.rotation - bone.rotation;\r\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n }\r\n return;\r\n }\r\n\r\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) { // Time is after last frame.\r\n let r = frames[frames.length + RotateTimeline.PREV_ROTATION];\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + r * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r += bone.data.rotation - bone.rotation;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360; // Wrap within -180 and 180.\r\n case MixBlend.add:\r\n bone.rotation += r * alpha;\r\n }\r\n return;\r\n }\r\n\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\r\n let prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent((frame >> 1) - 1,\r\n 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\r\n\r\n let r = frames[frame + RotateTimeline.ROTATION] - prevRotation;\r\n r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r += bone.data.rotation - bone.rotation;\r\n case MixBlend.add:\r\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n }\r\n }\r\n }\r\n\r\n /** Changes a bone's local {@link Bone#x} and {@link Bone#y}. */\r\n export class TranslateTimeline extends CurveTimeline {\r\n static ENTRIES = 3;\r\n static PREV_TIME = -3; static PREV_X = -2; static PREV_Y = -1;\r\n static X = 1; static Y = 2;\r\n\r\n /** The index of the bone in {@link Skeleton#bones} that will be changed. */\r\n boneIndex: number;\r\n\r\n /** The time in seconds, x, and y values for each key frame. */\r\n frames: ArrayLike; // time, x, y, ...\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.translate << 24) + this.boneIndex;\r\n }\r\n\r\n /** Sets the time in seconds, x, and y values for the specified key frame. */\r\n setFrame (frameIndex: number, time: number, x: number, y: number) {\r\n frameIndex *= TranslateTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TranslateTimeline.X] = x;\r\n this.frames[frameIndex + TranslateTimeline.Y] = y;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active) return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x;\r\n bone.y = bone.data.y;\r\n return;\r\n case MixBlend.first:\r\n bone.x += (bone.data.x - bone.x) * alpha;\r\n bone.y += (bone.data.y - bone.y) * alpha;\r\n }\r\n return;\r\n }\r\n\r\n let x = 0, y = 0;\r\n if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) { // Time is after last frame.\r\n x = frames[frames.length + TranslateTimeline.PREV_X];\r\n y = frames[frames.length + TranslateTimeline.PREV_Y];\r\n } else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\r\n x = frames[frame + TranslateTimeline.PREV_X];\r\n y = frames[frame + TranslateTimeline.PREV_Y];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\r\n\r\n x += (frames[frame + TranslateTimeline.X] - x) * percent;\r\n y += (frames[frame + TranslateTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x + x * alpha;\r\n bone.y = bone.data.y + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.x += (bone.data.x + x - bone.x) * alpha;\r\n bone.y += (bone.data.y + y - bone.y) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.x += x * alpha;\r\n bone.y += y * alpha;\r\n }\r\n }\r\n }\r\n\r\n /** Changes a bone's local {@link Bone#scaleX)} and {@link Bone#scaleY}. */\r\n export class ScaleTimeline extends TranslateTimeline {\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.scale << 24) + this.boneIndex;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active) return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.scaleX = bone.data.scaleX;\r\n bone.scaleY = bone.data.scaleY;\r\n return;\r\n case MixBlend.first:\r\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n }\r\n return;\r\n }\r\n\r\n let x = 0, y = 0;\r\n if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) { // Time is after last frame.\r\n x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX;\r\n y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY;\r\n } else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\r\n x = frames[frame + ScaleTimeline.PREV_X];\r\n y = frames[frame + ScaleTimeline.PREV_Y];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\r\n\r\n x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX;\r\n y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY;\r\n }\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n bone.scaleX += x - bone.data.scaleX;\r\n bone.scaleY += y - bone.data.scaleY;\r\n } else {\r\n bone.scaleX = x;\r\n bone.scaleY = y;\r\n }\r\n } else {\r\n let bx = 0, by = 0;\r\n if (direction == MixDirection.mixOut) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = bone.data.scaleX;\r\n by = bone.data.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bone.data.scaleX) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - bone.data.scaleY) * alpha;\r\n }\r\n } else {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\r\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\r\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = MathUtils.signum(x);\r\n by = MathUtils.signum(y);\r\n bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha;\r\n bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /** Changes a bone's local {@link Bone#shearX} and {@link Bone#shearY}. */\r\n export class ShearTimeline extends TranslateTimeline {\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.shear << 24) + this.boneIndex;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active) return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX;\r\n bone.shearY = bone.data.shearY;\r\n return;\r\n case MixBlend.first:\r\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n }\r\n return;\r\n }\r\n\r\n let x = 0, y = 0;\r\n if (time >= frames[frames.length - ShearTimeline.ENTRIES]) { // Time is after last frame.\r\n x = frames[frames.length + ShearTimeline.PREV_X];\r\n y = frames[frames.length + ShearTimeline.PREV_Y];\r\n } else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\r\n x = frames[frame + ShearTimeline.PREV_X];\r\n y = frames[frame + ShearTimeline.PREV_Y];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\r\n\r\n x = x + (frames[frame + ShearTimeline.X] - x) * percent;\r\n y = y + (frames[frame + ShearTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX + x * alpha;\r\n bone.shearY = bone.data.shearY + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.shearX += x * alpha;\r\n bone.shearY += y * alpha;\r\n }\r\n }\r\n }\r\n\r\n /** Changes a slot's {@link Slot#color}. */\r\n export class ColorTimeline extends CurveTimeline {\r\n static ENTRIES = 5;\r\n static PREV_TIME = -5; static PREV_R = -4; static PREV_G = -3; static PREV_B = -2; static PREV_A = -1;\r\n static R = 1; static G = 2; static B = 3; static A = 4;\r\n\r\n /** The index of the slot in {@link Skeleton#slots} that will be changed. */\r\n slotIndex: number;\r\n\r\n /** The time in seconds, red, green, blue, and alpha values for each key frame. */\r\n frames: ArrayLike; // time, r, g, b, a, ...\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.color << 24) + this.slotIndex;\r\n }\r\n\r\n /** Sets the time in seconds, red, green, blue, and alpha for the specified key frame. */\r\n setFrame (frameIndex: number, time: number, r: number, g: number, b: number, a: number) {\r\n frameIndex *= ColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + ColorTimeline.R] = r;\r\n this.frames[frameIndex + ColorTimeline.G] = g;\r\n this.frames[frameIndex + ColorTimeline.B] = b;\r\n this.frames[frameIndex + ColorTimeline.A] = a;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active) return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n return;\r\n case MixBlend.first:\r\n let color = slot.color, setup = slot.data.color;\r\n color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha,\r\n (setup.a - color.a) * alpha);\r\n }\r\n return;\r\n }\r\n\r\n let r = 0, g = 0, b = 0, a = 0;\r\n if (time >= frames[frames.length - ColorTimeline.ENTRIES]) { // Time is after last frame.\r\n let i = frames.length;\r\n r = frames[i + ColorTimeline.PREV_R];\r\n g = frames[i + ColorTimeline.PREV_G];\r\n b = frames[i + ColorTimeline.PREV_B];\r\n a = frames[i + ColorTimeline.PREV_A];\r\n } else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\r\n r = frames[frame + ColorTimeline.PREV_R];\r\n g = frames[frame + ColorTimeline.PREV_G];\r\n b = frames[frame + ColorTimeline.PREV_B];\r\n a = frames[frame + ColorTimeline.PREV_A];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\r\n\r\n r += (frames[frame + ColorTimeline.R] - r) * percent;\r\n g += (frames[frame + ColorTimeline.G] - g) * percent;\r\n b += (frames[frame + ColorTimeline.B] - b) * percent;\r\n a += (frames[frame + ColorTimeline.A] - a) * percent;\r\n }\r\n if (alpha == 1)\r\n slot.color.set(r, g, b, a);\r\n else {\r\n let color = slot.color;\r\n if (blend == MixBlend.setup) color.setFromColor(slot.data.color);\r\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\r\n }\r\n }\r\n }\r\n\r\n /** Changes a slot's {@link Slot#color} and {@link Slot#darkColor} for two color tinting. */\r\n export class TwoColorTimeline extends CurveTimeline {\r\n static ENTRIES = 8;\r\n static PREV_TIME = -8; static PREV_R = -7; static PREV_G = -6; static PREV_B = -5; static PREV_A = -4;\r\n static PREV_R2 = -3; static PREV_G2 = -2; static PREV_B2 = -1;\r\n static R = 1; static G = 2; static B = 3; static A = 4; static R2 = 5; static G2 = 6; static B2 = 7;\r\n\r\n /** The index of the slot in {@link Skeleton#slots()} that will be changed. The {@link Slot#darkColor()} must not be\r\n * null. */\r\n slotIndex: number;\r\n\r\n /** The time in seconds, red, green, blue, and alpha values of the color, red, green, blue of the dark color, for each key frame. */\r\n frames: ArrayLike; // time, r, g, b, a, r2, g2, b2, ...\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.twoColor << 24) + this.slotIndex;\r\n }\r\n\r\n /** Sets the time in seconds, light, and dark colors for the specified key frame. */\r\n setFrame (frameIndex: number, time: number, r: number, g: number, b: number, a: number, r2: number, g2: number, b2: number) {\r\n frameIndex *= TwoColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TwoColorTimeline.R] = r;\r\n this.frames[frameIndex + TwoColorTimeline.G] = g;\r\n this.frames[frameIndex + TwoColorTimeline.B] = b;\r\n this.frames[frameIndex + TwoColorTimeline.A] = a;\r\n this.frames[frameIndex + TwoColorTimeline.R2] = r2;\r\n this.frames[frameIndex + TwoColorTimeline.G2] = g2;\r\n this.frames[frameIndex + TwoColorTimeline.B2] = b2;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active) return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n slot.darkColor.setFromColor(slot.data.darkColor);\r\n return;\r\n case MixBlend.first:\r\n let light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha,\r\n (setupLight.a - light.a) * alpha);\r\n dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0);\r\n }\r\n return;\r\n }\r\n\r\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) { // Time is after last frame.\r\n let i = frames.length;\r\n r = frames[i + TwoColorTimeline.PREV_R];\r\n g = frames[i + TwoColorTimeline.PREV_G];\r\n b = frames[i + TwoColorTimeline.PREV_B];\r\n a = frames[i + TwoColorTimeline.PREV_A];\r\n r2 = frames[i + TwoColorTimeline.PREV_R2];\r\n g2 = frames[i + TwoColorTimeline.PREV_G2];\r\n b2 = frames[i + TwoColorTimeline.PREV_B2];\r\n } else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES);\r\n r = frames[frame + TwoColorTimeline.PREV_R];\r\n g = frames[frame + TwoColorTimeline.PREV_G];\r\n b = frames[frame + TwoColorTimeline.PREV_B];\r\n a = frames[frame + TwoColorTimeline.PREV_A];\r\n r2 = frames[frame + TwoColorTimeline.PREV_R2];\r\n g2 = frames[frame + TwoColorTimeline.PREV_G2];\r\n b2 = frames[frame + TwoColorTimeline.PREV_B2];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime));\r\n\r\n r += (frames[frame + TwoColorTimeline.R] - r) * percent;\r\n g += (frames[frame + TwoColorTimeline.G] - g) * percent;\r\n b += (frames[frame + TwoColorTimeline.B] - b) * percent;\r\n a += (frames[frame + TwoColorTimeline.A] - a) * percent;\r\n r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent;\r\n g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent;\r\n b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent;\r\n }\r\n if (alpha == 1) {\r\n slot.color.set(r, g, b, a);\r\n slot.darkColor.set(r2, g2, b2, 1);\r\n } else {\r\n let light = slot.color, dark = slot.darkColor;\r\n if (blend == MixBlend.setup) {\r\n light.setFromColor(slot.data.color);\r\n dark.setFromColor(slot.data.darkColor);\r\n }\r\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\r\n dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);\r\n }\r\n }\r\n }\r\n\r\n /** Changes a slot's {@link Slot#attachment}. */\r\n export class AttachmentTimeline implements Timeline {\r\n /** The index of the slot in {@link Skeleton#slots} that will be changed. */\r\n slotIndex: number;\r\n\r\n /** The time in seconds for each key frame. */\r\n frames: ArrayLike // time, ...\r\n\r\n /** The attachment name for each key frame. May contain null values to clear the attachment. */\r\n attachmentNames: Array;\r\n\r\n constructor (frameCount: number) {\r\n this.frames = Utils.newFloatArray(frameCount);\r\n this.attachmentNames = new Array(frameCount);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.attachment << 24) + this.slotIndex;\r\n }\r\n\r\n /** The number of key frames for this timeline. */\r\n getFrameCount () {\r\n return this.frames.length;\r\n }\r\n\r\n /** Sets the time in seconds and the attachment name for the specified key frame. */\r\n setFrame (frameIndex: number, time: number, attachmentName: string) {\r\n this.frames[frameIndex] = time;\r\n this.attachmentNames[frameIndex] = attachmentName;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active) return;\r\n if (direction == MixDirection.mixOut) {\r\n if (blend == MixBlend.setup)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first) this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n\r\n let frameIndex = 0;\r\n if (time >= frames[frames.length - 1]) // Time is after last frame.\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = Animation.binarySearch(frames, time, 1) - 1;\r\n\r\n let attachmentName = this.attachmentNames[frameIndex];\r\n skeleton.slots[this.slotIndex]\r\n .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n }\r\n\r\n setAttachment(skeleton: Skeleton, slot: Slot, attachmentName: string) {\r\n slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName);\r\n }\r\n }\r\n\r\n let zeros : ArrayLike = null;\r\n\r\n /** Changes a slot's {@link Slot#deform} to deform a {@link VertexAttachment}. */\r\n export class DeformTimeline extends CurveTimeline {\r\n /** The index of the slot in {@link Skeleton#getSlots()} that will be changed. */\r\n slotIndex: number;\r\n\r\n /** The attachment that will be deformed. */\r\n attachment: VertexAttachment;\r\n\r\n /** The time in seconds for each key frame. */\r\n frames: ArrayLike; // time, ...\r\n\r\n /** The vertices for each key frame. */\r\n frameVertices: Array>;\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount);\r\n this.frameVertices = new Array>(frameCount);\r\n if (zeros == null) zeros = Utils.newFloatArray(64);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.deform << 27) + + this.attachment.id + this.slotIndex;\r\n }\r\n\r\n /** Sets the time in seconds and the vertices for the specified key frame.\r\n * @param vertices Vertex positions for an unweighted VertexAttachment, or deform offsets if it has weights. */\r\n setFrame (frameIndex: number, time: number, vertices: ArrayLike) {\r\n this.frames[frameIndex] = time;\r\n this.frameVertices[frameIndex] = vertices;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let slot: Slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active) return;\r\n let slotAttachment: Attachment = slot.getAttachment();\r\n if (!(slotAttachment instanceof VertexAttachment) || !((slotAttachment).deformAttachment == this.attachment)) return;\r\n\r\n let deformArray: Array = slot.deform;\r\n if (deformArray.length == 0) blend = MixBlend.setup;\r\n\r\n let frameVertices = this.frameVertices;\r\n let vertexCount = frameVertices[0].length;\r\n\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n let vertexAttachment = slotAttachment;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n deformArray.length = 0;\r\n return;\r\n case MixBlend.first:\r\n if (alpha == 1) {\r\n deformArray.length = 0;\r\n break;\r\n }\r\n let deform: Array = Utils.setArraySize(deformArray, vertexCount);\r\n if (vertexAttachment.bones == null) {\r\n // Unweighted vertex positions.\r\n let setupVertices = vertexAttachment.vertices;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform[i] += (setupVertices[i] - deform[i]) * alpha;\r\n } else {\r\n // Weighted deform offsets.\r\n alpha = 1 - alpha;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform[i] *= alpha;\r\n }\r\n }\r\n return;\r\n }\r\n\r\n let deform: Array = Utils.setArraySize(deformArray, vertexCount);\r\n if (time >= frames[frames.length - 1]) { // Time is after last frame.\r\n let lastVertices = frameVertices[frames.length - 1];\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n let vertexAttachment = slotAttachment as VertexAttachment;\r\n if (vertexAttachment.bones == null) {\r\n // Unweighted vertex positions, with alpha.\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i = 0; i < vertexCount; i++) {\r\n deform[i] += lastVertices[i] - setupVertices[i];\r\n }\r\n } else {\r\n // Weighted deform offsets, with alpha.\r\n for (let i = 0; i < vertexCount; i++)\r\n deform[i] += lastVertices[i];\r\n }\r\n } else {\r\n Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\r\n }\r\n } else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n let vertexAttachment = slotAttachment as VertexAttachment;\r\n if (vertexAttachment.bones == null) {\r\n // Unweighted vertex positions, with alpha.\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i = 0; i < vertexCount; i++) {\r\n let setup = setupVertices[i];\r\n deform[i] = setup + (lastVertices[i] - setup) * alpha;\r\n }\r\n } else {\r\n // Weighted deform offsets, with alpha.\r\n for (let i = 0; i < vertexCount; i++)\r\n deform[i] = lastVertices[i] * alpha;\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (let i = 0; i < vertexCount; i++)\r\n deform[i] += (lastVertices[i] - deform[i]) * alpha;\r\n break;\r\n case MixBlend.add:\r\n let vertexAttachment = slotAttachment as VertexAttachment;\r\n if (vertexAttachment.bones == null) {\r\n // Unweighted vertex positions, with alpha.\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i = 0; i < vertexCount; i++) {\r\n deform[i] += (lastVertices[i] - setupVertices[i]) * alpha;\r\n }\r\n } else {\r\n // Weighted deform offsets, with alpha.\r\n for (let i = 0; i < vertexCount; i++)\r\n deform[i] += lastVertices[i] * alpha;\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time);\r\n let prevVertices = frameVertices[frame - 1];\r\n let nextVertices = frameVertices[frame];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\r\n\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n let vertexAttachment = slotAttachment as VertexAttachment;\r\n if (vertexAttachment.bones == null) {\r\n // Unweighted vertex positions, with alpha.\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i = 0; i < vertexCount; i++) {\r\n let prev = prevVertices[i];\r\n deform[i] += prev + (nextVertices[i] - prev) * percent - setupVertices[i];\r\n }\r\n } else {\r\n // Weighted deform offsets, with alpha.\r\n for (let i = 0; i < vertexCount; i++) {\r\n let prev = prevVertices[i];\r\n deform[i] += prev + (nextVertices[i] - prev) * percent;\r\n }\r\n }\r\n } else {\r\n for (let i = 0; i < vertexCount; i++) {\r\n let prev = prevVertices[i];\r\n deform[i] = prev + (nextVertices[i] - prev) * percent;\r\n }\r\n }\r\n } else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n let vertexAttachment = slotAttachment as VertexAttachment;\r\n if (vertexAttachment.bones == null) {\r\n // Unweighted vertex positions, with alpha.\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i = 0; i < vertexCount; i++) {\r\n let prev = prevVertices[i], setup = setupVertices[i];\r\n deform[i] = setup + (prev + (nextVertices[i] - prev) * percent - setup) * alpha;\r\n }\r\n } else {\r\n // Weighted deform offsets, with alpha.\r\n for (let i = 0; i < vertexCount; i++) {\r\n let prev = prevVertices[i];\r\n deform[i] = (prev + (nextVertices[i] - prev) * percent) * alpha;\r\n }\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (let i = 0; i < vertexCount; i++) {\r\n let prev = prevVertices[i];\r\n deform[i] += (prev + (nextVertices[i] - prev) * percent - deform[i]) * alpha;\r\n }\r\n break;\r\n case MixBlend.add:\r\n let vertexAttachment = slotAttachment as VertexAttachment;\r\n if (vertexAttachment.bones == null) {\r\n // Unweighted vertex positions, with alpha.\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i = 0; i < vertexCount; i++) {\r\n let prev = prevVertices[i];\r\n deform[i] += (prev + (nextVertices[i] - prev) * percent - setupVertices[i]) * alpha;\r\n }\r\n } else {\r\n // Weighted deform offsets, with alpha.\r\n for (let i = 0; i < vertexCount; i++) {\r\n let prev = prevVertices[i];\r\n deform[i] += (prev + (nextVertices[i] - prev) * percent) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /** Fires an {@link Event} when specific animation times are reached. */\r\n export class EventTimeline implements Timeline {\r\n /** The time in seconds for each key frame. */\r\n frames: ArrayLike; // time, ...\r\n\r\n /** The event for each key frame. */\r\n events: Array;\r\n\r\n constructor (frameCount: number) {\r\n this.frames = Utils.newFloatArray(frameCount);\r\n this.events = new Array(frameCount);\r\n }\r\n\r\n getPropertyId () {\r\n return TimelineType.event << 24;\r\n }\r\n\r\n /** The number of key frames for this timeline. */\r\n getFrameCount () {\r\n return this.frames.length;\r\n }\r\n\r\n /** Sets the time in seconds and the event for the specified key frame. */\r\n setFrame (frameIndex: number, event: Event) {\r\n this.frames[frameIndex] = event.time;\r\n this.events[frameIndex] = event;\r\n }\r\n\r\n /** Fires events for frames > `lastTime` and <= `time`. */\r\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n if (firedEvents == null) return;\r\n let frames = this.frames;\r\n let frameCount = this.frames.length;\r\n\r\n if (lastTime > time) { // Fire events after last time for looped animations.\r\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\r\n lastTime = -1;\r\n } else if (lastTime >= frames[frameCount - 1]) // Last time is after last frame.\r\n return;\r\n if (time < frames[0]) return; // Time is before first frame.\r\n\r\n let frame = 0;\r\n if (lastTime < frames[0])\r\n frame = 0;\r\n else {\r\n frame = Animation.binarySearch(frames, lastTime);\r\n let frameTime = frames[frame];\r\n while (frame > 0) { // Fire multiple events with the same frame.\r\n if (frames[frame - 1] != frameTime) break;\r\n frame--;\r\n }\r\n }\r\n for (; frame < frameCount && time >= frames[frame]; frame++)\r\n firedEvents.push(this.events[frame]);\r\n }\r\n }\r\n\r\n /** Changes a skeleton's {@link Skeleton#drawOrder}. */\r\n export class DrawOrderTimeline implements Timeline {\r\n /** The time in seconds for each key frame. */\r\n frames: ArrayLike; // time, ...\r\n\r\n /** The draw order for each key frame. See {@link #setFrame(int, float, int[])}. */\r\n drawOrders: Array>;\r\n\r\n constructor (frameCount: number) {\r\n this.frames = Utils.newFloatArray(frameCount);\r\n this.drawOrders = new Array>(frameCount);\r\n }\r\n\r\n getPropertyId () {\r\n return TimelineType.drawOrder << 24;\r\n }\r\n\r\n /** The number of key frames for this timeline. */\r\n getFrameCount () {\r\n return this.frames.length;\r\n }\r\n\r\n /** Sets the time in seconds and the draw order for the specified key frame.\r\n * @param drawOrder For each slot in {@link Skeleton#slots}, the index of the new draw order. May be null to use setup pose\r\n * draw order. */\r\n setFrame (frameIndex: number, time: number, drawOrder: Array) {\r\n this.frames[frameIndex] = time;\r\n this.drawOrders[frameIndex] = drawOrder;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let drawOrder: Array = skeleton.drawOrder;\r\n let slots: Array = skeleton.slots;\r\n if (direction == MixDirection.mixOut && blend == MixBlend.setup) {\r\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first) Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n\r\n let frame = 0;\r\n if (time >= frames[frames.length - 1]) // Time is after last frame.\r\n frame = frames.length - 1;\r\n else\r\n frame = Animation.binarySearch(frames, time) - 1;\r\n\r\n let drawOrderToSetupIndex = this.drawOrders[frame];\r\n if (drawOrderToSetupIndex == null)\r\n Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\r\n else {\r\n for (let i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\r\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\r\n }\r\n }\r\n }\r\n\r\n /** Changes an IK constraint's {@link IkConstraint#mix}, {@link IkConstraint#softness},\r\n * {@link IkConstraint#bendDirection}, {@link IkConstraint#stretch}, and {@link IkConstraint#compress}. */\r\n export class IkConstraintTimeline extends CurveTimeline {\r\n static ENTRIES = 6;\r\n static PREV_TIME = -6; static PREV_MIX = -5; static PREV_SOFTNESS = -4; static PREV_BEND_DIRECTION = -3; static PREV_COMPRESS = -2; static PREV_STRETCH = -1;\r\n static MIX = 1; static SOFTNESS = 2; static BEND_DIRECTION = 3; static COMPRESS = 4; static STRETCH = 5;\r\n\r\n /** The index of the IK constraint slot in {@link Skeleton#ikConstraints} that will be changed. */\r\n ikConstraintIndex: number;\r\n\r\n /** The time in seconds, mix, softness, bend direction, compress, and stretch for each key frame. */\r\n frames: ArrayLike; // time, mix, softness, bendDirection, compress, stretch, ...\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex;\r\n }\r\n\r\n /** Sets the time in seconds, mix, softness, bend direction, compress, and stretch for the specified key frame. */\r\n setFrame (frameIndex: number, time: number, mix: number, softness: number, bendDirection: number, compress: boolean, stretch: boolean) {\r\n frameIndex *= IkConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\r\n this.frames[frameIndex + IkConstraintTimeline.SOFTNESS] = softness;\r\n this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\r\n this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0;\r\n this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n let constraint: IkConstraint = skeleton.ikConstraints[this.ikConstraintIndex];\r\n if (!constraint.active) return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n return;\r\n case MixBlend.first:\r\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\r\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n return;\r\n }\r\n\r\n if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) { // Time is after last frame.\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n } else {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION]\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n } else {\r\n constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\r\n constraint.softness += (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n return;\r\n }\r\n\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\r\n let mix = frames[frame + IkConstraintTimeline.PREV_MIX];\r\n let softness = frames[frame + IkConstraintTimeline.PREV_SOFTNESS];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\r\n\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n } else {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n } else {\r\n constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\r\n constraint.softness += (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /** Changes a transform constraint's {@link TransformConstraint#rotateMix}, {@link TransformConstraint#translateMix},\r\n * {@link TransformConstraint#scaleMix}, and {@link TransformConstraint#shearMix}. */\r\n export class TransformConstraintTimeline extends CurveTimeline {\r\n static ENTRIES = 5;\r\n static PREV_TIME = -5; static PREV_ROTATE = -4; static PREV_TRANSLATE = -3; static PREV_SCALE = -2; static PREV_SHEAR = -1;\r\n static ROTATE = 1; static TRANSLATE = 2; static SCALE = 3; static SHEAR = 4;\r\n\r\n /** The index of the transform constraint slot in {@link Skeleton#transformConstraints} that will be changed. */\r\n transformConstraintIndex: number;\r\n\r\n /** The time in seconds, rotate mix, translate mix, scale mix, and shear mix for each key frame. */\r\n frames: ArrayLike; // time, rotate mix, translate mix, scale mix, shear mix, ...\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex;\r\n }\r\n\r\n /** The time in seconds, rotate mix, translate mix, scale mix, and shear mix for the specified key frame. */\r\n setFrame (frameIndex: number, time: number, rotateMix: number, translateMix: number, scaleMix: number, shearMix: number) {\r\n frameIndex *= TransformConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n\r\n let constraint: TransformConstraint = skeleton.transformConstraints[this.transformConstraintIndex];\r\n if (!constraint.active) return;\r\n if (time < frames[0]) {\r\n let data = constraint.data;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha;\r\n }\r\n return;\r\n }\r\n\r\n let rotate = 0, translate = 0, scale = 0, shear = 0;\r\n if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) { // Time is after last frame.\r\n let i = frames.length;\r\n rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[i + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[i + TransformConstraintTimeline.PREV_SHEAR];\r\n } else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\r\n rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\r\n\r\n rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent;\r\n scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent;\r\n shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n let data = constraint.data;\r\n constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha;\r\n constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha;\r\n constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha;\r\n constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha;\r\n } else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (scale - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (shear - constraint.shearMix) * alpha;\r\n }\r\n }\r\n }\r\n\r\n /** Changes a path constraint's {@link PathConstraint#position}. */\r\n export class PathConstraintPositionTimeline extends CurveTimeline {\r\n static ENTRIES = 2;\r\n static PREV_TIME = -2; static PREV_VALUE = -1;\r\n static VALUE = 1;\r\n\r\n /** The index of the path constraint slot in {@link Skeleton#pathConstraints} that will be changed. */\r\n pathConstraintIndex: number;\r\n\r\n /** The time in seconds and path constraint position for each key frame. */\r\n frames: ArrayLike; // time, position, ...\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex;\r\n }\r\n\r\n /** Sets the time in seconds and path constraint position for the specified key frame. */\r\n setFrame (frameIndex: number, time: number, value: number) {\r\n frameIndex *= PathConstraintPositionTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n let constraint: PathConstraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active) return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.position = constraint.data.position;\r\n return;\r\n case MixBlend.first:\r\n constraint.position += (constraint.data.position - constraint.position) * alpha;\r\n }\r\n return;\r\n }\r\n\r\n let position = 0;\r\n if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES]) // Time is after last frame.\r\n position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE];\r\n else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\r\n position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\r\n\r\n position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\r\n else\r\n constraint.position += (position - constraint.position) * alpha;\r\n }\r\n }\r\n\r\n /** Changes a path constraint's {@link PathConstraint#spacing}. */\r\n export class PathConstraintSpacingTimeline extends PathConstraintPositionTimeline {\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n let constraint: PathConstraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active) return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.spacing = constraint.data.spacing;\r\n return;\r\n case MixBlend.first:\r\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\r\n }\r\n return;\r\n }\r\n\r\n let spacing = 0;\r\n if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES]) // Time is after last frame.\r\n spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE];\r\n else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\r\n spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\r\n\r\n spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent;\r\n }\r\n\r\n if (blend == MixBlend.setup)\r\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\r\n else\r\n constraint.spacing += (spacing - constraint.spacing) * alpha;\r\n }\r\n }\r\n\r\n /** Changes a transform constraint's {@link PathConstraint#rotateMix} and\r\n * {@link TransformConstraint#translateMix}. */\r\n export class PathConstraintMixTimeline extends CurveTimeline {\r\n static ENTRIES = 3;\r\n static PREV_TIME = -3; static PREV_ROTATE = -2; static PREV_TRANSLATE = -1;\r\n static ROTATE = 1; static TRANSLATE = 2;\r\n\r\n /** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */\r\n pathConstraintIndex: number;\r\n\r\n /** The time in seconds, rotate mix, and translate mix for each key frame. */\r\n frames: ArrayLike; // time, rotate mix, translate mix, ...\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex;\r\n }\r\n\r\n /** The time in seconds, rotate mix, and translate mix for the specified key frame. */\r\n setFrame (frameIndex: number, time: number, rotateMix: number, translateMix: number) {\r\n frameIndex *= PathConstraintMixTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n let constraint: PathConstraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active) return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = constraint.data.rotateMix;\r\n constraint.translateMix = constraint.data.translateMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha;\r\n }\r\n return;\r\n }\r\n\r\n let rotate = 0, translate = 0;\r\n if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) { // Time is after last frame.\r\n rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n } else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\r\n rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\r\n\r\n rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent;\r\n }\r\n\r\n if (blend == MixBlend.setup) {\r\n constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha;\r\n constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha;\r\n } else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n }\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n /** Applies animations over time, queues animations for later playback, mixes (crossfading) between animations, and applies\r\n * multiple animations on top of each other (layering).\r\n *\r\n * See [Applying Animations](http://esotericsoftware.com/spine-applying-animations/) in the Spine Runtimes Guide. */\r\n export class AnimationState {\r\n static emptyAnimation = new Animation(\"\", [], 0);\r\n\r\n /** 1. A previously applied timeline has set this property.\r\n *\r\n * Result: Mix from the current pose to the timeline pose. */\r\n static SUBSEQUENT = 0;\r\n /** 1. This is the first timeline to set this property.\r\n * 2. The next track entry applied after this one does not have a timeline to set this property.\r\n *\r\n * Result: Mix from the setup pose to the timeline pose. */\r\n static FIRST = 1;\r\n /** 1) A previously applied timeline has set this property.
\r\n * 2) The next track entry to be applied does have a timeline to set this property.
\r\n * 3) The next track entry after that one does not have a timeline to set this property.
\r\n * Result: Mix from the current pose to the timeline pose, but do not mix out. This avoids \"dipping\" when crossfading\r\n * animations that key the same property. A subsequent timeline will set this property using a mix. */\r\n static HOLD_SUBSEQUENT = 2;\r\n /** 1) This is the first timeline to set this property.
\r\n * 2) The next track entry to be applied does have a timeline to set this property.
\r\n * 3) The next track entry after that one does not have a timeline to set this property.
\r\n * Result: Mix from the setup pose to the timeline pose, but do not mix out. This avoids \"dipping\" when crossfading animations\r\n * that key the same property. A subsequent timeline will set this property using a mix. */\r\n static HOLD_FIRST = 3;\r\n /** 1. This is the first timeline to set this property.\r\n * 2. The next track entry to be applied does have a timeline to set this property.\r\n * 3. The next track entry after that one does have a timeline to set this property.\r\n * 4. timelineHoldMix stores the first subsequent track entry that does not have a timeline to set this property.\r\n *\r\n * Result: The same as HOLD except the mix percentage from the timelineHoldMix track entry is used. This handles when more than\r\n * 2 track entries in a row have a timeline that sets the same property.\r\n *\r\n * Eg, A -> B -> C -> D where A, B, and C have a timeline setting same property, but D does not. When A is applied, to avoid\r\n * \"dipping\" A is not mixed out, however D (the first entry that doesn't set the property) mixing in is used to mix out A\r\n * (which affects B and C). Without using D to mix out, A would be applied fully until mixing completes, then snap into\r\n * place. */\r\n static HOLD_MIX = 4;\r\n\r\n static SETUP = 1;\r\n static CURRENT = 2;\r\n\r\n /** The AnimationStateData to look up mix durations. */\r\n data: AnimationStateData;\r\n\r\n /** The list of tracks that currently have animations, which may contain null entries. */\r\n tracks = new Array();\r\n\r\n /** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower\r\n * or faster. Defaults to 1.\r\n *\r\n * See TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */\r\n timeScale = 1;\r\n unkeyedState = 0;\r\n\r\n events = new Array();\r\n listeners = new Array();\r\n queue = new EventQueue(this);\r\n propertyIDs = new IntSet();\r\n animationsChanged = false;\r\n\r\n trackEntryPool = new Pool(() => new TrackEntry());\r\n\r\n constructor (data: AnimationStateData) {\r\n this.data = data;\r\n }\r\n\r\n /** Increments each track entry {@link TrackEntry#trackTime()}, setting queued animations as current if needed. */\r\n update (delta: number) {\r\n delta *= this.timeScale;\r\n let tracks = this.tracks;\r\n for (let i = 0, n = tracks.length; i < n; i++) {\r\n let current = tracks[i];\r\n if (current == null) continue;\r\n\r\n current.animationLast = current.nextAnimationLast;\r\n current.trackLast = current.nextTrackLast;\r\n\r\n let currentDelta = delta * current.timeScale;\r\n\r\n if (current.delay > 0) {\r\n current.delay -= currentDelta;\r\n if (current.delay > 0) continue;\r\n currentDelta = -current.delay;\r\n current.delay = 0;\r\n }\r\n\r\n let next = current.next;\r\n if (next != null) {\r\n // When the next entry's delay is passed, change to the next entry, preserving leftover time.\r\n let nextTime = current.trackLast - next.delay;\r\n if (nextTime >= 0) {\r\n next.delay = 0;\r\n next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\r\n current.trackTime += currentDelta;\r\n this.setCurrent(i, next, true);\r\n while (next.mixingFrom != null) {\r\n next.mixTime += delta;\r\n next = next.mixingFrom;\r\n }\r\n continue;\r\n }\r\n } else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {\r\n tracks[i] = null;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n continue;\r\n }\r\n if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) {\r\n // End mixing from entries once all have completed.\r\n let from = current.mixingFrom;\r\n current.mixingFrom = null;\r\n if (from != null) from.mixingTo = null;\r\n while (from != null) {\r\n this.queue.end(from);\r\n from = from.mixingFrom;\r\n }\r\n }\r\n\r\n current.trackTime += currentDelta;\r\n }\r\n\r\n this.queue.drain();\r\n }\r\n\r\n /** Returns true when all mixing from entries are complete. */\r\n updateMixingFrom (to: TrackEntry, delta: number): boolean {\r\n let from = to.mixingFrom;\r\n if (from == null) return true;\r\n\r\n let finished = this.updateMixingFrom(from, delta);\r\n\r\n from.animationLast = from.nextAnimationLast;\r\n from.trackLast = from.nextTrackLast;\r\n\r\n // Require mixTime > 0 to ensure the mixing from entry was applied at least once.\r\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\r\n // Require totalAlpha == 0 to ensure mixing is complete, unless mixDuration == 0 (the transition is a single frame).\r\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\r\n to.mixingFrom = from.mixingFrom;\r\n if (from.mixingFrom != null) from.mixingFrom.mixingTo = to;\r\n to.interruptAlpha = from.interruptAlpha;\r\n this.queue.end(from);\r\n }\r\n return finished;\r\n }\r\n\r\n from.trackTime += delta * from.timeScale;\r\n to.mixTime += delta;\r\n return false;\r\n }\r\n\r\n /** Poses the skeleton using the track entry animations. There are no side effects other than invoking listeners, so the\r\n * animation state can be applied to multiple skeletons to pose them identically.\r\n * @returns True if any animations were applied. */\r\n apply (skeleton: Skeleton) : boolean {\r\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\r\n if (this.animationsChanged) this._animationsChanged();\r\n\r\n let events = this.events;\r\n let tracks = this.tracks;\r\n let applied = false;\r\n\r\n for (let i = 0, n = tracks.length; i < n; i++) {\r\n let current = tracks[i];\r\n if (current == null || current.delay > 0) continue;\r\n applied = true;\r\n let blend: MixBlend = i == 0 ? MixBlend.first : current.mixBlend;\r\n\r\n // Apply mixing from entries first.\r\n let mix = current.alpha;\r\n if (current.mixingFrom != null)\r\n mix *= this.applyMixingFrom(current, skeleton, blend);\r\n else if (current.trackTime >= current.trackEnd && current.next == null)\r\n mix = 0;\r\n\r\n // Apply current entry.\r\n let animationLast = current.animationLast, animationTime = current.getAnimationTime();\r\n let timelineCount = current.animation.timelines.length;\r\n let timelines = current.animation.timelines;\r\n if ((i == 0 && mix == 1) || blend == MixBlend.add) {\r\n for (let ii = 0; ii < timelineCount; ii++) {\r\n // Fixes issue #302 on IOS9 where mix, blend sometimes became undefined and caused assets\r\n // to sometimes stop rendering when using color correction, as their RGBA values become NaN.\r\n // (https://github.com/pixijs/pixi-spine/issues/302)\r\n Utils.webkit602BugfixHelper(mix, blend);\r\n var timeline = timelines[ii];\r\n if (timeline instanceof AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true);\r\n else\r\n timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, MixDirection.mixIn);\r\n }\r\n } else {\r\n let timelineMode = current.timelineMode;\r\n\r\n let firstFrame = current.timelinesRotation.length == 0;\r\n if (firstFrame) Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);\r\n let timelinesRotation = current.timelinesRotation;\r\n\r\n for (let ii = 0; ii < timelineCount; ii++) {\r\n let timeline = timelines[ii];\r\n let timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : MixBlend.setup;\r\n if (timeline instanceof RotateTimeline) {\r\n this.applyRotateTimeline(timeline, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);\r\n } else if (timeline instanceof AttachmentTimeline) {\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true);\r\n } else {\r\n // This fixes the WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109\r\n Utils.webkit602BugfixHelper(mix, blend);\r\n timeline.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, MixDirection.mixIn);\r\n }\r\n }\r\n }\r\n this.queueEvents(current, animationTime);\r\n events.length = 0;\r\n current.nextAnimationLast = animationTime;\r\n current.nextTrackLast = current.trackTime;\r\n }\r\n\r\n // Set slots attachments to the setup pose, if needed. This occurs if an animation that is mixing out sets attachments so\r\n // subsequent timelines see any deform, but the subsequent timelines don't set an attachment (eg they are also mixing out or\r\n // the time is before the first key).\r\n var setupState = this.unkeyedState + AnimationState.SETUP;\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = skeleton.slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.attachmentState == setupState) {\r\n var attachmentName = slot.data.attachmentName;\r\n slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n }\r\n }\r\n this.unkeyedState += 2; // Increasing after each use avoids the need to reset attachmentState for every slot.\r\n\r\n this.queue.drain();\r\n return applied;\r\n }\r\n\r\n applyMixingFrom (to: TrackEntry, skeleton: Skeleton, blend: MixBlend) {\r\n let from = to.mixingFrom;\r\n if (from.mixingFrom != null) this.applyMixingFrom(from, skeleton, blend);\r\n\r\n let mix = 0;\r\n if (to.mixDuration == 0) { // Single frame mix to undo mixingFrom changes.\r\n mix = 1;\r\n if (blend == MixBlend.first) blend = MixBlend.setup;\r\n } else {\r\n mix = to.mixTime / to.mixDuration;\r\n if (mix > 1) mix = 1;\r\n if (blend != MixBlend.first) blend = from.mixBlend;\r\n }\r\n\r\n let events = mix < from.eventThreshold ? this.events : null;\r\n let attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\r\n let animationLast = from.animationLast, animationTime = from.getAnimationTime();\r\n let timelineCount = from.animation.timelines.length;\r\n let timelines = from.animation.timelines;\r\n let alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\r\n if (blend == MixBlend.add) {\r\n for (let i = 0; i < timelineCount; i++)\r\n timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, MixDirection.mixOut);\r\n } else {\r\n let timelineMode = from.timelineMode;\r\n let timelineHoldMix = from.timelineHoldMix;\r\n\r\n let firstFrame = from.timelinesRotation.length == 0;\r\n if (firstFrame) Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);\r\n let timelinesRotation = from.timelinesRotation;\r\n\r\n from.totalAlpha = 0;\r\n for (let i = 0; i < timelineCount; i++) {\r\n let timeline = timelines[i];\r\n let direction = MixDirection.mixOut;\r\n let timelineBlend: MixBlend;\r\n let alpha = 0;\r\n switch (timelineMode[i]) {\r\n case AnimationState.SUBSEQUENT:\r\n if (!drawOrder && timeline instanceof DrawOrderTimeline) continue;\r\n timelineBlend = blend;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.FIRST:\r\n timelineBlend = MixBlend.setup;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.HOLD_SUBSEQUENT:\r\n timelineBlend = blend;\r\n alpha = alphaHold;\r\n break;\r\n case AnimationState.HOLD_FIRST:\r\n timelineBlend = MixBlend.setup;\r\n alpha = alphaHold;\r\n break;\r\n default:\r\n timelineBlend = MixBlend.setup;\r\n let holdMix = timelineHoldMix[i];\r\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\r\n break;\r\n }\r\n from.totalAlpha += alpha;\r\n\r\n if (timeline instanceof RotateTimeline)\r\n this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);\r\n else if (timeline instanceof AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments);\r\n else {\r\n // This fixes the WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109\r\n Utils.webkit602BugfixHelper(alpha, blend);\r\n if (drawOrder && timeline instanceof DrawOrderTimeline && timelineBlend == MixBlend.setup)\r\n direction = MixDirection.mixIn;\r\n timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction);\r\n }\r\n }\r\n }\r\n\r\n if (to.mixDuration > 0) this.queueEvents(from, animationTime);\r\n this.events.length = 0;\r\n from.nextAnimationLast = animationTime;\r\n from.nextTrackLast = from.trackTime;\r\n\r\n return mix;\r\n }\r\n\r\n applyAttachmentTimeline (timeline: AttachmentTimeline, skeleton: Skeleton, time: number, blend: MixBlend, attachments: boolean) {\r\n\r\n var slot = skeleton.slots[timeline.slotIndex];\r\n if (!slot.bone.active) return;\r\n\r\n var frames = timeline.frames;\r\n if (time < frames[0]) { // Time is before first frame.\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\r\n }\r\n else {\r\n var frameIndex;\r\n if (time >= frames[frames.length - 1]) // Time is after last frame.\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = Animation.binarySearch(frames, time) - 1;\r\n this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments);\r\n }\r\n\r\n // If an attachment wasn't set (ie before the first frame or attachments is false), set the setup attachment later.\r\n if (slot.attachmentState <= this.unkeyedState) slot.attachmentState = this.unkeyedState + AnimationState.SETUP;\r\n }\r\n\r\n setAttachment (skeleton: Skeleton, slot: Slot, attachmentName: string, attachments: boolean) {\r\n slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName);\r\n if (attachments) slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;\r\n }\r\n\r\n\r\n applyRotateTimeline (timeline: Timeline, skeleton: Skeleton, time: number, alpha: number, blend: MixBlend,\r\n timelinesRotation: Array, i: number, firstFrame: boolean) {\r\n\r\n if (firstFrame) timelinesRotation[i] = 0;\r\n\r\n if (alpha == 1) {\r\n timeline.apply(skeleton, 0, time, null, 1, blend, MixDirection.mixIn);\r\n return;\r\n }\r\n\r\n let rotateTimeline = timeline as RotateTimeline;\r\n let frames = rotateTimeline.frames;\r\n let bone = skeleton.bones[rotateTimeline.boneIndex];\r\n if (!bone.active) return;\r\n let r1 = 0, r2 = 0;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n default:\r\n return;\r\n case MixBlend.first:\r\n r1 = bone.rotation;\r\n r2 = bone.data.rotation;\r\n }\r\n } else {\r\n r1 = blend == MixBlend.setup ? bone.data.rotation : bone.rotation;\r\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) // Time is after last frame.\r\n r2 = bone.data.rotation + frames[frames.length + RotateTimeline.PREV_ROTATION];\r\n else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\r\n let prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\r\n let frameTime = frames[frame];\r\n let percent = rotateTimeline.getCurvePercent((frame >> 1) - 1,\r\n 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\r\n\r\n r2 = frames[frame + RotateTimeline.ROTATION] - prevRotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n r2 = prevRotation + r2 * percent + bone.data.rotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n }\r\n }\r\n\r\n // Mix between rotations using the direction of the shortest route on the first frame while detecting crosses.\r\n let total = 0, diff = r2 - r1;\r\n diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\r\n if (diff == 0) {\r\n total = timelinesRotation[i];\r\n } else {\r\n let lastTotal = 0, lastDiff = 0;\r\n if (firstFrame) {\r\n lastTotal = 0;\r\n lastDiff = diff;\r\n } else {\r\n lastTotal = timelinesRotation[i]; // Angle and direction of mix, including loops.\r\n lastDiff = timelinesRotation[i + 1]; // Difference between bones.\r\n }\r\n let current = diff > 0, dir = lastTotal >= 0;\r\n // Detect cross at 0 (not 180).\r\n if (MathUtils.signum(lastDiff) != MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\r\n // A cross after a 360 rotation is a loop.\r\n if (Math.abs(lastTotal) > 180) lastTotal += 360 * MathUtils.signum(lastTotal);\r\n dir = current;\r\n }\r\n total = diff + lastTotal - lastTotal % 360; // Store loops as part of lastTotal.\r\n if (dir != current) total += 360 * MathUtils.signum(lastTotal);\r\n timelinesRotation[i] = total;\r\n }\r\n timelinesRotation[i + 1] = diff;\r\n r1 += total * alpha;\r\n bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360;\r\n }\r\n\r\n queueEvents (entry: TrackEntry, animationTime: number) {\r\n let animationStart = entry.animationStart, animationEnd = entry.animationEnd;\r\n let duration = animationEnd - animationStart;\r\n let trackLastWrapped = entry.trackLast % duration;\r\n\r\n // Queue events before complete.\r\n let events = this.events;\r\n let i = 0, n = events.length;\r\n for (; i < n; i++) {\r\n let event = events[i];\r\n if (event.time < trackLastWrapped) break;\r\n if (event.time > animationEnd) continue; // Discard events outside animation start/end.\r\n this.queue.event(entry, event);\r\n }\r\n\r\n // Queue complete if completed a loop iteration or the animation.\r\n let complete = false;\r\n if (entry.loop)\r\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\r\n else\r\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\r\n if (complete) this.queue.complete(entry);\r\n\r\n // Queue events after complete.\r\n for (; i < n; i++) {\r\n let event = events[i];\r\n if (event.time < animationStart) continue; // Discard events outside animation start/end.\r\n this.queue.event(entry, events[i]);\r\n }\r\n }\r\n\r\n /** Removes all animations from all tracks, leaving skeletons in their current pose.\r\n *\r\n * It may be desired to use {@link AnimationState#setEmptyAnimation()} to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose. */\r\n clearTracks () {\r\n let oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (let i = 0, n = this.tracks.length; i < n; i++)\r\n this.clearTrack(i);\r\n this.tracks.length = 0;\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n }\r\n\r\n /** Removes all animations from the track, leaving skeletons in their current pose.\r\n *\r\n * It may be desired to use {@link AnimationState#setEmptyAnimation()} to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose. */\r\n clearTrack (trackIndex: number) {\r\n if (trackIndex >= this.tracks.length) return;\r\n let current = this.tracks[trackIndex];\r\n if (current == null) return;\r\n\r\n this.queue.end(current);\r\n\r\n this.disposeNext(current);\r\n\r\n let entry = current;\r\n while (true) {\r\n let from = entry.mixingFrom;\r\n if (from == null) break;\r\n this.queue.end(from);\r\n entry.mixingFrom = null;\r\n entry.mixingTo = null;\r\n entry = from;\r\n }\r\n\r\n this.tracks[current.trackIndex] = null;\r\n\r\n this.queue.drain();\r\n }\r\n\r\n setCurrent (index: number, current: TrackEntry, interrupt: boolean) {\r\n let from = this.expandToIndex(index);\r\n this.tracks[index] = current;\r\n\r\n if (from != null) {\r\n if (interrupt) this.queue.interrupt(from);\r\n current.mixingFrom = from;\r\n from.mixingTo = current;\r\n current.mixTime = 0;\r\n\r\n // Store the interrupted mix percentage.\r\n if (from.mixingFrom != null && from.mixDuration > 0)\r\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\r\n\r\n from.timelinesRotation.length = 0; // Reset rotation for mixing out, in case entry was mixed in.\r\n }\r\n\r\n this.queue.start(current);\r\n }\r\n\r\n /** Sets an animation by name.\r\n *\r\n * {@link #setAnimationWith(}. */\r\n setAnimation (trackIndex: number, animationName: string, loop: boolean) {\r\n let animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null) throw new Error(\"Animation not found: \" + animationName);\r\n return this.setAnimationWith(trackIndex, animation, loop);\r\n }\r\n\r\n /** Sets the current animation for a track, discarding any queued animations. If the formerly current track entry was never\r\n * applied to a skeleton, it is replaced (not mixed from).\r\n * @param loop If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its\r\n * duration. In either case {@link TrackEntry#trackEnd} determines when the track is cleared.\r\n * @returns A track entry to allow further customization of animation playback. References to the track entry must not be kept\r\n * after the {@link AnimationStateListener#dispose()} event occurs. */\r\n setAnimationWith (trackIndex: number, animation: Animation, loop: boolean) {\r\n if (animation == null) throw new Error(\"animation cannot be null.\");\r\n let interrupt = true;\r\n let current = this.expandToIndex(trackIndex);\r\n if (current != null) {\r\n if (current.nextTrackLast == -1) {\r\n // Don't mix from an entry that was never applied.\r\n this.tracks[trackIndex] = current.mixingFrom;\r\n this.queue.interrupt(current);\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n current = current.mixingFrom;\r\n interrupt = false;\r\n } else\r\n this.disposeNext(current);\r\n }\r\n let entry = this.trackEntry(trackIndex, animation, loop, current);\r\n this.setCurrent(trackIndex, entry, interrupt);\r\n this.queue.drain();\r\n return entry;\r\n }\r\n\r\n /** Queues an animation by name.\r\n *\r\n * See {@link #addAnimationWith()}. */\r\n addAnimation (trackIndex: number, animationName: string, loop: boolean, delay: number) {\r\n let animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null) throw new Error(\"Animation not found: \" + animationName);\r\n return this.addAnimationWith(trackIndex, animation, loop, delay);\r\n }\r\n\r\n /** Adds an animation to be played after the current or last queued animation for a track. If the track is empty, it is\r\n * equivalent to calling {@link #setAnimationWith()}.\r\n * @param delay If > 0, sets {@link TrackEntry#delay}. If <= 0, the delay set is the duration of the previous track entry\r\n * minus any mix duration (from the {@link AnimationStateData}) plus the specified `delay` (ie the mix\r\n * ends at (`delay` = 0) or before (`delay` < 0) the previous track entry duration). If the\r\n * previous entry is looping, its next loop completion is used instead of its duration.\r\n * @returns A track entry to allow further customization of animation playback. References to the track entry must not be kept\r\n * after the {@link AnimationStateListener#dispose()} event occurs. */\r\n addAnimationWith (trackIndex: number, animation: Animation, loop: boolean, delay: number) {\r\n if (animation == null) throw new Error(\"animation cannot be null.\");\r\n\r\n let last = this.expandToIndex(trackIndex);\r\n if (last != null) {\r\n while (last.next != null)\r\n last = last.next;\r\n }\r\n\r\n let entry = this.trackEntry(trackIndex, animation, loop, last);\r\n\r\n if (last == null) {\r\n this.setCurrent(trackIndex, entry, true);\r\n this.queue.drain();\r\n } else {\r\n last.next = entry;\r\n if (delay <= 0) {\r\n let duration = last.animationEnd - last.animationStart;\r\n if (duration != 0) {\r\n if (last.loop)\r\n delay += duration * (1 + ((last.trackTime / duration) | 0));\r\n else\r\n delay += Math.max(duration, last.trackTime);\r\n delay -= this.data.getMix(last.animation, animation);\r\n } else\r\n delay = last.trackTime;\r\n }\r\n }\r\n\r\n entry.delay = delay;\r\n return entry;\r\n }\r\n\r\n /** Sets an empty animation for a track, discarding any queued animations, and sets the track entry's\r\n * {@link TrackEntry#mixduration}. An empty animation has no timelines and serves as a placeholder for mixing in or out.\r\n *\r\n * Mixing out is done by setting an empty animation with a mix duration using either {@link #setEmptyAnimation()},\r\n * {@link #setEmptyAnimations()}, or {@link #addEmptyAnimation()}. Mixing to an empty animation causes\r\n * the previous animation to be applied less and less over the mix duration. Properties keyed in the previous animation\r\n * transition to the value from lower tracks or to the setup pose value if no lower tracks key the property. A mix duration of\r\n * 0 still mixes out over one frame.\r\n *\r\n * Mixing in is done by first setting an empty animation, then adding an animation using\r\n * {@link #addAnimation()} and on the returned track entry, set the\r\n * {@link TrackEntry#setMixDuration()}. Mixing from an empty animation causes the new animation to be applied more and\r\n * more over the mix duration. Properties keyed in the new animation transition from the value from lower tracks or from the\r\n * setup pose value if no lower tracks key the property to the value keyed in the new animation. */\r\n setEmptyAnimation (trackIndex: number, mixDuration: number) {\r\n let entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n }\r\n\r\n /** Adds an empty animation to be played after the current or last queued animation for a track, and sets the track entry's\r\n * {@link TrackEntry#mixDuration}. If the track is empty, it is equivalent to calling\r\n * {@link #setEmptyAnimation()}.\r\n *\r\n * See {@link #setEmptyAnimation()}.\r\n * @param delay If > 0, sets {@link TrackEntry#delay}. If <= 0, the delay set is the duration of the previous track entry\r\n * minus any mix duration plus the specified `delay` (ie the mix ends at (`delay` = 0) or\r\n * before (`delay` < 0) the previous track entry duration). If the previous entry is looping, its next\r\n * loop completion is used instead of its duration.\r\n * @return A track entry to allow further customization of animation playback. References to the track entry must not be kept\r\n * after the {@link AnimationStateListener#dispose()} event occurs. */\r\n addEmptyAnimation (trackIndex: number, mixDuration: number, delay: number) {\r\n if (delay <= 0) delay -= mixDuration;\r\n let entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n }\r\n\r\n /** Sets an empty animation for every track, discarding any queued animations, and mixes to it over the specified mix\r\n * duration. */\r\n setEmptyAnimations (mixDuration: number) {\r\n let oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (let i = 0, n = this.tracks.length; i < n; i++) {\r\n let current = this.tracks[i];\r\n if (current != null) this.setEmptyAnimation(current.trackIndex, mixDuration);\r\n }\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n }\r\n\r\n expandToIndex (index: number) {\r\n if (index < this.tracks.length) return this.tracks[index];\r\n Utils.ensureArrayCapacity(this.tracks, index + 1, null);\r\n this.tracks.length = index + 1;\r\n return null;\r\n }\r\n\r\n /** @param last May be null. */\r\n trackEntry (trackIndex: number, animation: Animation, loop: boolean, last: TrackEntry) {\r\n let entry = this.trackEntryPool.obtain();\r\n entry.trackIndex = trackIndex;\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.holdPrevious = false;\r\n\r\n entry.eventThreshold = 0;\r\n entry.attachmentThreshold = 0;\r\n entry.drawOrderThreshold = 0;\r\n\r\n entry.animationStart = 0;\r\n entry.animationEnd = animation.duration;\r\n entry.animationLast = -1;\r\n entry.nextAnimationLast = -1;\r\n\r\n entry.delay = 0;\r\n entry.trackTime = 0;\r\n entry.trackLast = -1;\r\n entry.nextTrackLast = -1;\r\n entry.trackEnd = Number.MAX_VALUE;\r\n entry.timeScale = 1;\r\n\r\n entry.alpha = 1;\r\n entry.interruptAlpha = 1;\r\n entry.mixTime = 0;\r\n entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation);\r\n entry.mixBlend = MixBlend.replace;\r\n return entry;\r\n }\r\n\r\n disposeNext (entry: TrackEntry) {\r\n let next = entry.next;\r\n while (next != null) {\r\n this.queue.dispose(next);\r\n next = next.next;\r\n }\r\n entry.next = null;\r\n }\r\n\r\n _animationsChanged () {\r\n this.animationsChanged = false;\r\n\r\n this.propertyIDs.clear();\r\n\r\n for (let i = 0, n = this.tracks.length; i < n; i++) {\r\n let entry = this.tracks[i];\r\n if (entry == null) continue;\r\n while (entry.mixingFrom != null)\r\n entry = entry.mixingFrom;\r\n\r\n do {\r\n if (entry.mixingFrom == null || entry.mixBlend != MixBlend.add) this.computeHold(entry);\r\n entry = entry.mixingTo;\r\n } while (entry != null)\r\n }\r\n }\r\n\r\n computeHold (entry: TrackEntry) {\r\n let to = entry.mixingTo;\r\n let timelines = entry.animation.timelines;\r\n let timelinesCount = entry.animation.timelines.length;\r\n let timelineMode = Utils.setArraySize(entry.timelineMode, timelinesCount);\r\n entry.timelineHoldMix.length = 0;\r\n let timelineDipMix = Utils.setArraySize(entry.timelineHoldMix, timelinesCount);\r\n let propertyIDs = this.propertyIDs;\r\n\r\n if (to != null && to.holdPrevious) {\r\n for (let i = 0; i < timelinesCount; i++) {\r\n timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT;\r\n }\r\n return;\r\n }\r\n\r\n outer:\r\n for (let i = 0; i < timelinesCount; i++) {\r\n let timeline = timelines[i];\r\n let id = timeline.getPropertyId();\r\n if (!propertyIDs.add(id))\r\n timelineMode[i] = AnimationState.SUBSEQUENT;\r\n else if (to == null || timeline instanceof AttachmentTimeline || timeline instanceof DrawOrderTimeline\r\n || timeline instanceof EventTimeline || !to.animation.hasTimeline(id)) {\r\n timelineMode[i] = AnimationState.FIRST;\r\n } else {\r\n for (let next = to.mixingTo; next != null; next = next.mixingTo) {\r\n if (next.animation.hasTimeline(id)) continue;\r\n if (entry.mixDuration > 0) {\r\n timelineMode[i] = AnimationState.HOLD_MIX;\r\n timelineDipMix[i] = next;\r\n continue outer;\r\n }\r\n break;\r\n }\r\n timelineMode[i] = AnimationState.HOLD_FIRST;\r\n }\r\n }\r\n }\r\n\r\n /** Returns the track entry for the animation currently playing on the track, or null if no animation is currently playing. */\r\n getCurrent (trackIndex: number) {\r\n if (trackIndex >= this.tracks.length) return null;\r\n return this.tracks[trackIndex];\r\n }\r\n\r\n /** Adds a listener to receive events for all track entries. */\r\n addListener (listener: AnimationStateListener) {\r\n if (listener == null) throw new Error(\"listener cannot be null.\");\r\n this.listeners.push(listener);\r\n }\r\n\r\n /** Removes the listener added with {@link #addListener()}. */\r\n removeListener (listener: AnimationStateListener) {\r\n let index = this.listeners.indexOf(listener);\r\n if (index >= 0) this.listeners.splice(index, 1);\r\n }\r\n\r\n /** Removes all listeners added with {@link #addListener()}. */\r\n clearListeners () {\r\n this.listeners.length = 0;\r\n }\r\n\r\n /** Discards all listener notifications that have not yet been delivered. This can be useful to call from an\r\n * {@link AnimationStateListener} when it is known that further notifications that may have been already queued for delivery\r\n * are not wanted because new animations are being set. */\r\n clearListenerNotifications () {\r\n this.queue.clear();\r\n }\r\n\r\n //deprecated stuff\r\n onComplete: (trackIndex: number, loopCount: number) => any;\r\n onEvent: (trackIndex: number, event: Event) => any;\r\n onStart: (trackIndex: number) => any;\r\n onEnd: (trackIndex: number) => any;\r\n\r\n private static deprecatedWarning1: boolean = false;\r\n\r\n setAnimationByName(trackIndex: number, animationName: string, loop: boolean) {\r\n if (!AnimationState.deprecatedWarning1) {\r\n AnimationState.deprecatedWarning1 = true;\r\n console.warn(\"Spine Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.\");\r\n }\r\n this.setAnimation(trackIndex, animationName, loop);\r\n }\r\n\r\n private static deprecatedWarning2: boolean = false;\r\n\r\n addAnimationByName(trackIndex: number, animationName: string, loop: boolean, delay: number) {\r\n if (!AnimationState.deprecatedWarning2) {\r\n AnimationState.deprecatedWarning2 = true;\r\n console.warn(\"Spine Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.\");\r\n }\r\n this.addAnimation(trackIndex, animationName, loop, delay);\r\n }\r\n\r\n private static deprecatedWarning3: boolean = false;\r\n\r\n hasAnimation(animationName: string): boolean {\r\n let animation = this.data.skeletonData.findAnimation(animationName);\r\n return animation !== null;\r\n }\r\n\r\n hasAnimationByName(animationName: string): boolean {\r\n if (!AnimationState.deprecatedWarning3) {\r\n AnimationState.deprecatedWarning3 = true;\r\n console.warn(\"Spine Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.\");\r\n }\r\n return this.hasAnimation(animationName);\r\n }\r\n }\r\n\r\n /** Stores settings and other state for the playback of an animation on an {@link AnimationState} track.\r\n *\r\n * References to a track entry must not be kept after the {@link AnimationStateListener#dispose()} event occurs. */\r\n export class TrackEntry {\r\n /** The animation to apply for this track entry. */\r\n animation: Animation;\r\n\r\n /** The animation queued to start after this animation, or null. `next` makes up a linked list. */\r\n next: TrackEntry;\r\n\r\n /** The track entry for the previous animation when mixing from the previous animation to this animation, or null if no\r\n * mixing is currently occuring. When mixing from multiple animations, `mixingFrom` makes up a linked list. */\r\n mixingFrom: TrackEntry;\r\n\r\n /** The track entry for the next animation when mixing from this animation to the next animation, or null if no mixing is\r\n * currently occuring. When mixing to multiple animations, `mixingTo` makes up a linked list. */\r\n mixingTo: TrackEntry;\r\n\r\n /** The listener for events generated by this track entry, or null.\r\n *\r\n * A track entry returned from {@link AnimationState#setAnimation()} is already the current animation\r\n * for the track, so the track entry listener {@link AnimationStateListener#start()} will not be called. */\r\n listener: AnimationStateListener;\r\n\r\n /** The index of the track where this track entry is either current or queued.\r\n *\r\n * See {@link AnimationState#getCurrent()}. */\r\n trackIndex: number;\r\n\r\n /** If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its\r\n * duration. */\r\n loop: boolean;\r\n\r\n /** If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead\r\n * of being mixed out.\r\n *\r\n * When mixing between animations that key the same property, if a lower track also keys that property then the value will\r\n * briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0%\r\n * while the second animation mixes from 0% to 100%. Setting `holdPrevious` to true applies the first animation\r\n * at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which\r\n * keys the property, only when a higher track also keys the property.\r\n *\r\n * Snapping will occur if `holdPrevious` is true and this animation does not key all the same properties as the\r\n * previous animation. */\r\n holdPrevious: boolean;\r\n\r\n /** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the\r\n * `eventThreshold`, event timelines are applied while this animation is being mixed out. Defaults to 0, so event\r\n * timelines are not applied while this animation is being mixed out. */\r\n eventThreshold: number;\r\n\r\n /** When the mix percentage ({@link #mixtime} / {@link #mixDuration}) is less than the\r\n * `attachmentThreshold`, attachment timelines are applied while this animation is being mixed out. Defaults to\r\n * 0, so attachment timelines are not applied while this animation is being mixed out. */\r\n attachmentThreshold: number;\r\n\r\n /** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the\r\n * `drawOrderThreshold`, draw order timelines are applied while this animation is being mixed out. Defaults to 0,\r\n * so draw order timelines are not applied while this animation is being mixed out. */\r\n drawOrderThreshold: number;\r\n\r\n /** Seconds when this animation starts, both initially and after looping. Defaults to 0.\r\n *\r\n * When changing the `animationStart` time, it often makes sense to set {@link #animationLast} to the same\r\n * value to prevent timeline keys before the start time from triggering. */\r\n animationStart: number;\r\n\r\n /** Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will\r\n * loop back to {@link #animationStart} at this time. Defaults to the animation {@link Animation#duration}. */\r\n animationEnd: number;\r\n\r\n\r\n /** The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this\r\n * animation is applied, event timelines will fire all events between the `animationLast` time (exclusive) and\r\n * `animationTime` (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation\r\n * is applied. */\r\n animationLast: number;\r\n\r\n nextAnimationLast: number;\r\n\r\n /** Seconds to postpone playing the animation. When this track entry is the current track entry, `delay`\r\n * postpones incrementing the {@link #trackTime}. When this track entry is queued, `delay` is the time from\r\n * the start of the previous animation to when this track entry will become the current track entry (ie when the previous\r\n * track entry {@link TrackEntry#trackTime} >= this track entry's `delay`).\r\n *\r\n * {@link #timeScale} affects the delay. */\r\n delay: number;\r\n\r\n /** Current time in seconds this track entry has been the current track entry. The track time determines\r\n * {@link #animationTime}. The track time can be set to start the animation at a time other than 0, without affecting\r\n * looping. */\r\n trackTime: number;\r\n\r\n trackLast: number; nextTrackLast: number;\r\n\r\n /** The track time in seconds when this animation will be removed from the track. Defaults to the highest possible float\r\n * value, meaning the animation will be applied until a new animation is set or the track is cleared. If the track end time\r\n * is reached, no other animations are queued for playback, and mixing from any previous animations is complete, then the\r\n * properties keyed by the animation are set to the setup pose and the track is cleared.\r\n *\r\n * It may be desired to use {@link AnimationState#addEmptyAnimation()} rather than have the animation\r\n * abruptly cease being applied. */\r\n trackEnd: number;\r\n\r\n /** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or\r\n * faster. Defaults to 1.\r\n *\r\n * {@link #mixTime} is not affected by track entry time scale, so {@link #mixDuration} may need to be adjusted to\r\n * match the animation speed.\r\n *\r\n * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the\r\n * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, assuming time scale to be 1. If\r\n * the time scale is not 1, the delay may need to be adjusted.\r\n *\r\n * See AnimationState {@link AnimationState#timeScale} for affecting all animations. */\r\n timeScale: number;\r\n\r\n /** Values < 1 mix this animation with the skeleton's current pose (usually the pose resulting from lower tracks). Defaults\r\n * to 1, which overwrites the skeleton's current pose with this animation.\r\n *\r\n * Typically track 0 is used to completely pose the skeleton, then alpha is used on higher tracks. It doesn't make sense to\r\n * use alpha on track 0 if the skeleton pose is from the last frame render. */\r\n alpha: number;\r\n\r\n /** Seconds from 0 to the {@link #getMixDuration()} when mixing from the previous animation to this animation. May be\r\n * slightly more than `mixDuration` when the mix is complete. */\r\n mixTime: number;\r\n\r\n /** Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData\r\n * {@link AnimationStateData#getMix()} based on the animation before this animation (if any).\r\n *\r\n * A mix duration of 0 still mixes out over one frame to provide the track entry being mixed out a chance to revert the\r\n * properties it was animating.\r\n *\r\n * The `mixDuration` can be set manually rather than use the value from\r\n * {@link AnimationStateData#getMix()}. In that case, the `mixDuration` can be set for a new\r\n * track entry only before {@link AnimationState#update(float)} is first called.\r\n *\r\n * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the\r\n * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, not a mix duration set\r\n * afterward. */\r\n mixDuration: number; interruptAlpha: number; totalAlpha: number;\r\n\r\n /** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which\r\n * replaces the values from the lower tracks with the animation values. {@link MixBlend#add} adds the animation values to\r\n * the values from the lower tracks.\r\n *\r\n * The `mixBlend` can be set for a new track entry only before {@link AnimationState#apply()} is first\r\n * called. */\r\n mixBlend = MixBlend.replace;\r\n timelineMode = new Array();\r\n timelineHoldMix = new Array();\r\n timelinesRotation = new Array();\r\n\r\n reset () {\r\n this.next = null;\r\n this.mixingFrom = null;\r\n this.mixingTo = null;\r\n this.animation = null;\r\n this.listener = null;\r\n this.timelineMode.length = 0;\r\n this.timelineHoldMix.length = 0;\r\n this.timelinesRotation.length = 0;\r\n }\r\n\r\n /** Uses {@link #trackTime} to compute the `animationTime`, which is between {@link #animationStart}\r\n * and {@link #animationEnd}. When the `trackTime` is 0, the `animationTime` is equal to the\r\n * `animationStart` time. */\r\n getAnimationTime () {\r\n if (this.loop) {\r\n let duration = this.animationEnd - this.animationStart;\r\n if (duration == 0) return this.animationStart;\r\n return (this.trackTime % duration) + this.animationStart;\r\n }\r\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\r\n }\r\n\r\n setAnimationLast(animationLast: number) {\r\n this.animationLast = animationLast;\r\n this.nextAnimationLast = animationLast;\r\n }\r\n\r\n /** Returns true if at least one loop has been completed.\r\n *\r\n * See {@link AnimationStateListener#complete()}. */\r\n isComplete () {\r\n return this.trackTime >= this.animationEnd - this.animationStart;\r\n }\r\n\r\n /** Resets the rotation directions for mixing this entry's rotate timelines. This can be useful to avoid bones rotating the\r\n * long way around when using {@link #alpha} and starting animations on other tracks.\r\n *\r\n * Mixing with {@link MixBlend#replace} involves finding a rotation between two others, which has two possible solutions:\r\n * the short way or the long way around. The two rotations likely change over time, so which direction is the short or long\r\n * way also changes. If the short way was always chosen, bones would flip to the other side when that direction became the\r\n * long way. TrackEntry chooses the short way the first time it is applied and remembers that direction. */\r\n resetRotationDirections () {\r\n this.timelinesRotation.length = 0;\r\n }\r\n\r\n //deprecated stuff\r\n onComplete: (trackIndex: number, loopCount: number) => any;\r\n onEvent: (trackIndex: number, event: Event) => any;\r\n onStart: (trackIndex: number) => any;\r\n onEnd: (trackIndex: number) => any;\r\n\r\n private static deprecatedWarning1: Boolean = false;\r\n private static deprecatedWarning2: Boolean = false;\r\n\r\n get time() {\r\n if (!TrackEntry.deprecatedWarning1) {\r\n TrackEntry.deprecatedWarning1 = true;\r\n console.warn(\"Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.\");\r\n }\r\n return this.trackTime;\r\n }\r\n\r\n set time(value: number) {\r\n if (!TrackEntry.deprecatedWarning1) {\r\n TrackEntry.deprecatedWarning1 = true;\r\n console.warn(\"Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.\");\r\n }\r\n this.trackTime = value;\r\n }\r\n\r\n get endTime() {\r\n if (!TrackEntry.deprecatedWarning2) {\r\n TrackEntry.deprecatedWarning2 = true;\r\n console.warn(\"Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.\");\r\n }\r\n return this.trackTime;\r\n }\r\n\r\n set endTime(value: number) {\r\n if (!TrackEntry.deprecatedWarning2) {\r\n TrackEntry.deprecatedWarning2 = true;\r\n console.warn(\"Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.\");\r\n }\r\n this.trackTime = value;\r\n }\r\n\r\n loopsCount() {\r\n return Math.floor(this.trackTime / this.trackEnd);\r\n }\r\n }\r\n\r\n export class EventQueue {\r\n objects: Array = [];\r\n drainDisabled = false;\r\n animState: AnimationState;\r\n\r\n constructor(animState: AnimationState) {\r\n this.animState = animState;\r\n }\r\n\r\n start (entry: TrackEntry) {\r\n this.objects.push(EventType.start);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n }\r\n\r\n interrupt (entry: TrackEntry) {\r\n this.objects.push(EventType.interrupt);\r\n this.objects.push(entry);\r\n }\r\n\r\n end (entry: TrackEntry) {\r\n this.objects.push(EventType.end);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n }\r\n\r\n dispose (entry: TrackEntry) {\r\n this.objects.push(EventType.dispose);\r\n this.objects.push(entry);\r\n }\r\n\r\n complete (entry: TrackEntry) {\r\n this.objects.push(EventType.complete);\r\n this.objects.push(entry);\r\n }\r\n\r\n event (entry: TrackEntry, event: Event) {\r\n this.objects.push(EventType.event);\r\n this.objects.push(entry);\r\n this.objects.push(event);\r\n }\r\n\r\n private static deprecatedWarning1: Boolean = false;\r\n\r\n deprecateStuff() {\r\n if (!EventQueue.deprecatedWarning1) {\r\n EventQueue.deprecatedWarning1 = true;\r\n console.warn(\"Spine Deprecation Warning: onComplete, onStart, onEnd, onEvent art deprecated, please use listeners from now on. 'state.addListener({ complete: function(track, event) { } })'\");\r\n }\r\n return true;\r\n }\r\n\r\n drain () {\r\n if (this.drainDisabled) return;\r\n this.drainDisabled = true;\r\n\r\n let objects = this.objects;\r\n let listeners = this.animState.listeners;\r\n\r\n for (let i = 0; i < objects.length; i += 2) {\r\n let type = objects[i] as EventType;\r\n let entry = objects[i + 1] as TrackEntry;\r\n switch (type) {\r\n case EventType.start:\r\n if (entry.listener != null && entry.listener.start) entry.listener.start(entry);\r\n for (let ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].start) listeners[ii].start(entry);\r\n //deprecation\r\n entry.onStart && this.deprecateStuff() && entry.onStart(entry.trackIndex);\r\n this.animState.onStart && this.deprecateStuff() && this.deprecateStuff && this.animState.onStart(entry.trackIndex);\r\n break;\r\n case EventType.interrupt:\r\n if (entry.listener != null && entry.listener.interrupt) entry.listener.interrupt(entry);\r\n for (let ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].interrupt) listeners[ii].interrupt(entry);\r\n break;\r\n case EventType.end:\r\n if (entry.listener != null && entry.listener.end) entry.listener.end(entry);\r\n for (let ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].end) listeners[ii].end(entry);\r\n //deprecation\r\n entry.onEnd && this.deprecateStuff() && entry.onEnd(entry.trackIndex);\r\n this.animState.onEnd && this.deprecateStuff() && this.animState.onEnd(entry.trackIndex);\r\n // Fall through.\r\n case EventType.dispose:\r\n if (entry.listener != null && entry.listener.dispose) entry.listener.dispose(entry);\r\n for (let ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].dispose) listeners[ii].dispose(entry);\r\n this.animState.trackEntryPool.free(entry);\r\n break;\r\n case EventType.complete:\r\n if (entry.listener != null && entry.listener.complete) entry.listener.complete(entry);\r\n for (let ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].complete) listeners[ii].complete(entry);\r\n //deprecation\r\n\r\n let count = MathUtils.toInt(entry.loopsCount()) ;\r\n entry.onComplete && this.deprecateStuff() && entry.onComplete(entry.trackIndex, count);\r\n this.animState.onComplete && this.deprecateStuff() && this.animState.onComplete(entry.trackIndex, count);\r\n break;\r\n case EventType.event:\r\n let event = objects[i++ + 2] as Event;\r\n if (entry.listener != null && entry.listener.event) entry.listener.event(entry, event);\r\n for (let ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].event) listeners[ii].event(entry, event);\r\n //deprecation\r\n entry.onEvent && this.deprecateStuff() && entry.onEvent(entry.trackIndex, event);\r\n this.animState.onEvent && this.deprecateStuff() && this.animState.onEvent(entry.trackIndex, event);\r\n break;\r\n }\r\n }\r\n this.clear();\r\n\r\n this.drainDisabled = false;\r\n }\r\n\r\n clear () {\r\n this.objects.length = 0;\r\n }\r\n }\r\n\r\n export enum EventType {\r\n start, interrupt, end, dispose, complete, event\r\n }\r\n\r\n export interface AnimationStateListener {\r\n /** Invoked when this entry has been set as the current entry. */\r\n start? (entry: TrackEntry): void;\r\n\r\n /** Invoked when another entry has replaced this entry as the current entry. This entry may continue being applied for\r\n * mixing. */\r\n interrupt? (entry: TrackEntry): void;\r\n\r\n /** Invoked when this entry is no longer the current entry and will never be applied again. */\r\n end? (entry: TrackEntry): void;\r\n\r\n /** Invoked when this entry will be disposed. This may occur without the entry ever being set as the current entry.\r\n * References to the entry should not be kept after dispose is called, as it may be destroyed or reused. */\r\n dispose? (entry: TrackEntry): void;\r\n\r\n /** Invoked every time this entry's animation completes a loop. */\r\n complete? (entry: TrackEntry): void;\r\n\r\n /** Invoked when this entry's animation triggers an event. */\r\n event? (entry: TrackEntry, event: Event): void;\r\n }\r\n\r\n export abstract class AnimationStateAdapter implements AnimationStateListener {\r\n start (entry: TrackEntry) {\r\n }\r\n\r\n interrupt (entry: TrackEntry) {\r\n }\r\n\r\n end (entry: TrackEntry) {\r\n }\r\n\r\n dispose (entry: TrackEntry) {\r\n }\r\n\r\n complete (entry: TrackEntry) {\r\n }\r\n\r\n event (entry: TrackEntry, event: Event) {\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class AnimationStateData {\r\n skeletonData: SkeletonData;\r\n animationToMixTime: Map = {};\r\n defaultMix = 0;\r\n\r\n constructor(skeletonData: SkeletonData) {\r\n if (skeletonData == null) throw new Error(\"skeletonData cannot be null.\");\r\n this.skeletonData = skeletonData;\r\n }\r\n\r\n setMix(fromName: string, toName: string, duration: number) {\r\n let from = this.skeletonData.findAnimation(fromName);\r\n if (from == null) throw new Error(\"Animation not found: \" + fromName);\r\n let to = this.skeletonData.findAnimation(toName);\r\n if (to == null) throw new Error(\"Animation not found: \" + toName);\r\n this.setMixWith(from, to, duration);\r\n }\r\n\r\n private static deprecatedWarning1: boolean = false;\r\n\r\n setMixByName(fromName: string, toName: string, duration: number) {\r\n if (!AnimationStateData.deprecatedWarning1) {\r\n AnimationStateData.deprecatedWarning1 = true;\r\n console.warn(\"Deprecation Warning: AnimationStateData.setMixByName is deprecated, please use setMix from now on.\");\r\n }\r\n this.setMix(fromName, toName, duration);\r\n }\r\n\r\n setMixWith(from: Animation, to: Animation, duration: number) {\r\n if (from == null) throw new Error(\"from cannot be null.\");\r\n if (to == null) throw new Error(\"to cannot be null.\");\r\n let key = from.name + \".\" + to.name;\r\n this.animationToMixTime[key] = duration;\r\n }\r\n\r\n getMix(from: Animation, to: Animation) {\r\n let key = from.name + \".\" + to.name;\r\n let value = this.animationToMixTime[key];\r\n return value === undefined ? this.defaultMix : value;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class AtlasAttachmentLoader implements AttachmentLoader {\r\n atlas: TextureAtlas;\r\n\r\n constructor(atlas: TextureAtlas) {\r\n this.atlas = atlas;\r\n }\r\n\r\n /** @return May be null to not load an attachment. */\r\n newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment {\r\n let region = this.atlas.findRegion(path);\r\n if (region == null) throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\r\n let attachment = new RegionAttachment(name);\r\n attachment.region = region;\r\n return attachment;\r\n }\r\n\r\n /** @return May be null to not load an attachment. */\r\n newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment {\r\n let region = this.atlas.findRegion(path);\r\n if (region == null) throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\r\n let attachment = new MeshAttachment(name);\r\n attachment.region = region;\r\n return attachment;\r\n }\r\n\r\n /** @return May be null to not load an attachment. */\r\n newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment {\r\n return new BoundingBoxAttachment(name);\r\n }\r\n\r\n /** @return May be null to not load an attachment */\r\n newPathAttachment(skin: Skin, name: string): PathAttachment {\r\n return new PathAttachment(name);\r\n }\r\n\r\n newPointAttachment(skin: Skin, name: string): PointAttachment {\r\n return new PointAttachment(name);\r\n }\r\n\r\n newClippingAttachment(skin: Skin, name: string): ClippingAttachment {\r\n return new ClippingAttachment(name);\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export enum BlendMode {\r\n Normal = 0,\r\n Additive = 1,\r\n Multiply = 2,\r\n Screen = 3\r\n }\r\n}\r\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class Bone implements Updatable {\n static yDown: boolean = false;\n //be careful! Spine b,c is c,b in pixi matrix\n matrix = new PIXI.Matrix();\n\n get worldX(): number {\n return this.matrix.tx;\n }\n\n get worldY(): number {\n return this.matrix.ty;\n }\n\n data: BoneData;\n skeleton: Skeleton;\n parent: Bone;\n children = new Array();\n x = 0;\n y = 0;\n rotation = 0;\n scaleX = 0;\n scaleY = 0;\n shearX = 0;\n shearY = 0;\n ax = 0;\n ay = 0;\n arotation = 0;\n ascaleX = 0;\n ascaleY = 0;\n ashearX = 0;\n ashearY = 0;\n appliedValid = false;\n\n sorted = false;\n active = false;\n\n /** @param parent May be null. */\n constructor(data: BoneData, skeleton: Skeleton, parent: Bone) {\n if (data == null) throw new Error(\"data cannot be null.\");\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.skeleton = skeleton;\n this.parent = parent;\n this.setToSetupPose();\n }\n\n isActive () {\n return this.active;\n }\n\n /** Same as {@link #updateWorldTransform()}. This method exists for Bone to implement {@link Updatable}. */\n update() {\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\n }\n\n /** Computes the world transform using the parent bone and this bone's local transform. */\n updateWorldTransform() {\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\n }\n\n /** Computes the world transform using the parent bone and the specified local transform. */\n updateWorldTransformWith(x: number, y: number, rotation: number, scaleX: number, scaleY: number, shearX: number, shearY: number) {\n this.ax = x;\n this.ay = y;\n this.arotation = rotation;\n this.ascaleX = scaleX;\n this.ascaleY = scaleY;\n this.ashearX = shearX;\n this.ashearY = shearY;\n this.appliedValid = true;\n\n let parent = this.parent;\n let m = this.matrix;\n\n let sx = this.skeleton.scaleX;\n let sy = Bone.yDown? -this.skeleton.scaleY : this.skeleton.scaleY;\n\n if (parent == null) { // Root bone.\n let skeleton = this.skeleton;\n let rotationY = rotation + 90 + shearY;\n m.a = MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\n m.c = MathUtils.cosDeg(rotationY) * scaleY * sx;\n m.b = MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\n m.d = MathUtils.sinDeg(rotationY) * scaleY * sy;\n m.tx = x * sx + skeleton.x;\n m.ty = y * sy + skeleton.y;\n return;\n }\n\n let pa = parent.matrix.a, pb = parent.matrix.c, pc = parent.matrix.b, pd = parent.matrix.d;\n m.tx = pa * x + pb * y + parent.matrix.tx;\n m.ty = pc * x + pd * y + parent.matrix.ty;\n switch (this.data.transformMode) {\n case TransformMode.Normal: {\n let rotationY = rotation + 90 + shearY;\n let la = MathUtils.cosDeg(rotation + shearX) * scaleX;\n let lb = MathUtils.cosDeg(rotationY) * scaleY;\n let lc = MathUtils.sinDeg(rotation + shearX) * scaleX;\n let ld = MathUtils.sinDeg(rotationY) * scaleY;\n m.a = pa * la + pb * lc;\n m.c = pa * lb + pb * ld;\n m.b = pc * la + pd * lc;\n m.d = pc * lb + pd * ld;\n return;\n }\n case TransformMode.OnlyTranslation: {\n let rotationY = rotation + 90 + shearY;\n m.a = MathUtils.cosDeg(rotation + shearX) * scaleX;\n m.c = MathUtils.cosDeg(rotationY) * scaleY;\n m.b = MathUtils.sinDeg(rotation + shearX) * scaleX;\n m.d = MathUtils.sinDeg(rotationY) * scaleY;\n break;\n }\n case TransformMode.NoRotationOrReflection: {\n let s = pa * pa + pc * pc;\n let prx = 0;\n if (s > 0.0001) {\n s = Math.abs(pa * pd - pb * pc) / s;\n pa /= this.skeleton.scaleX;\n pc /= this.skeleton.scaleY;\n pb = pc * s;\n pd = pa * s;\n prx = Math.atan2(pc, pa) * MathUtils.radDeg;\n } else {\n pa = 0;\n pc = 0;\n prx = 90 - Math.atan2(pd, pb) * MathUtils.radDeg;\n }\n let rx = rotation + shearX - prx;\n let ry = rotation + shearY - prx + 90;\n let la = MathUtils.cosDeg(rx) * scaleX;\n let lb = MathUtils.cosDeg(ry) * scaleY;\n let lc = MathUtils.sinDeg(rx) * scaleX;\n let ld = MathUtils.sinDeg(ry) * scaleY;\n m.a = pa * la - pb * lc;\n m.c = pa * lb - pb * ld;\n m.b = pc * la + pd * lc;\n m.d = pc * lb + pd * ld;\n break;\n }\n case TransformMode.NoScale:\n case TransformMode.NoScaleOrReflection: {\n let cos = MathUtils.cosDeg(rotation);\n let sin = MathUtils.sinDeg(rotation);\n let za = (pa * cos + pb * sin) / sx;\n let zc = (pc * cos + pd * sin) / sy;\n let s = Math.sqrt(za * za + zc * zc);\n if (s > 0.00001) s = 1 / s;\n za *= s;\n zc *= s;\n s = Math.sqrt(za * za + zc * zc);\n if (\n this.data.transformMode == TransformMode.NoScale\n && (pa * pd - pb * pc < 0) != (Bone.yDown?\n (this.skeleton.scaleX < 0 != this.skeleton.scaleY > 0) :\n (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\n ) s = -s;\n let r = Math.PI / 2 + Math.atan2(zc, za);\n let zb = Math.cos(r) * s;\n let zd = Math.sin(r) * s;\n let la = MathUtils.cosDeg(shearX) * scaleX;\n let lb = MathUtils.cosDeg(90 + shearY) * scaleY;\n let lc = MathUtils.sinDeg(shearX) * scaleX;\n let ld = MathUtils.sinDeg(90 + shearY) * scaleY;\n m.a = za * la + zb * lc;\n m.c = za * lb + zb * ld;\n m.b = zc * la + zd * lc;\n m.d = zc * lb + zd * ld;\n break;\n }\n }\n m.a *= sx;\n m.c *= sx;\n m.b *= sy;\n m.d *= sy;\n }\n\n setToSetupPose() {\n let data = this.data;\n this.x = data.x;\n this.y = data.y;\n this.rotation = data.rotation;\n this.scaleX = data.scaleX;\n this.scaleY = data.scaleY;\n this.shearX = data.shearX;\n this.shearY = data.shearY;\n }\n\n getWorldRotationX() {\n return Math.atan2(this.matrix.b, this.matrix.a) * MathUtils.radDeg;\n }\n\n getWorldRotationY() {\n return Math.atan2(this.matrix.d, this.matrix.c) * MathUtils.radDeg;\n }\n\n getWorldScaleX() {\n let m = this.matrix;\n return Math.sqrt(m.a * m.a + m.c * m.c);\n }\n\n getWorldScaleY() {\n let m = this.matrix;\n return Math.sqrt(m.b * m.b + m.d * m.d);\n }\n\n /** Computes the individual applied transform values from the world transform. This can be useful to perform processing using\n * the applied transform after the world transform has been modified directly (eg, by a constraint).\n *

\n * Some information is ambiguous in the world transform, such as -1,-1 scale versus 180 rotation. */\n updateAppliedTransform() {\n this.appliedValid = true;\n let parent = this.parent;\n let m = this.matrix;\n if (parent == null) {\n this.ax = m.tx;\n this.ay = m.ty;\n this.arotation = Math.atan2(m.b, m.a) * MathUtils.radDeg;\n this.ascaleX = Math.sqrt(m.a * m.a + m.b * m.b);\n this.ascaleY = Math.sqrt(m.c * m.c + m.d * m.d);\n this.ashearX = 0;\n this.ashearY = Math.atan2(m.a * m.c + m.b * m.d, m.a * m.d - m.b * m.c) * MathUtils.radDeg;\n return;\n }\n let pm = parent.matrix;\n let pid = 1 / (pm.a * pm.d - pm.b * pm.c);\n let dx = m.tx - pm.tx, dy = m.ty - pm.ty;\n this.ax = (dx * pm.d * pid - dy * pm.c * pid);\n this.ay = (dy * pm.a * pid - dx * pm.b * pid);\n let ia = pid * pm.d;\n let id = pid * pm.a;\n let ib = pid * pm.c;\n let ic = pid * pm.b;\n let ra = ia * m.a - ib * m.b;\n let rb = ia * m.c - ib * m.d;\n let rc = id * m.b - ic * m.a;\n let rd = id * m.d - ic * m.c;\n this.ashearX = 0;\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\n if (this.ascaleX > 0.0001) {\n let det = ra * rd - rb * rc;\n this.ascaleY = det / this.ascaleX;\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * MathUtils.radDeg;\n this.arotation = Math.atan2(rc, ra) * MathUtils.radDeg;\n } else {\n this.ascaleX = 0;\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\n this.ashearY = 0;\n this.arotation = 90 - Math.atan2(rd, rb) * MathUtils.radDeg;\n }\n }\n\n worldToLocal(world: Vector2) {\n let m = this.matrix;\n let a = m.a, b = m.c, c = m.b, d = m.d;\n let invDet = 1 / (a * d - b * c);\n let x = world.x - m.tx, y = world.y - m.ty;\n world.x = (x * d * invDet - y * b * invDet);\n world.y = (y * a * invDet - x * c * invDet);\n return world;\n }\n\n localToWorld(local: Vector2) {\n let m = this.matrix;\n let x = local.x, y = local.y;\n local.x = x * m.a + y * m.c + m.tx;\n local.y = x * m.b + y * m.d + m.ty;\n return local;\n }\n\n worldToLocalRotation (worldRotation: number) {\n let sin = MathUtils.sinDeg(worldRotation), cos = MathUtils.cosDeg(worldRotation);\n let mat = this.matrix;\n return Math.atan2(mat.a * sin - mat.b * cos, mat.d * cos - mat.c * sin) * MathUtils.radDeg;\n }\n\n localToWorldRotation (localRotation: number) {\n let sin = MathUtils.sinDeg(localRotation), cos = MathUtils.cosDeg(localRotation);\n let mat = this.matrix;\n return Math.atan2(cos * mat.b + sin * mat.d, cos * mat.a + sin * mat.c) * MathUtils.radDeg;\n }\n\n rotateWorld (degrees: number) {\n let mat = this.matrix;\n let a = mat.a, b = mat.c, c = mat.b, d = mat.d;\n let cos = MathUtils.cosDeg(degrees), sin = MathUtils.sinDeg(degrees);\n mat.a = cos * a - sin * c;\n mat.c = cos * b - sin * d;\n mat.b = sin * a + cos * c;\n mat.d = sin * b + cos * d;\n this.appliedValid = false;\n }\n }\n}\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class BoneData {\r\n index: number;\r\n name: string;\r\n parent: BoneData;\r\n length: number;\r\n x = 0;\r\n y = 0;\r\n rotation = 0;\r\n scaleX = 1;\r\n scaleY = 1;\r\n shearX = 0;\r\n shearY = 0;\r\n transformMode = TransformMode.Normal;\r\n skinRequired = false;\r\n\r\n color = new Color();\r\n\r\n constructor(index: number, name: string, parent: BoneData) {\r\n if (index < 0) throw new Error(\"index must be >= 0.\");\r\n if (name == null) throw new Error(\"name cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.parent = parent;\r\n }\r\n }\r\n\r\n export enum TransformMode {\r\n Normal, OnlyTranslation, NoRotationOrReflection, NoScale, NoScaleOrReflection\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export abstract class ConstraintData {\r\n constructor(public name: string, public order: number, public skinRequired: boolean) { }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class Event {\r\n data: EventData;\r\n intValue: number;\r\n floatValue: number;\r\n stringValue: string;\r\n time: number;\r\n volume: number;\r\n balance: number;\r\n\r\n\r\n constructor(time: number, data: EventData) {\r\n if (data == null) throw new Error(\"data cannot be null.\");\r\n this.time = time;\r\n this.data = data;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class EventData {\r\n name: string;\r\n intValue: number;\r\n floatValue: number;\r\n stringValue: string;\r\n audioPath: string;\r\n volume: number;\r\n balance: number;\r\n\r\n constructor (name: string) {\r\n this.name = name;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class IkConstraint implements Updatable {\r\n data: IkConstraintData;\r\n bones: Array;\r\n target: Bone;\r\n bendDirection = 0;\r\n compress = false;\r\n stretch = false;\r\n mix = 1;\r\n softness = 0;\r\n active = false;\r\n\r\n constructor (data: IkConstraintData, skeleton: Skeleton) {\r\n if (data == null) throw new Error(\"data cannot be null.\");\r\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.mix = data.mix;\r\n this.softness = data.softness;\r\n this.bendDirection = data.bendDirection;\r\n this.compress = data.compress;\r\n this.stretch = data.stretch;\r\n\r\n this.bones = new Array();\r\n for (let i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n\r\n isActive () {\r\n return this.active;\r\n }\r\n\r\n apply () {\r\n this.update();\r\n }\r\n\r\n update () {\r\n let target = this.target;\r\n let bones = this.bones;\r\n switch (bones.length) {\r\n case 1:\r\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\r\n break;\r\n case 2:\r\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.softness, this.mix);\r\n break;\r\n }\r\n }\r\n\r\n /** Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified in the world\r\n * coordinate system. */\r\n apply1 (bone: Bone, targetX: number, targetY: number, compress: boolean, stretch: boolean, uniform: boolean, alpha: number) {\r\n if (!bone.appliedValid) bone.updateAppliedTransform();\r\n let p = bone.parent.matrix;\r\n\r\n\r\n let pa = p.a, pb = p.c, pc = p.b, pd = p.d;\r\n let rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\r\n\r\n switch(bone.data.transformMode) {\r\n case TransformMode.OnlyTranslation:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n break;\r\n case TransformMode.NoRotationOrReflection:\r\n let s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\r\n let sa = pa / bone.skeleton.scaleX;\r\n let sc = pc / bone.skeleton.scaleY;\r\n pb = -sc * s * bone.skeleton.scaleX;\r\n pd = sa * s * bone.skeleton.scaleY;\r\n rotationIK += Math.atan2(sc, sa) * MathUtils.radDeg;\r\n // Fall through\r\n default:\r\n let x = targetX - p.tx, y = targetY - p.ty;\r\n let d = pa * pd - pb * pc;\r\n tx = (x * pd - y * pb) / d - bone.ax;\r\n ty = (y * pa - x * pc) / d - bone.ay;\r\n }\r\n rotationIK += Math.atan2(ty, tx) * MathUtils.radDeg;\r\n\r\n if (bone.ascaleX < 0) rotationIK += 180;\r\n if (rotationIK > 180)\r\n rotationIK -= 360;\r\n else if (rotationIK < -180) rotationIK += 360;\r\n let sx = bone.ascaleX, sy = bone.ascaleY;\r\n if (compress || stretch) {\r\n switch (bone.data.transformMode) {\r\n case TransformMode.NoScale:\r\n case TransformMode.NoScaleOrReflection:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n }\r\n let b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\r\n if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) {\r\n let s = (dd / b - 1) * alpha + 1;\r\n sx *= s;\r\n if (uniform) sy *= s;\r\n }\r\n }\r\n bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX,\r\n bone.ashearY);\r\n }\r\n\r\n /** Adjusts the parent and child bone rotations so the tip of the child is as close to the target position as possible. The\r\n * target is specified in the world coordinate system.\r\n * @param child A direct descendant of the parent bone. */\r\n apply2 (parent: Bone, child: Bone, targetX: number, targetY: number, bendDir: number, stretch: boolean, softness: number, alpha: number) {\r\n if (alpha == 0) {\r\n child.updateWorldTransform();\r\n return;\r\n }\r\n if (!parent.appliedValid) parent.updateAppliedTransform();\r\n if (!child.appliedValid) child.updateAppliedTransform();\r\n let px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;\r\n let pmat = parent.matrix;\r\n let os1 = 0, os2 = 0, s2 = 0;\r\n if (psx < 0) {\r\n psx = -psx;\r\n os1 = 180;\r\n s2 = -1;\r\n } else {\r\n os1 = 0;\r\n s2 = 1;\r\n }\r\n if (psy < 0) {\r\n psy = -psy;\r\n s2 = -s2;\r\n }\r\n if (csx < 0) {\r\n csx = -csx;\r\n os2 = 180;\r\n } else\r\n os2 = 0;\r\n let cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = pmat.a, b = pmat.c, c = pmat.b, d = pmat.d;\r\n let u = Math.abs(psx - psy) <= 0.0001;\r\n if (!u) {\r\n cy = 0;\r\n cwx = a * cx + pmat.tx;\r\n cwy = c * cx + pmat.ty;\r\n } else {\r\n cy = child.ay;\r\n cwx = a * cx + b * cy + pmat.tx;\r\n cwy = c * cx + d * cy + pmat.ty;\r\n }\r\n let pp = parent.parent.matrix;\r\n a = pp.a;\r\n b = pp.c;\r\n c = pp.b;\r\n d = pp.d;\r\n let id = 1 / (a * d - b * c), x = cwx - pp.tx, y = cwy - pp.ty;\r\n let dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\r\n let l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\r\n if (l1 < 0.0001) {\r\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\r\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n return;\r\n }\r\n x = targetX - pp.tx;\r\n y = targetY - pp.ty;\r\n let tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\r\n let dd = tx * tx + ty * ty;\r\n if (softness != 0) {\r\n softness *= psx * (csx + 1) / 2;\r\n let td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\r\n if (sd > 0) {\r\n let p = Math.min(1, sd / (softness * 2)) - 1;\r\n p = (sd - softness * (1 - p * p)) / td;\r\n tx -= p * tx;\r\n ty -= p * ty;\r\n dd = tx * tx + ty * ty;\r\n }\r\n }\r\n outer:\r\n if (u) {\r\n l2 *= psx;\r\n let cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\r\n if (cos < -1)\r\n cos = -1;\r\n else if (cos > 1) {\r\n cos = 1;\r\n if (stretch) sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\r\n }\r\n a2 = Math.acos(cos) * bendDir;\r\n a = l1 + l2 * cos;\r\n b = l2 * Math.sin(a2);\r\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\r\n } else {\r\n a = psx * l2;\r\n b = psy * l2;\r\n let aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\r\n c = bb * l1 * l1 + aa * dd - aa * bb;\r\n let c1 = -2 * bb * l1, c2 = bb - aa;\r\n d = c1 * c1 - 4 * c2 * c;\r\n if (d >= 0) {\r\n let q = Math.sqrt(d);\r\n if (c1 < 0) q = -q;\r\n q = -(c1 + q) / 2;\r\n let r0 = q / c2, r1 = c / q;\r\n let r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\r\n if (r * r <= dd) {\r\n y = Math.sqrt(dd - r * r) * bendDir;\r\n a1 = ta - Math.atan2(y, r);\r\n a2 = Math.atan2(y / psy, (r - l1) / psx);\r\n break outer;\r\n }\r\n }\r\n let minAngle = MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\r\n let maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\r\n c = -a * l1 / (aa - bb);\r\n if (c >= -1 && c <= 1) {\r\n c = Math.acos(c);\r\n x = a * Math.cos(c) + l1;\r\n y = b * Math.sin(c);\r\n d = x * x + y * y;\r\n if (d < minDist) {\r\n minAngle = c;\r\n minDist = d;\r\n minX = x;\r\n minY = y;\r\n }\r\n if (d > maxDist) {\r\n maxAngle = c;\r\n maxDist = d;\r\n maxX = x;\r\n maxY = y;\r\n }\r\n }\r\n if (dd <= (minDist + maxDist) / 2) {\r\n a1 = ta - Math.atan2(minY * bendDir, minX);\r\n a2 = minAngle * bendDir;\r\n } else {\r\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\r\n a2 = maxAngle * bendDir;\r\n }\r\n }\r\n let os = Math.atan2(cy, cx) * s2;\r\n let rotation = parent.arotation;\r\n a1 = (a1 - os) * MathUtils.radDeg + os1 - rotation;\r\n if (a1 > 180)\r\n a1 -= 360;\r\n else if (a1 < -180) a1 += 360;\r\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0);\r\n rotation = child.arotation;\r\n a2 = ((a2 + os) * MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\r\n if (a2 > 180)\r\n a2 -= 360;\r\n else if (a2 < -180) a2 += 360;\r\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class IkConstraintData extends ConstraintData {\r\n bones = new Array();\r\n target: BoneData;\r\n bendDirection = 1;\r\n compress = false;\r\n stretch = false;\r\n uniform = false;\r\n mix = 1;\r\n softness = 0;\r\n\r\n constructor (name: string) {\r\n super(name, 0, false);\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class PathConstraint implements Updatable {\r\n static NONE = -1; static BEFORE = -2; static AFTER = -3;\r\n static epsilon = 0.00001;\r\n\r\n data: PathConstraintData;\r\n bones: Array;\r\n target: Slot;\r\n position = 0; spacing = 0; rotateMix = 0; translateMix = 0;\r\n\r\n spaces = new Array(); positions = new Array();\r\n world = new Array(); curves = new Array(); lengths = new Array();\r\n segments = new Array();\r\n\r\n active = false;\r\n\r\n constructor (data: PathConstraintData, skeleton: Skeleton) {\r\n if (data == null) throw new Error(\"data cannot be null.\");\r\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (let i = 0, n = data.bones.length; i < n; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findSlot(data.target.name);\r\n this.position = data.position;\r\n this.spacing = data.spacing;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n }\r\n\r\n isActive () {\r\n return this.active;\r\n }\r\n\r\n apply () {\r\n this.update();\r\n }\r\n\r\n update () {\r\n let attachment = this.target.getAttachment();\r\n if (!(attachment instanceof PathAttachment)) return;\r\n\r\n let rotateMix = this.rotateMix, translateMix = this.translateMix;\r\n let translate = translateMix > 0, rotate = rotateMix > 0;\r\n if (!translate && !rotate) return;\r\n\r\n let data = this.data;\r\n let spacingMode = data.spacingMode;\r\n let lengthSpacing = spacingMode == SpacingMode.Length;\r\n let rotateMode = data.rotateMode;\r\n let tangents = rotateMode == RotateMode.Tangent, scale = rotateMode == RotateMode.ChainScale;\r\n let boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\r\n let bones = this.bones;\r\n let spaces = Utils.setArraySize(this.spaces, spacesCount), lengths: Array = null;\r\n let spacing = this.spacing;\r\n if (scale || lengthSpacing) {\r\n if (scale) lengths = Utils.setArraySize(this.lengths, boneCount);\r\n for (let i = 0, n = spacesCount - 1; i < n;) {\r\n let bone = bones[i];\r\n let setupLength = bone.data.length;\r\n if (setupLength < PathConstraint.epsilon) {\r\n if (scale) lengths[i] = 0;\r\n spaces[++i] = 0;\r\n } else {\r\n let x = setupLength * bone.matrix.a, y = setupLength * bone.matrix.b;\r\n let length = Math.sqrt(x * x + y * y);\r\n if (scale) lengths[i] = length;\r\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length / setupLength;\r\n }\r\n }\r\n } else {\r\n for (let i = 1; i < spacesCount; i++)\r\n spaces[i] = spacing;\r\n }\r\n\r\n let positions = this.computeWorldPositions(attachment, spacesCount, tangents,\r\n data.positionMode == PositionMode.Percent, spacingMode == SpacingMode.Percent);\r\n let boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\r\n let tip = false;\r\n if (offsetRotation == 0)\r\n tip = rotateMode == RotateMode.Chain;\r\n else {\r\n tip = false;\r\n let p = this.target.bone.matrix;\r\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n }\r\n for (let i = 0, p = 3; i < boneCount; i++, p += 3) {\r\n let bone = bones[i];\r\n let mat = bone.matrix;\r\n mat.tx += (boneX - mat.tx) * translateMix;\r\n mat.ty += (boneY - mat.ty) * translateMix;\r\n let x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\r\n if (scale) {\r\n let length = lengths[i];\r\n if (length != 0) {\r\n let s = (Math.sqrt(dx * dx + dy * dy) / length - 1) * rotateMix + 1;\r\n mat.a *= s;\r\n mat.b *= s;\r\n }\r\n }\r\n boneX = x;\r\n boneY = y;\r\n if (rotate) {\r\n let a = mat.a, b = mat.c, c = mat.b, d = mat.d, r = 0, cos = 0, sin = 0;\r\n if (tangents)\r\n r = positions[p - 1];\r\n else if (spaces[i + 1] == 0)\r\n r = positions[p + 2];\r\n else\r\n r = Math.atan2(dy, dx);\r\n r -= Math.atan2(c, a);\r\n if (tip) {\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n let length = bone.data.length;\r\n boneX += (length * (cos * a - sin * c) - dx) * rotateMix;\r\n boneY += (length * (sin * a + cos * c) - dy) * rotateMix;\r\n } else {\r\n r += offsetRotation;\r\n }\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI) //\r\n r += MathUtils.PI2;\r\n r *= rotateMix;\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n mat.a = cos * a - sin * c;\r\n mat.c = cos * b - sin * d;\r\n mat.b = sin * a + cos * c;\r\n mat.d = sin * b + cos * d;\r\n }\r\n bone.appliedValid = false;\r\n }\r\n }\r\n\r\n computeWorldPositions (path: PathAttachment, spacesCount: number, tangents: boolean, percentPosition: boolean,\r\n percentSpacing: boolean) {\r\n let target = this.target;\r\n let position = this.position;\r\n let spaces = this.spaces, out = Utils.setArraySize(this.positions, spacesCount * 3 + 2), world: Array = null;\r\n let closed = path.closed;\r\n let verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\r\n\r\n if (!path.constantSpeed) {\r\n let lengths = path.lengths;\r\n curveCount -= closed ? 1 : 2;\r\n let pathLength = lengths[curveCount];\r\n if (percentPosition) position *= pathLength;\r\n if (percentSpacing) {\r\n for (let i = 0; i < spacesCount; i++)\r\n spaces[i] *= pathLength;\r\n }\r\n world = Utils.setArraySize(this.world, 8);\r\n for (let i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\r\n let space = spaces[i];\r\n position += space;\r\n let p = position;\r\n\r\n if (closed) {\r\n p %= pathLength;\r\n if (p < 0) p += pathLength;\r\n curve = 0;\r\n } else if (p < 0) {\r\n if (prevCurve != PathConstraint.BEFORE) {\r\n prevCurve = PathConstraint.BEFORE;\r\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\r\n }\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n } else if (p > pathLength) {\r\n if (prevCurve != PathConstraint.AFTER) {\r\n prevCurve = PathConstraint.AFTER;\r\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\r\n }\r\n this.addAfterPosition(p - pathLength, world, 0, out, o);\r\n continue;\r\n }\r\n\r\n // Determine curve containing position.\r\n for (;; curve++) {\r\n let length = lengths[curve];\r\n if (p > length) continue;\r\n if (curve == 0)\r\n p /= length;\r\n else {\r\n let prev = lengths[curve - 1];\r\n p = (p - prev) / (length - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n if (closed && curve == curveCount) {\r\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\r\n } else\r\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\r\n }\r\n this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o,\r\n tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n }\r\n\r\n // World vertices.\r\n if (closed) {\r\n verticesLength += 2;\r\n world = Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\r\n world[verticesLength - 2] = world[0];\r\n world[verticesLength - 1] = world[1];\r\n } else {\r\n curveCount--;\r\n verticesLength -= 4;\r\n world = Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\r\n }\r\n\r\n // Curve lengths.\r\n let curves = Utils.setArraySize(this.curves, curveCount);\r\n let pathLength = 0;\r\n let x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\r\n let tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\r\n for (let i = 0, w = 2; i < curveCount; i++, w += 6) {\r\n cx1 = world[w];\r\n cy1 = world[w + 1];\r\n cx2 = world[w + 2];\r\n cy2 = world[w + 3];\r\n x2 = world[w + 4];\r\n y2 = world[w + 5];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n curves[i] = pathLength;\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n if (percentPosition) position *= pathLength;\r\n if (percentSpacing) {\r\n for (let i = 0; i < spacesCount; i++)\r\n spaces[i] *= pathLength;\r\n }\r\n\r\n let segments = this.segments;\r\n let curveLength = 0;\r\n for (let i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\r\n let space = spaces[i];\r\n position += space;\r\n let p = position;\r\n\r\n if (closed) {\r\n p %= pathLength;\r\n if (p < 0) p += pathLength;\r\n curve = 0;\r\n } else if (p < 0) {\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n } else if (p > pathLength) {\r\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\r\n continue;\r\n }\r\n\r\n // Determine curve containing position.\r\n for (;; curve++) {\r\n let length = curves[curve];\r\n if (p > length) continue;\r\n if (curve == 0)\r\n p /= length;\r\n else {\r\n let prev = curves[curve - 1];\r\n p = (p - prev) / (length - prev);\r\n }\r\n break;\r\n }\r\n\r\n // Curve segment lengths.\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n let ii = curve * 6;\r\n x1 = world[ii];\r\n y1 = world[ii + 1];\r\n cx1 = world[ii + 2];\r\n cy1 = world[ii + 3];\r\n cx2 = world[ii + 4];\r\n cy2 = world[ii + 5];\r\n x2 = world[ii + 6];\r\n y2 = world[ii + 7];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\r\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[0] = curveLength;\r\n for (ii = 1; ii < 8; ii++) {\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[ii] = curveLength;\r\n }\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[8] = curveLength;\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[9] = curveLength;\r\n segment = 0;\r\n }\r\n\r\n // Weight by segment length.\r\n p *= curveLength;\r\n for (;; segment++) {\r\n let length = segments[segment];\r\n if (p > length) continue;\r\n if (segment == 0)\r\n p /= length;\r\n else {\r\n let prev = segments[segment - 1];\r\n p = segment + (p - prev) / (length - prev);\r\n }\r\n break;\r\n }\r\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n }\r\n\r\n addBeforePosition (p: number, temp: Array, i: number, out: Array, o: number) {\r\n let x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n }\r\n\r\n addAfterPosition (p: number, temp: Array, i: number, out: Array, o: number) {\r\n let x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n }\r\n\r\n addCurvePosition (p: number, x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number,\r\n out: Array, o: number, tangents: boolean) {\r\n if (p == 0 || isNaN(p)) p = 0.0001;\r\n let tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\r\n let ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\r\n let x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\r\n out[o] = x;\r\n out[o + 1] = y;\r\n if (tangents) out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class PathConstraintData extends ConstraintData {\r\n bones = new Array();\r\n target: SlotData;\r\n positionMode: PositionMode;\r\n spacingMode: SpacingMode;\r\n rotateMode: RotateMode;\r\n offsetRotation: number;\r\n position: number; spacing: number; rotateMix: number; translateMix: number;\r\n\r\n constructor (name: string) {\r\n super(name, 0, false);\r\n }\r\n }\r\n\r\n export enum PositionMode {\r\n Fixed, Percent\r\n }\r\n\r\n export enum SpacingMode {\r\n Length, Fixed, Percent\r\n }\r\n\r\n export enum RotateMode {\r\n Tangent, Chain, ChainScale\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class Skeleton {\r\n data: SkeletonData;\r\n bones: Array;\r\n slots: Array;\r\n drawOrder: Array;\r\n ikConstraints: Array;\r\n transformConstraints: Array;\r\n pathConstraints: Array;\r\n _updateCache = new Array();\r\n updateCacheReset = new Array();\r\n skin: Skin;\r\n color: Color;\r\n time = 0;\r\n scaleX = 1; scaleY = 1;\r\n x = 0; y = 0;\r\n\r\n constructor (data: SkeletonData) {\r\n if (data == null) throw new Error(\"data cannot be null.\");\r\n this.data = data;\r\n\r\n this.bones = new Array();\r\n for (let i = 0; i < data.bones.length; i++) {\r\n let boneData = data.bones[i];\r\n let bone: Bone;\r\n if (boneData.parent == null)\r\n bone = new Bone(boneData, this, null);\r\n else {\r\n let parent = this.bones[boneData.parent.index];\r\n bone = new Bone(boneData, this, parent);\r\n parent.children.push(bone);\r\n }\r\n this.bones.push(bone);\r\n }\r\n\r\n this.slots = new Array();\r\n this.drawOrder = new Array();\r\n for (let i = 0; i < data.slots.length; i++) {\r\n let slotData = data.slots[i];\r\n let bone = this.bones[slotData.boneData.index];\r\n let slot = new Slot(slotData, bone);\r\n this.slots.push(slot);\r\n this.drawOrder.push(slot);\r\n }\r\n\r\n this.ikConstraints = new Array();\r\n for (let i = 0; i < data.ikConstraints.length; i++) {\r\n let ikConstraintData = data.ikConstraints[i];\r\n this.ikConstraints.push(new IkConstraint(ikConstraintData, this));\r\n }\r\n\r\n this.transformConstraints = new Array();\r\n for (let i = 0; i < data.transformConstraints.length; i++) {\r\n let transformConstraintData = data.transformConstraints[i];\r\n this.transformConstraints.push(new TransformConstraint(transformConstraintData, this));\r\n }\r\n\r\n this.pathConstraints = new Array();\r\n for (let i = 0; i < data.pathConstraints.length; i++) {\r\n let pathConstraintData = data.pathConstraints[i];\r\n this.pathConstraints.push(new PathConstraint(pathConstraintData, this));\r\n }\r\n\r\n this.color = new Color(1, 1, 1, 1);\r\n this.updateCache();\r\n }\r\n\r\n updateCache () {\r\n let updateCache = this._updateCache;\r\n updateCache.length = 0;\r\n this.updateCacheReset.length = 0;\r\n\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n bone.sorted = bone.data.skinRequired;\r\n bone.active = !bone.sorted;\r\n }\r\n\r\n if (this.skin != null) {\r\n let skinBones = this.skin.bones;\r\n for (let i = 0, n = this.skin.bones.length; i < n; i++) {\r\n let bone = this.bones[skinBones[i].index];\r\n do {\r\n bone.sorted = false;\r\n bone.active = true;\r\n bone = bone.parent;\r\n } while (bone != null);\r\n }\r\n }\r\n\r\n // IK first, lowest hierarchy depth first.\r\n let ikConstraints = this.ikConstraints;\r\n let transformConstraints = this.transformConstraints;\r\n let pathConstraints = this.pathConstraints;\r\n let ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\r\n let constraintCount = ikCount + transformCount + pathCount;\r\n\r\n outer:\r\n for (let i = 0; i < constraintCount; i++) {\r\n for (let ii = 0; ii < ikCount; ii++) {\r\n let constraint = ikConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortIkConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (let ii = 0; ii < transformCount; ii++) {\r\n let constraint = transformConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortTransformConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (let ii = 0; ii < pathCount; ii++) {\r\n let constraint = pathConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortPathConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n }\r\n\r\n for (let i = 0, n = bones.length; i < n; i++)\r\n this.sortBone(bones[i]);\r\n }\r\n\r\n sortIkConstraint (constraint: IkConstraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active) return;\r\n\r\n let target = constraint.target;\r\n this.sortBone(target);\r\n\r\n let constrained = constraint.bones;\r\n let parent = constrained[0];\r\n this.sortBone(parent);\r\n\r\n if (constrained.length > 1) {\r\n let child = constrained[constrained.length - 1];\r\n if (!(this._updateCache.indexOf(child) > -1)) this.updateCacheReset.push(child);\r\n }\r\n\r\n this._updateCache.push(constraint);\r\n\r\n this.sortReset(parent.children);\r\n constrained[constrained.length - 1].sorted = true;\r\n }\r\n\r\n sortPathConstraint (constraint: PathConstraint) {\r\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin != null && Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active) return;\r\n\r\n let slot = constraint.target;\r\n let slotIndex = slot.data.index;\r\n let slotBone = slot.bone;\r\n if (this.skin != null) this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\r\n if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\r\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\r\n for (let i = 0, n = this.data.skins.length; i < n; i++)\r\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\r\n\r\n let attachment = slot.getAttachment();\r\n if (attachment instanceof PathAttachment) this.sortPathConstraintAttachmentWith(attachment, slotBone);\r\n\r\n let constrained = constraint.bones;\r\n let boneCount = constrained.length;\r\n for (let i = 0; i < boneCount; i++)\r\n this.sortBone(constrained[i]);\r\n\r\n this._updateCache.push(constraint);\r\n\r\n for (let i = 0; i < boneCount; i++)\r\n this.sortReset(constrained[i].children);\r\n for (let i = 0; i < boneCount; i++)\r\n constrained[i].sorted = true;\r\n }\r\n\r\n sortTransformConstraint (constraint: TransformConstraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active) return;\r\n\r\n this.sortBone(constraint.target);\r\n\r\n let constrained = constraint.bones;\r\n let boneCount = constrained.length;\r\n if (constraint.data.local) {\r\n for (let i = 0; i < boneCount; i++) {\r\n let child = constrained[i];\r\n this.sortBone(child.parent);\r\n if (!(this._updateCache.indexOf(child) > -1)) this.updateCacheReset.push(child);\r\n }\r\n } else {\r\n for (let i = 0; i < boneCount; i++) {\r\n this.sortBone(constrained[i]);\r\n }\r\n }\r\n\r\n this._updateCache.push(constraint);\r\n\r\n for (let ii = 0; ii < boneCount; ii++)\r\n this.sortReset(constrained[ii].children);\r\n for (let ii = 0; ii < boneCount; ii++)\r\n constrained[ii].sorted = true;\r\n }\r\n\r\n sortPathConstraintAttachment (skin: Skin, slotIndex: number, slotBone: Bone) {\r\n let attachments = skin.attachments[slotIndex];\r\n if (!attachments) return;\r\n for (let key in attachments) {\r\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\r\n }\r\n }\r\n\r\n sortPathConstraintAttachmentWith (attachment: Attachment, slotBone: Bone) {\r\n if (!(attachment instanceof PathAttachment)) return;\r\n let pathBones = (attachment).bones;\r\n if (pathBones == null)\r\n this.sortBone(slotBone);\r\n else {\r\n let bones = this.bones;\r\n let i = 0;\r\n while (i < pathBones.length) {\r\n let boneCount = pathBones[i++];\r\n for (let n = i + boneCount; i < n; i++) {\r\n let boneIndex = pathBones[i];\r\n this.sortBone(bones[boneIndex]);\r\n }\r\n }\r\n }\r\n }\r\n\r\n sortBone (bone: Bone) {\r\n if (bone.sorted) return;\r\n let parent = bone.parent;\r\n if (parent != null) this.sortBone(parent);\r\n bone.sorted = true;\r\n this._updateCache.push(bone);\r\n }\r\n\r\n sortReset (bones: Array) {\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (!bone.active) continue;\r\n if (bone.sorted) this.sortReset(bone.children);\r\n bone.sorted = false;\r\n }\r\n }\r\n\r\n /** Updates the world transform for each bone and applies constraints. */\r\n updateWorldTransform () {\r\n let updateCacheReset = this.updateCacheReset;\r\n for (let i = 0, n = updateCacheReset.length; i < n; i++) {\r\n let bone = updateCacheReset[i] as Bone;\r\n bone.ax = bone.x;\r\n bone.ay = bone.y;\r\n bone.arotation = bone.rotation;\r\n bone.ascaleX = bone.scaleX;\r\n bone.ascaleY = bone.scaleY;\r\n bone.ashearX = bone.shearX;\r\n bone.ashearY = bone.shearY;\r\n bone.appliedValid = true;\r\n }\r\n let updateCache = this._updateCache;\r\n for (let i = 0, n = updateCache.length; i < n; i++)\r\n updateCache[i].update();\r\n }\r\n\r\n /** Sets the bones, constraints, and slots to their setup pose values. */\r\n setToSetupPose () {\r\n this.setBonesToSetupPose();\r\n this.setSlotsToSetupPose();\r\n }\r\n\r\n /** Sets the bones and constraints to their setup pose values. */\r\n setBonesToSetupPose () {\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++)\r\n bones[i].setToSetupPose();\r\n\r\n let ikConstraints = this.ikConstraints;\r\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\r\n let constraint = ikConstraints[i];\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n\r\n let transformConstraints = this.transformConstraints;\r\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\r\n let constraint = transformConstraints[i];\r\n let data = constraint.data;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n }\r\n\r\n let pathConstraints = this.pathConstraints;\r\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\r\n let constraint = pathConstraints[i];\r\n let data = constraint.data;\r\n constraint.position = data.position;\r\n constraint.spacing = data.spacing;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n }\r\n }\r\n\r\n setSlotsToSetupPose () {\r\n let slots = this.slots;\r\n Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\r\n for (let i = 0, n = slots.length; i < n; i++)\r\n slots[i].setToSetupPose();\r\n }\r\n\r\n /** @return May return null. */\r\n getRootBone () {\r\n if (this.bones.length == 0) return null;\r\n return this.bones[0];\r\n }\r\n\r\n /** @return May be null. */\r\n findBone (boneName: string) {\r\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (bone.data.name == boneName) return bone;\r\n }\r\n return null;\r\n }\r\n\r\n /** @return -1 if the bone was not found. */\r\n findBoneIndex (boneName: string) {\r\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].data.name == boneName) return i;\r\n return -1;\r\n }\r\n\r\n /** @return May be null. */\r\n findSlot (slotName: string) {\r\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (slot.data.name == slotName) return slot;\r\n }\r\n return null;\r\n }\r\n\r\n /** @return -1 if the bone was not found. */\r\n findSlotIndex (slotName: string) {\r\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].data.name == slotName) return i;\r\n return -1;\r\n }\r\n\r\n /** Sets a skin by name.\r\n * @see #setSkin(Skin) */\r\n setSkinByName (skinName: string) {\r\n let skin = this.data.findSkin(skinName);\r\n if (skin == null) throw new Error(\"Skin not found: \" + skinName);\r\n this.setSkin(skin);\r\n }\r\n\r\n /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default skin}.\r\n * Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no\r\n * old skin, each slot's setup mode attachment is attached from the new skin.\r\n * @param newSkin May be null. */\r\n setSkin (newSkin: Skin) {\r\n if (newSkin == this.skin) return;\r\n if (newSkin != null) {\r\n if (this.skin != null)\r\n newSkin.attachAll(this, this.skin);\r\n else {\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n let name = slot.data.attachmentName;\r\n if (name != null) {\r\n let attachment: Attachment = newSkin.getAttachment(i, name);\r\n if (attachment != null) slot.setAttachment(attachment);\r\n }\r\n }\r\n }\r\n }\r\n this.skin = newSkin;\r\n this.updateCache();\r\n }\r\n\r\n /** @return May be null. */\r\n getAttachmentByName (slotName: string, attachmentName: string): Attachment {\r\n return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\r\n }\r\n\r\n /** @return May be null. */\r\n getAttachment (slotIndex: number, attachmentName: string): Attachment {\r\n if (attachmentName == null) throw new Error(\"attachmentName cannot be null.\");\r\n if (this.skin != null) {\r\n let attachment: Attachment = this.skin.getAttachment(slotIndex, attachmentName);\r\n if (attachment != null) return attachment;\r\n }\r\n if (this.data.defaultSkin != null) return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\r\n return null;\r\n }\r\n\r\n /** @param attachmentName May be null. */\r\n setAttachment (slotName: string, attachmentName?: string) {\r\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (slot.data.name == slotName) {\r\n let attachment: Attachment = null;\r\n if (attachmentName != null) {\r\n attachment = this.getAttachment(i, attachmentName);\r\n if (attachment == null)\r\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\r\n }\r\n slot.setAttachment(attachment);\r\n return;\r\n }\r\n }\r\n throw new Error(\"Slot not found: \" + slotName);\r\n }\r\n\r\n /** @return May be null. */\r\n findIkConstraint (constraintName: string) {\r\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\r\n let ikConstraints = this.ikConstraints;\r\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\r\n let ikConstraint = ikConstraints[i];\r\n if (ikConstraint.data.name == constraintName) return ikConstraint;\r\n }\r\n return null;\r\n }\r\n\r\n /** @return May be null. */\r\n findTransformConstraint (constraintName: string) {\r\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\r\n let transformConstraints = this.transformConstraints;\r\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\r\n let constraint = transformConstraints[i];\r\n if (constraint.data.name == constraintName) return constraint;\r\n }\r\n return null;\r\n }\r\n\r\n /** @return May be null. */\r\n findPathConstraint (constraintName: string) {\r\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\r\n let pathConstraints = this.pathConstraints;\r\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\r\n let constraint = pathConstraints[i];\r\n if (constraint.data.name == constraintName) return constraint;\r\n }\r\n return null;\r\n }\r\n\r\n /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n * @param offset The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * @param size The width and height of the AABB.\r\n * @param temp Working memory */\r\n getBounds (offset: Vector2, size: Vector2, temp: Array = new Array(2)) {\r\n if (offset == null) throw new Error(\"offset cannot be null.\");\r\n if (size == null) throw new Error(\"size cannot be null.\");\r\n let drawOrder = this.drawOrder;\r\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n for (let i = 0, n = drawOrder.length; i < n; i++) {\r\n let slot = drawOrder[i];\r\n if (!slot.bone.active) continue;\r\n let verticesLength = 0;\r\n let vertices: ArrayLike = null;\r\n let attachment = slot.getAttachment();\r\n if (attachment instanceof RegionAttachment) {\r\n verticesLength = 8;\r\n vertices = Utils.setArraySize(temp, verticesLength, 0);\r\n (attachment).computeWorldVertices(slot.bone, vertices, 0, 2);\r\n } else if (attachment instanceof MeshAttachment) {\r\n let mesh = (attachment);\r\n verticesLength = mesh.worldVerticesLength;\r\n vertices = Utils.setArraySize(temp, verticesLength, 0);\r\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\r\n }\r\n if (vertices != null) {\r\n for (let ii = 0, nn = vertices.length; ii < nn; ii += 2) {\r\n let x = vertices[ii], y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n }\r\n offset.set(minX, minY);\r\n size.set(maxX - minX, maxY - minY);\r\n }\r\n\r\n update (delta: number) {\r\n this.time += delta;\r\n }\r\n\r\n get flipX(): boolean {\r\n return this.scaleX == -1;\r\n }\r\n\r\n set flipX(value: boolean) {\r\n if (!Skeleton.deprecatedWarning1) {\r\n Skeleton.deprecatedWarning1 = true;\r\n console.warn(\"Spine Deprecation Warning: `Skeleton.flipX/flipY` was deprecated, please use scaleX/scaleY\");\r\n }\r\n this.scaleX = value ? 1.0 : -1.0;\r\n }\r\n\r\n get flipY(): boolean {\r\n return this.scaleY == -1;\r\n }\r\n\r\n set flipY(value: boolean) {\r\n if (!Skeleton.deprecatedWarning1) {\r\n Skeleton.deprecatedWarning1 = true;\r\n console.warn(\"Spine Deprecation Warning: `Skeleton.flipX/flipY` was deprecated, please use scaleX/scaleY\");\r\n }\r\n this.scaleY = value ? 1.0 : -1.0;\r\n }\r\n\r\n private static deprecatedWarning1: boolean = false;\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes License Agreement\r\n * Last updated May 1, 2019. Replaces all prior versions.\r\n *\r\n * Copyright (c) 2013-2019, Esoteric Software LLC\r\n *\r\n * Integration of the Spine Runtimes into software or otherwise creating\r\n * derivative works of the Spine Runtimes is permitted under the terms and\r\n * conditions of Section 2 of the Spine Editor License Agreement:\r\n * http://esotericsoftware.com/spine-editor-license\r\n *\r\n * Otherwise, it is permitted to integrate the Spine Runtimes into software\r\n * or otherwise create derivative works of the Spine Runtimes (collectively,\r\n * \"Products\"), provided that each user of the Products must obtain their own\r\n * Spine Editor license and redistribution of the Products in any form must\r\n * include this license and copyright notice.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY EXPRESS\r\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\r\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN\r\n * NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY DIRECT, INDIRECT,\r\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r\n * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS\r\n * INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY\r\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r\n * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n\texport class SkeletonBinary {\r\n\t\tstatic AttachmentTypeValues = [ 0 /*AttachmentType.Region*/, 1/*AttachmentType.BoundingBox*/, 2/*AttachmentType.Mesh*/, 3/*AttachmentType.LinkedMesh*/, 4/*AttachmentType.Path*/, 5/*AttachmentType.Point*/, 6/*AttachmentType.Clipping*/ ];\r\n\t\tstatic TransformModeValues = [TransformMode.Normal, TransformMode.OnlyTranslation, TransformMode.NoRotationOrReflection, TransformMode.NoScale, TransformMode.NoScaleOrReflection];\r\n\t\tstatic PositionModeValues = [ PositionMode.Fixed, PositionMode.Percent ];\r\n\t\tstatic SpacingModeValues = [ SpacingMode.Length, SpacingMode.Fixed, SpacingMode.Percent];\r\n\t\tstatic RotateModeValues = [ RotateMode.Tangent, RotateMode.Chain, RotateMode.ChainScale ];\r\n\t\tstatic BlendModeValues = [ BlendMode.Normal, BlendMode.Additive, BlendMode.Multiply, BlendMode.Screen];\r\n\r\n\t\tstatic BONE_ROTATE = 0;\r\n\t\tstatic BONE_TRANSLATE = 1;\r\n\t\tstatic BONE_SCALE = 2;\r\n\t\tstatic BONE_SHEAR = 3;\r\n\r\n\t\tstatic SLOT_ATTACHMENT = 0;\r\n\t\tstatic SLOT_COLOR = 1;\r\n\t\tstatic SLOT_TWO_COLOR = 2;\r\n\r\n\t\tstatic PATH_POSITION = 0;\r\n\t\tstatic PATH_SPACING = 1;\r\n\t\tstatic PATH_MIX = 2;\r\n\r\n\t\tstatic CURVE_LINEAR = 0;\r\n\t\tstatic CURVE_STEPPED = 1;\r\n\t\tstatic CURVE_BEZIER = 2;\r\n\r\n\t\tattachmentLoader: AttachmentLoader;\r\n\t\tscale = 1;\r\n\t\tprivate linkedMeshes = new Array();\r\n\r\n\t\tconstructor (attachmentLoader: AttachmentLoader) {\r\n\t\t\tthis.attachmentLoader = attachmentLoader;\r\n\t\t}\r\n\r\n\t\treadSkeletonData (binary: Uint8Array): SkeletonData {\r\n\t\t\tlet scale = this.scale;\r\n\r\n\t\t\tlet skeletonData = new SkeletonData();\r\n\t\t\tskeletonData.name = \"\"; // BOZO\r\n\r\n\t\t\tlet input = new BinaryInput(binary);\r\n\r\n\t\t\tskeletonData.hash = input.readString();\r\n\t\t\tskeletonData.version = input.readString();\r\n if (skeletonData.version === '3.8.75')\r\n {\r\n let error = `Unsupported skeleton data, 3.8.75 is deprecated, please export with a newer version of Spine.`;\r\n console.error(error);\r\n }\r\n\t\t\tskeletonData.x = input.readFloat();\r\n\t\t\tskeletonData.y = input.readFloat();\r\n\t\t\tskeletonData.width = input.readFloat();\r\n\t\t\tskeletonData.height = input.readFloat();\r\n\r\n\t\t\tlet nonessential = input.readBoolean();\r\n\t\t\tif (nonessential) {\r\n\t\t\t\tskeletonData.fps = input.readFloat();\r\n\r\n\t\t\t\tskeletonData.imagesPath = input.readString();\r\n\t\t\t\tskeletonData.audioPath = input.readString();\r\n\t\t\t}\r\n\r\n\t\t\tlet n = 0;\r\n\t\t\t// Strings.\r\n\t\t\tn = input.readInt(true)\r\n\t\t\tfor (let i = 0; i < n; i++)\r\n\t\t\t\tinput.strings.push(input.readString());\r\n\r\n\t\t\t// Bones.\r\n\t\t\tn = input.readInt(true)\r\n\t\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\t\tlet name = input.readString();\r\n\t\t\t\tlet parent = i == 0 ? null : skeletonData.bones[input.readInt(true)];\r\n\t\t\t\tlet data = new BoneData(i, name, parent);\r\n\t\t\t\tdata.rotation = input.readFloat();\r\n\t\t\t\tdata.x = input.readFloat() * scale;\r\n\t\t\t\tdata.y = input.readFloat() * scale;\r\n\t\t\t\tdata.scaleX = input.readFloat();\r\n\t\t\t\tdata.scaleY = input.readFloat();\r\n\t\t\t\tdata.shearX = input.readFloat();\r\n\t\t\t\tdata.shearY = input.readFloat();\r\n\t\t\t\tdata.length = input.readFloat() * scale;\r\n\t\t\t\tdata.transformMode = SkeletonBinary.TransformModeValues[input.readInt(true)];\r\n\t\t\t\tdata.skinRequired = input.readBoolean();\r\n\t\t\t\tif (nonessential) Color.rgba8888ToColor(data.color, input.readInt32());\r\n\t\t\t\tskeletonData.bones.push(data);\r\n\t\t\t}\r\n\r\n\t\t\t// Slots.\r\n\t\t\tn = input.readInt(true);\r\n\t\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\t\tlet slotName = input.readString();\r\n\t\t\t\tlet boneData = skeletonData.bones[input.readInt(true)];\r\n\t\t\t\tlet data = new SlotData(i, slotName, boneData);\r\n\t\t\t\tColor.rgba8888ToColor(data.color, input.readInt32());\r\n\r\n\t\t\t\tlet darkColor = input.readInt32();\r\n\t\t\t\tif (darkColor != -1) Color.rgb888ToColor(data.darkColor = new Color(), darkColor);\r\n\r\n\t\t\t\tdata.attachmentName = input.readStringRef();\r\n\t\t\t\tdata.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)];\r\n\t\t\t\tskeletonData.slots.push(data);\r\n\t\t\t}\r\n\r\n\t\t\t// IK constraints.\r\n\t\t\tn = input.readInt(true);\r\n\t\t\tfor (let i = 0, nn; i < n; i++) {\r\n\t\t\t\tlet data = new IkConstraintData(input.readString());\r\n\t\t\t\tdata.order = input.readInt(true);\r\n\t\t\t\tdata.skinRequired = input.readBoolean();\r\n\t\t\t\tnn = input.readInt(true);\r\n\t\t\t\tfor (let ii = 0; ii < nn; ii++)\r\n\t\t\t\t\tdata.bones.push(skeletonData.bones[input.readInt(true)]);\r\n\t\t\t\tdata.target = skeletonData.bones[input.readInt(true)];\r\n\t\t\t\tdata.mix = input.readFloat();\r\n\t\t\t\tdata.softness = input.readFloat() * scale;\r\n\t\t\t\tdata.bendDirection = input.readByte();\r\n\t\t\t\tdata.compress = input.readBoolean();\r\n\t\t\t\tdata.stretch = input.readBoolean();\r\n\t\t\t\tdata.uniform = input.readBoolean();\r\n\t\t\t\tskeletonData.ikConstraints.push(data);\r\n\t\t\t}\r\n\r\n\t\t\t// Transform constraints.\r\n\t\t\tn = input.readInt(true);\r\n\t\t\tfor (let i = 0, nn; i < n; i++) {\r\n\t\t\t\tlet data = new TransformConstraintData(input.readString());\r\n\t\t\t\tdata.order = input.readInt(true);\r\n\t\t\t\tdata.skinRequired = input.readBoolean();\r\n\t\t\t\tnn = input.readInt(true);\r\n\t\t\t\tfor (let ii = 0; ii < nn; ii++)\r\n\t\t\t\t\tdata.bones.push(skeletonData.bones[input.readInt(true)]);\r\n\t\t\t\tdata.target = skeletonData.bones[input.readInt(true)];\r\n\t\t\t\tdata.local = input.readBoolean();\r\n\t\t\t\tdata.relative = input.readBoolean();\r\n\t\t\t\tdata.offsetRotation = input.readFloat();\r\n\t\t\t\tdata.offsetX = input.readFloat() * scale;\r\n\t\t\t\tdata.offsetY = input.readFloat() * scale;\r\n\t\t\t\tdata.offsetScaleX = input.readFloat();\r\n\t\t\t\tdata.offsetScaleY = input.readFloat();\r\n\t\t\t\tdata.offsetShearY = input.readFloat();\r\n\t\t\t\tdata.rotateMix = input.readFloat();\r\n\t\t\t\tdata.translateMix = input.readFloat();\r\n\t\t\t\tdata.scaleMix = input.readFloat();\r\n\t\t\t\tdata.shearMix = input.readFloat();\r\n\t\t\t\tskeletonData.transformConstraints.push(data);\r\n\t\t\t}\r\n\r\n\t\t\t// Path constraints.\r\n\t\t\tn = input.readInt(true);\r\n\t\t\tfor (let i = 0, nn; i < n; i++) {\r\n\t\t\t\tlet data = new PathConstraintData(input.readString());\r\n\t\t\t\tdata.order = input.readInt(true);\r\n\t\t\t\tdata.skinRequired = input.readBoolean();\r\n\t\t\t\tnn = input.readInt(true);\r\n\t\t\t\tfor (let ii = 0; ii < nn; ii++)\r\n\t\t\t\t\tdata.bones.push(skeletonData.bones[input.readInt(true)]);\r\n\t\t\t\tdata.target = skeletonData.slots[input.readInt(true)];\r\n\t\t\t\tdata.positionMode = SkeletonBinary.PositionModeValues[input.readInt(true)];\r\n\t\t\t\tdata.spacingMode = SkeletonBinary.SpacingModeValues[input.readInt(true)];\r\n\t\t\t\tdata.rotateMode = SkeletonBinary.RotateModeValues[input.readInt(true)];\r\n\t\t\t\tdata.offsetRotation = input.readFloat();\r\n\t\t\t\tdata.position = input.readFloat();\r\n\t\t\t\tif (data.positionMode == PositionMode.Fixed) data.position *= scale;\r\n\t\t\t\tdata.spacing = input.readFloat();\r\n\t\t\t\tif (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) data.spacing *= scale;\r\n\t\t\t\tdata.rotateMix = input.readFloat();\r\n\t\t\t\tdata.translateMix = input.readFloat();\r\n\t\t\t\tskeletonData.pathConstraints.push(data);\r\n\t\t\t}\r\n\r\n\t\t\t// Default skin.\r\n\t\t\tlet defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\r\n\t\t\tif (defaultSkin != null) {\r\n\t\t\t\tskeletonData.defaultSkin = defaultSkin;\r\n\t\t\t\tskeletonData.skins.push(defaultSkin);\r\n\t\t\t}\r\n\r\n\t\t\t// Skins.\r\n\t\t\t{\r\n\t\t\t\tlet i = skeletonData.skins.length;\r\n\t\t\t\tUtils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\r\n\t\t\t\tfor (; i < n; i++)\r\n\t\t\t\t\tskeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential);\r\n\t\t\t}\r\n\r\n\t\t\t// Linked meshes.\r\n\t\t\tn = this.linkedMeshes.length;\r\n\t\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\t\tlet linkedMesh = this.linkedMeshes[i];\r\n\t\t\t\tlet skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n\t\t\t\tif (skin == null) throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n\t\t\t\tlet parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n\t\t\t\tif (parent == null) throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n\t\t\t\tlinkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent as VertexAttachment : linkedMesh.mesh;\r\n\t\t\t\tlinkedMesh.mesh.setParentMesh(parent as MeshAttachment);\r\n\t\t\t\t// linkedMesh.mesh.updateUVs();\r\n\t\t\t}\r\n\t\t\tthis.linkedMeshes.length = 0;\r\n\r\n\t\t\t// Events.\r\n\t\t\tn = input.readInt(true);\r\n\t\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\t\tlet data = new EventData(input.readStringRef());\r\n\t\t\t\tdata.intValue = input.readInt(false);\r\n\t\t\t\tdata.floatValue = input.readFloat();\r\n\t\t\t\tdata.stringValue = input.readString();\r\n\t\t\t\tdata.audioPath = input.readString();\r\n\t\t\t\tif (data.audioPath != null) {\r\n\t\t\t\t\tdata.volume = input.readFloat();\r\n\t\t\t\t\tdata.balance = input.readFloat();\r\n\t\t\t\t}\r\n\t\t\t\tskeletonData.events.push(data);\r\n\t\t\t}\r\n\r\n\t\t\t// Animations.\r\n\t\t\tn = input.readInt(true);\r\n\t\t\tfor (let i = 0; i < n; i++)\r\n\t\t\t\tskeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData));\r\n\t\t\treturn skeletonData;\r\n\t\t}\r\n\r\n\t\tprivate readSkin (input: BinaryInput, skeletonData: SkeletonData, defaultSkin: boolean, nonessential: boolean): Skin {\r\n let skin = null;\r\n let slotCount = 0;\r\n\r\n if (defaultSkin) {\r\n slotCount = input.readInt(true)\r\n if (slotCount == 0) return null;\r\n skin = new Skin(\"default\");\r\n } else {\r\n skin = new Skin(input.readStringRef());\r\n skin.bones.length = input.readInt(true);\r\n for (let i = 0, n = skin.bones.length; i < n; i++)\r\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\r\n\r\n for (let i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\r\n for (let i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\r\n for (let i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\r\n\r\n slotCount = input.readInt(true);\r\n }\r\n\r\n for (let i = 0; i < slotCount; i++) {\r\n let slotIndex = input.readInt(true);\r\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n let name = input.readStringRef();\r\n let attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name, nonessential);\r\n if (attachment != null) skin.setAttachment(slotIndex, name, attachment);\r\n }\r\n }\r\n return skin;\r\n\t\t}\r\n\r\n\t\tprivate readAttachment(input: BinaryInput, skeletonData: SkeletonData, skin: Skin, slotIndex: number, attachmentName: string, nonessential: boolean): Attachment {\r\n\t\t\tlet scale = this.scale;\r\n\r\n\t\t\tlet name = input.readStringRef();\r\n\t\t\tif (name == null) name = attachmentName;\r\n\r\n\t\t\tlet typeIndex = input.readByte();\r\n\t\t\tlet type = SkeletonBinary.AttachmentTypeValues[typeIndex];\r\n\t\t\tswitch (type) {\r\n\t\t\tcase AttachmentType.Region: {\r\n\t\t\t\tlet path = input.readStringRef();\r\n\t\t\t\tlet rotation = input.readFloat();\r\n\t\t\t\tlet x = input.readFloat();\r\n\t\t\t\tlet y = input.readFloat();\r\n\t\t\t\tlet scaleX = input.readFloat();\r\n\t\t\t\tlet scaleY = input.readFloat();\r\n\t\t\t\tlet width = input.readFloat();\r\n\t\t\t\tlet height = input.readFloat();\r\n\t\t\t\tlet color = input.readInt32();\r\n\r\n\t\t\t\tif (path == null) path = name;\r\n\t\t\t\tlet region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n\t\t\t\tif (region == null) return null;\r\n\t\t\t\tregion.path = path;\r\n\t\t\t\tregion.x = x * scale;\r\n\t\t\t\tregion.y = y * scale;\r\n\t\t\t\tregion.scaleX = scaleX;\r\n\t\t\t\tregion.scaleY = scaleY;\r\n\t\t\t\tregion.rotation = rotation;\r\n\t\t\t\tregion.width = width * scale;\r\n\t\t\t\tregion.height = height * scale;\r\n\t\t\t\tColor.rgba8888ToColor(region.color, color);\r\n\t\t\t\t// region.updateOffset();\r\n\t\t\t\treturn region;\r\n\t\t\t}\r\n\t\t\tcase AttachmentType.BoundingBox: {\r\n\t\t\t\tlet vertexCount = input.readInt(true);\r\n\t\t\t\tlet vertices = this.readVertices(input, vertexCount);\r\n\t\t\t\tlet color = nonessential ? input.readInt32() : 0;\r\n\r\n\t\t\t\tlet box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n\t\t\t\tif (box == null) return null;\r\n\t\t\t\tbox.worldVerticesLength = vertexCount << 1;\r\n\t\t\t\tbox.vertices = vertices.vertices;\r\n\t\t\t\tbox.bones = vertices.bones;\r\n\t\t\t\tif (nonessential) Color.rgba8888ToColor(box.color, color);\r\n\t\t\t\treturn box;\r\n\t\t\t}\r\n\t\t\tcase AttachmentType.Mesh: {\r\n\t\t\t\tlet path = input.readStringRef();\r\n\t\t\t\tlet color = input.readInt32();\r\n\t\t\t\tlet vertexCount = input.readInt(true);\r\n\t\t\t\tlet uvs = this.readFloatArray(input, vertexCount << 1, 1);\r\n\t\t\t\tlet triangles = this.readShortArray(input);\r\n\t\t\t\tlet vertices = this.readVertices(input, vertexCount);\r\n\t\t\t\tlet hullLength = input.readInt(true);\r\n\t\t\t\tlet edges = null;\r\n\t\t\t\tlet width = 0, height = 0;\r\n\t\t\t\tif (nonessential) {\r\n\t\t\t\t\tedges = this.readShortArray(input);\r\n\t\t\t\t\twidth = input.readFloat();\r\n\t\t\t\t\theight = input.readFloat();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (path == null) path = name;\r\n\t\t\t\tlet mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n\t\t\t\tif (mesh == null) return null;\r\n\t\t\t\tmesh.path = path;\r\n\t\t\t\tColor.rgba8888ToColor(mesh.color, color);\r\n\t\t\t\tmesh.bones = vertices.bones;\r\n\t\t\t\tmesh.vertices = vertices.vertices;\r\n\t\t\t\tmesh.worldVerticesLength = vertexCount << 1;\r\n\t\t\t\tmesh.triangles = triangles;\r\n\t\t\t\tmesh.regionUVs = new Float32Array(uvs);\r\n\t\t\t\t// mesh.updateUVs();\r\n\t\t\t\tmesh.hullLength = hullLength << 1;\r\n\t\t\t\tif (nonessential) {\r\n\t\t\t\t\tmesh.edges = edges;\r\n\t\t\t\t\tmesh.width = width * scale;\r\n\t\t\t\t\tmesh.height = height * scale;\r\n\t\t\t\t}\r\n\t\t\t\treturn mesh;\r\n\t\t\t}\r\n\t\t\tcase AttachmentType.LinkedMesh: {\r\n\t\t\t\tlet path = input.readStringRef();\r\n\t\t\t\tlet color = input.readInt32();\r\n\t\t\t\tlet skinName = input.readStringRef();\r\n\t\t\t\tlet parent = input.readStringRef();\r\n\t\t\t\tlet inheritDeform = input.readBoolean();\r\n\t\t\t\tlet width = 0, height = 0;\r\n\t\t\t\tif (nonessential) {\r\n\t\t\t\t\twidth = input.readFloat();\r\n\t\t\t\t\theight = input.readFloat();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (path == null) path = name;\r\n\t\t\t\tlet mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n\t\t\t\tif (mesh == null) return null;\r\n\t\t\t\tmesh.path = path;\r\n\t\t\t\tColor.rgba8888ToColor(mesh.color, color);\r\n\t\t\t\tif (nonessential) {\r\n\t\t\t\t\tmesh.width = width * scale;\r\n\t\t\t\t\tmesh.height = height * scale;\r\n\t\t\t\t}\r\n\t\t\t\tthis.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent, inheritDeform));\r\n\t\t\t\treturn mesh;\r\n\t\t\t}\r\n\t\t\tcase AttachmentType.Path: {\r\n\t\t\t\tlet closed = input.readBoolean();\r\n\t\t\t\tlet constantSpeed = input.readBoolean();\r\n\t\t\t\tlet vertexCount = input.readInt(true);\r\n\t\t\t\tlet vertices = this.readVertices(input, vertexCount);\r\n\t\t\t\tlet lengths = Utils.newArray(vertexCount / 3, 0);\r\n\t\t\t\tfor (let i = 0, n = lengths.length; i < n; i++)\r\n\t\t\t\t\tlengths[i] = input.readFloat() * scale;\r\n\t\t\t\tlet color = nonessential ? input.readInt32() : 0;\r\n\r\n\t\t\t\tlet path = this.attachmentLoader.newPathAttachment(skin, name);\r\n\t\t\t\tif (path == null) return null;\r\n\t\t\t\tpath.closed = closed;\r\n\t\t\t\tpath.constantSpeed = constantSpeed;\r\n\t\t\t\tpath.worldVerticesLength = vertexCount << 1;\r\n\t\t\t\tpath.vertices = vertices.vertices;\r\n\t\t\t\tpath.bones = vertices.bones;\r\n\t\t\t\tpath.lengths = lengths;\r\n\t\t\t\tif (nonessential) Color.rgba8888ToColor(path.color, color);\r\n\t\t\t\treturn path;\r\n\t\t\t}\r\n\t\t\tcase AttachmentType.Point: {\r\n\t\t\t\tlet rotation = input.readFloat();\r\n\t\t\t\tlet x = input.readFloat();\r\n\t\t\t\tlet y = input.readFloat();\r\n\t\t\t\tlet color = nonessential ? input.readInt32() : 0;\r\n\r\n\t\t\t\tlet point = this.attachmentLoader.newPointAttachment(skin, name);\r\n\t\t\t\tif (point == null) return null;\r\n\t\t\t\tpoint.x = x * scale;\r\n\t\t\t\tpoint.y = y * scale;\r\n\t\t\t\tpoint.rotation = rotation;\r\n\t\t\t\tif (nonessential) Color.rgba8888ToColor(point.color, color);\r\n\t\t\t\treturn point;\r\n\t\t\t}\r\n\t\t\tcase AttachmentType.Clipping: {\r\n\t\t\t\tlet endSlotIndex = input.readInt(true);\r\n\t\t\t\tlet vertexCount = input.readInt(true);\r\n\t\t\t\tlet vertices = this.readVertices(input, vertexCount);\r\n\t\t\t\tlet color = nonessential ? input.readInt32() : 0;\r\n\r\n\t\t\t\tlet clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n\t\t\t\tif (clip == null) return null;\r\n\t\t\t\tclip.endSlot = skeletonData.slots[endSlotIndex];\r\n\t\t\t\tclip.worldVerticesLength = vertexCount << 1;\r\n\t\t\t\tclip.vertices = vertices.vertices;\r\n\t\t\t\tclip.bones = vertices.bones;\r\n\t\t\t\tif (nonessential) Color.rgba8888ToColor(clip.color, color);\r\n\t\t\t\treturn clip;\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tprivate readVertices (input: BinaryInput, vertexCount: number): Vertices {\r\n\t\t\tlet verticesLength = vertexCount << 1;\r\n\t\t\tlet vertices = new Vertices();\r\n\t\t\tlet scale = this.scale;\r\n\t\t\tif (!input.readBoolean()) {\r\n\t\t\t\tvertices.vertices = this.readFloatArray(input, verticesLength, scale);\r\n\t\t\t\treturn vertices;\r\n\t\t\t}\r\n\t\t\tlet weights = new Array();\r\n\t\t\tlet bonesArray = new Array();\r\n\t\t\tfor (let i = 0; i < vertexCount; i++) {\r\n\t\t\t\tlet boneCount = input.readInt(true);\r\n\t\t\t\tbonesArray.push(boneCount);\r\n\t\t\t\tfor (let ii = 0; ii < boneCount; ii++) {\r\n\t\t\t\t\tbonesArray.push(input.readInt(true));\r\n\t\t\t\t\tweights.push(input.readFloat() * scale);\r\n\t\t\t\t\tweights.push(input.readFloat() * scale);\r\n\t\t\t\t\tweights.push(input.readFloat());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvertices.vertices = Utils.toFloatArray(weights);\r\n\t\t\tvertices.bones = bonesArray;\r\n\t\t\treturn vertices;\r\n\t\t}\r\n\r\n\t\tprivate readFloatArray (input: BinaryInput, n: number, scale: number): number[] {\r\n\t\t\tlet array = new Array(n);\r\n\t\t\tif (scale == 1) {\r\n\t\t\t\tfor (let i = 0; i < n; i++)\r\n\t\t\t\t\tarray[i] = input.readFloat();\r\n\t\t\t} else {\r\n\t\t\t\tfor (let i = 0; i < n; i++)\r\n\t\t\t\t\tarray[i] = input.readFloat() * scale;\r\n\t\t\t}\r\n\t\t\treturn array;\r\n\t\t}\r\n\r\n\t\tprivate readShortArray (input: BinaryInput): number[] {\r\n\t\t\tlet n = input.readInt(true);\r\n\t\t\tlet array = new Array(n);\r\n\t\t\tfor (let i = 0; i < n; i++)\r\n\t\t\t\tarray[i] = input.readShort();\r\n\t\t\treturn array;\r\n\t\t}\r\n\r\n\t\tprivate readAnimation (input: BinaryInput, name: string, skeletonData: SkeletonData): Animation {\r\n\t\t\tlet timelines = new Array();\r\n\t\t\tlet scale = this.scale;\r\n\t\t\tlet duration = 0;\r\n\t\t\tlet tempColor1 = new Color();\r\n\t\t\tlet tempColor2 = new Color();\r\n\r\n\t\t\t// Slot timelines.\r\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\r\n\t\t\t\tlet slotIndex = input.readInt(true);\r\n\t\t\t\tfor (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n\t\t\t\t\tlet timelineType = input.readByte();\r\n\t\t\t\t\tlet frameCount = input.readInt(true);\r\n\t\t\t\t\tswitch (timelineType) {\r\n\t\t\t\t\tcase SkeletonBinary.SLOT_ATTACHMENT: {\r\n\t\t\t\t\t\tlet timeline = new AttachmentTimeline(frameCount);\r\n\t\t\t\t\t\ttimeline.slotIndex = slotIndex;\r\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++)\r\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readStringRef());\r\n\t\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcase SkeletonBinary.SLOT_COLOR: {\r\n\t\t\t\t\t\tlet timeline = new ColorTimeline(frameCount);\r\n\t\t\t\t\t\ttimeline.slotIndex = slotIndex;\r\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n\t\t\t\t\t\t\tlet time = input.readFloat();\r\n\t\t\t\t\t\t\tColor.rgba8888ToColor(tempColor1, input.readInt32());\r\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a);\r\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * ColorTimeline.ENTRIES]);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcase SkeletonBinary.SLOT_TWO_COLOR: {\r\n\t\t\t\t\t\tlet timeline = new TwoColorTimeline(frameCount);\r\n\t\t\t\t\t\ttimeline.slotIndex = slotIndex;\r\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n\t\t\t\t\t\t\tlet time = input.readFloat();\r\n\t\t\t\t\t\t\tColor.rgba8888ToColor(tempColor1, input.readInt32());\r\n\t\t\t\t\t\t\tColor.rgb888ToColor(tempColor2, input.readInt32());\r\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a, tempColor2.r,\r\n\t\t\t\t\t\t\t\ttempColor2.g, tempColor2.b);\r\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * TwoColorTimeline.ENTRIES]);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Bone timelines.\r\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\r\n\t\t\t\tlet boneIndex = input.readInt(true);\r\n\t\t\t\tfor (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n\t\t\t\t\tlet timelineType = input.readByte();\r\n\t\t\t\t\tlet frameCount = input.readInt(true);\r\n\t\t\t\t\tswitch (timelineType) {\r\n\t\t\t\t\tcase SkeletonBinary.BONE_ROTATE: {\r\n\t\t\t\t\t\tlet timeline = new RotateTimeline(frameCount);\r\n\t\t\t\t\t\ttimeline.boneIndex = boneIndex;\r\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readFloat());\r\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * RotateTimeline.ENTRIES]);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcase SkeletonBinary.BONE_TRANSLATE:\r\n\t\t\t\t\tcase SkeletonBinary.BONE_SCALE:\r\n\t\t\t\t\tcase SkeletonBinary.BONE_SHEAR: {\r\n\t\t\t\t\t\tlet timeline;\r\n\t\t\t\t\t\tlet timelineScale = 1;\r\n\t\t\t\t\t\tif (timelineType == SkeletonBinary.BONE_SCALE)\r\n\t\t\t\t\t\t\ttimeline = new ScaleTimeline(frameCount);\r\n\t\t\t\t\t\telse if (timelineType == SkeletonBinary.BONE_SHEAR)\r\n\t\t\t\t\t\t\ttimeline = new ShearTimeline(frameCount);\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\ttimeline = new TranslateTimeline(frameCount);\r\n\t\t\t\t\t\t\ttimelineScale = scale;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttimeline.boneIndex = boneIndex;\r\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale,\r\n\t\t\t\t\t\t\t\tinput.readFloat() * timelineScale);\r\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * TranslateTimeline.ENTRIES]);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// IK constraint timelines.\r\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\r\n\t\t\t\tlet index = input.readInt(true);\r\n\t\t\t\tlet frameCount = input.readInt(true);\r\n\t\t\t\tlet timeline = new IkConstraintTimeline(frameCount);\r\n\t\t\t\ttimeline.ikConstraintIndex = index;\r\n\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(),\r\n\t\t\t\t\t\tinput.readBoolean());\r\n\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\r\n\t\t\t\t}\r\n\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * IkConstraintTimeline.ENTRIES]);\r\n\t\t\t}\r\n\r\n\t\t\t// Transform constraint timelines.\r\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\r\n\t\t\t\tlet index = input.readInt(true);\r\n\t\t\t\tlet frameCount = input.readInt(true);\r\n\t\t\t\tlet timeline = new TransformConstraintTimeline(frameCount);\r\n\t\t\t\ttimeline.transformConstraintIndex = index;\r\n\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat(),\r\n\t\t\t\t\t\tinput.readFloat());\r\n\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\r\n\t\t\t\t}\r\n\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * TransformConstraintTimeline.ENTRIES]);\r\n\t\t\t}\r\n\r\n\t\t\t// Path constraint timelines.\r\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\r\n\t\t\t\tlet index = input.readInt(true);\r\n\t\t\t\tlet data = skeletonData.pathConstraints[index];\r\n\t\t\t\tfor (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n\t\t\t\t\tlet timelineType = input.readByte();\r\n\t\t\t\t\tlet frameCount = input.readInt(true);\r\n\t\t\t\t\tswitch (timelineType) {\r\n\t\t\t\t\tcase SkeletonBinary.PATH_POSITION:\r\n\t\t\t\t\tcase SkeletonBinary.PATH_SPACING: {\r\n\t\t\t\t\t\tlet timeline;\r\n\t\t\t\t\t\tlet timelineScale = 1;\r\n\t\t\t\t\t\tif (timelineType == SkeletonBinary.PATH_SPACING) {\r\n\t\t\t\t\t\t\ttimeline = new PathConstraintSpacingTimeline(frameCount);\r\n\t\t\t\t\t\t\tif (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) timelineScale = scale;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttimeline = new PathConstraintPositionTimeline(frameCount);\r\n\t\t\t\t\t\t\tif (data.positionMode == PositionMode.Fixed) timelineScale = scale;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttimeline.pathConstraintIndex = index;\r\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale);\r\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * PathConstraintPositionTimeline.ENTRIES]);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcase SkeletonBinary.PATH_MIX: {\r\n\t\t\t\t\t\tlet timeline = new PathConstraintMixTimeline(frameCount);\r\n\t\t\t\t\t\ttimeline.pathConstraintIndex = index;\r\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat());\r\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * PathConstraintMixTimeline.ENTRIES]);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Deform timelines.\r\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\r\n\t\t\t\tlet skin = skeletonData.skins[input.readInt(true)];\r\n\t\t\t\tfor (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n\t\t\t\t\tlet slotIndex = input.readInt(true);\r\n\t\t\t\t\tfor (let iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\r\n\t\t\t\t\t\tlet attachment = skin.getAttachment(slotIndex, input.readStringRef()) as VertexAttachment;\r\n\t\t\t\t\t\tlet weighted = attachment.bones != null;\r\n\t\t\t\t\t\tlet vertices = attachment.vertices;\r\n\t\t\t\t\t\tlet deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n\r\n\t\t\t\t\t\tlet frameCount = input.readInt(true);\r\n\t\t\t\t\t\tlet timeline = new DeformTimeline(frameCount);\r\n\t\t\t\t\t\ttimeline.slotIndex = slotIndex;\r\n\t\t\t\t\t\ttimeline.attachment = attachment;\r\n\r\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n\t\t\t\t\t\t\tlet time = input.readFloat();\r\n\t\t\t\t\t\t\tlet deform;\r\n\t\t\t\t\t\t\tlet end = input.readInt(true);\r\n\t\t\t\t\t\t\tif (end == 0)\r\n\t\t\t\t\t\t\t\tdeform = weighted ? Utils.newFloatArray(deformLength) : vertices;\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tdeform = Utils.newFloatArray(deformLength);\r\n\t\t\t\t\t\t\t\tlet start = input.readInt(true);\r\n\t\t\t\t\t\t\t\tend += start;\r\n\t\t\t\t\t\t\t\tif (scale == 1) {\r\n\t\t\t\t\t\t\t\t\tfor (let v = start; v < end; v++)\r\n\t\t\t\t\t\t\t\t\t\tdeform[v] = input.readFloat();\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tfor (let v = start; v < end; v++)\r\n\t\t\t\t\t\t\t\t\t\tdeform[v] = input.readFloat() * scale;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (!weighted) {\r\n\t\t\t\t\t\t\t\t\tfor (let v = 0, vn = deform.length; v < vn; v++)\r\n\t\t\t\t\t\t\t\t\t\tdeform[v] += vertices[v];\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, time, deform);\r\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Draw order timeline.\r\n\t\t\tlet drawOrderCount = input.readInt(true);\r\n\t\t\tif (drawOrderCount > 0) {\r\n\t\t\t\tlet timeline = new DrawOrderTimeline(drawOrderCount);\r\n\t\t\t\tlet slotCount = skeletonData.slots.length;\r\n\t\t\t\tfor (let i = 0; i < drawOrderCount; i++) {\r\n\t\t\t\t\tlet time = input.readFloat();\r\n\t\t\t\t\tlet offsetCount = input.readInt(true);\r\n\t\t\t\t\tlet drawOrder = Utils.newArray(slotCount, 0);\r\n\t\t\t\t\tfor (let ii = slotCount - 1; ii >= 0; ii--)\r\n\t\t\t\t\t\tdrawOrder[ii] = -1;\r\n\t\t\t\t\tlet unchanged = Utils.newArray(slotCount - offsetCount, 0);\r\n\t\t\t\t\tlet originalIndex = 0, unchangedIndex = 0;\r\n\t\t\t\t\tfor (let ii = 0; ii < offsetCount; ii++) {\r\n\t\t\t\t\t\tlet slotIndex = input.readInt(true);\r\n\t\t\t\t\t\t// Collect unchanged items.\r\n\t\t\t\t\t\twhile (originalIndex != slotIndex)\r\n\t\t\t\t\t\t\tunchanged[unchangedIndex++] = originalIndex++;\r\n\t\t\t\t\t\t// Set changed items.\r\n\t\t\t\t\t\tdrawOrder[originalIndex + input.readInt(true)] = originalIndex++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Collect remaining unchanged items.\r\n\t\t\t\t\twhile (originalIndex < slotCount)\r\n\t\t\t\t\t\tunchanged[unchangedIndex++] = originalIndex++;\r\n\t\t\t\t\t// Fill in unchanged items.\r\n\t\t\t\t\tfor (let ii = slotCount - 1; ii >= 0; ii--)\r\n\t\t\t\t\t\tif (drawOrder[ii] == -1) drawOrder[ii] = unchanged[--unchangedIndex];\r\n\t\t\t\t\ttimeline.setFrame(i, time, drawOrder);\r\n\t\t\t\t}\r\n\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\tduration = Math.max(duration, timeline.frames[drawOrderCount - 1]);\r\n\t\t\t}\r\n\r\n\t\t\t// Event timeline.\r\n\t\t\tlet eventCount = input.readInt(true);\r\n\t\t\tif (eventCount > 0) {\r\n\t\t\t\tlet timeline = new EventTimeline(eventCount);\r\n\t\t\t\tfor (let i = 0; i < eventCount; i++) {\r\n\t\t\t\t\tlet time = input.readFloat();\r\n\t\t\t\t\tlet eventData = skeletonData.events[input.readInt(true)];\r\n\t\t\t\t\tlet event = new Event(time, eventData);\r\n\t\t\t\t\tevent.intValue = input.readInt(false);\r\n\t\t\t\t\tevent.floatValue = input.readFloat();\r\n\t\t\t\t\tevent.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\r\n\t\t\t\t\tif (event.data.audioPath != null) {\r\n\t\t\t\t\t\tevent.volume = input.readFloat();\r\n\t\t\t\t\t\tevent.balance = input.readFloat();\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttimeline.setFrame(i, event);\r\n\t\t\t\t}\r\n\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\tduration = Math.max(duration, timeline.frames[eventCount - 1]);\r\n\t\t\t}\r\n\r\n\t\t\treturn new Animation(name, timelines, duration);\r\n\t\t}\r\n\r\n\t\tprivate readCurve (input: BinaryInput, frameIndex: number, timeline: CurveTimeline) {\r\n\t\t\tswitch (input.readByte()) {\r\n\t\t\tcase SkeletonBinary.CURVE_STEPPED:\r\n\t\t\t\ttimeline.setStepped(frameIndex);\r\n\t\t\t\tbreak;\r\n\t\t\tcase SkeletonBinary.CURVE_BEZIER:\r\n\t\t\t\tthis.setCurve(timeline, frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tsetCurve (timeline: CurveTimeline, frameIndex: number, cx1: number, cy1: number, cx2: number, cy2: number) {\r\n\t\t\ttimeline.setCurve(frameIndex, cx1, cy1, cx2, cy2);\r\n\t\t}\r\n\t}\r\n\r\n\tclass BinaryInput {\r\n\t\tconstructor(data: Uint8Array, public strings = new Array(), private index: number = 0, private buffer = new DataView(data.buffer)) { \r\n\r\n\t\t}\r\n\r\n\t\treadByte(): number {\r\n\t\t\treturn this.buffer.getInt8(this.index++);\r\n\t\t}\r\n\r\n\t\treadShort(): number {\r\n\t\t\tlet value = this.buffer.getInt16(this.index);\r\n\t\t\tthis.index += 2;\r\n\t\t\treturn value;\r\n\t\t}\r\n\r\n\t\treadInt32(): number {\r\n\t\t\t let value = this.buffer.getInt32(this.index)\r\n\t\t\t this.index += 4;\r\n\t\t\t return value;\r\n\t\t}\r\n\r\n\t\treadInt(optimizePositive: boolean) {\r\n\t\t\tlet b = this.readByte();\r\n\t\t\tlet result = b & 0x7F;\r\n\t\t\tif ((b & 0x80) != 0) {\r\n\t\t\t\tb = this.readByte();\r\n\t\t\t\tresult |= (b & 0x7F) << 7;\r\n\t\t\t\tif ((b & 0x80) != 0) {\r\n\t\t\t\t\tb = this.readByte();\r\n\t\t\t\t\tresult |= (b & 0x7F) << 14;\r\n\t\t\t\t\tif ((b & 0x80) != 0) {\r\n\t\t\t\t\t\tb = this.readByte();\r\n\t\t\t\t\t\tresult |= (b & 0x7F) << 21;\r\n\t\t\t\t\t\tif ((b & 0x80) != 0) {\r\n\t\t\t\t\t\t\tb = this.readByte();\r\n\t\t\t\t\t\t\tresult |= (b & 0x7F) << 28;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn optimizePositive ? result : ((result >>> 1) ^ -(result & 1));\r\n\t\t}\r\n\r\n\t\treadStringRef (): string {\r\n\t\t\tlet index = this.readInt(true);\r\n\t\t\treturn index == 0 ? null : this.strings[index - 1];\r\n\t\t}\r\n\r\n\t\treadString (): string {\r\n\t\t\tlet byteCount = this.readInt(true);\r\n\t\t\tswitch (byteCount) {\r\n\t\t\tcase 0:\r\n\t\t\t\treturn null;\r\n\t\t\tcase 1:\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t\tbyteCount--;\r\n\t\t\tlet chars = \"\";\r\n\t\t\tlet charCount = 0;\r\n\t\t\tfor (let i = 0; i < byteCount;) {\r\n\t\t\t\tlet b = this.readByte();\r\n\t\t\t\tswitch (b >> 4) {\r\n\t\t\t\tcase 12:\r\n\t\t\t\tcase 13:\r\n\t\t\t\t\tchars += String.fromCharCode(((b & 0x1F) << 6 | this.readByte() & 0x3F));\r\n\t\t\t\t\ti += 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 14:\r\n\t\t\t\t\tchars += String.fromCharCode(((b & 0x0F) << 12 | (this.readByte() & 0x3F) << 6 | this.readByte() & 0x3F));\r\n\t\t\t\t\ti += 3;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tchars += String.fromCharCode(b);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn chars;\r\n\t\t}\r\n\r\n\t\treadFloat (): number {\r\n\t\t\tlet value = this.buffer.getFloat32(this.index);\r\n\t\t\tthis.index += 4;\r\n\t\t\treturn value;\r\n\t\t}\r\n\r\n\t\treadBoolean (): boolean {\r\n\t\t\treturn this.readByte() != 0;\r\n\t\t}\r\n\t}\r\n\r\n\tclass LinkedMesh {\r\n\t\tparent: string; skin: string;\r\n\t\tslotIndex: number;\r\n\t\tmesh: MeshAttachment;\r\n\t\tinheritDeform: boolean;\r\n\r\n\t\tconstructor (mesh: MeshAttachment, skin: string, slotIndex: number, parent: string, inheritDeform: boolean) {\r\n\t\t\tthis.mesh = mesh;\r\n\t\t\tthis.skin = skin;\r\n\t\t\tthis.slotIndex = slotIndex;\r\n\t\t\tthis.parent = parent;\r\n\t\t\tthis.inheritDeform = inheritDeform;\r\n\t\t}\r\n\t}\r\n\r\n\tclass Vertices {\r\n\t\tconstructor(public bones: Array = null, public vertices: Array | Float32Array = null) { }\r\n\t}\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class SkeletonBounds {\r\n minX = 0; minY = 0; maxX = 0; maxY = 0;\r\n boundingBoxes = new Array();\r\n polygons = new Array>();\r\n private polygonPool = new Pool>(() => {\r\n return Utils.newFloatArray(16);\r\n });\r\n\r\n update (skeleton: Skeleton, updateAabb: boolean) {\r\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\r\n let boundingBoxes = this.boundingBoxes;\r\n let polygons = this.polygons;\r\n let polygonPool = this.polygonPool;\r\n let slots = skeleton.slots;\r\n let slotCount = slots.length;\r\n\r\n boundingBoxes.length = 0;\r\n polygonPool.freeAll(polygons);\r\n polygons.length = 0;\r\n\r\n for (let i = 0; i < slotCount; i++) {\r\n let slot = slots[i];\r\n if (!slot.bone.active) continue;\r\n let attachment = slot.getAttachment();\r\n if (attachment instanceof BoundingBoxAttachment) {\r\n let boundingBox = attachment as BoundingBoxAttachment;\r\n boundingBoxes.push(boundingBox);\r\n\r\n let polygon = polygonPool.obtain();\r\n if (polygon.length != boundingBox.worldVerticesLength) {\r\n polygon = Utils.newFloatArray(boundingBox.worldVerticesLength);\r\n }\r\n polygons.push(polygon);\r\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\r\n }\r\n }\r\n\r\n if (updateAabb) {\r\n this.aabbCompute();\r\n } else {\r\n this.minX = Number.POSITIVE_INFINITY;\r\n this.minY = Number.POSITIVE_INFINITY;\r\n this.maxX = Number.NEGATIVE_INFINITY;\r\n this.maxY = Number.NEGATIVE_INFINITY;\r\n }\r\n }\r\n\r\n aabbCompute () {\r\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n let polygons = this.polygons;\r\n for (let i = 0, n = polygons.length; i < n; i++) {\r\n let polygon = polygons[i];\r\n let vertices = polygon;\r\n for (let ii = 0, nn = polygon.length; ii < nn; ii += 2) {\r\n let x = vertices[ii];\r\n let y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n this.minX = minX;\r\n this.minY = minY;\r\n this.maxX = maxX;\r\n this.maxY = maxY;\r\n }\r\n\r\n /** Returns true if the axis aligned bounding box contains the point. */\r\n aabbContainsPoint (x: number, y: number) {\r\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\r\n }\r\n\r\n /** Returns true if the axis aligned bounding box intersects the line segment. */\r\n aabbIntersectsSegment (x1: number, y1: number, x2: number, y2: number) {\r\n let minX = this.minX;\r\n let minY = this.minY;\r\n let maxX = this.maxX;\r\n let maxY = this.maxY;\r\n if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\r\n return false;\r\n let m = (y2 - y1) / (x2 - x1);\r\n let y = m * (minX - x1) + y1;\r\n if (y > minY && y < maxY) return true;\r\n y = m * (maxX - x1) + y1;\r\n if (y > minY && y < maxY) return true;\r\n let x = (minY - y1) / m + x1;\r\n if (x > minX && x < maxX) return true;\r\n x = (maxY - y1) / m + x1;\r\n if (x > minX && x < maxX) return true;\r\n return false;\r\n }\r\n\r\n /** Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds. */\r\n aabbIntersectsSkeleton (bounds: SkeletonBounds) {\r\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\r\n }\r\n\r\n /** Returns the first bounding box attachment that contains the point, or null. When doing many checks, it is usually more\r\n * efficient to only call this method if {@link #aabbContainsPoint(float, float)} returns true. */\r\n containsPoint (x: number, y: number): BoundingBoxAttachment {\r\n let polygons = this.polygons;\r\n for (let i = 0, n = polygons.length; i < n; i++)\r\n if (this.containsPointPolygon(polygons[i], x, y)) return this.boundingBoxes[i];\r\n return null;\r\n }\r\n\r\n /** Returns true if the polygon contains the point. */\r\n containsPointPolygon (polygon: ArrayLike, x: number, y: number) {\r\n let vertices = polygon;\r\n let nn = polygon.length;\r\n\r\n let prevIndex = nn - 2;\r\n let inside = false;\r\n for (let ii = 0; ii < nn; ii += 2) {\r\n let vertexY = vertices[ii + 1];\r\n let prevY = vertices[prevIndex + 1];\r\n if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\r\n let vertexX = vertices[ii];\r\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x) inside = !inside;\r\n }\r\n prevIndex = ii;\r\n }\r\n return inside;\r\n }\r\n\r\n /** Returns the first bounding box attachment that contains any part of the line segment, or null. When doing many checks, it\r\n * is usually more efficient to only call this method if {@link #aabbIntersectsSegment(float, float, float, float)} returns\r\n * true. */\r\n intersectsSegment (x1: number, y1: number, x2: number, y2: number) {\r\n let polygons = this.polygons;\r\n for (let i = 0, n = polygons.length; i < n; i++)\r\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2)) return this.boundingBoxes[i];\r\n return null;\r\n }\r\n\r\n /** Returns true if the polygon contains any part of the line segment. */\r\n intersectsSegmentPolygon (polygon: ArrayLike, x1: number, y1: number, x2: number, y2: number) {\r\n let vertices = polygon;\r\n let nn = polygon.length;\r\n\r\n let width12 = x1 - x2, height12 = y1 - y2;\r\n let det1 = x1 * y2 - y1 * x2;\r\n let x3 = vertices[nn - 2], y3 = vertices[nn - 1];\r\n for (let ii = 0; ii < nn; ii += 2) {\r\n let x4 = vertices[ii], y4 = vertices[ii + 1];\r\n let det2 = x3 * y4 - y3 * x4;\r\n let width34 = x3 - x4, height34 = y3 - y4;\r\n let det3 = width12 * height34 - height12 * width34;\r\n let x = (det1 * width34 - width12 * det2) / det3;\r\n if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\r\n let y = (det1 * height34 - height12 * det2) / det3;\r\n if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1))) return true;\r\n }\r\n x3 = x4;\r\n y3 = y4;\r\n }\r\n return false;\r\n }\r\n\r\n /** Returns the polygon for the specified bounding box, or null. */\r\n getPolygon (boundingBox: BoundingBoxAttachment) {\r\n if (boundingBox == null) throw new Error(\"boundingBox cannot be null.\");\r\n let index = this.boundingBoxes.indexOf(boundingBox);\r\n return index == -1 ? null : this.polygons[index];\r\n }\r\n\r\n getWidth () {\r\n return this.maxX - this.minX;\r\n }\r\n\r\n getHeight () {\r\n return this.maxY - this.minY;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n\texport class SkeletonClipping {\r\n\t\tprivate triangulator = new Triangulator();\r\n\t\tprivate clippingPolygon = new Array();\r\n\t\tprivate clipOutput = new Array();\r\n\t\tclippedVertices = new Array();\r\n\t\tclippedTriangles = new Array();\r\n\t\tprivate scratch = new Array();\r\n\r\n\t\tprivate clipAttachment: ClippingAttachment;\r\n\t\tprivate clippingPolygons: Array>;\r\n\r\n\t\tclipStart (slot: Slot, clip: ClippingAttachment): number {\r\n\t\t\tif (this.clipAttachment != null) return 0;\r\n\t\t\tthis.clipAttachment = clip;\r\n\r\n\t\t\tlet n = clip.worldVerticesLength;\r\n\t\t\tlet vertices = Utils.setArraySize(this.clippingPolygon, n);\r\n\t\t\tclip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\r\n\t\t\tlet clippingPolygon = this.clippingPolygon;\r\n\t\t\tSkeletonClipping.makeClockwise(clippingPolygon);\r\n\t\t\tlet clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\r\n\t\t\tfor (let i = 0, n = clippingPolygons.length; i < n; i++) {\r\n\t\t\t\tlet polygon = clippingPolygons[i];\r\n\t\t\t\tSkeletonClipping.makeClockwise(polygon);\r\n\t\t\t\tpolygon.push(polygon[0]);\r\n\t\t\t\tpolygon.push(polygon[1]);\r\n\t\t\t}\r\n\r\n\t\t\treturn clippingPolygons.length;\r\n\t\t}\r\n\r\n\t\tclipEndWithSlot (slot: Slot) {\r\n\t\t\tif (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data) this.clipEnd();\r\n\t\t}\r\n\r\n\t\tclipEnd () {\r\n\t\t\tif (this.clipAttachment == null) return;\r\n\t\t\tthis.clipAttachment = null;\r\n\t\t\tthis.clippingPolygons = null;\r\n\t\t\tthis.clippedVertices.length = 0;\r\n\t\t\tthis.clippedTriangles.length = 0;\r\n\t\t\tthis.clippingPolygon.length = 0;\r\n\t\t}\r\n\r\n\t\tisClipping (): boolean {\r\n\t\t\treturn this.clipAttachment != null;\r\n\t\t}\r\n\r\n\t\tclipTriangles (vertices: ArrayLike, verticesLength: number, triangles: ArrayLike, trianglesLength: number, uvs: ArrayLike,\r\n\t\t\tlight: Color, dark: Color, twoColor: boolean) {\r\n\r\n\t\t\tlet clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\r\n\t\t\tlet clippedTriangles = this.clippedTriangles;\r\n\t\t\tlet polygons = this.clippingPolygons;\r\n\t\t\tlet polygonsCount = this.clippingPolygons.length;\r\n\t\t\tlet vertexSize = twoColor ? 12 : 8;\r\n\r\n\t\t\tlet index = 0;\r\n\t\t\tclippedVertices.length = 0;\r\n\t\t\tclippedTriangles.length = 0;\r\n\t\t\touter:\r\n\t\t\tfor (let i = 0; i < trianglesLength; i += 3) {\r\n\t\t\t\tlet vertexOffset = triangles[i] << 1;\r\n\t\t\t\tlet x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\r\n\t\t\t\tlet u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\r\n\r\n\t\t\t\tvertexOffset = triangles[i + 1] << 1;\r\n\t\t\t\tlet x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\r\n\t\t\t\tlet u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\r\n\r\n\t\t\t\tvertexOffset = triangles[i + 2] << 1;\r\n\t\t\t\tlet x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\r\n\t\t\t\tlet u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\r\n\r\n\t\t\t\tfor (let p = 0; p < polygonsCount; p++) {\r\n\t\t\t\t\tlet s = clippedVertices.length;\r\n\t\t\t\t\tif (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\r\n\t\t\t\t\t\tlet clipOutputLength = clipOutput.length;\r\n\t\t\t\t\t\tif (clipOutputLength == 0) continue;\r\n\t\t\t\t\t\tlet d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\r\n\t\t\t\t\t\tlet d = 1 / (d0 * d2 + d1 * (y1 - y3));\r\n\r\n\t\t\t\t\t\tlet clipOutputCount = clipOutputLength >> 1;\r\n\t\t\t\t\t\tlet clipOutputItems = this.clipOutput;\r\n\t\t\t\t\t\tlet clippedVerticesItems = Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\r\n\t\t\t\t\t\tfor (let ii = 0; ii < clipOutputLength; ii += 2) {\r\n\t\t\t\t\t\t\tlet x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\r\n\t\t\t\t\t\t\tclippedVerticesItems[s] = x;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 1] = y;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 2] = light.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 3] = light.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 4] = light.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 5] = light.a;\r\n\t\t\t\t\t\t\tlet c0 = x - x3, c1 = y - y3;\r\n\t\t\t\t\t\t\tlet a = (d0 * c0 + d1 * c1) * d;\r\n\t\t\t\t\t\t\tlet b = (d4 * c0 + d2 * c1) * d;\r\n\t\t\t\t\t\t\tlet c = 1 - a - b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\r\n\t\t\t\t\t\t\tif (twoColor) {\r\n\t\t\t\t\t\t\t\tclippedVerticesItems[s + 8] = dark.r;\r\n\t\t\t\t\t\t\t\tclippedVerticesItems[s + 9] = dark.g;\r\n\t\t\t\t\t\t\t\tclippedVerticesItems[s + 10] = dark.b;\r\n\t\t\t\t\t\t\t\tclippedVerticesItems[s + 11] = dark.a;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ts += vertexSize;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ts = clippedTriangles.length;\r\n\t\t\t\t\t\tlet clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\r\n\t\t\t\t\t\tclipOutputCount--;\r\n\t\t\t\t\t\tfor (let ii = 1; ii < clipOutputCount; ii++) {\r\n\t\t\t\t\t\t\tclippedTrianglesItems[s] = index;\r\n\t\t\t\t\t\t\tclippedTrianglesItems[s + 1] = (index + ii);\r\n\t\t\t\t\t\t\tclippedTrianglesItems[s + 2] = (index + ii + 1);\r\n\t\t\t\t\t\t\ts += 3;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tindex += clipOutputCount + 1;\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tlet clippedVerticesItems = Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\r\n\t\t\t\t\t\tclippedVerticesItems[s] = x1;\r\n\t\t\t\t\t\tclippedVerticesItems[s + 1] = y1;\r\n\t\t\t\t\t\tclippedVerticesItems[s + 2] = light.r;\r\n\t\t\t\t\t\tclippedVerticesItems[s + 3] = light.g;\r\n\t\t\t\t\t\tclippedVerticesItems[s + 4] = light.b;\r\n\t\t\t\t\t\tclippedVerticesItems[s + 5] = light.a;\r\n\t\t\t\t\t\tif (!twoColor) {\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 6] = u1;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 7] = v1;\r\n\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 8] = x2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 9] = y2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 10] = light.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 11] = light.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 12] = light.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 13] = light.a;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 14] = u2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 15] = v2;\r\n\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 16] = x3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 17] = y3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 18] = light.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 19] = light.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 20] = light.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 21] = light.a;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 22] = u3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 23] = v3;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 6] = u1;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 7] = v1;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 8] = dark.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 9] = dark.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 10] = dark.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 11] = dark.a;\r\n\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 12] = x2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 13] = y2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 14] = light.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 15] = light.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 16] = light.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 17] = light.a;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 18] = u2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 19] = v2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 20] = dark.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 21] = dark.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 22] = dark.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 23] = dark.a;\r\n\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 24] = x3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 25] = y3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 26] = light.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 27] = light.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 28] = light.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 29] = light.a;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 30] = u3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 31] = v3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 32] = dark.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 33] = dark.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 34] = dark.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 35] = dark.a;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ts = clippedTriangles.length;\r\n\t\t\t\t\t\tlet clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3);\r\n\t\t\t\t\t\tclippedTrianglesItems[s] = index;\r\n\t\t\t\t\t\tclippedTrianglesItems[s + 1] = (index + 1);\r\n\t\t\t\t\t\tclippedTrianglesItems[s + 2] = (index + 2);\r\n\t\t\t\t\t\tindex += 3;\r\n\t\t\t\t\t\tcontinue outer;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/** Clips the input triangle against the convex, clockwise clipping area. If the triangle lies entirely within the clipping\r\n\t\t * area, false is returned. The clipping area must duplicate the first vertex at the end of the vertices list. */\r\n\t\tclip (x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, clippingArea: Array, output: Array) {\r\n\t\t\tlet originalOutput = output;\r\n\t\t\tlet clipped = false;\r\n\r\n\t\t\t// Avoid copy at the end.\r\n\t\t\tlet input: Array = null;\r\n\t\t\tif (clippingArea.length % 4 >= 2) {\r\n\t\t\t\tinput = output;\r\n\t\t\t\toutput = this.scratch;\r\n\t\t\t} else\r\n\t\t\t\tinput = this.scratch;\r\n\r\n\t\t\tinput.length = 0;\r\n\t\t\tinput.push(x1);\r\n\t\t\tinput.push(y1);\r\n\t\t\tinput.push(x2);\r\n\t\t\tinput.push(y2);\r\n\t\t\tinput.push(x3);\r\n\t\t\tinput.push(y3);\r\n\t\t\tinput.push(x1);\r\n\t\t\tinput.push(y1);\r\n\t\t\toutput.length = 0;\r\n\r\n\t\t\tlet clippingVertices = clippingArea;\r\n\t\t\tlet clippingVerticesLast = clippingArea.length - 4;\r\n\t\t\tfor (let i = 0;; i += 2) {\r\n\t\t\t\tlet edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\r\n\t\t\t\tlet edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\r\n\t\t\t\tlet deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\r\n\r\n\t\t\t\tlet inputVertices = input;\r\n\t\t\t\tlet inputVerticesLength = input.length - 2, outputStart = output.length;\r\n\t\t\t\tfor (let ii = 0; ii < inputVerticesLength; ii += 2) {\r\n\t\t\t\t\tlet inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\r\n\t\t\t\t\tlet inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\r\n\t\t\t\t\tlet side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\r\n\t\t\t\t\tif (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\r\n\t\t\t\t\t\tif (side2) { // v1 inside, v2 inside\r\n\t\t\t\t\t\t\toutput.push(inputX2);\r\n\t\t\t\t\t\t\toutput.push(inputY2);\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// v1 inside, v2 outside\r\n\t\t\t\t\t\tlet c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n\t\t\t\t\t\tlet ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / (c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY));\r\n\t\t\t\t\t\toutput.push(edgeX + (edgeX2 - edgeX) * ua);\r\n\t\t\t\t\t\toutput.push(edgeY + (edgeY2 - edgeY) * ua);\r\n\t\t\t\t\t} else if (side2) { // v1 outside, v2 inside\r\n\t\t\t\t\t\tlet c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n\t\t\t\t\t\tlet ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / (c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY));\r\n\t\t\t\t\t\toutput.push(edgeX + (edgeX2 - edgeX) * ua);\r\n\t\t\t\t\t\toutput.push(edgeY + (edgeY2 - edgeY) * ua);\r\n\t\t\t\t\t\toutput.push(inputX2);\r\n\t\t\t\t\t\toutput.push(inputY2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tclipped = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (outputStart == output.length) { // All edges outside.\r\n\t\t\t\t\toriginalOutput.length = 0;\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\toutput.push(output[0]);\r\n\t\t\t\toutput.push(output[1]);\r\n\r\n\t\t\t\tif (i == clippingVerticesLast) break;\r\n\t\t\t\tlet temp = output;\r\n\t\t\t\toutput = input;\r\n\t\t\t\toutput.length = 0;\r\n\t\t\t\tinput = temp;\r\n\t\t\t}\r\n\r\n\t\t\tif (originalOutput != output) {\r\n\t\t\t\toriginalOutput.length = 0;\r\n\t\t\t\tfor (let i = 0, n = output.length - 2; i < n; i++)\r\n\t\t\t\t\toriginalOutput[i] = output[i];\r\n\t\t\t} else\r\n\t\t\t\toriginalOutput.length = originalOutput.length - 2;\r\n\r\n\t\t\treturn clipped;\r\n\t\t}\r\n\r\n\t\tpublic static makeClockwise (polygon: ArrayLike) {\r\n\t\t\tlet vertices = polygon;\r\n\t\t\tlet verticeslength = polygon.length;\r\n\r\n\t\t\tlet area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\r\n\t\t\tfor (let i = 0, n = verticeslength - 3; i < n; i += 2) {\r\n\t\t\t\tp1x = vertices[i];\r\n\t\t\t\tp1y = vertices[i + 1];\r\n\t\t\t\tp2x = vertices[i + 2];\r\n\t\t\t\tp2y = vertices[i + 3];\r\n\t\t\t\tarea += p1x * p2y - p2x * p1y;\r\n\t\t\t}\r\n\t\t\tif (area < 0) return;\r\n\r\n\t\t\tfor (let i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\r\n\t\t\t\tlet x = vertices[i], y = vertices[i + 1];\r\n\t\t\t\tlet other = lastX - i;\r\n\t\t\t\tvertices[i] = vertices[other];\r\n\t\t\t\tvertices[i + 1] = vertices[other + 1];\r\n\t\t\t\tvertices[other] = x;\r\n\t\t\t\tvertices[other + 1] = y;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class SkeletonData {\r\n name: string;\r\n bones = new Array(); // Ordered parents first.\r\n slots = new Array(); // Setup pose draw order.\r\n skins = new Array();\r\n defaultSkin: Skin;\r\n events = new Array();\r\n animations = new Array();\r\n ikConstraints = new Array();\r\n transformConstraints = new Array();\r\n pathConstraints = new Array();\r\n x: number; y: number; width: number; height: number;\r\n version: string; hash: string;\r\n\r\n // Nonessential\r\n fps = 0;\r\n imagesPath: string;\r\n audioPath: string;\r\n\r\n findBone (boneName: string) {\r\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (bone.name == boneName) return bone;\r\n }\r\n return null;\r\n }\r\n\r\n findBoneIndex (boneName: string) {\r\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].name == boneName) return i;\r\n return -1;\r\n }\r\n\r\n findSlot (slotName: string) {\r\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (slot.name == slotName) return slot;\r\n }\r\n return null;\r\n }\r\n\r\n findSlotIndex (slotName: string) {\r\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].name == slotName) return i;\r\n return -1;\r\n }\r\n\r\n findSkin (skinName: string) {\r\n if (skinName == null) throw new Error(\"skinName cannot be null.\");\r\n let skins = this.skins;\r\n for (let i = 0, n = skins.length; i < n; i++) {\r\n let skin = skins[i];\r\n if (skin.name == skinName) return skin;\r\n }\r\n return null;\r\n }\r\n\r\n findEvent (eventDataName: string) {\r\n if (eventDataName == null) throw new Error(\"eventDataName cannot be null.\");\r\n let events = this.events;\r\n for (let i = 0, n = events.length; i < n; i++) {\r\n let event = events[i];\r\n if (event.name == eventDataName) return event;\r\n }\r\n return null;\r\n }\r\n\r\n findAnimation (animationName: string) {\r\n if (animationName == null) throw new Error(\"animationName cannot be null.\");\r\n let animations = this.animations;\r\n for (let i = 0, n = animations.length; i < n; i++) {\r\n let animation = animations[i];\r\n if (animation.name == animationName) return animation;\r\n }\r\n return null;\r\n }\r\n\r\n findIkConstraint (constraintName: string) {\r\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\r\n let ikConstraints = this.ikConstraints;\r\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\r\n let constraint = ikConstraints[i];\r\n if (constraint.name == constraintName) return constraint;\r\n }\r\n return null;\r\n }\r\n\r\n findTransformConstraint (constraintName: string) {\r\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\r\n let transformConstraints = this.transformConstraints;\r\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\r\n let constraint = transformConstraints[i];\r\n if (constraint.name == constraintName) return constraint;\r\n }\r\n return null;\r\n }\r\n\r\n findPathConstraint (constraintName: string) {\r\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\r\n let pathConstraints = this.pathConstraints;\r\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\r\n let constraint = pathConstraints[i];\r\n if (constraint.name == constraintName) return constraint;\r\n }\r\n return null;\r\n }\r\n\r\n findPathConstraintIndex (pathConstraintName: string) {\r\n if (pathConstraintName == null) throw new Error(\"pathConstraintName cannot be null.\");\r\n let pathConstraints = this.pathConstraints;\r\n for (let i = 0, n = pathConstraints.length; i < n; i++)\r\n if (pathConstraints[i].name == pathConstraintName) return i;\r\n return -1;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n /**\r\n * pixi-spine gives option to not fail at certain parsing errors\r\n * spine-ts fails here\r\n */\r\n export let FAIL_ON_NON_EXISTING_SKIN = false;\r\n\r\n export class SkeletonJson {\r\n attachmentLoader: AttachmentLoader;\r\n scale = 1;\r\n private linkedMeshes = new Array();\r\n\r\n constructor (attachmentLoader: AttachmentLoader) {\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n\r\n readSkeletonData (json: string | any): SkeletonData {\r\n let scale = this.scale;\r\n let skeletonData = new SkeletonData();\r\n let root = typeof(json) === \"string\" ? JSON.parse(json) : json;\r\n\r\n // Skeleton\r\n let skeletonMap = root.skeleton;\r\n if (skeletonMap != null) {\r\n skeletonData.hash = skeletonMap.hash;\r\n skeletonData.version = skeletonMap.spine;\r\n if (skeletonData.version.substr(0, 3) !== '3.8') {\r\n let error = `PixiJS Spine plugin supports only format for Spine 3.8. Your model has version ${skeletonMap.spine}. Please look in pixi-spine repository README for another branch.`;\r\n console.error(error);\r\n }\r\n if (skeletonData.version === '3.8.75')\r\n {\r\n let error = `Unsupported skeleton data, 3.8.75 is deprecated, please export with a newer version of Spine.`;\r\n console.error(error);\r\n }\r\n skeletonData.x = skeletonMap.x;\r\n skeletonData.y = skeletonMap.y;\r\n skeletonData.width = skeletonMap.width;\r\n skeletonData.height = skeletonMap.height;\r\n skeletonData.fps = skeletonMap.fps;\r\n skeletonData.imagesPath = skeletonMap.images;\r\n }\r\n\r\n // Bones\r\n if (root.bones) {\r\n for (let i = 0; i < root.bones.length; i++) {\r\n let boneMap = root.bones[i];\r\n\r\n let parent: BoneData = null;\r\n let parentName: string = this.getValue(boneMap, \"parent\", null);\r\n if (parentName != null) {\r\n parent = skeletonData.findBone(parentName);\r\n if (parent == null) throw new Error(\"Parent bone not found: \" + parentName);\r\n }\r\n let data = new BoneData(skeletonData.bones.length, boneMap.name, parent);\r\n data.length = this.getValue(boneMap, \"length\", 0) * scale;\r\n data.x = this.getValue(boneMap, \"x\", 0) * scale;\r\n data.y = this.getValue(boneMap, \"y\", 0) * scale;\r\n data.rotation = this.getValue(boneMap, \"rotation\", 0);\r\n data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\r\n data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\r\n data.shearX = this.getValue(boneMap, \"shearX\", 0);\r\n data.shearY = this.getValue(boneMap, \"shearY\", 0);\r\n data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\r\n data.skinRequired = this.getValue(boneMap, \"skin\", false);\r\n\r\n skeletonData.bones.push(data);\r\n }\r\n }\r\n\r\n // Slots.\r\n if (root.slots) {\r\n for (let i = 0; i < root.slots.length; i++) {\r\n let slotMap = root.slots[i];\r\n let slotName: string = slotMap.name;\r\n let boneName: string = slotMap.bone;\r\n let boneData = skeletonData.findBone(boneName);\r\n if (boneData == null) throw new Error(\"Slot bone not found: \" + boneName);\r\n let data = new SlotData(skeletonData.slots.length, slotName, boneData);\r\n\r\n let color: string = this.getValue(slotMap, \"color\", null);\r\n if (color != null) data.color.setFromString(color);\r\n\r\n let dark: string = this.getValue(slotMap, \"dark\", null);\r\n if (dark != null) {\r\n data.darkColor = new Color(1, 1, 1, 1);\r\n data.darkColor.setFromString(dark);\r\n }\r\n\r\n data.attachmentName = this.getValue(slotMap, \"attachment\", null);\r\n data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\r\n skeletonData.slots.push(data);\r\n }\r\n }\r\n\r\n // IK constraints\r\n if (root.ik) {\r\n for (let i = 0; i < root.ik.length; i++) {\r\n let constraintMap = root.ik[i];\r\n let data = new IkConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n\r\n for (let j = 0; j < constraintMap.bones.length; j++) {\r\n let boneName = constraintMap.bones[j];\r\n let bone = skeletonData.findBone(boneName);\r\n if (bone == null) throw new Error(\"IK bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n\r\n let targetName: string = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null) throw new Error(\"IK target bone not found: \" + targetName);\r\n\r\n data.mix = this.getValue(constraintMap, \"mix\", 1);\r\n data.softness = this.getValue(constraintMap, \"softness\", 0) * scale;\r\n data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\r\n data.compress = this.getValue(constraintMap, \"compress\", false);\r\n data.stretch = this.getValue(constraintMap, \"stretch\", false);\r\n data.uniform = this.getValue(constraintMap, \"uniform\", false);\r\n\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n }\r\n\r\n // Transform constraints.\r\n if (root.transform) {\r\n for (let i = 0; i < root.transform.length; i++) {\r\n let constraintMap = root.transform[i];\r\n let data = new TransformConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n\r\n for (let j = 0; j < constraintMap.bones.length; j++) {\r\n let boneName = constraintMap.bones[j];\r\n let bone = skeletonData.findBone(boneName);\r\n if (bone == null) throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n\r\n let targetName: string = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null) throw new Error(\"Transform constraint target bone not found: \" + targetName);\r\n\r\n data.local = this.getValue(constraintMap, \"local\", false);\r\n data.relative = this.getValue(constraintMap, \"relative\", false);\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\r\n data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\r\n data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\r\n data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\r\n data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\r\n\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\r\n data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\r\n\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n }\r\n\r\n // Path constraints.\r\n if (root.path) {\r\n for (let i = 0; i < root.path.length; i++) {\r\n let constraintMap = root.path[i];\r\n let data = new PathConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n\r\n for (let j = 0; j < constraintMap.bones.length; j++) {\r\n let boneName = constraintMap.bones[j];\r\n let bone = skeletonData.findBone(boneName);\r\n if (bone == null) throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n\r\n let targetName: string = constraintMap.target;\r\n data.target = skeletonData.findSlot(targetName);\r\n if (data.target == null) throw new Error(\"Path target slot not found: \" + targetName);\r\n\r\n data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\r\n data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\r\n data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.position = this.getValue(constraintMap, \"position\", 0);\r\n if (data.positionMode == PositionMode.Fixed) data.position *= scale;\r\n data.spacing = this.getValue(constraintMap, \"spacing\", 0);\r\n if (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) data.spacing *= scale;\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n }\r\n\r\n // Skins.\r\n if (root.skins) {\r\n for (let i = 0; i < root.skins.length; i++) {\r\n let skinMap = root.skins[i]\r\n let skin = new Skin(skinMap.name);\r\n\r\n if (skinMap.bones) {\r\n for (let ii = 0; ii < skinMap.bones.length; ii++) {\r\n let bone = skeletonData.findBone(skinMap.bones[ii]);\r\n if (bone == null) throw new Error(\"Skin bone not found: \" + skinMap.bones[i]);\r\n skin.bones.push(bone);\r\n }\r\n }\r\n\r\n if (skinMap.ik) {\r\n for (let ii = 0; ii < skinMap.ik.length; ii++) {\r\n let constraint = skeletonData.findIkConstraint(skinMap.ik[ii]);\r\n if (constraint == null) throw new Error(\"Skin IK constraint not found: \" + skinMap.ik[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n\r\n if (skinMap.transform) {\r\n for (let ii = 0; ii < skinMap.transform.length; ii++) {\r\n let constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]);\r\n if (constraint == null) throw new Error(\"Skin transform constraint not found: \" + skinMap.transform[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n\r\n if (skinMap.path) {\r\n for (let ii = 0; ii < skinMap.path.length; ii++) {\r\n let constraint = skeletonData.findPathConstraint(skinMap.path[ii]);\r\n if (constraint == null) throw new Error(\"Skin path constraint not found: \" + skinMap.path[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n\r\n for (let slotName in skinMap.attachments) {\r\n let slot = skeletonData.findSlot(slotName);\r\n if (slot == null) throw new Error(\"Slot not found: \" + slotName);\r\n let slotMap = skinMap.attachments[slotName];\r\n for (let entryName in slotMap) {\r\n let attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\r\n if (attachment != null) skin.setAttachment(slot.index, entryName, attachment);\r\n }\r\n }\r\n skeletonData.skins.push(skin);\r\n if (skin.name == \"default\") skeletonData.defaultSkin = skin;\r\n }\r\n }\r\n\r\n // Linked meshes.\r\n for (let i = 0, n = this.linkedMeshes.length; i < n; i++) {\r\n let linkedMesh = this.linkedMeshes[i];\r\n let skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null) throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent == null) throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh( parent);\r\n // linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n\r\n // Events.\r\n if (root.events) {\r\n for (let eventName in root.events) {\r\n let eventMap = root.events[eventName];\r\n let data = new EventData(eventName);\r\n data.intValue = this.getValue(eventMap, \"int\", 0);\r\n data.floatValue = this.getValue(eventMap, \"float\", 0);\r\n data.stringValue = this.getValue(eventMap, \"string\", \"\");\r\n data.audioPath = this.getValue(eventMap, \"audio\", null);\r\n if (data.audioPath != null) {\r\n data.volume = this.getValue(eventMap, \"volume\", 1);\r\n data.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n }\r\n\r\n // Animations.\r\n if (root.animations) {\r\n for (let animationName in root.animations) {\r\n let animationMap = root.animations[animationName];\r\n this.readAnimation(animationMap, animationName, skeletonData);\r\n }\r\n }\r\n\r\n return skeletonData;\r\n }\r\n\r\n readAttachment (map: any, skin: Skin, slotIndex: number, name: string, skeletonData: SkeletonData): Attachment {\r\n let scale = this.scale;\r\n name = this.getValue(map, \"name\", name);\r\n\r\n let type = this.getValue(map, \"type\", \"region\");\r\n\r\n switch (type) {\r\n case \"region\": {\r\n let path = this.getValue(map, \"path\", name);\r\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null) return null;\r\n region.path = path;\r\n region.x = this.getValue(map, \"x\", 0) * scale;\r\n region.y = this.getValue(map, \"y\", 0) * scale;\r\n region.scaleX = this.getValue(map, \"scaleX\", 1);\r\n region.scaleY = this.getValue(map, \"scaleY\", 1);\r\n region.rotation = this.getValue(map, \"rotation\", 0);\r\n region.width = map.width * scale;\r\n region.height = map.height * scale;\r\n\r\n let color: string = this.getValue(map, \"color\", null);\r\n if (color != null) region.color.setFromString(color);\r\n\r\n // region.updateOffset();\r\n return region;\r\n }\r\n case \"boundingbox\": {\r\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null) return null;\r\n this.readVertices(map, box, map.vertexCount << 1);\r\n let color: string = this.getValue(map, \"color\", null);\r\n if (color != null) box.color.setFromString(color);\r\n return box;\r\n }\r\n case \"mesh\":\r\n case \"linkedmesh\": {\r\n let path = this.getValue(map, \"path\", name);\r\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null) return null;\r\n mesh.path = path;\r\n\r\n let color = this.getValue(map, \"color\", null);\r\n if (color != null) mesh.color.setFromString(color);\r\n\r\n mesh.width = this.getValue(map, \"width\", 0) * scale;\r\n mesh.height = this.getValue(map, \"height\", 0) * scale;\r\n\r\n let parent: string = this.getValue(map, \"parent\", null);\r\n if (parent != null) {\r\n this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent, this.getValue(map, \"deform\", true)));\r\n return mesh;\r\n }\r\n\r\n let uvs: Array = map.uvs;\r\n this.readVertices(map, mesh, uvs.length);\r\n mesh.triangles = map.triangles;\r\n mesh.regionUVs = new Float32Array(uvs);\r\n // mesh.updateUVs();\r\n\r\n mesh.edges = this.getValue(map, \"edges\", null);\r\n mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\r\n return mesh;\r\n }\r\n case \"path\": {\r\n let path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null) return null;\r\n path.closed = this.getValue(map, \"closed\", false);\r\n path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\r\n\r\n let vertexCount = map.vertexCount;\r\n this.readVertices(map, path, vertexCount << 1);\r\n\r\n let lengths: Array = Utils.newArray(vertexCount / 3, 0);\r\n for (let i = 0; i < map.lengths.length; i++)\r\n lengths[i] = map.lengths[i] * scale;\r\n path.lengths = lengths;\r\n\r\n let color: string = this.getValue(map, \"color\", null);\r\n if (color != null) path.color.setFromString(color);\r\n return path;\r\n }\r\n case \"point\": {\r\n let point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null) return null;\r\n point.x = this.getValue(map, \"x\", 0) * scale;\r\n point.y = this.getValue(map, \"y\", 0) * scale;\r\n point.rotation = this.getValue(map, \"rotation\", 0);\r\n\r\n let color = this.getValue(map, \"color\", null);\r\n if (color != null) point.color.setFromString(color);\r\n return point;\r\n }\r\n case \"clipping\": {\r\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null) return null;\r\n\r\n let end = this.getValue(map, \"end\", null);\r\n if (end != null) {\r\n let slot = skeletonData.findSlot(end);\r\n if (slot == null) throw new Error(\"Clipping end slot not found: \" + end);\r\n clip.endSlot = slot;\r\n }\r\n\r\n let vertexCount = map.vertexCount;\r\n this.readVertices(map, clip, vertexCount << 1);\r\n\r\n let color: string = this.getValue(map, \"color\", null);\r\n if (color != null) clip.color.setFromString(color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n readVertices (map: any, attachment: VertexAttachment, verticesLength: number) {\r\n let scale = this.scale;\r\n attachment.worldVerticesLength = verticesLength;\r\n let vertices: Array = map.vertices;\r\n if (verticesLength == vertices.length) {\r\n let scaledVertices = Utils.toFloatArray(vertices);\r\n if (scale != 1) {\r\n for (let i = 0, n = vertices.length; i < n; i++)\r\n scaledVertices[i] *= scale;\r\n }\r\n attachment.vertices = scaledVertices;\r\n return;\r\n }\r\n let weights = new Array();\r\n let bones = new Array();\r\n for (let i = 0, n = vertices.length; i < n;) {\r\n let boneCount = vertices[i++];\r\n bones.push(boneCount);\r\n for (let nn = i + boneCount * 4; i < nn; i += 4) {\r\n bones.push(vertices[i]);\r\n weights.push(vertices[i + 1] * scale);\r\n weights.push(vertices[i + 2] * scale);\r\n weights.push(vertices[i + 3]);\r\n }\r\n }\r\n attachment.bones = bones;\r\n attachment.vertices = Utils.toFloatArray(weights);\r\n }\r\n\r\n readAnimation (map: any, name: string, skeletonData: SkeletonData) {\r\n let scale = this.scale;\r\n let timelines = new Array();\r\n let duration = 0;\r\n\r\n // Slot timelines.\r\n if (map.slots) {\r\n for (let slotName in map.slots) {\r\n let slotMap = map.slots[slotName];\r\n let slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1) throw new Error(\"Slot not found: \" + slotName);\r\n for (let timelineName in slotMap) {\r\n let timelineMap = slotMap[timelineName];\r\n if (timelineName == \"attachment\") {\r\n let timeline = new AttachmentTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n\r\n let frameIndex = 0;\r\n for (let i = 0; i < timelineMap.length; i++) {\r\n let valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex++, this.getValue(valueMap, \"time\", 0), valueMap.name);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n } else if (timelineName == \"color\") {\r\n let timeline = new ColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n\r\n let frameIndex = 0;\r\n for (let i = 0; i < timelineMap.length; i++) {\r\n let valueMap = timelineMap[i];\r\n let color = new Color();\r\n color.setFromString(valueMap.color || \"ffffffff\");\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), color.r, color.g, color.b, color.a);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * ColorTimeline.ENTRIES]);\r\n\r\n } else if (timelineName == \"twoColor\") {\r\n let timeline = new TwoColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n\r\n let frameIndex = 0;\r\n for (let i = 0; i < timelineMap.length; i++) {\r\n let valueMap = timelineMap[i];\r\n let light = new Color();\r\n let dark = new Color();\r\n light.setFromString(valueMap.light);\r\n dark.setFromString(valueMap.dark);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * TwoColorTimeline.ENTRIES]);\r\n\r\n } else\r\n throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\r\n }\r\n }\r\n }\r\n\r\n // Bone timelines.\r\n if (map.bones) {\r\n for (let boneName in map.bones) {\r\n let boneMap = map.bones[boneName];\r\n let boneIndex = skeletonData.findBoneIndex(boneName);\r\n if (boneIndex == -1) throw new Error(\"Bone not found: \" + boneName);\r\n for (let timelineName in boneMap) {\r\n let timelineMap = boneMap[timelineName];\r\n if (timelineName === \"rotate\") {\r\n let timeline = new RotateTimeline(timelineMap.length);\r\n timeline.boneIndex = boneIndex;\r\n\r\n let frameIndex = 0;\r\n for (let i = 0; i < timelineMap.length; i++) {\r\n let valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"angle\", 0));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * RotateTimeline.ENTRIES]);\r\n\r\n } else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\r\n let timeline: TranslateTimeline = null;\r\n let timelineScale = 1, defaultValue = 0;\r\n if (timelineName === \"scale\") {\r\n timeline = new ScaleTimeline(timelineMap.length);\r\n defaultValue = 1;\r\n } else if (timelineName === \"shear\")\r\n timeline = new ShearTimeline(timelineMap.length);\r\n else {\r\n timeline = new TranslateTimeline(timelineMap.length);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n\r\n let frameIndex = 0;\r\n for (let i = 0; i < timelineMap.length; i++) {\r\n let valueMap = timelineMap[i];\r\n let x = this.getValue(valueMap, \"x\", defaultValue), y = this.getValue(valueMap, \"y\", defaultValue);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), x * timelineScale, y * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * TranslateTimeline.ENTRIES]);\r\n\r\n } else\r\n throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\r\n }\r\n }\r\n }\r\n\r\n // IK constraint timelines.\r\n if (map.ik) {\r\n for (let constraintName in map.ik) {\r\n let constraintMap = map.ik[constraintName];\r\n let constraint = skeletonData.findIkConstraint(constraintName);\r\n let timeline = new IkConstraintTimeline(constraintMap.length);\r\n timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\r\n let frameIndex = 0;\r\n for (let i = 0; i < constraintMap.length; i++) {\r\n let valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"mix\", 1), this.getValue(valueMap, \"softness\", 0) * scale,\r\n this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1, this.getValue(valueMap, \"compress\", false), this.getValue(valueMap, \"stretch\", false));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * IkConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n\r\n // Transform constraint timelines.\r\n if (map.transform) {\r\n for (let constraintName in map.transform) {\r\n let constraintMap = map.transform[constraintName];\r\n let constraint = skeletonData.findTransformConstraint(constraintName);\r\n let timeline = new TransformConstraintTimeline(constraintMap.length);\r\n timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\r\n let frameIndex = 0;\r\n for (let i = 0; i < constraintMap.length; i++) {\r\n let valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1),\r\n this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration,\r\n timeline.frames[(timeline.getFrameCount() - 1) * TransformConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n\r\n // Path constraint timelines.\r\n if (map.path) {\r\n for (let constraintName in map.path) {\r\n let constraintMap = map.path[constraintName];\r\n let index = skeletonData.findPathConstraintIndex(constraintName);\r\n if (index == -1) throw new Error(\"Path constraint not found: \" + constraintName);\r\n let data = skeletonData.pathConstraints[index];\r\n for (let timelineName in constraintMap) {\r\n let timelineMap = constraintMap[timelineName];\r\n if (timelineName === \"position\" || timelineName === \"spacing\") {\r\n let timeline: PathConstraintPositionTimeline = null;\r\n let timelineScale = 1;\r\n if (timelineName === \"spacing\") {\r\n timeline = new PathConstraintSpacingTimeline(timelineMap.length);\r\n if (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) timelineScale = scale;\r\n } else {\r\n timeline = new PathConstraintPositionTimeline(timelineMap.length);\r\n if (data.positionMode == PositionMode.Fixed) timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n let frameIndex = 0;\r\n for (let i = 0; i < timelineMap.length; i++) {\r\n let valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, timelineName, 0) * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration,\r\n timeline.frames[(timeline.getFrameCount() - 1) * PathConstraintPositionTimeline.ENTRIES]);\r\n } else if (timelineName === \"mix\") {\r\n let timeline = new PathConstraintMixTimeline(timelineMap.length);\r\n timeline.pathConstraintIndex = index;\r\n let frameIndex = 0;\r\n for (let i = 0; i < timelineMap.length; i++) {\r\n let valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1),\r\n this.getValue(valueMap, \"translateMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration,\r\n timeline.frames[(timeline.getFrameCount() - 1) * PathConstraintMixTimeline.ENTRIES]);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Deform timelines.\r\n if (map.deform) {\r\n for (let deformName in map.deform) {\r\n let deformMap = map.deform[deformName];\r\n let skin = skeletonData.findSkin(deformName);\r\n if (skin == null) {\r\n if (FAIL_ON_NON_EXISTING_SKIN) {\r\n throw new Error(\"Skin not found: \" + deformName);\r\n } else {\r\n continue;\r\n }\r\n }\r\n for (let slotName in deformMap) {\r\n let slotMap = deformMap[slotName];\r\n let slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1) throw new Error(\"Slot not found: \" + slotMap.name);\r\n for (let timelineName in slotMap) {\r\n let timelineMap = slotMap[timelineName];\r\n let attachment = skin.getAttachment(slotIndex, timelineName);\r\n if (attachment == null) throw new Error(\"Deform attachment not found: \" + timelineMap.name);\r\n let weighted = attachment.bones != null;\r\n let vertices = attachment.vertices;\r\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n\r\n let timeline = new DeformTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n\r\n let frameIndex = 0;\r\n for (let j = 0; j < timelineMap.length; j++) {\r\n let valueMap = timelineMap[j];\r\n let deform: ArrayLike;\r\n let verticesValue: Array = this.getValue(valueMap, \"vertices\", null);\r\n if (verticesValue == null)\r\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = Utils.newFloatArray(deformLength);\r\n let start = this.getValue(valueMap, \"offset\", 0);\r\n Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\r\n if (scale != 1) {\r\n for (let i = start, n = i + verticesValue.length; i < n; i++)\r\n deform[i] *= scale;\r\n }\r\n if (!weighted) {\r\n for (let i = 0; i < deformLength; i++)\r\n deform[i] += vertices[i];\r\n }\r\n }\r\n\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), deform);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Draw order timeline.\r\n let drawOrderNode = map.drawOrder;\r\n if (drawOrderNode == null) drawOrderNode = map.draworder;\r\n if (drawOrderNode != null) {\r\n let timeline = new DrawOrderTimeline(drawOrderNode.length);\r\n let slotCount = skeletonData.slots.length;\r\n let frameIndex = 0;\r\n for (let j = 0; j < drawOrderNode.length; j++) {\r\n let drawOrderMap = drawOrderNode[j];\r\n let drawOrder: Array = null;\r\n let offsets = this.getValue(drawOrderMap, \"offsets\", null);\r\n if (offsets != null) {\r\n drawOrder = Utils.newArray(slotCount, -1);\r\n let unchanged = Utils.newArray(slotCount - offsets.length, 0);\r\n let originalIndex = 0, unchangedIndex = 0;\r\n for (let i = 0; i < offsets.length; i++) {\r\n let offsetMap = offsets[i];\r\n let slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\r\n if (slotIndex == -1) throw new Error(\"Slot not found: \" + offsetMap.slot);\r\n // Collect unchanged items.\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n // Set changed items.\r\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\r\n }\r\n // Collect remaining unchanged items.\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n // Fill in unchanged items.\r\n for (let i = slotCount - 1; i >= 0; i--)\r\n if (drawOrder[i] == -1) drawOrder[i] = unchanged[--unchangedIndex];\r\n }\r\n timeline.setFrame(frameIndex++, this.getValue(drawOrderMap, \"time\", 0), drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n\r\n // Event timeline.\r\n if (map.events) {\r\n let timeline = new EventTimeline(map.events.length);\r\n let frameIndex = 0;\r\n for (let i = 0; i < map.events.length; i++) {\r\n let eventMap = map.events[i];\r\n let eventData = skeletonData.findEvent(eventMap.name);\r\n if (eventData == null) throw new Error(\"Event not found: \" + eventMap.name);\r\n let event = new Event(Utils.toSinglePrecision(this.getValue(eventMap, \"time\", 0)), eventData);\r\n event.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\r\n event.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\r\n event.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\r\n if (event.data.audioPath != null) {\r\n event.volume = this.getValue(eventMap, \"volume\", 1);\r\n event.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n timeline.setFrame(frameIndex++, event);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n\r\n if (isNaN(duration)) {\r\n throw new Error(\"Error while parsing animation, duration is NaN\");\r\n }\r\n\r\n skeletonData.animations.push(new Animation(name, timelines, duration));\r\n }\r\n\r\n readCurve (map: any, timeline: CurveTimeline, frameIndex: number) {\r\n if (!map.hasOwnProperty(\"curve\")) return;\r\n if (map.curve === \"stepped\")\r\n timeline.setStepped(frameIndex);\r\n else {\r\n let curve: number = map.curve;\r\n timeline.setCurve(frameIndex, curve, this.getValue(map, \"c2\", 0), this.getValue(map, \"c3\", 1), this.getValue(map, \"c4\", 1));\r\n }\r\n }\r\n\r\n getValue (map: any, prop: string, defaultValue: any) {\r\n return map[prop] !== undefined ? map[prop] : defaultValue;\r\n }\r\n\r\n static blendModeFromString (str: string) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\") return BlendMode.Normal;\r\n if (str == \"additive\") return BlendMode.Additive;\r\n if (str == \"multiply\") return BlendMode.Multiply;\r\n if (str == \"screen\") return BlendMode.Screen;\r\n throw new Error(`Unknown blend mode: ${str}`);\r\n }\r\n\r\n static positionModeFromString (str: string) {\r\n str = str.toLowerCase();\r\n if (str == \"fixed\") return PositionMode.Fixed;\r\n if (str == \"percent\") return PositionMode.Percent;\r\n throw new Error(`Unknown position mode: ${str}`);\r\n }\r\n\r\n static spacingModeFromString (str: string) {\r\n str = str.toLowerCase();\r\n if (str == \"length\") return SpacingMode.Length;\r\n if (str == \"fixed\") return SpacingMode.Fixed;\r\n if (str == \"percent\") return SpacingMode.Percent;\r\n throw new Error(`Unknown position mode: ${str}`);\r\n }\r\n\r\n static rotateModeFromString (str: string) {\r\n str = str.toLowerCase();\r\n if (str == \"tangent\") return RotateMode.Tangent;\r\n if (str == \"chain\") return RotateMode.Chain;\r\n if (str == \"chainscale\") return RotateMode.ChainScale;\r\n throw new Error(`Unknown rotate mode: ${str}`);\r\n }\r\n\r\n static transformModeFromString(str: string) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\") return TransformMode.Normal;\r\n if (str == \"onlytranslation\") return TransformMode.OnlyTranslation;\r\n if (str == \"norotationorreflection\") return TransformMode.NoRotationOrReflection;\r\n if (str == \"noscale\") return TransformMode.NoScale;\r\n if (str == \"noscaleorreflection\") return TransformMode.NoScaleOrReflection;\r\n throw new Error(`Unknown transform mode: ${str}`);\r\n }\r\n }\r\n\r\n class LinkedMesh {\r\n parent: string; skin: string;\r\n slotIndex: number;\r\n mesh: MeshAttachment;\r\n inheritDeform: boolean;\r\n\r\n constructor (mesh: MeshAttachment, skin: string, slotIndex: number, parent: string, inheritDeform: boolean) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class SkinEntry {\r\n constructor(public slotIndex: number, public name: string, public attachment: Attachment) { }\r\n }\r\n\r\n export class Skin {\r\n name: string;\r\n attachments = new Array>();\r\n bones = Array();\r\n constraints = new Array();\r\n\r\n constructor (name: string) {\r\n if (name == null) throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n\r\n setAttachment (slotIndex: number, name: string, attachment: Attachment) {\r\n if (attachment == null) throw new Error(\"attachment cannot be null.\");\r\n let attachments = this.attachments;\r\n if (slotIndex >= attachments.length) attachments.length = slotIndex + 1;\r\n if (!attachments[slotIndex]) attachments[slotIndex] = { };\r\n attachments[slotIndex][name] = attachment;\r\n }\r\n\r\n addSkin (skin: Skin) {\r\n for(let i = 0; i < skin.bones.length; i++) {\r\n let bone = skin.bones[i];\r\n let contained = false;\r\n for (let j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained) this.bones.push(bone);\r\n }\r\n\r\n for(let i = 0; i < skin.constraints.length; i++) {\r\n let constraint = skin.constraints[i];\r\n let contained = false;\r\n for (let j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained) this.constraints.push(constraint);\r\n }\r\n\r\n let attachments = skin.getAttachments();\r\n for (let i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n\r\n copySkin (skin: Skin) {\r\n for(let i = 0; i < skin.bones.length; i++) {\r\n let bone = skin.bones[i];\r\n let contained = false;\r\n for (let j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained) this.bones.push(bone);\r\n }\r\n\r\n for(let i = 0; i < skin.constraints.length; i++) {\r\n let constraint = skin.constraints[i];\r\n let contained = false;\r\n for (let j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained) this.constraints.push(constraint);\r\n }\r\n\r\n let attachments = skin.getAttachments();\r\n for (let i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n if (attachment.attachment == null) continue;\r\n if (attachment.attachment instanceof MeshAttachment) {\r\n attachment.attachment = attachment.attachment.newLinkedMesh();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n } else {\r\n attachment.attachment = attachment.attachment.copy();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n }\r\n\r\n /** @return May be null. */\r\n getAttachment (slotIndex: number, name: string): Attachment {\r\n let dictionary = this.attachments[slotIndex];\r\n return dictionary ? dictionary[name] : null;\r\n }\r\n\r\n removeAttachment (slotIndex: number, name: string) {\r\n let dictionary = this.attachments[slotIndex];\r\n if (dictionary) dictionary[name] = null;\r\n }\r\n\r\n getAttachments (): Array {\r\n let entries = new Array();\r\n for (var i = 0; i < this.attachments.length; i++) {\r\n let slotAttachments = this.attachments[i];\r\n if (slotAttachments) {\r\n for (let name in slotAttachments) {\r\n let attachment = slotAttachments[name];\r\n if (attachment) entries.push(new SkinEntry(i, name, attachment));\r\n }\r\n }\r\n }\r\n return entries;\r\n }\r\n\r\n getAttachmentsForSlot (slotIndex: number, attachments: Array) {\r\n let slotAttachments = this.attachments[slotIndex];\r\n if (slotAttachments) {\r\n for (let name in slotAttachments) {\r\n let attachment = slotAttachments[name];\r\n if (attachment) attachments.push(new SkinEntry(slotIndex, name, attachment));\r\n }\r\n }\r\n }\r\n\r\n clear () {\r\n this.attachments.length = 0;\r\n this.bones.length = 0;\r\n this.constraints.length = 0;\r\n }\r\n\r\n /** Attach each attachment in this skin if the corresponding attachment in the old skin is currently attached. */\r\n attachAll (skeleton: Skeleton, oldSkin: Skin) {\r\n let slotIndex = 0;\r\n for (let i = 0; i < skeleton.slots.length; i++) {\r\n let slot = skeleton.slots[i];\r\n let slotAttachment = slot.getAttachment();\r\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\r\n let dictionary = oldSkin.attachments[slotIndex];\r\n for (let key in dictionary) {\r\n let skinAttachment:Attachment = dictionary[key];\r\n if (slotAttachment == skinAttachment) {\r\n let attachment = this.getAttachment(slotIndex, key);\r\n if (attachment != null) slot.setAttachment(attachment);\r\n break;\r\n }\r\n }\r\n }\r\n slotIndex++;\r\n }\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class Slot {\r\n //this is for PIXI\r\n currentMesh: any;\r\n currentSprite: any;\r\n currentGraphics: any;\r\n clippingContainer: any;\r\n\r\n meshes: any;\r\n currentMeshName: string;\r\n sprites: any;\r\n currentSpriteName: string;\r\n\r\n blendMode: number;\r\n //assign hack region a bit later\r\n hackRegion: TextureRegion;\r\n hackAttachment: Attachment;\r\n\r\n //this is canon\r\n data: SlotData;\r\n bone: Bone;\r\n color: Color;\r\n darkColor: Color;\r\n attachment: Attachment;\r\n private attachmentTime: number;\r\n attachmentState: number;\r\n deform = new Array();\r\n\r\n constructor (data: SlotData, bone: Bone) {\r\n if (data == null) throw new Error(\"data cannot be null.\");\r\n if (bone == null) throw new Error(\"bone cannot be null.\");\r\n this.data = data;\r\n this.bone = bone;\r\n this.color = new Color();\r\n this.darkColor = data.darkColor == null ? null : new Color();\r\n this.setToSetupPose();\r\n\r\n this.blendMode = this.data.blendMode;\r\n }\r\n\r\n /** @return May be null. */\r\n getAttachment (): Attachment {\r\n return this.attachment;\r\n }\r\n\r\n /** Sets the attachment and if it changed, resets {@link #getAttachmentTime()} and clears {@link #getAttachmentVertices()}.\r\n * @param attachment May be null. */\r\n setAttachment (attachment: Attachment) {\r\n if (this.attachment == attachment) return;\r\n this.attachment = attachment;\r\n this.attachmentTime = this.bone.skeleton.time;\r\n this.deform.length = 0;\r\n }\r\n\r\n setAttachmentTime (time: number) {\r\n this.attachmentTime = this.bone.skeleton.time - time;\r\n }\r\n\r\n /** Returns the time since the attachment was set. */\r\n getAttachmentTime (): number {\r\n return this.bone.skeleton.time - this.attachmentTime;\r\n }\r\n\r\n setToSetupPose () {\r\n this.color.setFromColor(this.data.color);\r\n if (this.darkColor != null) this.darkColor.setFromColor(this.data.darkColor);\r\n if (this.data.attachmentName == null)\r\n this.attachment = null;\r\n else {\r\n this.attachment = null;\r\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\r\n }\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class SlotData {\r\n index: number;\r\n name: string;\r\n boneData: BoneData;\r\n color = new Color(1, 1, 1, 1);\r\n darkColor: Color;\r\n attachmentName: string;\r\n blendMode: BlendMode;\r\n\r\n constructor (index: number, name: string, boneData: BoneData) {\r\n if (index < 0) throw new Error(\"index must be >= 0.\");\r\n if (name == null) throw new Error(\"name cannot be null.\");\r\n if (boneData == null) throw new Error(\"boneData cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.boneData = boneData;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export abstract class Texture {\r\n protected _image: HTMLImageElement;\r\n\r\n constructor (image: HTMLImageElement) {\r\n this._image = image;\r\n }\r\n\r\n getImage (): HTMLImageElement {\r\n return this._image;\r\n }\r\n\r\n abstract setFilters (minFilter: TextureFilter, magFilter: TextureFilter): void;\r\n abstract setWraps (uWrap: TextureWrap, vWrap: TextureWrap): void;\r\n abstract dispose (): void;\r\n\r\n\r\n public static filterFromString (text: string): TextureFilter {\r\n switch (text.toLowerCase()) {\r\n case \"nearest\": return TextureFilter.Nearest;\r\n case \"linear\": return TextureFilter.Linear;\r\n case \"mipmap\": return TextureFilter.MipMap;\r\n case \"mipmapnearestnearest\": return TextureFilter.MipMapNearestNearest;\r\n case \"mipmaplinearnearest\": return TextureFilter.MipMapLinearNearest;\r\n case \"mipmapnearestlinear\": return TextureFilter.MipMapNearestLinear;\r\n case \"mipmaplinearlinear\": return TextureFilter.MipMapLinearLinear;\r\n default: throw new Error(`Unknown texture filter ${text}`);\r\n }\r\n }\r\n\r\n public static wrapFromString (text: string): TextureWrap {\r\n switch (text.toLowerCase()) {\r\n case \"mirroredtepeat\": return TextureWrap.MirroredRepeat;\r\n case \"clamptoedge\": return TextureWrap.ClampToEdge;\r\n case \"repeat\": return TextureWrap.Repeat;\r\n default: throw new Error(`Unknown texture wrap ${text}`);\r\n }\r\n }\r\n }\r\n\r\n export enum TextureFilter {\r\n Nearest = 9728, // WebGLRenderingContext.NEAREST\r\n Linear = 9729, // WebGLRenderingContext.LINEAR\r\n MipMap = 9987, // WebGLRenderingContext.LINEAR_MIPMAP_LINEAR\r\n MipMapNearestNearest = 9984, // WebGLRenderingContext.NEAREST_MIPMAP_NEAREST\r\n MipMapLinearNearest = 9985, // WebGLRenderingContext.LINEAR_MIPMAP_NEAREST\r\n MipMapNearestLinear = 9986, // WebGLRenderingContext.NEAREST_MIPMAP_LINEAR\r\n MipMapLinearLinear = 9987 // WebGLRenderingContext.LINEAR_MIPMAP_LINEAR\r\n }\r\n\r\n export enum TextureWrap {\r\n MirroredRepeat = 33648, // WebGLRenderingContext.MIRRORED_REPEAT\r\n ClampToEdge = 33071, // WebGLRenderingContext.CLAMP_TO_EDGE\r\n Repeat = 10497 // WebGLRenderingContext.REPEAT\r\n }\r\n\r\n export class TextureRegion {\r\n texture: PIXI.Texture;\r\n\r\n //thats for overrides\r\n size: PIXI.Rectangle = null;\r\n\r\n get width(): number {\r\n const tex = this.texture;\r\n if (PIXI.VERSION[0] == '3') {\r\n return (tex as any).crop.width;\r\n }\r\n if (tex.trim) {\r\n return tex.trim.width;\r\n }\r\n return tex.orig.width;\r\n }\r\n\r\n get height(): number {\r\n const tex = this.texture;\r\n if (PIXI.VERSION[0] == '3') {\r\n return (tex as any).crop.height;\r\n }\r\n if (tex.trim) {\r\n return tex.trim.height;\r\n }\r\n return tex.orig.height;\r\n }\r\n\r\n get u(): number {\r\n return (this.texture as any)._uvs.x0;\r\n }\r\n\r\n get v(): number {\r\n return (this.texture as any)._uvs.y0;\r\n }\r\n\r\n get u2(): number {\r\n return (this.texture as any)._uvs.x2;\r\n }\r\n\r\n get v2(): number {\r\n return (this.texture as any)._uvs.y2;\r\n }\r\n\r\n get offsetX(): number {\r\n const tex = this.texture;\r\n return tex.trim ? tex.trim.x : 0;\r\n }\r\n\r\n get offsetY(): number {\r\n console.warn(\"Deprecation Warning: @Hackerham: I guess, if you are using PIXI-SPINE ATLAS region.offsetY, you want a texture, right? Use region.texture from now on.\");\r\n return this.spineOffsetY;\r\n }\r\n\r\n get pixiOffsetY(): number {\r\n const tex = this.texture;\r\n return tex.trim ? tex.trim.y : 0;\r\n }\r\n\r\n get spineOffsetY(): number {\r\n let tex = this.texture;\r\n return this.originalHeight - this.height - (tex.trim ? tex.trim.y : 0);\r\n }\r\n\r\n get originalWidth(): number {\r\n let tex = this.texture;\r\n if (PIXI.VERSION[0] == '3') {\r\n if (tex.trim) {\r\n return tex.trim.width;\r\n }\r\n return (tex as any).crop.width;\r\n }\r\n return tex.orig.width;\r\n }\r\n\r\n get originalHeight(): number {\r\n const tex = this.texture;\r\n if (PIXI.VERSION[0] == '3') {\r\n if (tex.trim) {\r\n return tex.trim.height;\r\n }\r\n return (tex as any).crop.height;\r\n }\r\n return tex.orig.height;\r\n }\r\n\r\n get x(): number {\r\n return this.texture.frame.x;\r\n }\r\n\r\n get y(): number {\r\n return this.texture.frame.y;\r\n }\r\n\r\n get rotate(): boolean {\r\n return this.texture.rotate !== 0;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class TextureAtlas implements Disposable {\r\n pages = new Array();\r\n regions = new Array();\r\n\r\n constructor(atlasText?: string, textureLoader?: (path: string, loaderFunction: (tex: PIXI.BaseTexture) => any) => any, callback?: (obj: TextureAtlas) => any) {\r\n if (atlasText) {\r\n this.addSpineAtlas(atlasText, textureLoader, callback);\r\n }\r\n }\r\n\r\n addTexture(name: string, texture: PIXI.Texture) {\r\n let pages = this.pages;\r\n let page: TextureAtlasPage = null;\r\n for (let i = 0; i < pages.length; i++) {\r\n if (pages[i].baseTexture === texture.baseTexture) {\r\n page = pages[i];\r\n break;\r\n }\r\n }\r\n if (page === null) {\r\n page = new TextureAtlasPage();\r\n page.name = 'texturePage';\r\n let baseTexture = texture.baseTexture;\r\n page.width = baseTexture.realWidth;\r\n page.height = baseTexture.realHeight;\r\n page.baseTexture = baseTexture;\r\n //those fields are not relevant in Pixi\r\n page.minFilter = page.magFilter = TextureFilter.Nearest;\r\n page.uWrap = TextureWrap.ClampToEdge;\r\n page.vWrap = TextureWrap.ClampToEdge;\r\n pages.push(page);\r\n }\r\n let region = new TextureAtlasRegion();\r\n region.name = name;\r\n region.page = page;\r\n region.texture = texture;\r\n region.index = -1;\r\n this.regions.push(region);\r\n return region;\r\n }\r\n\r\n addTextureHash(textures: Map, stripExtension: boolean) {\r\n for (let key in textures) {\r\n if (textures.hasOwnProperty(key)) {\r\n this.addTexture(stripExtension && key.indexOf('.') !== -1 ? key.substr(0, key.lastIndexOf('.')) : key, textures[key]);\r\n }\r\n }\r\n }\r\n\r\n public addSpineAtlas(atlasText: string, textureLoader: (path: string, loaderFunction: (tex: PIXI.BaseTexture) => any) => any, callback: (obj: TextureAtlas) => any) {\r\n return this.load(atlasText, textureLoader, callback);\r\n }\r\n\r\n private load(atlasText: string, textureLoader: (path: string, loaderFunction: (tex: PIXI.BaseTexture) => any) => any, callback: (obj: TextureAtlas) => any) {\r\n if (textureLoader == null)\r\n throw new Error(\"textureLoader cannot be null.\");\r\n\r\n let reader = new TextureAtlasReader(atlasText);\r\n let tuple = new Array(4);\r\n let page: TextureAtlasPage = null;\r\n\r\n let iterateParser = () => {\r\n while (true) {\r\n let line = reader.readLine();\r\n if (line == null) {\r\n return callback && callback(this);\r\n }\r\n line = line.trim();\r\n if (line.length == 0)\r\n page = null;\r\n else if (!page) {\r\n page = new TextureAtlasPage();\r\n page.name = line;\r\n\r\n if (reader.readTuple(tuple) == 2) { // size is only optional for an atlas packed with an old TexturePacker.\r\n page.width = parseInt(tuple[0]);\r\n page.height = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n }\r\n // page.format = Format[tuple[0]]; we don't need format in WebGL\r\n\r\n reader.readTuple(tuple);\r\n page.minFilter = Texture.filterFromString(tuple[0]);\r\n page.magFilter = Texture.filterFromString(tuple[1]);\r\n\r\n let direction = reader.readValue();\r\n page.uWrap = TextureWrap.ClampToEdge;\r\n page.vWrap = TextureWrap.ClampToEdge;\r\n if (direction == \"x\")\r\n page.uWrap = TextureWrap.Repeat;\r\n else if (direction == \"y\")\r\n page.vWrap = TextureWrap.Repeat;\r\n else if (direction == \"xy\")\r\n page.uWrap = page.vWrap = TextureWrap.Repeat;\r\n\r\n textureLoader(line, (texture: PIXI.BaseTexture) => {\r\n if (texture === null) {\r\n this.pages.splice(this.pages.indexOf(page), 1);\r\n return callback && callback(null);\r\n }\r\n page.baseTexture = texture;\r\n if (!texture.valid) {\r\n texture.setSize(page.width, page.height);\r\n }\r\n this.pages.push(page);\r\n page.setFilters();\r\n\r\n if (!page.width || !page.height) {\r\n page.width = texture.realWidth;\r\n page.height = texture.realHeight;\r\n if (!page.width || !page.height) {\r\n console.log(\"ERROR spine atlas page \" + page.name + \": meshes wont work if you dont specify size in atlas (http://www.html5gamedevs.com/topic/18888-pixi-spines-and-meshes/?p=107121)\");\r\n }\r\n }\r\n iterateParser();\r\n });\r\n this.pages.push(page);\r\n break;\r\n } else {\r\n let region: TextureAtlasRegion = new TextureAtlasRegion();\r\n region.name = line;\r\n region.page = page;\r\n\r\n let rotateValue = reader.readValue();\r\n let rotate = 0;\r\n if (rotateValue.toLocaleLowerCase() == \"true\") {\r\n rotate = 6;\r\n } else if (rotateValue.toLocaleLowerCase() == \"false\") {\r\n rotate = 0;\r\n } else {\r\n rotate = ((720 - parseFloat(rotateValue))% 360) / 45;\r\n }\r\n\r\n reader.readTuple(tuple);\r\n let x = parseInt(tuple[0]);\r\n let y = parseInt(tuple[1]);\r\n\r\n reader.readTuple(tuple);\r\n let width = parseInt(tuple[0]);\r\n let height = parseInt(tuple[1]);\r\n\r\n let resolution = page.baseTexture.resolution;\r\n x /= resolution;\r\n y /= resolution;\r\n width /= resolution;\r\n height /= resolution;\r\n\r\n const swapWH = rotate % 4 != 0;\r\n let frame = new PIXI.Rectangle(x, y, swapWH ? height : width, swapWH ? width : height);\r\n\r\n if (reader.readTuple(tuple) == 4) { // split is optional\r\n // region.splits = new Vector.(parseInt(tuple[0]), parseInt(tuple[1]), parseInt(tuple[2]), parseInt(tuple[3]));\r\n\r\n if (reader.readTuple(tuple) == 4) { // pad is optional, but only present with splits\r\n //region.pads = Vector.(parseInt(tuple[0]), parseInt(tuple[1]), parseInt(tuple[2]), parseInt(tuple[3]));\r\n\r\n reader.readTuple(tuple);\r\n }\r\n }\r\n\r\n let originalWidth = parseInt(tuple[0]) / resolution;\r\n let originalHeight = parseInt(tuple[1]) / resolution;\r\n reader.readTuple(tuple);\r\n let offsetX = parseInt(tuple[0]) / resolution;\r\n let offsetY = parseInt(tuple[1]) / resolution;\r\n\r\n let orig = new PIXI.Rectangle(0, 0, originalWidth, originalHeight);\r\n let trim = new PIXI.Rectangle(offsetX, originalHeight - height - offsetY, width, height);\r\n\r\n //TODO: pixiv3 uses different frame/crop/trim\r\n\r\n if (PIXI.VERSION[0] != '3') {\r\n // pixi v4 or v5\r\n region.texture = new PIXI.Texture(region.page.baseTexture, frame, orig, trim, rotate);\r\n } else {\r\n // pixi v3.0.11\r\n let frame2 = new PIXI.Rectangle(x, y, width, height);\r\n let crop = frame2.clone();\r\n trim.width = originalWidth;\r\n trim.height = originalHeight;\r\n region.texture = new PIXI.Texture(region.page.baseTexture, frame2, crop, trim, rotate);\r\n }\r\n\r\n region.index = parseInt(reader.readValue());\r\n region.texture.updateUvs();\r\n\r\n this.regions.push(region);\r\n }\r\n }\r\n };\r\n\r\n iterateParser();\r\n }\r\n\r\n findRegion(name: string): TextureAtlasRegion {\r\n for (let i = 0; i < this.regions.length; i++) {\r\n if (this.regions[i].name == name) {\r\n return this.regions[i];\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n dispose() {\r\n for (let i = 0; i < this.pages.length; i++) {\r\n this.pages[i].baseTexture.dispose();\r\n }\r\n }\r\n }\r\n\r\n class TextureAtlasReader {\r\n lines: Array;\r\n index: number = 0;\r\n\r\n constructor(text: string) {\r\n this.lines = text.split(/\\r\\n|\\r|\\n/);\r\n }\r\n\r\n readLine(): string {\r\n if (this.index >= this.lines.length)\r\n return null;\r\n return this.lines[this.index++];\r\n }\r\n\r\n readValue(): string {\r\n let line = this.readLine();\r\n let colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n return line.substring(colon + 1).trim();\r\n }\r\n\r\n readTuple(tuple: Array): number {\r\n let line = this.readLine();\r\n let colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n let i = 0, lastMatch = colon + 1;\r\n for (; i < 3; i++) {\r\n let comma = line.indexOf(\",\", lastMatch);\r\n if (comma == -1) break;\r\n tuple[i] = line.substr(lastMatch, comma - lastMatch).trim();\r\n lastMatch = comma + 1;\r\n }\r\n tuple[i] = line.substring(lastMatch).trim();\r\n return i + 1;\r\n }\r\n }\r\n\r\n export class TextureAtlasPage {\r\n name: string;\r\n minFilter: TextureFilter;\r\n magFilter: TextureFilter;\r\n uWrap: TextureWrap;\r\n vWrap: TextureWrap;\r\n baseTexture: PIXI.BaseTexture;\r\n width: number;\r\n height: number;\r\n\r\n public setFilters() {\r\n let tex = this.baseTexture;\r\n let filter = this.minFilter;\r\n if (filter == TextureFilter.Linear) {\r\n tex.scaleMode = PIXI.SCALE_MODES.LINEAR;\r\n } else if (this.minFilter == TextureFilter.Nearest) {\r\n tex.scaleMode = PIXI.SCALE_MODES.NEAREST;\r\n } else {\r\n tex.mipmap = PIXI.MIPMAP_MODES.POW2;\r\n if (filter == TextureFilter.MipMapNearestNearest) {\r\n tex.scaleMode = PIXI.SCALE_MODES.NEAREST;\r\n } else {\r\n tex.scaleMode = PIXI.SCALE_MODES.LINEAR;\r\n }\r\n }\r\n }\r\n }\r\n\r\n export class TextureAtlasRegion extends TextureRegion {\r\n page: TextureAtlasPage;\r\n name: string;\r\n index: number;\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class TransformConstraint implements Updatable {\r\n data: TransformConstraintData;\r\n bones: Array;\r\n target: Bone;\r\n rotateMix = 0;\r\n translateMix = 0;\r\n scaleMix = 0;\r\n shearMix = 0;\r\n temp = new Vector2();\r\n active = false;\r\n\r\n constructor(data: TransformConstraintData, skeleton: Skeleton) {\r\n if (data == null) throw new Error(\"data cannot be null.\");\r\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n this.scaleMix = data.scaleMix;\r\n this.shearMix = data.shearMix;\r\n this.bones = new Array();\r\n for (let i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n\r\n isActive () {\r\n return this.active;\r\n }\r\n\r\n apply() {\r\n this.update();\r\n }\r\n\r\n update() {\r\n if (this.data.local) {\r\n if (this.data.relative)\r\n this.applyRelativeLocal();\r\n else\r\n this.applyAbsoluteLocal();\r\n\r\n } else {\r\n if (this.data.relative)\r\n this.applyRelativeWorld();\r\n else\r\n this.applyAbsoluteWorld();\r\n }\r\n }\r\n\r\n applyAbsoluteWorld() {\r\n let rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix,\r\n shearMix = this.shearMix;\r\n let target = this.target;\r\n let targetMat = target.matrix;\r\n let ta = targetMat.a, tb = targetMat.c, tc = targetMat.b, td = targetMat.d;\r\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n let offsetRotation = this.data.offsetRotation * degRadReflect;\r\n let offsetShearY = this.data.offsetShearY * degRadReflect;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n let modified = false;\r\n let mat = bone.matrix;\r\n\r\n if (rotateMix != 0) {\r\n let a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n let r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n r *= rotateMix;\r\n let cos = Math.cos(r), sin = Math.sin(r);\r\n mat.a = cos * a - sin * c;\r\n mat.c = cos * b - sin * d;\r\n mat.b = sin * a + cos * c;\r\n mat.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n\r\n if (translateMix != 0) {\r\n let temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n mat.tx += (temp.x - mat.tx) * translateMix;\r\n mat.ty += (temp.y - mat.ty) * translateMix;\r\n modified = true;\r\n }\r\n\r\n if (scaleMix > 0) {\r\n let s = Math.sqrt(mat.a * mat.a + mat.b * mat.b);\r\n let ts = Math.sqrt(ta * ta + tc * tc);\r\n if (s > 0.00001) s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\r\n mat.a *= s;\r\n mat.b *= s;\r\n s = Math.sqrt(mat.c * mat.c + mat.d * mat.d);\r\n ts = Math.sqrt(tb * tb + td * td);\r\n if (s > 0.00001) s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\r\n mat.c *= s;\r\n mat.d *= s;\r\n modified = true;\r\n }\r\n\r\n if (shearMix > 0) {\r\n let b = mat.c, d = mat.d;\r\n let by = Math.atan2(d, b);\r\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(mat.b, mat.a));\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n r = by + (r + offsetShearY) * shearMix;\r\n let s = Math.sqrt(b * b + d * d);\r\n mat.c = Math.cos(r) * s;\r\n mat.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n\r\n if (modified) bone.appliedValid = false;\r\n }\r\n }\r\n\r\n applyRelativeWorld() {\r\n let rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix,\r\n shearMix = this.shearMix;\r\n let target = this.target;\r\n let targetMat = target.matrix;\r\n let ta = targetMat.a, tb = targetMat.c, tc = targetMat.b, td = targetMat.d;\r\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n let offsetRotation = this.data.offsetRotation * degRadReflect,\r\n offsetShearY = this.data.offsetShearY * degRadReflect;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n let modified = false;\r\n let mat = bone.matrix;\r\n\r\n if (rotateMix != 0) {\r\n let a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n let r = Math.atan2(tc, ta) + offsetRotation;\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI) r += MathUtils.PI2;\r\n r *= rotateMix;\r\n let cos = Math.cos(r), sin = Math.sin(r);\r\n mat.a = cos * a - sin * c;\r\n mat.c = cos * b - sin * d;\r\n mat.b = sin * a + cos * c;\r\n mat.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n\r\n if (translateMix != 0) {\r\n let temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n mat.tx += temp.x * translateMix;\r\n mat.ty += temp.y * translateMix;\r\n modified = true;\r\n }\r\n\r\n if (scaleMix > 0) {\r\n let s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1;\r\n mat.a *= s;\r\n mat.b *= s;\r\n s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1;\r\n mat.c *= s;\r\n mat.d *= s;\r\n modified = true;\r\n }\r\n\r\n if (shearMix > 0) {\r\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta);\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI) r += MathUtils.PI2;\r\n let b = mat.c, d = mat.d;\r\n r = Math.atan2(d, b) + (r - MathUtils.PI / 2 + offsetShearY) * shearMix;\r\n let s = Math.sqrt(b * b + d * d);\r\n mat.c = Math.cos(r) * s;\r\n mat.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n\r\n if (modified) bone.appliedValid = false;\r\n }\r\n }\r\n\r\n applyAbsoluteLocal() {\r\n let rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix,\r\n shearMix = this.shearMix;\r\n let target = this.target;\r\n if (!target.appliedValid) target.updateAppliedTransform();\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (!bone.appliedValid) bone.updateAppliedTransform();\r\n\r\n let rotation = bone.arotation;\r\n if (rotateMix != 0) {\r\n let r = target.arotation - rotation + this.data.offsetRotation;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n rotation += r * rotateMix;\r\n }\r\n\r\n let x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax - x + this.data.offsetX) * translateMix;\r\n y += (target.ay - y + this.data.offsetY) * translateMix;\r\n }\r\n\r\n let scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix > 0) {\r\n if (scaleX > 0.00001) scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX;\r\n if (scaleY > 0.00001) scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY;\r\n }\r\n\r\n let shearY = bone.ashearY;\r\n if (shearMix > 0) {\r\n let r = target.ashearY - shearY + this.data.offsetShearY;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n bone.shearY += r * shearMix;\r\n }\r\n\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n }\r\n\r\n applyRelativeLocal() {\r\n let rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix,\r\n shearMix = this.shearMix;\r\n let target = this.target;\r\n if (!target.appliedValid) target.updateAppliedTransform();\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (!bone.appliedValid) bone.updateAppliedTransform();\r\n\r\n let rotation = bone.arotation;\r\n if (rotateMix != 0) rotation += (target.arotation + this.data.offsetRotation) * rotateMix;\r\n\r\n let x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax + this.data.offsetX) * translateMix;\r\n y += (target.ay + this.data.offsetY) * translateMix;\r\n }\r\n\r\n let scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix > 0) {\r\n if (scaleX > 0.00001) scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1;\r\n if (scaleY > 0.00001) scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1;\r\n }\r\n\r\n let shearY = bone.ashearY;\r\n if (shearMix > 0) shearY += (target.ashearY + this.data.offsetShearY) * shearMix;\r\n\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n }\r\n }\r\n\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class TransformConstraintData extends ConstraintData {\r\n bones = new Array();\r\n target: BoneData;\r\n rotateMix = 0; translateMix = 0; scaleMix = 0; shearMix = 0;\r\n offsetRotation = 0; offsetX = 0; offsetY = 0; offsetScaleX = 0; offsetScaleY = 0; offsetShearY = 0;\r\n relative = false;\r\n local = false;\r\n\r\n constructor (name: string) {\r\n super(name, 0, false);\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n\texport class Triangulator {\r\n\t\tprivate convexPolygons = new Array>();\r\n\t\tprivate convexPolygonsIndices = new Array>();\r\n\r\n\t\tprivate indicesArray = new Array();\r\n\t\tprivate isConcaveArray = new Array();\r\n\t\tprivate triangles = new Array();\r\n\r\n\t\tprivate polygonPool = new Pool>(() => {\r\n\t\t\treturn new Array();\r\n\t\t});\r\n\r\n\t\tprivate polygonIndicesPool = new Pool>(() => {\r\n\t\t\treturn new Array();\r\n\t\t});\r\n\r\n\t\tpublic triangulate (verticesArray: ArrayLike): Array {\r\n\t\t\tlet vertices = verticesArray;\r\n\t\t\tlet vertexCount = verticesArray.length >> 1;\r\n\r\n\t\t\tlet indices = this.indicesArray;\r\n\t\t\tindices.length = 0;\r\n\t\t\tfor (let i = 0; i < vertexCount; i++)\r\n\t\t\t\tindices[i] = i;\r\n\r\n\t\t\tlet isConcave = this.isConcaveArray;\r\n\t\t\tisConcave.length = 0;\r\n\t\t\tfor (let i = 0, n = vertexCount; i < n; ++i)\r\n\t\t\t\tisConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\r\n\r\n\t\t\tlet triangles = this.triangles;\r\n\t\t\ttriangles.length = 0;\r\n\r\n\t\t\twhile (vertexCount > 3) {\r\n\t\t\t\t// Find ear tip.\r\n\t\t\t\tlet previous = vertexCount - 1, i = 0, next = 1;\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\touter:\r\n\t\t\t\t\tif (!isConcave[i]) {\r\n\t\t\t\t\t\tlet p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\r\n\t\t\t\t\t\tlet p1x = vertices[p1], p1y = vertices[p1 + 1];\r\n\t\t\t\t\t\tlet p2x = vertices[p2], p2y = vertices[p2 + 1];\r\n\t\t\t\t\t\tlet p3x = vertices[p3], p3y = vertices[p3 + 1];\r\n\t\t\t\t\t\tfor (let ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\r\n\t\t\t\t\t\t\tif (!isConcave[ii]) continue;\r\n\t\t\t\t\t\t\tlet v = indices[ii] << 1;\r\n\t\t\t\t\t\t\tlet vx = vertices[v], vy = vertices[v + 1];\r\n\t\t\t\t\t\t\tif (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\r\n\t\t\t\t\t\t\t\tif (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\r\n\t\t\t\t\t\t\t\t\tif (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy)) break outer;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (next == 0) {\r\n\t\t\t\t\t\tdo {\r\n\t\t\t\t\t\t\tif (!isConcave[i]) break;\r\n\t\t\t\t\t\t\ti--;\r\n\t\t\t\t\t\t} while (i > 0);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tprevious = i;\r\n\t\t\t\t\ti = next;\r\n\t\t\t\t\tnext = (next + 1) % vertexCount;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Cut ear tip.\r\n\t\t\t\ttriangles.push(indices[(vertexCount + i - 1) % vertexCount]);\r\n\t\t\t\ttriangles.push(indices[i]);\r\n\t\t\t\ttriangles.push(indices[(i + 1) % vertexCount]);\r\n\t\t\t\tindices.splice(i, 1);\r\n\t\t\t\tisConcave.splice(i, 1);\r\n\t\t\t\tvertexCount--;\r\n\r\n\t\t\t\tlet previousIndex = (vertexCount + i - 1) % vertexCount;\r\n\t\t\t\tlet nextIndex = i == vertexCount ? 0 : i;\r\n\t\t\t\tisConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\r\n\t\t\t\tisConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\r\n\t\t\t}\r\n\r\n\t\t\tif (vertexCount == 3) {\r\n\t\t\t\ttriangles.push(indices[2]);\r\n\t\t\t\ttriangles.push(indices[0]);\r\n\t\t\t\ttriangles.push(indices[1]);\r\n\t\t\t}\r\n\r\n\t\t\treturn triangles;\r\n\t\t}\r\n\r\n\t\tdecompose (verticesArray: Array, triangles: Array) : Array> {\r\n\t\t\tlet vertices = verticesArray;\r\n\t\t\tlet convexPolygons = this.convexPolygons;\r\n\t\t\tthis.polygonPool.freeAll(convexPolygons);\r\n\t\t\tconvexPolygons.length = 0;\r\n\r\n\t\t\tlet convexPolygonsIndices = this.convexPolygonsIndices;\r\n\t\t\tthis.polygonIndicesPool.freeAll(convexPolygonsIndices);\r\n\t\t\tconvexPolygonsIndices.length = 0;\r\n\r\n\t\t\tlet polygonIndices = this.polygonIndicesPool.obtain();\r\n\t\t\tpolygonIndices.length = 0;\r\n\r\n\t\t\tlet polygon = this.polygonPool.obtain();\r\n\t\t\tpolygon.length = 0;\r\n\r\n\t\t\t// Merge subsequent triangles if they form a triangle fan.\r\n\t\t\tlet fanBaseIndex = -1, lastWinding = 0;\r\n\t\t\tfor (let i = 0, n = triangles.length; i < n; i += 3) {\r\n\t\t\t\tlet t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\r\n\t\t\t\tlet x1 = vertices[t1], y1 = vertices[t1 + 1];\r\n\t\t\t\tlet x2 = vertices[t2], y2 = vertices[t2 + 1];\r\n\t\t\t\tlet x3 = vertices[t3], y3 = vertices[t3 + 1];\r\n\r\n\t\t\t\t// If the base of the last triangle is the same as this triangle, check if they form a convex polygon (triangle fan).\r\n\t\t\t\tlet merged = false;\r\n\t\t\t\tif (fanBaseIndex == t1) {\r\n\t\t\t\t\tlet o = polygon.length - 4;\r\n\t\t\t\t\tlet winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\r\n\t\t\t\t\tlet winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\r\n\t\t\t\t\tif (winding1 == lastWinding && winding2 == lastWinding) {\r\n\t\t\t\t\t\tpolygon.push(x3);\r\n\t\t\t\t\t\tpolygon.push(y3);\r\n\t\t\t\t\t\tpolygonIndices.push(t3);\r\n\t\t\t\t\t\tmerged = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Otherwise make this triangle the new base.\r\n\t\t\t\tif (!merged) {\r\n\t\t\t\t\tif (polygon.length > 0) {\r\n\t\t\t\t\t\tconvexPolygons.push(polygon);\r\n\t\t\t\t\t\tconvexPolygonsIndices.push(polygonIndices);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.polygonPool.free(polygon)\r\n\t\t\t\t\t\tthis.polygonIndicesPool.free(polygonIndices);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpolygon = this.polygonPool.obtain();\r\n\t\t\t\t\tpolygon.length = 0;\r\n\t\t\t\t\tpolygon.push(x1);\r\n\t\t\t\t\tpolygon.push(y1);\r\n\t\t\t\t\tpolygon.push(x2);\r\n\t\t\t\t\tpolygon.push(y2);\r\n\t\t\t\t\tpolygon.push(x3);\r\n\t\t\t\t\tpolygon.push(y3);\r\n\t\t\t\t\tpolygonIndices = this.polygonIndicesPool.obtain();\r\n\t\t\t\t\tpolygonIndices.length = 0;\r\n\t\t\t\t\tpolygonIndices.push(t1);\r\n\t\t\t\t\tpolygonIndices.push(t2);\r\n\t\t\t\t\tpolygonIndices.push(t3);\r\n\t\t\t\t\tlastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\r\n\t\t\t\t\tfanBaseIndex = t1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (polygon.length > 0) {\r\n\t\t\t\tconvexPolygons.push(polygon);\r\n\t\t\t\tconvexPolygonsIndices.push(polygonIndices);\r\n\t\t\t}\r\n\r\n\t\t\t// Go through the list of polygons and try to merge the remaining triangles with the found triangle fans.\r\n\t\t\tfor (let i = 0, n = convexPolygons.length; i < n; i++) {\r\n\t\t\t\tpolygonIndices = convexPolygonsIndices[i];\r\n\t\t\t\tif (polygonIndices.length == 0) continue;\r\n\t\t\t\tlet firstIndex = polygonIndices[0];\r\n\t\t\t\tlet lastIndex = polygonIndices[polygonIndices.length - 1];\r\n\r\n\t\t\t\tpolygon = convexPolygons[i];\r\n\t\t\t\tlet o = polygon.length - 4;\r\n\t\t\t\tlet prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\r\n\t\t\t\tlet prevX = polygon[o + 2], prevY = polygon[o + 3];\r\n\t\t\t\tlet firstX = polygon[0], firstY = polygon[1];\r\n\t\t\t\tlet secondX = polygon[2], secondY = polygon[3];\r\n\t\t\t\tlet winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\r\n\r\n\t\t\t\tfor (let ii = 0; ii < n; ii++) {\r\n\t\t\t\t\tif (ii == i) continue;\r\n\t\t\t\t\tlet otherIndices = convexPolygonsIndices[ii];\r\n\t\t\t\t\tif (otherIndices.length != 3) continue;\r\n\t\t\t\t\tlet otherFirstIndex = otherIndices[0];\r\n\t\t\t\t\tlet otherSecondIndex = otherIndices[1];\r\n\t\t\t\t\tlet otherLastIndex = otherIndices[2];\r\n\r\n\t\t\t\t\tlet otherPoly = convexPolygons[ii];\r\n\t\t\t\t\tlet x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\r\n\r\n\t\t\t\t\tif (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex) continue;\r\n\t\t\t\t\tlet winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\r\n\t\t\t\t\tlet winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\r\n\t\t\t\t\tif (winding1 == winding && winding2 == winding) {\r\n\t\t\t\t\t\totherPoly.length = 0;\r\n\t\t\t\t\t\totherIndices.length = 0;\r\n\t\t\t\t\t\tpolygon.push(x3);\r\n\t\t\t\t\t\tpolygon.push(y3);\r\n\t\t\t\t\t\tpolygonIndices.push(otherLastIndex);\r\n\t\t\t\t\t\tprevPrevX = prevX;\r\n\t\t\t\t\t\tprevPrevY = prevY;\r\n\t\t\t\t\t\tprevX = x3;\r\n\t\t\t\t\t\tprevY = y3;\r\n\t\t\t\t\t\tii = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Remove empty polygons that resulted from the merge step above.\r\n\t\t\tfor (let i = convexPolygons.length - 1; i >= 0; i--) {\r\n\t\t\t\tpolygon = convexPolygons[i];\r\n\t\t\t\tif (polygon.length == 0) {\r\n\t\t\t\t\tconvexPolygons.splice(i, 1);\r\n\t\t\t\t\tthis.polygonPool.free(polygon);\r\n\t\t\t\t\tpolygonIndices = convexPolygonsIndices[i]\r\n\t\t\t\t\tconvexPolygonsIndices.splice(i, 1)\r\n\t\t\t\t\tthis.polygonIndicesPool.free(polygonIndices);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn convexPolygons;\r\n\t\t}\r\n\r\n\t\tprivate static isConcave (index: number, vertexCount: number, vertices: ArrayLike, indices: ArrayLike): boolean {\r\n\t\t\tlet previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\r\n\t\t\tlet current = indices[index] << 1;\r\n\t\t\tlet next = indices[(index + 1) % vertexCount] << 1;\r\n\t\t\treturn !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next],\r\n\t\t\t\tvertices[next + 1]);\r\n\t\t}\r\n\r\n\t\tprivate static positiveArea (p1x: number, p1y: number, p2x: number, p2y: number, p3x: number, p3y: number): boolean {\r\n\t\t\treturn p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\r\n\t\t}\r\n\r\n\t\tprivate static winding (p1x: number, p1y: number, p2x: number, p2y: number, p3x: number, p3y: number): number {\r\n\t\t\tlet px = p2x - p1x, py = p2y - p1y;\r\n\t\t\treturn p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\r\n\t\t}\r\n\t}\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export interface Updatable {\r\n update(): void;\r\n\r\n isActive(): boolean;\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export interface Map {\r\n [key: string]: T;\r\n }\r\n\r\n export class IntSet {\r\n array = new Array();\r\n\r\n add (value: number): boolean {\r\n let contains = this.contains(value);\r\n this.array[value | 0] = value | 0;\r\n return !contains;\r\n }\r\n\r\n contains (value: number) {\r\n return this.array[value | 0] != undefined;\r\n }\r\n\r\n remove (value: number) {\r\n this.array[value | 0] = undefined;\r\n }\r\n\r\n clear () {\r\n this.array.length = 0;\r\n }\r\n }\r\n\r\n export interface Disposable {\r\n dispose (): void;\r\n }\r\n\r\n export interface Restorable {\r\n restore (): void;\r\n }\r\n\r\n export class Color {\r\n public static WHITE = new Color(1, 1, 1, 1);\r\n public static RED = new Color(1, 0, 0, 1);\r\n public static GREEN = new Color(0, 1, 0, 1);\r\n public static BLUE = new Color(0, 0, 1, 1);\r\n public static MAGENTA = new Color(1, 0, 1, 1);\r\n\r\n constructor (public r: number = 0, public g: number = 0, public b: number = 0, public a: number = 0) {\r\n }\r\n\r\n set (r: number, g: number, b: number, a: number) {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n this.clamp();\r\n return this;\r\n }\r\n\r\n setFromColor (c: Color) {\r\n this.r = c.r;\r\n this.g = c.g;\r\n this.b = c.b;\r\n this.a = c.a;\r\n return this;\r\n }\r\n\r\n setFromString (hex: string) {\r\n hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\r\n this.r = parseInt(hex.substr(0, 2), 16) / 255.0;\r\n this.g = parseInt(hex.substr(2, 2), 16) / 255.0;\r\n this.b = parseInt(hex.substr(4, 2), 16) / 255.0;\r\n this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\r\n return this;\r\n }\r\n\r\n add (r: number, g: number, b: number, a: number) {\r\n this.r += r;\r\n this.g += g;\r\n this.b += b;\r\n this.a += a;\r\n this.clamp();\r\n return this;\r\n }\r\n\r\n clamp () {\r\n if (this.r < 0) this.r = 0;\r\n else if (this.r > 1) this.r = 1;\r\n\r\n if (this.g < 0) this.g = 0;\r\n else if (this.g > 1) this.g = 1;\r\n\r\n if (this.b < 0) this.b = 0;\r\n else if (this.b > 1) this.b = 1;\r\n\r\n if (this.a < 0) this.a = 0;\r\n else if (this.a > 1) this.a = 1;\r\n return this;\r\n }\r\n\r\n static rgba8888ToColor(color: Color, value: number) {\r\n color.r = ((value & 0xff000000) >>> 24) / 255;\r\n color.g = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.b = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.a = ((value & 0x000000ff)) / 255;\r\n }\r\n\r\n static rgb888ToColor (color: Color, value: number) {\r\n color.r = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.g = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.b = ((value & 0x000000ff)) / 255;\r\n }\r\n }\r\n\r\n export class MathUtils {\r\n static PI = 3.1415927;\r\n static PI2 = MathUtils.PI * 2;\r\n static radiansToDegrees = 180 / MathUtils.PI;\r\n static radDeg = MathUtils.radiansToDegrees;\r\n static degreesToRadians = MathUtils.PI / 180;\r\n static degRad = MathUtils.degreesToRadians;\r\n\r\n static clamp (value: number, min: number, max: number) {\r\n if (value < min) return min;\r\n if (value > max) return max;\r\n return value;\r\n }\r\n\r\n static cosDeg (degrees: number) {\r\n return Math.cos(degrees * MathUtils.degRad);\r\n }\r\n\r\n static sinDeg (degrees: number) {\r\n return Math.sin(degrees * MathUtils.degRad);\r\n }\r\n\r\n static signum (value: number): number {\r\n return value > 0 ? 1 : value < 0 ? -1 : 0;\r\n }\r\n\r\n static toInt (x: number) {\r\n return x > 0 ? Math.floor(x) : Math.ceil(x);\r\n }\r\n\r\n static cbrt (x: number) {\r\n let y = Math.pow(Math.abs(x), 1/3);\r\n return x < 0 ? -y : y;\r\n }\r\n\r\n static randomTriangular (min: number, max: number): number {\r\n return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\r\n }\r\n\r\n static randomTriangularWith (min: number, max: number, mode: number): number {\r\n let u = Math.random();\r\n let d = max - min;\r\n if (u <= (mode - min) / d) return min + Math.sqrt(u * d * (mode - min));\r\n return max - Math.sqrt((1 - u) * d * (max - mode));\r\n }\r\n }\r\n\r\n export abstract class Interpolation {\r\n protected abstract applyInternal (a: number): number;\r\n apply(start: number, end: number, a: number): number {\r\n return start + (end - start) * this.applyInternal(a);\r\n }\r\n }\r\n\r\n export class Pow extends Interpolation {\r\n protected power = 2;\r\n\r\n constructor (power: number) {\r\n super();\r\n this.power = power;\r\n }\r\n\r\n applyInternal (a: number): number {\r\n if (a <= 0.5) return Math.pow(a * 2, this.power) / 2;\r\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\r\n }\r\n }\r\n\r\n export class PowOut extends Pow {\r\n constructor (power: number) {\r\n super(power);\r\n }\r\n\r\n applyInternal (a: number) : number {\r\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\r\n }\r\n }\r\n\r\n export class Utils {\r\n static SUPPORTS_TYPED_ARRAYS = typeof(Float32Array) !== \"undefined\";\r\n\r\n static arrayCopy (source: ArrayLike, sourceStart: number, dest: ArrayLike, destStart: number, numElements: number) {\r\n for (let i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\r\n dest[j] = source[i];\r\n }\r\n }\r\n\r\n static setArraySize (array: Array, size: number, value: any = 0): Array {\r\n let oldSize = array.length;\r\n if (oldSize == size) return array;\r\n array.length = size;\r\n if (oldSize < size) {\r\n for (let i = oldSize; i < size; i++) array[i] = value;\r\n }\r\n return array;\r\n }\r\n\r\n static ensureArrayCapacity (array: Array, size: number, value: any = 0): Array {\r\n if (array.length >= size) return array;\r\n return Utils.setArraySize(array, size, value);\r\n }\r\n\r\n static newArray (size: number, defaultValue: T): Array {\r\n let array = new Array(size);\r\n for (let i = 0; i < size; i++) array[i] = defaultValue;\r\n return array;\r\n }\r\n\r\n static newFloatArray (size: number): ArrayLike {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Float32Array(size)\r\n } else {\r\n let array = new Array(size);\r\n for (let i = 0; i < array.length; i++) array[i] = 0;\r\n return array;\r\n }\r\n }\r\n\r\n static newShortArray (size: number): ArrayLike {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Int16Array(size)\r\n } else {\r\n let array = new Array(size);\r\n for (let i = 0; i < array.length; i++) array[i] = 0;\r\n return array;\r\n }\r\n }\r\n\r\n static toFloatArray (array: Array) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\r\n }\r\n\r\n static toSinglePrecision (value: number) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\r\n }\r\n\r\n // This function is used to fix WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109\r\n static webkit602BugfixHelper (alpha: number, blend: MixBlend) {\r\n\r\n }\r\n\r\n static contains (array: Array, element: T, identity = true) {\r\n for (let i = 0; i < array.length; i++) {\r\n if (array[i] == element) return true;\r\n }\r\n return false;\r\n }\r\n }\r\n\r\n export class DebugUtils {\r\n static logBones(skeleton: Skeleton) {\r\n for (let i = 0; i < skeleton.bones.length; i++) {\r\n let bone = skeleton.bones[i];\r\n let mat = bone.matrix;\r\n console.log(bone.data.name + \", \" + mat.a + \", \" + mat.b + \", \" + mat.c + \", \" + mat.d + \", \" + mat.tx + \", \" + mat.ty);\r\n }\r\n }\r\n }\r\n\r\n export class Pool {\r\n private items = new Array();\r\n private instantiator: () => T;\r\n\r\n constructor (instantiator: () => T) {\r\n this.instantiator = instantiator;\r\n }\r\n\r\n obtain () {\r\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\r\n }\r\n\r\n free (item: T) {\r\n if ((item as any).reset) (item as any).reset();\r\n this.items.push(item);\r\n }\r\n\r\n freeAll (items: ArrayLike) {\r\n for (let i = 0; i < items.length; i++) {\r\n this.free(items[i]);\r\n }\r\n }\r\n\r\n clear () {\r\n this.items.length = 0;\r\n }\r\n }\r\n\r\n export class Vector2 {\r\n constructor (public x = 0, public y = 0) {\r\n }\r\n\r\n set (x: number, y: number): Vector2 {\r\n this.x = x;\r\n this.y = y;\r\n return this;\r\n }\r\n\r\n length () {\r\n let x = this.x;\r\n let y = this.y;\r\n return Math.sqrt(x * x + y * y);\r\n }\r\n\r\n normalize () {\r\n let len = this.length();\r\n if (len != 0) {\r\n this.x /= len;\r\n this.y /= len;\r\n }\r\n return this;\r\n }\r\n }\r\n\r\n export class TimeKeeper {\r\n maxDelta = 0.064;\r\n framesPerSecond = 0;\r\n delta = 0;\r\n totalTime = 0;\r\n\r\n private lastTime = Date.now() / 1000;\r\n private frameCount = 0;\r\n private frameTime = 0;\r\n\r\n update () {\r\n let now = Date.now() / 1000;\r\n this.delta = now - this.lastTime;\r\n this.frameTime += this.delta;\r\n this.totalTime += this.delta;\r\n if (this.delta > this.maxDelta) this.delta = this.maxDelta;\r\n this.lastTime = now;\r\n\r\n this.frameCount++;\r\n if (this.frameTime > 1) {\r\n this.framesPerSecond = this.frameCount / this.frameTime;\r\n this.frameTime = 0;\r\n this.frameCount = 0;\r\n }\r\n }\r\n }\r\n\r\n export interface ArrayLike {\r\n length: number;\r\n [n: number]: T;\r\n }\r\n\r\n export class WindowedMean {\r\n values: Array;\r\n addedValues = 0;\r\n lastValue = 0;\r\n mean = 0;\r\n dirty = true;\r\n\r\n constructor (windowSize: number = 32) {\r\n this.values = new Array(windowSize);\r\n }\r\n\r\n hasEnoughData () {\r\n return this.addedValues >= this.values.length;\r\n }\r\n\r\n addValue (value: number) {\r\n if (this.addedValues < this.values.length)\r\n this.addedValues++;\r\n this.values[this.lastValue++] = value;\r\n if (this.lastValue > this.values.length - 1) this.lastValue = 0;\r\n this.dirty = true;\r\n }\r\n\r\n getMean () {\r\n if (this.hasEnoughData()) {\r\n if (this.dirty) {\r\n let mean = 0;\r\n for (let i = 0; i < this.values.length; i++) {\r\n mean += this.values[i];\r\n }\r\n this.mean = mean / this.values.length;\r\n this.dirty = false;\r\n }\r\n return this.mean;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n\texport interface VertexEffect {\r\n\t\tbegin(skeleton: Skeleton): void;\r\n\t\ttransform(position: Vector2, uv: Vector2, light: Color, dark: Color): void;\r\n\t\tend(): void;\r\n\t}\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export abstract class Attachment {\r\n name: string;\r\n\r\n constructor(name: string) {\r\n if (name == null) throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n\r\n abstract copy (): Attachment;\r\n }\r\n\r\n export abstract class VertexAttachment extends Attachment {\r\n private static nextID = 0;\r\n\r\n id = (VertexAttachment.nextID++ & 65535) << 11;\r\n bones: Array;\r\n vertices: ArrayLike;\r\n worldVerticesLength = 0;\r\n deformAttachment: VertexAttachment = this;\r\n\r\n constructor(name: string) {\r\n super(name);\r\n }\r\n\r\n computeWorldVerticesOld(slot: Slot, worldVertices: ArrayLike) {\r\n this.computeWorldVertices(slot, 0, this.worldVerticesLength, worldVertices, 0, 2);\r\n }\r\n\r\n /** Transforms local vertices to world coordinates.\r\n * @param start The index of the first local vertex value to transform. Each vertex has 2 values, x and y.\r\n * @param count The number of world vertex values to output. Must be <= {@link #getWorldVerticesLength()} - start.\r\n * @param worldVertices The output world vertices. Must have a length >= offset + count.\r\n * @param offset The worldVertices index to begin writing values. */\r\n computeWorldVertices (slot: Slot, start: number, count: number, worldVertices: ArrayLike, offset: number, stride: number) {\r\n count = offset + (count >> 1) * stride;\r\n let skeleton = slot.bone.skeleton;\r\n let deformArray = slot.deform;\r\n let vertices = this.vertices;\r\n let bones = this.bones;\r\n if (bones == null) {\r\n if (deformArray.length > 0) vertices = deformArray;\r\n let mat = slot.bone.matrix;\r\n let x = mat.tx;\r\n let y = mat.ty;\r\n let a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n for (let v = start, w = offset; w < count; v += 2, w += stride) {\r\n let vx = vertices[v], vy = vertices[v + 1];\r\n worldVertices[w] = vx * a + vy * b + x;\r\n worldVertices[w + 1] = vx * c + vy * d + y;\r\n }\r\n return;\r\n }\r\n let v = 0, skip = 0;\r\n for (let i = 0; i < start; i += 2) {\r\n let n = bones[v];\r\n v += n + 1;\r\n skip += n;\r\n }\r\n let skeletonBones = skeleton.bones;\r\n if (deformArray.length == 0) {\r\n for (let w = offset, b = skip * 3; w < count; w += stride) {\r\n let wx = 0, wy = 0;\r\n let n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3) {\r\n let mat = skeletonBones[bones[v]].matrix;\r\n let vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\r\n wx += (vx * mat.a + vy * mat.c + mat.tx) * weight;\r\n wy += (vx * mat.b + vy * mat.d + mat.ty) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n } else {\r\n let deform = deformArray;\r\n for (let w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\r\n let wx = 0, wy = 0;\r\n let n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3, f += 2) {\r\n let mat = skeletonBones[bones[v]].matrix;\r\n let vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\r\n wx += (vx * mat.a + vy * mat.c + mat.tx) * weight;\r\n wy += (vx * mat.b + vy * mat.d + mat.ty) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n }\r\n\r\n copyTo (attachment: VertexAttachment) {\r\n if (this.bones != null) {\r\n attachment.bones = new Array(this.bones.length);\r\n Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\r\n } else\r\n attachment.bones = null;\r\n\r\n if (this.vertices != null) {\r\n attachment.vertices = Utils.newFloatArray(this.vertices.length);\r\n Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\r\n } else\r\n attachment.vertices = null;\r\n\r\n attachment.worldVerticesLength = this.worldVerticesLength;\r\n attachment.deformAttachment = this.deformAttachment;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export interface AttachmentLoader {\r\n /** @return May be null to not load an attachment. */\r\n newRegionAttachment (skin: Skin, name: string, path: string): RegionAttachment;\r\n\r\n /** @return May be null to not load an attachment. */\r\n newMeshAttachment (skin: Skin, name: string, path: string): MeshAttachment;\r\n\r\n /** @return May be null to not load an attachment. */\r\n newBoundingBoxAttachment (skin: Skin, name: string): BoundingBoxAttachment;\r\n\r\n /** @return May be null to not load an attachment */\r\n newPathAttachment(skin: Skin, name: string): PathAttachment;\r\n\r\n /** @return May be null to not load an attachment */\r\n newPointAttachment(skin: Skin, name: string): PointAttachment;\r\n\r\n /** @return May be null to not load an attachment */\r\n newClippingAttachment(skin: Skin, name: string): ClippingAttachment;\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export enum AttachmentType {\r\n Region, BoundingBox, Mesh, LinkedMesh, Path, Point, Clipping\r\n }\r\n}\r\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class BoundingBoxAttachment extends VertexAttachment {\n color = new Color(1, 1, 1, 1);\n\n constructor (name: string) {\n super(name);\n }\n\n copy (): Attachment {\n let copy = new BoundingBoxAttachment(this.name);\n this.copyTo(copy);\n copy.color.setFromColor(this.color);\n return copy;\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License v2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class ClippingAttachment extends VertexAttachment {\n endSlot: SlotData;\n\n // Nonessential.\n color = new Color(0.2275, 0.2275, 0.8078, 1); // ce3a3aff\n\n constructor (name: string) {\n super(name);\n }\n\n copy (): Attachment {\n let copy = new ClippingAttachment(this.name);\n this.copyTo(copy);\n copy.endSlot = this.endSlot;\n copy.color.setFromColor(this.color);\n return copy;\n }\n }\n}\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class MeshAttachment extends VertexAttachment {\r\n region: TextureRegion;\r\n path: string;\r\n regionUVs: Float32Array; uvs: ArrayLike;\r\n triangles: Array;\r\n color = new Color(1, 1, 1, 1);\r\n width: number;\r\n height: number;\r\n hullLength: number;\r\n edges: Array;\r\n private parentMesh: MeshAttachment;\r\n tempColor = new Color(0, 0, 0, 0);\r\n\r\n constructor (name: string) {\r\n super(name);\r\n }\r\n\r\n getParentMesh () {\r\n return this.parentMesh;\r\n }\r\n\r\n /** @param parentMesh May be null. */\r\n setParentMesh (parentMesh: MeshAttachment) {\r\n this.parentMesh = parentMesh;\r\n if (parentMesh != null) {\r\n this.bones = parentMesh.bones;\r\n this.vertices = parentMesh.vertices;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n this.regionUVs = parentMesh.regionUVs;\r\n this.triangles = parentMesh.triangles;\r\n this.hullLength = parentMesh.hullLength;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength\r\n }\r\n }\r\n\r\n copy (): Attachment {\r\n if (this.parentMesh != null) return this.newLinkedMesh();\r\n\r\n let copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n\r\n this.copyTo(copy);\r\n copy.regionUVs = new Float32Array(this.regionUVs.length);\r\n Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\r\n copy.uvs = new Array(this.uvs.length);\r\n Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\r\n copy.triangles = new Array(this.triangles.length);\r\n Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\r\n copy.hullLength = this.hullLength;\r\n\r\n // Nonessential.\r\n if (this.edges != null) {\r\n copy.edges = new Array(this.edges.length);\r\n Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\r\n }\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n\r\n return copy;\r\n }\r\n\r\n newLinkedMesh (): MeshAttachment {\r\n let copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n copy.deformAttachment = this.deformAttachment;\r\n copy.setParentMesh(this.parentMesh != null ? this.parentMesh : this);\r\n // copy.updateUVs();\r\n return copy;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class PathAttachment extends VertexAttachment {\n lengths: Array;\n closed = false; constantSpeed = false;\n color = new Color(1, 1, 1, 1);\n\n constructor (name: string) {\n super(name);\n }\n\n copy (): Attachment {\n let copy = new PathAttachment(this.name);\n this.copyTo(copy);\n copy.lengths = new Array(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 return copy;\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License v2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class PointAttachment extends VertexAttachment {\n x: number; y: number; rotation: number;\n color = new Color(0.38, 0.94, 0, 1);\n\n constructor (name: string) {\n super(name);\n }\n\n computeWorldPosition(bone: Bone, point: Vector2) {\n const mat = bone.matrix;\n point.x = this.x * mat.a + this.y * mat.c + bone.worldX;\n point.y = this.x * mat.b + this.y * mat.d + bone.worldY;\n return point;\n }\n\n computeWorldRotation(bone: Bone) {\n const mat = bone.matrix;\n let cos = MathUtils.cosDeg(this.rotation), sin = MathUtils.sinDeg(this.rotation);\n let x = cos * mat.a + sin * mat.c;\n let y = cos * mat.b + sin * mat.d;\n return Math.atan2(y, x) * MathUtils.radDeg;\n }\n\n copy (): Attachment {\n let copy = new PointAttachment(this.name);\n copy.x = this.x;\n copy.y = this.y;\n copy.rotation = this.rotation;\n copy.color.setFromColor(this.color);\n return copy;\n }\n }\n}\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class RegionAttachment extends Attachment {\r\n static OX1 = 0;\r\n static OY1 = 1;\r\n static OX2 = 2;\r\n static OY2 = 3;\r\n static OX3 = 4;\r\n static OY3 = 5;\r\n static OX4 = 6;\r\n static OY4 = 7;\r\n\r\n static X1 = 0;\r\n static Y1 = 1;\r\n static C1R = 2;\r\n static C1G = 3;\r\n static C1B = 4;\r\n static C1A = 5;\r\n static U1 = 6;\r\n static V1 = 7;\r\n\r\n static X2 = 8;\r\n static Y2 = 9;\r\n static C2R = 10;\r\n static C2G = 11;\r\n static C2B = 12;\r\n static C2A = 13;\r\n static U2 = 14;\r\n static V2 = 15;\r\n\r\n static X3 = 16;\r\n static Y3 = 17;\r\n static C3R = 18;\r\n static C3G = 19;\r\n static C3B = 20;\r\n static C3A = 21;\r\n static U3 = 22;\r\n static V3 = 23;\r\n\r\n static X4 = 24;\r\n static Y4 = 25;\r\n static C4R = 26;\r\n static C4G = 27;\r\n static C4B = 28;\r\n static C4A = 29;\r\n static U4 = 30;\r\n static V4 = 31;\r\n\r\n x = 0;\r\n y = 0;\r\n scaleX = 1;\r\n scaleY = 1;\r\n rotation = 0;\r\n width = 0;\r\n height = 0;\r\n color = new Color(1, 1, 1, 1);\r\n\r\n path: string;\r\n rendererObject: any;\r\n region: TextureRegion;\r\n\r\n offset = Utils.newFloatArray(8);\r\n uvs = Utils.newFloatArray(8);\r\n\r\n tempColor = new Color(1, 1, 1, 1);\r\n\r\n constructor(name: string) {\r\n super(name);\r\n }\r\n\r\n updateOffset(): void {\r\n let regionScaleX = this.width / this.region.originalWidth * this.scaleX;\r\n let regionScaleY = this.height / this.region.originalHeight * this.scaleY;\r\n let localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\r\n let localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\r\n let localX2 = localX + this.region.width * regionScaleX;\r\n let localY2 = localY + this.region.height * regionScaleY;\r\n let radians = this.rotation * Math.PI / 180;\r\n let cos = Math.cos(radians);\r\n let sin = Math.sin(radians);\r\n let localXCos = localX * cos + this.x;\r\n let localXSin = localX * sin;\r\n let localYCos = localY * cos + this.y;\r\n let localYSin = localY * sin;\r\n let localX2Cos = localX2 * cos + this.x;\r\n let localX2Sin = localX2 * sin;\r\n let localY2Cos = localY2 * cos + this.y;\r\n let localY2Sin = localY2 * sin;\r\n let offset = this.offset;\r\n offset[RegionAttachment.OX1] = localXCos - localYSin;\r\n offset[RegionAttachment.OY1] = localYCos + localXSin;\r\n offset[RegionAttachment.OX2] = localXCos - localY2Sin;\r\n offset[RegionAttachment.OY2] = localY2Cos + localXSin;\r\n offset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\r\n offset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\r\n offset[RegionAttachment.OX4] = localX2Cos - localYSin;\r\n offset[RegionAttachment.OY4] = localYCos + localX2Sin;\r\n }\r\n\r\n setRegion(region: TextureRegion): void {\r\n this.region = region;\r\n let uvs = this.uvs;\r\n if (region.rotate) {\r\n uvs[2] = region.u;\r\n uvs[3] = region.v2;\r\n uvs[4] = region.u;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v;\r\n uvs[0] = region.u2;\r\n uvs[1] = region.v2;\r\n } else {\r\n uvs[0] = region.u;\r\n uvs[1] = region.v2;\r\n uvs[2] = region.u;\r\n uvs[3] = region.v;\r\n uvs[4] = region.u2;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v2;\r\n }\r\n }\r\n\r\n computeWorldVertices(bone: Bone, worldVertices: ArrayLike, offset: number, stride: number) {\r\n let vertexOffset = this.offset;\r\n let mat = bone.matrix;\r\n let x = mat.tx, y = mat.ty;\r\n let a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n let offsetX = 0, offsetY = 0;\r\n\r\n offsetX = vertexOffset[RegionAttachment.OX1];\r\n offsetY = vertexOffset[RegionAttachment.OY1];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x; // br\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n\r\n offsetX = vertexOffset[RegionAttachment.OX2];\r\n offsetY = vertexOffset[RegionAttachment.OY2];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x; // bl\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n\r\n offsetX = vertexOffset[RegionAttachment.OX3];\r\n offsetY = vertexOffset[RegionAttachment.OY3];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x; // ul\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n\r\n offsetX = vertexOffset[RegionAttachment.OX4];\r\n offsetY = vertexOffset[RegionAttachment.OY4];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x; // ur\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n }\r\n\r\n copy (): Attachment {\r\n let copy = new RegionAttachment(this.name);\r\n copy.region = this.region;\r\n copy.rendererObject = this.rendererObject;\r\n copy.path = this.path;\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.scaleX = this.scaleX;\r\n copy.scaleY = this.scaleY;\r\n copy.rotation = this.rotation;\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\r\n Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n\texport class JitterEffect implements VertexEffect {\r\n\t\tjitterX = 0;\r\n\t\tjitterY = 0;\r\n\r\n\t\tconstructor (jitterX: number, jitterY: number) {\r\n\t\t\tthis.jitterX = jitterX;\r\n\t\t\tthis.jitterY = jitterY;\r\n\t\t}\r\n\r\n\t\tbegin(skeleton: Skeleton): void {\r\n\t\t}\r\n\r\n\t\ttransform(position: Vector2, uv: Vector2, light: Color, dark: Color): void {\r\n\t\t\tposition.x += MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n\t\t\tposition.y += MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n\t\t}\r\n\r\n\t\tend(): void {\r\n\t\t}\r\n\t}\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n\texport class SwirlEffect implements VertexEffect {\r\n\t\tstatic interpolation = new PowOut(2);\r\n\t\tcenterX = 0;\r\n\t\tcenterY = 0;\r\n\t\tradius = 0;\r\n\t\tangle = 0;\r\n\t\tprivate worldX = 0;\r\n\t\tprivate worldY = 0;\r\n\r\n\t\tconstructor (radius: number) {\r\n\t\t\tthis.radius = radius;\r\n\t\t}\r\n\r\n\t\tbegin(skeleton: Skeleton): void {\r\n\t\t\tthis.worldX = skeleton.x + this.centerX;\r\n\t\t\tthis.worldY = skeleton.y + this.centerY;\r\n\t\t}\r\n\r\n\t\ttransform(position: Vector2, uv: Vector2, light: Color, dark: Color): void {\r\n\t\t\tlet radAngle = this.angle * MathUtils.degreesToRadians;\r\n\t\t\tlet x = position.x - this.worldX;\r\n\t\t\tlet y = position.y - this.worldY;\r\n\t\t\tlet dist = Math.sqrt(x * x + y * y);\r\n\t\t\tif (dist < this.radius) {\r\n\t\t\t\tlet theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\r\n\t\t\t\tlet cos = Math.cos(theta);\r\n\t\t\t\tlet sin = Math.sin(theta);\r\n\t\t\t\tposition.x = cos * x - sin * y + this.worldX;\r\n\t\t\t\tposition.y = sin * x + cos * y + this.worldY;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tend(): void {\r\n\t\t}\r\n\t}\r\n}\r\n","interface Math {\r\n fround(n: number): number;\r\n}\r\n\r\n(() => {\r\n if (!Math.fround) {\r\n Math.fround = Math.fround = (function(array) {\r\n return function(x: number) {\r\n return array[0] = x, array[0];\r\n };\r\n })(new Float32Array(1));\r\n }\r\n})();\r\n","/// \r\n/// \r\n/// \r\nnamespace pixi_spine {\r\n /* Esoteric Software SPINE wrapper for pixi.js */\r\n core.Bone.yDown = true;\r\n\r\n let tempRgb = [0, 0, 0];\r\n\r\n export interface ISpineDisplayObject extends PIXI.DisplayObject {\r\n region?: core.TextureRegion;\r\n attachment?: core.Attachment;\r\n }\r\n\r\n export class SpineSprite extends PIXI.Sprite implements ISpineDisplayObject {\r\n region?: core.TextureRegion = null;\r\n attachment?: core.Attachment = null;\r\n }\r\n\r\n const gp = PIXI.GraphicsGeometry.prototype as any;\r\n if (!gp.invalidate) {\r\n let tmp = [];\r\n gp.invalidate = function() {\r\n const t = this.graphicsData;\r\n tmp.push(0);\r\n this.graphicsData = tmp;\r\n this.clear();\r\n this.graphicsData = t;\r\n }\r\n }\r\n\r\n export class SpineMesh extends PIXI.SimpleMesh implements ISpineDisplayObject {\r\n region?: core.TextureRegion = null;\r\n attachment?: core.Attachment = null;\r\n\r\n constructor(texture: PIXI.Texture, vertices?: Float32Array, uvs?: Float32Array, indices?: Uint16Array, drawMode?: number) {\r\n super(texture, vertices, uvs, indices, drawMode);\r\n }\r\n }\r\n\r\n /**\r\n * A class that enables the you to import and run your spine animations in pixi.\r\n * The Spine animation data needs to be loaded using either the Loader or a SpineLoader before it can be used by this class\r\n * See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source\r\n *\r\n * ```js\r\n * let spineAnimation = new spine(spineData);\r\n * ```\r\n *\r\n * @class\r\n * @extends Container\r\n * @memberof spine\r\n * @param spineData {object} The spine data loaded from a spine atlas.\r\n */\r\n export class Spine extends PIXI.Container {\r\n static globalAutoUpdate: boolean = true;\r\n static globalDelayLimit: number = 0;\r\n\r\n tintRgb: ArrayLike;\r\n spineData: core.SkeletonData;\r\n skeleton: core.Skeleton;\r\n stateData: core.AnimationStateData;\r\n state: core.AnimationState;\r\n slotContainers: Array;\r\n tempClipContainers: Array;\r\n localDelayLimit: number;\r\n private _autoUpdate: boolean;\r\n private _visible: boolean;\r\n\r\n constructor(spineData: core.SkeletonData) {\r\n super();\r\n\r\n if (!spineData) {\r\n throw new Error('The spineData param is required.');\r\n }\r\n\r\n if ((typeof spineData) === \"string\") {\r\n throw new Error('spineData param cant be string. Please use spine.Spine.fromAtlas(\"YOUR_RESOURCE_NAME\") from now on.');\r\n }\r\n\r\n /**\r\n * The spineData object\r\n *\r\n * @member {object}\r\n */\r\n this.spineData = spineData;\r\n\r\n /**\r\n * A spine Skeleton object\r\n *\r\n * @member {object}\r\n */\r\n this.skeleton = new core.Skeleton(spineData);\r\n this.skeleton.updateWorldTransform();\r\n\r\n /**\r\n * A spine AnimationStateData object created from the spine data passed in the constructor\r\n *\r\n * @member {object}\r\n */\r\n this.stateData = new core.AnimationStateData(spineData);\r\n\r\n /**\r\n * A spine AnimationState object created from the spine AnimationStateData object\r\n *\r\n * @member {object}\r\n */\r\n this.state = new core.AnimationState(this.stateData);\r\n\r\n /**\r\n * An array of containers\r\n *\r\n * @member {Container[]}\r\n */\r\n this.slotContainers = [];\r\n\r\n this.tempClipContainers = [];\r\n\r\n for (let i = 0, n = this.skeleton.slots.length; i < n; i++) {\r\n let slot = this.skeleton.slots[i];\r\n let attachment: any = slot.getAttachment();\r\n let slotContainer = this.newContainer();\r\n this.slotContainers.push(slotContainer);\r\n this.addChild(slotContainer);\r\n this.tempClipContainers.push(null);\r\n\r\n if (attachment instanceof core.RegionAttachment) {\r\n let spriteName = (attachment.region as core.TextureAtlasRegion).name;\r\n let sprite = this.createSprite(slot, attachment, spriteName);\r\n slot.currentSprite = sprite;\r\n slot.currentSpriteName = spriteName;\r\n slotContainer.addChild(sprite);\r\n }\r\n else if (attachment instanceof core.MeshAttachment) {\r\n let mesh = this.createMesh(slot, attachment);\r\n slot.currentMesh = mesh;\r\n slot.currentMeshName = attachment.name;\r\n slotContainer.addChild(mesh);\r\n }\r\n else if (attachment instanceof core.ClippingAttachment) {\r\n this.createGraphics(slot, attachment);\r\n slotContainer.addChild(slot.clippingContainer);\r\n slotContainer.addChild(slot.currentGraphics);\r\n }\r\n else {\r\n continue;\r\n }\r\n\r\n }\r\n\r\n /**\r\n * The tint applied to all spine slots. This is a [r,g,b] value. A value of [1,1,1] will remove any tint effect.\r\n *\r\n * @member {number}\r\n * @memberof spine.Spine#\r\n */\r\n this.tintRgb = new Float32Array([1, 1, 1]);\r\n\r\n this.autoUpdate = true;\r\n this.visible = true;\r\n }\r\n\r\n /**\r\n * If this flag is set to true, the spine animation will be automatically updated every\r\n * time the object id drawn. The down side of this approach is that the delta time is\r\n * automatically calculated and you could miss out on cool effects like slow motion,\r\n * pause, skip ahead and the sorts. Most of these effects can be achieved even with\r\n * autoUpdate enabled but are harder to achieve.\r\n *\r\n * @member {boolean}\r\n * @memberof spine.Spine#\r\n * @default true\r\n */\r\n get autoUpdate(): boolean {\r\n return this._autoUpdate;\r\n }\r\n\r\n set autoUpdate(value: boolean) {\r\n if (value !== this._autoUpdate) {\r\n this._autoUpdate = value;\r\n this.updateTransform = value ? Spine.prototype.autoUpdateTransform : PIXI.Container.prototype.updateTransform;\r\n }\r\n }\r\n\r\n /**\r\n * The visibility of the spine object. If false the object will not be drawn,\r\n * the updateTransform function will not be called, and the spine will not be automatically updated.\r\n *\r\n * @member {boolean}\r\n * @memberof spine.Spine#\r\n * @default true\r\n */\r\n get visible(): boolean {\r\n return this._visible;\r\n }\r\n\r\n set visible(value: boolean) {\r\n if (value !== this._visible) {\r\n this._visible = value;\r\n if (value) {\r\n this.lastTime = 0;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * The tint applied to the spine object. This is a hex value. A value of 0xFFFFFF will remove any tint effect.\r\n *\r\n * @member {number}\r\n * @memberof spine.Spine#\r\n * @default 0xFFFFFF\r\n */\r\n get tint(): number {\r\n return PIXI.utils.rgb2hex(this.tintRgb as any);\r\n }\r\n\r\n set tint(value: number) {\r\n this.tintRgb = PIXI.utils.hex2rgb(value, this.tintRgb as any);\r\n }\r\n\r\n /**\r\n * Limit value for the update dt with Spine.globalDelayLimit\r\n * that can be overridden with localDelayLimit\r\n * @return {number} - Maximum processed dt value for the update\r\n */\r\n get delayLimit() : number {\r\n let limit = typeof this.localDelayLimit !== \"undefined\"?\r\n this.localDelayLimit: Spine.globalDelayLimit;\r\n\r\n // If limit is 0, this means there is no limit for the delay\r\n return limit || Number.MAX_VALUE\r\n }\r\n\r\n /**\r\n * Update the spine skeleton and its animations by delta time (dt)\r\n *\r\n * @param dt {number} Delta time. Time by which the animation should be updated\r\n */\r\n update(dt: number) {\r\n // Limit delta value to avoid animation jumps\r\n let delayLimit = this.delayLimit;\r\n if (dt > delayLimit) dt = delayLimit;\r\n\r\n this.state.update(dt);\r\n this.state.apply(this.skeleton);\r\n\r\n //check we haven't been destroyed via a spine event callback in state update\r\n if(!this.skeleton)\r\n return;\r\n\r\n this.skeleton.updateWorldTransform();\r\n\r\n let slots = this.skeleton.slots;\r\n\r\n // in case pixi has double tint\r\n let globalClr = (this as any).color;\r\n let light: ArrayLike = null, dark: ArrayLike = null;\r\n\r\n if (globalClr) {\r\n light = globalClr.light;\r\n dark = globalClr.dark;\r\n } else {\r\n light = this.tintRgb;\r\n }\r\n\r\n let thack = false;\r\n\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n let attachment = slot.getAttachment();\r\n let slotContainer = this.slotContainers[i];\r\n\r\n if (!attachment) {\r\n slotContainer.visible = false;\r\n continue;\r\n }\r\n\r\n let spriteColor: any = null;\r\n\r\n let attColor = (attachment as any).color;\r\n if (attachment instanceof core.RegionAttachment) {\r\n let region = (attachment as core.RegionAttachment).region;\r\n if (region) {\r\n if (slot.currentMesh) {\r\n slot.currentMesh.visible = false;\r\n slot.currentMesh = null;\r\n slot.currentMeshName = undefined;\r\n }\r\n let ar = region as core.TextureAtlasRegion;\r\n if (!slot.currentSpriteName || slot.currentSpriteName !== ar.name) {\r\n let spriteName = ar.name;\r\n if (slot.currentSprite) {\r\n slot.currentSprite.visible = false;\r\n }\r\n slot.sprites = slot.sprites || {};\r\n if (slot.sprites[spriteName] !== undefined) {\r\n slot.sprites[spriteName].visible = true;\r\n }\r\n else {\r\n let sprite = this.createSprite(slot, attachment, spriteName);\r\n slotContainer.addChild(sprite);\r\n }\r\n slot.currentSprite = slot.sprites[spriteName];\r\n slot.currentSpriteName = spriteName;\r\n\r\n // force sprite update when attachment name is same.\r\n // issues https://github.com/pixijs/pixi-spine/issues/318\r\n } else if (slot.currentSpriteName === ar.name && !slot.hackRegion) {\r\n this.setSpriteRegion(attachment, slot.currentSprite, region);\r\n }\r\n }\r\n\r\n let transform = slotContainer.transform;\r\n transform.setFromMatrix(slot.bone.matrix);\r\n\r\n if (slot.currentSprite.color) {\r\n //YAY! double - tint!\r\n spriteColor = slot.currentSprite.color;\r\n } else {\r\n tempRgb[0] = light[0] * slot.color.r * attColor.r;\r\n tempRgb[1] = light[1] * slot.color.g * attColor.g;\r\n tempRgb[2] = light[2] * slot.color.b * attColor.b;\r\n slot.currentSprite.tint = PIXI.utils.rgb2hex(tempRgb);\r\n }\r\n slot.currentSprite.blendMode = slot.blendMode;\r\n }\r\n else if (attachment instanceof core.MeshAttachment) {\r\n if (slot.currentSprite) {\r\n //TODO: refactor this thing, switch it on and off for container\r\n slot.currentSprite.visible = false;\r\n slot.currentSprite = null;\r\n slot.currentSpriteName = undefined;\r\n\r\n //TODO: refactor this shit\r\n const transform = new PIXI.Transform();\r\n (transform as any)._parentID = -1;\r\n (transform as any)._worldID = (slotContainer.transform as any)._worldID;\r\n slotContainer.transform = transform;\r\n }\r\n if (!slot.currentMeshName || slot.currentMeshName !== attachment.name) {\r\n let meshName = attachment.name;\r\n if (slot.currentMesh) {\r\n slot.currentMesh.visible = false;\r\n }\r\n\r\n slot.meshes = slot.meshes || {};\r\n\r\n if (slot.meshes[meshName] !== undefined) {\r\n slot.meshes[meshName].visible = true;\r\n }\r\n else {\r\n let mesh = this.createMesh(slot, attachment);\r\n slotContainer.addChild(mesh);\r\n }\r\n\r\n slot.currentMesh = slot.meshes[meshName];\r\n slot.currentMeshName = meshName;\r\n }\r\n (attachment as core.VertexAttachment).computeWorldVerticesOld(slot, slot.currentMesh.vertices);\r\n if (slot.currentMesh.color) {\r\n // pixi-heaven\r\n spriteColor = slot.currentMesh.color;\r\n } else {\r\n tempRgb[0] = light[0] * slot.color.r * attColor.r;\r\n tempRgb[1] = light[1] * slot.color.g * attColor.g;\r\n tempRgb[2] = light[2] * slot.color.b * attColor.b;\r\n slot.currentMesh.tint = PIXI.utils.rgb2hex(tempRgb);\r\n }\r\n slot.currentMesh.blendMode = slot.blendMode;\r\n }\r\n else if (attachment instanceof core.ClippingAttachment) {\r\n if (!slot.currentGraphics) {\r\n this.createGraphics(slot, attachment);\r\n slotContainer.addChild(slot.clippingContainer);\r\n slotContainer.addChild(slot.currentGraphics);\r\n }\r\n this.updateGraphics(slot, attachment);\r\n }\r\n else {\r\n slotContainer.visible = false;\r\n continue;\r\n }\r\n slotContainer.visible = true;\r\n\r\n // pixi has double tint\r\n if (spriteColor) {\r\n let r0 = slot.color.r * attColor.r;\r\n let g0 = slot.color.g * attColor.g;\r\n let b0 = slot.color.b * attColor.b;\r\n\r\n //YAY! double-tint!\r\n spriteColor.setLight(\r\n light[0] * r0 + dark[0] * (1.0 - r0),\r\n light[1] * g0 + dark[1] * (1.0 - g0),\r\n light[2] * b0 + dark[2] * (1.0 - b0),\r\n );\r\n if (slot.darkColor) {\r\n r0 = slot.darkColor.r;\r\n g0 = slot.darkColor.g;\r\n b0 = slot.darkColor.b;\r\n } else {\r\n r0 = 0.0;\r\n g0 = 0.0;\r\n b0 = 0.0;\r\n }\r\n spriteColor.setDark(\r\n light[0] * r0 + dark[0] * (1 - r0),\r\n light[1] * g0 + dark[1] * (1 - g0),\r\n light[2] * b0 + dark[2] * (1 - b0),\r\n );\r\n }\r\n\r\n slotContainer.alpha = slot.color.a;\r\n }\r\n\r\n //== this is clipping implementation ===\r\n //TODO: remove parent hacks when pixi masks allow it\r\n let drawOrder = this.skeleton.drawOrder;\r\n let clippingAttachment: core.ClippingAttachment = null;\r\n let clippingContainer: PIXI.Container = null;\r\n\r\n for (let i = 0, n = drawOrder.length; i < n; i++) {\r\n let slot = slots[drawOrder[i].data.index];\r\n let slotContainer = this.slotContainers[drawOrder[i].data.index];\r\n\r\n if (!clippingContainer) {\r\n\t\t\t\t\t//Adding null check as it is possible for slotContainer.parent to be null in the event of a spine being disposed off in its loop callback\r\n if (slotContainer.parent !== null && slotContainer.parent !== this) {\r\n slotContainer.parent.removeChild(slotContainer);\r\n //silend add hack\r\n (slotContainer as any).parent = this;\r\n }\r\n }\r\n if (slot.currentGraphics && slot.getAttachment()) {\r\n clippingContainer = slot.clippingContainer;\r\n clippingAttachment = slot.getAttachment() as core.ClippingAttachment;\r\n clippingContainer.children.length = 0;\r\n this.children[i] = slotContainer;\r\n\r\n if (clippingAttachment.endSlot == slot.data) {\r\n clippingAttachment.endSlot = null;\r\n }\r\n\r\n } else {\r\n if (clippingContainer) {\r\n let c = this.tempClipContainers[i];\r\n if (!c) {\r\n c = this.tempClipContainers[i] = this.newContainer();\r\n c.visible = false;\r\n }\r\n this.children[i] = c;\r\n\r\n //silent remove hack\r\n (slotContainer as any).parent = null;\r\n clippingContainer.addChild(slotContainer);\r\n if (clippingAttachment.endSlot == slot.data) {\r\n clippingContainer.renderable = true;\r\n clippingContainer = null;\r\n clippingAttachment = null;\r\n }\r\n } else {\r\n this.children[i] = slotContainer;\r\n }\r\n }\r\n }\r\n };\r\n\r\n private setSpriteRegion(attachment: core.RegionAttachment, sprite: SpineSprite, region: core.TextureRegion) {\r\n // prevent setters calling when attachment and region is same\r\n if(sprite.attachment === attachment && sprite.region === region) {\r\n return;\r\n }\r\n\r\n sprite.region = region;\r\n sprite.attachment = attachment;\r\n\r\n sprite.texture = region.texture;\r\n sprite.rotation = attachment.rotation * core.MathUtils.degRad;\r\n sprite.position.x = attachment.x;\r\n sprite.position.y = attachment.y;\r\n sprite.alpha = attachment.color.a;\r\n\r\n if (!region.size) {\r\n sprite.scale.x = attachment.scaleX * attachment.width / region.originalWidth;\r\n sprite.scale.y = -attachment.scaleY * attachment.height / region.originalHeight;\r\n } else {\r\n //hacked!\r\n sprite.scale.x = region.size.width / region.originalWidth;\r\n sprite.scale.y = -region.size.height / region.originalHeight;\r\n }\r\n }\r\n\r\n private setMeshRegion(attachment: core.MeshAttachment, mesh: SpineMesh, region: core.TextureRegion) {\r\n\r\n if(mesh.attachment === attachment && mesh.region === region) {\r\n return;\r\n }\r\n\r\n mesh.region = region;\r\n mesh.attachment = attachment;\r\n mesh.texture = region.texture;\r\n region.texture.updateUvs();\r\n mesh.uvBuffer.update(attachment.regionUVs);\r\n }\r\n\r\n protected lastTime: number;\r\n\r\n /**\r\n * When autoupdate is set to yes this function is used as pixi's updateTransform function\r\n *\r\n * @private\r\n */\r\n autoUpdateTransform() {\r\n if (Spine.globalAutoUpdate) {\r\n this.lastTime = this.lastTime || Date.now();\r\n let timeDelta = (Date.now() - this.lastTime) * 0.001;\r\n this.lastTime = Date.now();\r\n this.update(timeDelta);\r\n } else {\r\n this.lastTime = 0;\r\n }\r\n\r\n PIXI.Container.prototype.updateTransform.call(this);\r\n };\r\n\r\n /**\r\n * Create a new sprite to be used with core.RegionAttachment\r\n *\r\n * @param slot {spine.Slot} The slot to which the attachment is parented\r\n * @param attachment {spine.RegionAttachment} The attachment that the sprite will represent\r\n * @private\r\n */\r\n createSprite(slot: core.Slot, attachment: core.RegionAttachment, defName: string) {\r\n let region = attachment.region;\r\n if (slot.hackAttachment === attachment) {\r\n region = slot.hackRegion;\r\n }\r\n let texture = region.texture;\r\n let sprite = this.newSprite(texture);\r\n\r\n sprite.anchor.set(0.5);\r\n this.setSpriteRegion(attachment, sprite, attachment.region);\r\n\r\n slot.sprites = slot.sprites || {};\r\n slot.sprites[defName] = sprite;\r\n return sprite;\r\n };\r\n\r\n /**\r\n * Creates a Strip from the spine data\r\n * @param slot {spine.Slot} The slot to which the attachment is parented\r\n * @param attachment {spine.RegionAttachment} The attachment that the sprite will represent\r\n * @private\r\n */\r\n createMesh(slot: core.Slot, attachment: core.MeshAttachment) {\r\n let region = attachment.region;\r\n if (slot.hackAttachment === attachment) {\r\n region = slot.hackRegion;\r\n slot.hackAttachment = null;\r\n slot.hackRegion = null;\r\n }\r\n let strip = this.newMesh(\r\n region.texture,\r\n new Float32Array(attachment.regionUVs.length),\r\n attachment.regionUVs,\r\n new Uint16Array(attachment.triangles),\r\n PIXI.DRAW_MODES.TRIANGLES);\r\n\r\n if (typeof (strip as any)._canvasPadding !== \"undefined\") {\r\n (strip as any)._canvasPadding = 1.5;\r\n }\r\n\r\n strip.alpha = attachment.color.a;\r\n\r\n strip.region = attachment.region;\r\n this.setMeshRegion(attachment, strip, region);\r\n\r\n slot.meshes = slot.meshes || {};\r\n slot.meshes[attachment.name] = strip;\r\n return strip;\r\n };\r\n\r\n static clippingPolygon: Array = [];\r\n\r\n createGraphics(slot: core.Slot, clip: core.ClippingAttachment) {\r\n let graphics = this.newGraphics();\r\n let poly = new PIXI.Polygon([]);\r\n graphics.clear();\r\n graphics.beginFill(0xffffff, 1);\r\n graphics.drawPolygon(poly as any);\r\n graphics.renderable = false;\r\n slot.currentGraphics = graphics;\r\n slot.clippingContainer = this.newContainer();\r\n slot.clippingContainer.mask = slot.currentGraphics;\r\n\r\n return graphics;\r\n }\r\n\r\n updateGraphics(slot: core.Slot, clip: core.ClippingAttachment) {\r\n let geom = slot.currentGraphics.geometry;\r\n let vertices = (geom.graphicsData[0].shape as PIXI.Polygon).points;\r\n let n = clip.worldVerticesLength;\r\n vertices.length = n;\r\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\r\n geom.invalidate();\r\n }\r\n\r\n /**\r\n * Changes texture in attachment in specific slot.\r\n *\r\n * PIXI runtime feature, it was made to satisfy our users.\r\n *\r\n * @param slotIndex {number}\r\n * @param [texture = null] {PIXI.Texture} If null, take default (original) texture\r\n * @param [size = null] {PIXI.Point} sometimes we need new size for region attachment, you can pass 'texture.orig' there\r\n * @returns {boolean} Success flag\r\n */\r\n hackTextureBySlotIndex(slotIndex: number, texture: PIXI.Texture = null, size: PIXI.Rectangle = null) {\r\n let slot = this.skeleton.slots[slotIndex];\r\n if (!slot) {\r\n return false;\r\n }\r\n let attachment: any = slot.getAttachment();\r\n let region: core.TextureRegion = attachment.region;\r\n if (texture) {\r\n region = new core.TextureRegion();\r\n region.texture = texture;\r\n region.size = size;\r\n slot.hackRegion = region;\r\n slot.hackAttachment = attachment;\r\n } else {\r\n slot.hackRegion = null;\r\n slot.hackAttachment = null;\r\n }\r\n if (slot.currentSprite && slot.currentSprite.region != region) {\r\n this.setSpriteRegion(attachment, slot.currentSprite, region);\r\n slot.currentSprite.region = region;\r\n } else if (slot.currentMesh && slot.currentMesh.region != region) {\r\n this.setMeshRegion(attachment, slot.currentMesh, region);\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * Changes texture in attachment in specific slot.\r\n *\r\n * PIXI runtime feature, it was made to satisfy our users.\r\n *\r\n * @param slotName {string}\r\n * @param [texture = null] {PIXI.Texture} If null, take default (original) texture\r\n * @param [size = null] {PIXI.Point} sometimes we need new size for region attachment, you can pass 'texture.orig' there\r\n * @returns {boolean} Success flag\r\n */\r\n hackTextureBySlotName(slotName: string, texture: PIXI.Texture = null, size: PIXI.Rectangle = null) {\r\n let index = this.skeleton.findSlotIndex(slotName);\r\n if (index == -1) {\r\n return false;\r\n }\r\n return this.hackTextureBySlotIndex(index, texture, size);\r\n }\r\n\r\n /**\r\n * Changes texture of an attachment\r\n *\r\n * PIXI runtime feature, it was made to satisfy our users.\r\n *\r\n * @param slotName {string}\r\n * @param attachmentName {string}\r\n * @param [texture = null] {PIXI.Texture} If null, take default (original) texture\r\n * @param [size = null] {PIXI.Point} sometimes we need new size for region attachment, you can pass 'texture.orig' there\r\n * @returns {boolean} Success flag\r\n */\r\n hackTextureAttachment(slotName: string, attachmentName: string, texture, size: PIXI.Rectangle = null) {\r\n // changes the texture of an attachment at the skeleton level\r\n const slotIndex = this.skeleton.findSlotIndex(slotName)\r\n const attachment: any = this.skeleton.getAttachmentByName(slotName, attachmentName)\r\n attachment.region.texture = texture\r\n\r\n const slot = this.skeleton.slots[slotIndex]\r\n if (!slot) {\r\n return false\r\n }\r\n\r\n // gets the currently active attachment in this slot\r\n const currentAttachment: any = slot.getAttachment()\r\n if (attachmentName === currentAttachment.name) {\r\n // if the attachment we are changing is currently active, change the the live texture\r\n let region: core.TextureRegion = attachment.region\r\n if (texture) {\r\n region = new core.TextureRegion()\r\n region.texture = texture\r\n region.size = size\r\n slot.hackRegion = region\r\n slot.hackAttachment = currentAttachment\r\n } else {\r\n slot.hackRegion = null\r\n slot.hackAttachment = null\r\n }\r\n if (slot.currentSprite && slot.currentSprite.region != region) {\r\n this.setSpriteRegion(currentAttachment, slot.currentSprite, region)\r\n slot.currentSprite.region = region\r\n } else if (slot.currentMesh && slot.currentMesh.region != region) {\r\n this.setMeshRegion(currentAttachment, slot.currentMesh, region)\r\n }\r\n return true\r\n }\r\n return false\r\n }\r\n\r\n //those methods can be overriden to spawn different classes\r\n newContainer() {\r\n return new PIXI.Container();\r\n }\r\n\r\n newSprite(tex: PIXI.Texture) {\r\n return new SpineSprite(tex);\r\n }\r\n\r\n newGraphics() {\r\n return new PIXI.Graphics();\r\n }\r\n\r\n newMesh(texture: PIXI.Texture, vertices?: Float32Array, uvs?: Float32Array, indices?: Uint16Array, drawMode?: number) {\r\n return new SpineMesh(texture, vertices, uvs, indices, drawMode);\r\n }\r\n\r\n transformHack() {\r\n return 1;\r\n }\r\n\r\n /**\r\n * Hack for pixi-display and pixi-lights. Every attachment name ending with a suffix will be added to different layer\r\n * @param nameSuffix\r\n * @param group\r\n * @param outGroup\r\n */\r\n hackAttachmentGroups(nameSuffix: string, group: any, outGroup: any) {\r\n if (!nameSuffix) {\r\n return;\r\n }\r\n const list_d = [], list_n = [];\r\n for (let i = 0, len = this.skeleton.slots.length; i < len; i++) {\r\n const slot = this.skeleton.slots[i];\r\n const name = slot.currentSpriteName || slot.currentMeshName || \"\";\r\n const target = slot.currentSprite || slot.currentMesh;\r\n if(name.endsWith(nameSuffix)){\r\n target.parentGroup = group;\r\n list_n.push(target);\r\n }else if(outGroup && target){\r\n target.parentGroup = outGroup;\r\n list_d.push(target);\r\n }\r\n }\r\n return [list_d,list_n];\r\n };\r\n\r\n destroy(options?: any): void {\r\n for (let i = 0, n = this.skeleton.slots.length; i < n; i++) {\r\n let slot = this.skeleton.slots[i];\r\n for (let name in slot.meshes) {\r\n slot.meshes[name].destroy(options);\r\n }\r\n slot.meshes = null;\r\n\r\n for (let name in slot.sprites) {\r\n slot.sprites[name].destroy(options);\r\n }\r\n slot.sprites = null;\r\n }\r\n\r\n for (let i = 0, n = this.slotContainers.length; i < n; i++) {\r\n this.slotContainers[i].destroy(options);\r\n }\r\n this.spineData = null;\r\n this.skeleton = null;\r\n this.slotContainers = null;\r\n this.stateData = null;\r\n this.state = null;\r\n this.tempClipContainers = null;\r\n\r\n super.destroy(options);\r\n }\r\n }\r\n\r\n function SlotContainerUpdateTransformV3() {\r\n let pt = this.parent.worldTransform;\r\n let wt = this.worldTransform;\r\n let lt = this.localTransform;\r\n wt.a = lt.a * pt.a + lt.b * pt.c;\r\n wt.b = lt.a * pt.b + lt.b * pt.d;\r\n wt.c = lt.c * pt.a + lt.d * pt.c;\r\n wt.d = lt.c * pt.b + lt.d * pt.d;\r\n wt.tx = lt.tx * pt.a + lt.ty * pt.c + pt.tx;\r\n wt.ty = lt.tx * pt.b + lt.ty * pt.d + pt.ty;\r\n this.worldAlpha = this.alpha * this.parent.worldAlpha;\r\n this._currentBounds = null;\r\n }\r\n}\r\n","namespace pixi_spine {\r\n (PIXI as any).spine = pixi_spine;\r\n\r\n // texture patch for v5\r\n\r\n const TextureProto = PIXI.Texture.prototype as any;\r\n\r\n if (!TextureProto._updateUvs) {\r\n TextureProto._updateUvs = TextureProto.updateUvs;\r\n }\r\n}\r\n","declare namespace PIXI.loaders {\r\n export interface IMetadata {\r\n spineSkeletonScale?: number;\r\n spineAtlas?: any;\r\n spineAtlasSuffix?: string;\r\n spineAtlasFile?: string;\r\n spineMetadata?: any;\r\n imageNamePrefix?: string;\r\n atlasRawData?: string;\r\n imageLoader?: any;\r\n images?: any;\r\n imageMetadata?: any;\r\n image?: any;\r\n }\r\n}\r\n\r\nnamespace pixi_spine {\r\n\r\n function isJson(resource: PIXI.LoaderResource) {\r\n return resource.type === PIXI.LoaderResource.TYPE.JSON;\r\n }\r\n\r\n function isBuffer(resource: PIXI.LoaderResource) {\r\n return resource.xhrType === PIXI.LoaderResource.XHR_RESPONSE_TYPE.BUFFER;\r\n }\r\n\r\n PIXI.LoaderResource.setExtensionXhrType('skel', PIXI.LoaderResource.XHR_RESPONSE_TYPE.BUFFER);\r\n\r\n export class AtlasParser {\r\n static use(this: PIXI.Loader, resource: PIXI.LoaderResource, next: () => any) {\r\n // skip if no data, its not json, or it isn't atlas data\r\n if (!resource.data) {\r\n return next();\r\n }\r\n\r\n const isJsonSpineModel = isJson(resource) && resource.data.bones;\r\n const isBinarySpineModel = isBuffer(resource) && (resource.extension === 'skel' || resource.metadata.spineMetadata);\r\n\r\n if (!isJsonSpineModel && !isBinarySpineModel) {\r\n return next();\r\n }\r\n\r\n let parser: core.SkeletonJson | core.SkeletonBinary = null;\r\n let dataToParse = resource.data;\r\n\r\n if (isJsonSpineModel) {\r\n parser = new core.SkeletonJson(null);\r\n } else {\r\n parser = new core.SkeletonBinary(null);\r\n if (resource.data instanceof ArrayBuffer) {\r\n dataToParse = new Uint8Array(resource.data);\r\n }\r\n }\r\n\r\n const metadata = resource.metadata || {};\r\n const metadataSkeletonScale = metadata ? resource.metadata.spineSkeletonScale : null;\r\n\r\n if (metadataSkeletonScale) {\r\n parser.scale = metadataSkeletonScale;\r\n }\r\n\r\n const metadataAtlas = metadata ? resource.metadata.spineAtlas : null;\r\n if (metadataAtlas === false) {\r\n return next();\r\n }\r\n if (metadataAtlas && metadataAtlas.pages) {\r\n //its an atlas!\r\n parser.attachmentLoader = new core.AtlasAttachmentLoader(metadataAtlas);\r\n resource.spineData = parser.readSkeletonData(dataToParse);\r\n resource.spineAtlas = metadataAtlas;\r\n\r\n return next();\r\n }\r\n\r\n const metadataAtlasSuffix = metadata.spineAtlasSuffix || '.atlas';\r\n\r\n /**\r\n * use a bit of hackery to load the atlas file, here we assume that the .json, .atlas and .png files\r\n * that correspond to the spine file are in the same base URL and that the .json and .atlas files\r\n * have the same name\r\n */\r\n let atlasPath = resource.url;\r\n let queryStringPos = atlasPath.indexOf('?');\r\n if (queryStringPos > 0) {\r\n //remove querystring\r\n atlasPath = atlasPath.substr(0, queryStringPos)\r\n }\r\n atlasPath = atlasPath.substr(0, atlasPath.lastIndexOf('.')) + metadataAtlasSuffix;\r\n // use atlas path as a params. (no need to use same atlas file name with json file name)\r\n if (resource.metadata && resource.metadata.spineAtlasFile) {\r\n atlasPath = resource.metadata.spineAtlasFile;\r\n }\r\n\r\n //remove the baseUrl\r\n atlasPath = atlasPath.replace(this.baseUrl, '');\r\n\r\n const atlasOptions = {\r\n crossOrigin: resource.crossOrigin,\r\n xhrType: PIXI.LoaderResource.XHR_RESPONSE_TYPE.TEXT,\r\n metadata: metadata.spineMetadata || null,\r\n parentResource: resource\r\n };\r\n const imageOptions = {\r\n crossOrigin: resource.crossOrigin,\r\n metadata: metadata.imageMetadata || null,\r\n parentResource: resource\r\n };\r\n let baseUrl = resource.url.substr(0, resource.url.lastIndexOf('/') + 1);\r\n //remove the baseUrl\r\n baseUrl = baseUrl.replace(this.baseUrl, '');\r\n\r\n const namePrefix = metadata.imageNamePrefix || (resource.name + '_atlas_page_');\r\n\r\n const adapter = metadata.images ? staticImageLoader(metadata.images)\r\n : metadata.image ? staticImageLoader({ 'default': metadata.image })\r\n : metadata.imageLoader ? metadata.imageLoader(this, namePrefix, baseUrl, imageOptions)\r\n : imageLoaderAdapter(this, namePrefix, baseUrl, imageOptions);\r\n\r\n const createSkeletonWithRawAtlas = function (rawData: string) {\r\n new core.TextureAtlas(rawData, adapter, function (spineAtlas) {\r\n if (spineAtlas) {\r\n parser.attachmentLoader = new core.AtlasAttachmentLoader(spineAtlas);\r\n resource.spineData = parser.readSkeletonData(dataToParse);\r\n resource.spineAtlas = spineAtlas;\r\n }\r\n next();\r\n });\r\n };\r\n\r\n if (resource.metadata && resource.metadata.atlasRawData) {\r\n createSkeletonWithRawAtlas(resource.metadata.atlasRawData)\r\n } else {\r\n this.add(resource.name + '_atlas', atlasPath, atlasOptions, function (atlasResource: any) {\r\n if (!atlasResource.error) {\r\n createSkeletonWithRawAtlas(atlasResource.data);\r\n } else {\r\n next();\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n export function imageLoaderAdapter(loader: any, namePrefix: any, baseUrl: any, imageOptions: any) {\r\n if (baseUrl && baseUrl.lastIndexOf('/') !== (baseUrl.length - 1)) {\r\n baseUrl += '/';\r\n }\r\n return function (line: string, callback: (baseTexture: PIXI.BaseTexture) => any) {\r\n const name = namePrefix + line;\r\n const url = baseUrl + line;\r\n\r\n const cachedResource = loader.resources[name];\r\n if (cachedResource) {\r\n const done = () => {\r\n callback(cachedResource.texture.baseTexture)\r\n }\r\n if (cachedResource.texture) {\r\n done();\r\n }\r\n else {\r\n cachedResource.onAfterMiddleware.add(done);\r\n }\r\n } else {\r\n loader.add(name, url, imageOptions, (resource: PIXI.LoaderResource) => {\r\n if (!resource.error) {\r\n callback(resource.texture.baseTexture);\r\n } else {\r\n callback(null);\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n export function syncImageLoaderAdapter(baseUrl: any, crossOrigin: any) {\r\n if (baseUrl && baseUrl.lastIndexOf('/') !== (baseUrl.length - 1)) {\r\n baseUrl += '/';\r\n }\r\n return function (line: any, callback: any) {\r\n callback(PIXI.BaseTexture.from(line, crossOrigin));\r\n }\r\n }\r\n\r\n export function staticImageLoader(pages: { [key: string]: (PIXI.BaseTexture | PIXI.Texture) }) {\r\n return function (line: any, callback: any) {\r\n let page = pages[line] || pages['default'] as any;\r\n if (page && page.baseTexture)\r\n callback(page.baseTexture);\r\n else\r\n callback(page);\r\n }\r\n }\r\n\r\n if (PIXI.Loader) {\r\n PIXI.Loader.registerPlugin(AtlasParser);\r\n }\r\n}\r\n"]} \ No newline at end of file +{"version":3,"file":"pixi-spine.js","sourceRoot":"","sources":["../src/core/Animation.ts","../src/core/AnimationState.ts","../src/core/AnimationStateData.ts","../src/core/AtlasAttachmentLoader.ts","../src/core/BlendMode.ts","../src/core/Bone.ts","../src/core/BoneData.ts","../src/core/Constraint.ts","../src/core/Event.ts","../src/core/EventData.ts","../src/core/IkConstraint.ts","../src/core/IkConstraintData.ts","../src/core/PathConstraint.ts","../src/core/PathConstraintData.ts","../src/core/Skeleton.ts","../src/core/SkeletonBinary.ts","../src/core/SkeletonBounds.ts","../src/core/SkeletonClipping.ts","../src/core/SkeletonData.ts","../src/core/SkeletonJson.ts","../src/core/Skin.ts","../src/core/Slot.ts","../src/core/SlotData.ts","../src/core/Texture.ts","../src/core/TextureAtlas.ts","../src/core/TransformConstraint.ts","../src/core/TransformConstraintData.ts","../src/core/Triangulator.ts","../src/core/Updatable.ts","../src/core/Utils.ts","../src/core/VertexEffect.ts","../src/core/attachments/Attachment.ts","../src/core/attachments/AttachmentLoader.ts","../src/core/attachments/AttachmentType.ts","../src/core/attachments/BoundingBoxAttachment.ts","../src/core/attachments/ClippingAttachment.ts","../src/core/attachments/MeshAttachment.ts","../src/core/attachments/PathAttachment.ts","../src/core/attachments/PointAttachment.ts","../src/core/attachments/RegionAttachment.ts","../src/core/vertexeffects/JitterEffect.ts","../src/core/vertexeffects/SwirlEffect.ts","../src/polyfills.ts","../src/Spine.ts","../src/exporter.ts","../src/loaders.ts"],"names":[],"mappings":";;;;;;;;;;;;;AA6BA,IAAU,UAAU,CAs/CnB;AAt/CD,WAAU,UAAU;IAAC,IAAA,IAAI,CAs/CxB;IAt/CoB,WAAA,IAAI;QAGrB;YASI,mBAAa,IAAY,EAAE,S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D,OAAO,UAAU,IAAS,EAAE,QAAa;YACrC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC;QACvD,CAAC,CAAA;IACL,CAAC;IAPe,iCAAsB,yBAOrC,CAAA;IAED,SAAgB,iBAAiB,CAAC,KAA2D;QACzF,OAAO,UAAU,IAAS,EAAE,QAAa;YACrC,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,SAAS,CAAQ,CAAC;YAClD,IAAI,IAAI,IAAI,IAAI,CAAC,WAAW;gBACxB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;;gBAE3B,QAAQ,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC,CAAA;IACL,CAAC;IARe,4BAAiB,oBAQhC,CAAA;IAED,IAAI,IAAI,CAAC,MAAM,EAAE;QACb,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;KAC3C;AACL,CAAC,EApLS,UAAU,KAAV,UAAU,QAoLnB","sourcesContent":["/******************************************************************************\r\n * Spine Runtimes License Agreement\r\n * Last updated May 1, 2019. Replaces all prior versions.\r\n *\r\n * Copyright (c) 2013-2019, Esoteric Software LLC\r\n *\r\n * Integration of the Spine Runtimes into software or otherwise creating\r\n * derivative works of the Spine Runtimes is permitted under the terms and\r\n * conditions of Section 2 of the Spine Editor License Agreement:\r\n * http://esotericsoftware.com/spine-editor-license\r\n *\r\n * Otherwise, it is permitted to integrate the Spine Runtimes into software\r\n * or otherwise create derivative works of the Spine Runtimes (collectively,\r\n * \"Products\"), provided that each user of the Products must obtain their own\r\n * Spine Editor license and redistribution of the Products in any form must\r\n * include this license and copyright notice.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY EXPRESS\r\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\r\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN\r\n * NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY DIRECT, INDIRECT,\r\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r\n * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS\r\n * INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY\r\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r\n * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n\r\n /** A simple container for a list of timelines and a name. */\r\n export class Animation {\r\n /** The animation's name, which is unique across all animations in the skeleton. */\r\n name: string;\r\n timelines: Array;\r\n timelineIds: Array;\r\n\r\n /** The duration of the animation in seconds, which is the highest time of all keys in the timeline. */\r\n duration: number;\r\n\r\n constructor (name: string, timelines: Array, duration: number) {\r\n if (name == null) throw new Error(\"name cannot be null.\");\r\n if (timelines == null) throw new Error(\"timelines cannot be null.\");\r\n this.name = name;\r\n this.timelines = timelines;\r\n this.timelineIds = [];\r\n for (var i = 0; i < timelines.length; i++)\r\n this.timelineIds[timelines[i].getPropertyId()] = true;\r\n this.duration = duration;\r\n }\r\n\r\n hasTimeline (id: number) {\r\n return this.timelineIds[id] == true;\r\n }\r\n\r\n /** Applies all the animation's timelines to the specified skeleton.\r\n *\r\n * See Timeline {@link Timeline#apply(Skeleton, float, float, Array, float, MixBlend, MixDirection)}.\r\n * @param loop If true, the animation repeats after {@link #getDuration()}.\r\n * @param events May be null to ignore fired events. */\r\n apply (skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\r\n\r\n if (loop && this.duration != 0) {\r\n time %= this.duration;\r\n if (lastTime > 0) lastTime %= this.duration;\r\n }\r\n\r\n let timelines = this.timelines;\r\n for (let i = 0, n = timelines.length; i < n; i++)\r\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\r\n }\r\n\r\n /** @param target After the first and before the last value.\r\n * @returns index of first value greater than the target. */\r\n static binarySearch (values: ArrayLike, target: number, step: number = 1) {\r\n let low = 0;\r\n let high = values.length / step - 2;\r\n if (high == 0) return step;\r\n let current = high >>> 1;\r\n while (true) {\r\n if (values[(current + 1) * step] <= target)\r\n low = current + 1;\r\n else\r\n high = current;\r\n if (low == high) return (low + 1) * step;\r\n current = (low + high) >>> 1;\r\n }\r\n }\r\n\r\n static linearSearch (values: ArrayLike, target: number, step: number) {\r\n for (let i = 0, last = values.length - step; i <= last; i += step)\r\n if (values[i] > target) return i;\r\n return -1;\r\n }\r\n }\r\n\r\n /** The interface for all timelines. */\r\n export interface Timeline {\r\n /** Applies this timeline to the skeleton.\r\n * @param skeleton The skeleton the timeline is being applied to. This provides access to the bones, slots, and other\r\n * skeleton components the timeline may change.\r\n * @param lastTime The time this timeline was last applied. Timelines such as {@link EventTimeline}} trigger only at specific\r\n * times rather than every frame. In that case, the timeline triggers everything between `lastTime`\r\n * (exclusive) and `time` (inclusive).\r\n * @param time The time within the animation. Most timelines find the key before and the key after this time so they can\r\n * interpolate between the keys.\r\n * @param events If any events are fired, they are added to this list. Can be null to ignore fired events or if the timeline\r\n * does not fire events.\r\n * @param alpha 0 applies the current or setup value (depending on `blend`). 1 applies the timeline value.\r\n * Between 0 and 1 applies a value between the current or setup value and the timeline value. By adjusting\r\n * `alpha` over time, an animation can be mixed in or out. `alpha` can also be useful to\r\n * apply animations on top of each other (layering).\r\n * @param blend Controls how mixing is applied when `alpha` < 1.\r\n * @param direction Indicates whether the timeline is mixing in or out. Used by timelines which perform instant transitions,\r\n * such as {@link DrawOrderTimeline} or {@link AttachmentTimeline}. */\r\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void;\r\n\r\n /** Uniquely encodes both the type of this timeline and the skeleton property that it affects. */\r\n getPropertyId (): number;\r\n }\r\n\r\n /** Controls how a timeline value is mixed with the setup pose value or current pose value when a timeline's `alpha`\r\n * < 1.\r\n *\r\n * See Timeline {@link Timeline#apply(Skeleton, float, float, Array, float, MixBlend, MixDirection)}. */\r\n export enum MixBlend {\r\n /** Transitions from the setup value to the timeline value (the current value is not used). Before the first key, the setup\r\n * value is set. */\r\n setup,\r\n /** Transitions from the current value to the timeline value. Before the first key, transitions from the current value to\r\n * the setup value. Timelines which perform instant transitions, such as {@link DrawOrderTimeline} or\r\n * {@link AttachmentTimeline}, use the setup value before the first key.\r\n *\r\n * `first` is intended for the first animations applied, not for animations layered on top of those. */\r\n first,\r\n /** Transitions from the current value to the timeline value. No change is made before the first key (the current value is\r\n * kept until the first key).\r\n *\r\n * `replace` is intended for animations layered on top of others, not for the first animations applied. */\r\n replace,\r\n /** Transitions from the current value to the current value plus the timeline value. No change is made before the first key\r\n * (the current value is kept until the first key).\r\n *\r\n * `add` is intended for animations layered on top of others, not for the first animations applied. Properties\r\n * keyed by additive animations must be set manually or by another animation before applying the additive animations, else\r\n * the property values will increase continually. */\r\n add\r\n }\r\n\r\n /** Indicates whether a timeline's `alpha` is mixing out over time toward 0 (the setup or current pose value) or\r\n * mixing in toward 1 (the timeline's value).\r\n *\r\n * See Timeline {@link Timeline#apply(Skeleton, float, float, Array, float, MixBlend, MixDirection)}. */\r\n export enum MixDirection {\r\n mixIn, mixOut\r\n }\r\n\r\n export enum TimelineType {\r\n rotate, translate, scale, shear,\r\n attachment, color, deform,\r\n event, drawOrder,\r\n ikConstraint, transformConstraint,\r\n pathConstraintPosition, pathConstraintSpacing, pathConstraintMix,\r\n twoColor\r\n }\r\n\r\n /** The base class for timelines that use interpolation between key frame values. */\r\n export abstract class CurveTimeline implements Timeline {\r\n static LINEAR = 0; static STEPPED = 1; static BEZIER = 2;\r\n static BEZIER_SIZE = 10 * 2 - 1;\r\n\r\n private curves: ArrayLike; // type, x, y, ...\r\n\r\n abstract getPropertyId(): number;\r\n\r\n constructor (frameCount: number) {\r\n if (frameCount <= 0) throw new Error(\"frameCount must be > 0: \" + frameCount);\r\n this.curves = Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\r\n }\r\n\r\n /** The number of key frames for this timeline. */\r\n getFrameCount () {\r\n return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\r\n }\r\n\r\n /** Sets the specified key frame to linear interpolation. */\r\n setLinear (frameIndex: number) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\r\n }\r\n\r\n /** Sets the specified key frame to stepped interpolation. */\r\n setStepped (frameIndex: number) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\r\n }\r\n\r\n /** Returns the interpolation type for the specified key frame.\r\n * @returns Linear is 0, stepped is 1, Bezier is 2. */\r\n getCurveType (frameIndex: number): number {\r\n let index = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n if (index == this.curves.length) return CurveTimeline.LINEAR;\r\n let type = this.curves[index];\r\n if (type == CurveTimeline.LINEAR) return CurveTimeline.LINEAR;\r\n if (type == CurveTimeline.STEPPED) return CurveTimeline.STEPPED;\r\n return CurveTimeline.BEZIER;\r\n }\r\n\r\n /** Sets the specified key frame to Bezier interpolation. `cx1` and `cx2` are from 0 to 1,\r\n * representing the percent of time between the two key frames. `cy1` and `cy2` are the percent of the\r\n * difference between the key frame's values. */\r\n setCurve (frameIndex: number, cx1: number, cy1: number, cx2: number, cy2: number) {\r\n let tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\r\n let dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\r\n let ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\r\n let dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\r\n\r\n let i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n let curves = this.curves;\r\n curves[i++] = CurveTimeline.BEZIER;\r\n\r\n let x = dfx, y = dfy;\r\n for (let n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n curves[i] = x;\r\n curves[i + 1] = y;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n x += dfx;\r\n y += dfy;\r\n }\r\n }\r\n\r\n /** Returns the interpolated percentage for the specified key frame and linear percentage. */\r\n getCurvePercent (frameIndex: number, percent: number) {\r\n percent = MathUtils.clamp(percent, 0, 1);\r\n let curves = this.curves;\r\n let i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n let type = curves[i];\r\n if (type == CurveTimeline.LINEAR) return percent;\r\n if (type == CurveTimeline.STEPPED) return 0;\r\n i++;\r\n let x = 0;\r\n for (let start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n x = curves[i];\r\n if (x >= percent) {\r\n let prevX: number, prevY: number;\r\n if (i == start) {\r\n prevX = 0;\r\n prevY = 0;\r\n } else {\r\n prevX = curves[i - 2];\r\n prevY = curves[i - 1];\r\n }\r\n return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\r\n }\r\n }\r\n let y = curves[i - 1];\r\n return y + (1 - y) * (percent - x) / (1 - x); // Last point is 1,1.\r\n }\r\n\r\n abstract apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void;\r\n }\r\n\r\n /** Changes a bone's local {@link Bone#rotation}. */\r\n export class RotateTimeline extends CurveTimeline {\r\n static ENTRIES = 2;\r\n static PREV_TIME = -2; static PREV_ROTATION = -1;\r\n static ROTATION = 1;\r\n\r\n /** The index of the bone in {@link Skeleton#bones} that will be changed. */\r\n boneIndex: number;\r\n\r\n /** The time in seconds and rotation in degrees for each key frame. */\r\n frames: ArrayLike; // time, degrees, ...\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount << 1);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.rotate << 24) + this.boneIndex;\r\n }\r\n\r\n /** Sets the time and angle of the specified keyframe. */\r\n setFrame (frameIndex: number, time: number, degrees: number) {\r\n frameIndex <<= 1;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active) return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n return;\r\n case MixBlend.first:\r\n let r = bone.data.rotation - bone.rotation;\r\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n }\r\n return;\r\n }\r\n\r\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) { // Time is after last frame.\r\n let r = frames[frames.length + RotateTimeline.PREV_ROTATION];\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + r * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r += bone.data.rotation - bone.rotation;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360; // Wrap within -180 and 180.\r\n case MixBlend.add:\r\n bone.rotation += r * alpha;\r\n }\r\n return;\r\n }\r\n\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\r\n let prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent((frame >> 1) - 1,\r\n 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\r\n\r\n let r = frames[frame + RotateTimeline.ROTATION] - prevRotation;\r\n r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r += bone.data.rotation - bone.rotation;\r\n case MixBlend.add:\r\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n }\r\n }\r\n }\r\n\r\n /** Changes a bone's local {@link Bone#x} and {@link Bone#y}. */\r\n export class TranslateTimeline extends CurveTimeline {\r\n static ENTRIES = 3;\r\n static PREV_TIME = -3; static PREV_X = -2; static PREV_Y = -1;\r\n static X = 1; static Y = 2;\r\n\r\n /** The index of the bone in {@link Skeleton#bones} that will be changed. */\r\n boneIndex: number;\r\n\r\n /** The time in seconds, x, and y values for each key frame. */\r\n frames: ArrayLike; // time, x, y, ...\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.translate << 24) + this.boneIndex;\r\n }\r\n\r\n /** Sets the time in seconds, x, and y values for the specified key frame. */\r\n setFrame (frameIndex: number, time: number, x: number, y: number) {\r\n frameIndex *= TranslateTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TranslateTimeline.X] = x;\r\n this.frames[frameIndex + TranslateTimeline.Y] = y;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active) return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x;\r\n bone.y = bone.data.y;\r\n return;\r\n case MixBlend.first:\r\n bone.x += (bone.data.x - bone.x) * alpha;\r\n bone.y += (bone.data.y - bone.y) * alpha;\r\n }\r\n return;\r\n }\r\n\r\n let x = 0, y = 0;\r\n if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) { // Time is after last frame.\r\n x = frames[frames.length + TranslateTimeline.PREV_X];\r\n y = frames[frames.length + TranslateTimeline.PREV_Y];\r\n } else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\r\n x = frames[frame + TranslateTimeline.PREV_X];\r\n y = frames[frame + TranslateTimeline.PREV_Y];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\r\n\r\n x += (frames[frame + TranslateTimeline.X] - x) * percent;\r\n y += (frames[frame + TranslateTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x + x * alpha;\r\n bone.y = bone.data.y + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.x += (bone.data.x + x - bone.x) * alpha;\r\n bone.y += (bone.data.y + y - bone.y) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.x += x * alpha;\r\n bone.y += y * alpha;\r\n }\r\n }\r\n }\r\n\r\n /** Changes a bone's local {@link Bone#scaleX)} and {@link Bone#scaleY}. */\r\n export class ScaleTimeline extends TranslateTimeline {\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.scale << 24) + this.boneIndex;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active) return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.scaleX = bone.data.scaleX;\r\n bone.scaleY = bone.data.scaleY;\r\n return;\r\n case MixBlend.first:\r\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n }\r\n return;\r\n }\r\n\r\n let x = 0, y = 0;\r\n if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) { // Time is after last frame.\r\n x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX;\r\n y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY;\r\n } else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\r\n x = frames[frame + ScaleTimeline.PREV_X];\r\n y = frames[frame + ScaleTimeline.PREV_Y];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\r\n\r\n x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX;\r\n y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY;\r\n }\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n bone.scaleX += x - bone.data.scaleX;\r\n bone.scaleY += y - bone.data.scaleY;\r\n } else {\r\n bone.scaleX = x;\r\n bone.scaleY = y;\r\n }\r\n } else {\r\n let bx = 0, by = 0;\r\n if (direction == MixDirection.mixOut) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = bone.data.scaleX;\r\n by = bone.data.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bone.data.scaleX) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - bone.data.scaleY) * alpha;\r\n }\r\n } else {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\r\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\r\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = MathUtils.signum(x);\r\n by = MathUtils.signum(y);\r\n bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha;\r\n bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /** Changes a bone's local {@link Bone#shearX} and {@link Bone#shearY}. */\r\n export class ShearTimeline extends TranslateTimeline {\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.shear << 24) + this.boneIndex;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active) return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX;\r\n bone.shearY = bone.data.shearY;\r\n return;\r\n case MixBlend.first:\r\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n }\r\n return;\r\n }\r\n\r\n let x = 0, y = 0;\r\n if (time >= frames[frames.length - ShearTimeline.ENTRIES]) { // Time is after last frame.\r\n x = frames[frames.length + ShearTimeline.PREV_X];\r\n y = frames[frames.length + ShearTimeline.PREV_Y];\r\n } else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\r\n x = frames[frame + ShearTimeline.PREV_X];\r\n y = frames[frame + ShearTimeline.PREV_Y];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\r\n\r\n x = x + (frames[frame + ShearTimeline.X] - x) * percent;\r\n y = y + (frames[frame + ShearTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX + x * alpha;\r\n bone.shearY = bone.data.shearY + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.shearX += x * alpha;\r\n bone.shearY += y * alpha;\r\n }\r\n }\r\n }\r\n\r\n /** Changes a slot's {@link Slot#color}. */\r\n export class ColorTimeline extends CurveTimeline {\r\n static ENTRIES = 5;\r\n static PREV_TIME = -5; static PREV_R = -4; static PREV_G = -3; static PREV_B = -2; static PREV_A = -1;\r\n static R = 1; static G = 2; static B = 3; static A = 4;\r\n\r\n /** The index of the slot in {@link Skeleton#slots} that will be changed. */\r\n slotIndex: number;\r\n\r\n /** The time in seconds, red, green, blue, and alpha values for each key frame. */\r\n frames: ArrayLike; // time, r, g, b, a, ...\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.color << 24) + this.slotIndex;\r\n }\r\n\r\n /** Sets the time in seconds, red, green, blue, and alpha for the specified key frame. */\r\n setFrame (frameIndex: number, time: number, r: number, g: number, b: number, a: number) {\r\n frameIndex *= ColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + ColorTimeline.R] = r;\r\n this.frames[frameIndex + ColorTimeline.G] = g;\r\n this.frames[frameIndex + ColorTimeline.B] = b;\r\n this.frames[frameIndex + ColorTimeline.A] = a;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active) return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n return;\r\n case MixBlend.first:\r\n let color = slot.color, setup = slot.data.color;\r\n color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha,\r\n (setup.a - color.a) * alpha);\r\n }\r\n return;\r\n }\r\n\r\n let r = 0, g = 0, b = 0, a = 0;\r\n if (time >= frames[frames.length - ColorTimeline.ENTRIES]) { // Time is after last frame.\r\n let i = frames.length;\r\n r = frames[i + ColorTimeline.PREV_R];\r\n g = frames[i + ColorTimeline.PREV_G];\r\n b = frames[i + ColorTimeline.PREV_B];\r\n a = frames[i + ColorTimeline.PREV_A];\r\n } else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\r\n r = frames[frame + ColorTimeline.PREV_R];\r\n g = frames[frame + ColorTimeline.PREV_G];\r\n b = frames[frame + ColorTimeline.PREV_B];\r\n a = frames[frame + ColorTimeline.PREV_A];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\r\n\r\n r += (frames[frame + ColorTimeline.R] - r) * percent;\r\n g += (frames[frame + ColorTimeline.G] - g) * percent;\r\n b += (frames[frame + ColorTimeline.B] - b) * percent;\r\n a += (frames[frame + ColorTimeline.A] - a) * percent;\r\n }\r\n if (alpha == 1)\r\n slot.color.set(r, g, b, a);\r\n else {\r\n let color = slot.color;\r\n if (blend == MixBlend.setup) color.setFromColor(slot.data.color);\r\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\r\n }\r\n }\r\n }\r\n\r\n /** Changes a slot's {@link Slot#color} and {@link Slot#darkColor} for two color tinting. */\r\n export class TwoColorTimeline extends CurveTimeline {\r\n static ENTRIES = 8;\r\n static PREV_TIME = -8; static PREV_R = -7; static PREV_G = -6; static PREV_B = -5; static PREV_A = -4;\r\n static PREV_R2 = -3; static PREV_G2 = -2; static PREV_B2 = -1;\r\n static R = 1; static G = 2; static B = 3; static A = 4; static R2 = 5; static G2 = 6; static B2 = 7;\r\n\r\n /** The index of the slot in {@link Skeleton#slots()} that will be changed. The {@link Slot#darkColor()} must not be\r\n * null. */\r\n slotIndex: number;\r\n\r\n /** The time in seconds, red, green, blue, and alpha values of the color, red, green, blue of the dark color, for each key frame. */\r\n frames: ArrayLike; // time, r, g, b, a, r2, g2, b2, ...\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.twoColor << 24) + this.slotIndex;\r\n }\r\n\r\n /** Sets the time in seconds, light, and dark colors for the specified key frame. */\r\n setFrame (frameIndex: number, time: number, r: number, g: number, b: number, a: number, r2: number, g2: number, b2: number) {\r\n frameIndex *= TwoColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TwoColorTimeline.R] = r;\r\n this.frames[frameIndex + TwoColorTimeline.G] = g;\r\n this.frames[frameIndex + TwoColorTimeline.B] = b;\r\n this.frames[frameIndex + TwoColorTimeline.A] = a;\r\n this.frames[frameIndex + TwoColorTimeline.R2] = r2;\r\n this.frames[frameIndex + TwoColorTimeline.G2] = g2;\r\n this.frames[frameIndex + TwoColorTimeline.B2] = b2;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active) return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n slot.darkColor.setFromColor(slot.data.darkColor);\r\n return;\r\n case MixBlend.first:\r\n let light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha,\r\n (setupLight.a - light.a) * alpha);\r\n dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0);\r\n }\r\n return;\r\n }\r\n\r\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) { // Time is after last frame.\r\n let i = frames.length;\r\n r = frames[i + TwoColorTimeline.PREV_R];\r\n g = frames[i + TwoColorTimeline.PREV_G];\r\n b = frames[i + TwoColorTimeline.PREV_B];\r\n a = frames[i + TwoColorTimeline.PREV_A];\r\n r2 = frames[i + TwoColorTimeline.PREV_R2];\r\n g2 = frames[i + TwoColorTimeline.PREV_G2];\r\n b2 = frames[i + TwoColorTimeline.PREV_B2];\r\n } else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES);\r\n r = frames[frame + TwoColorTimeline.PREV_R];\r\n g = frames[frame + TwoColorTimeline.PREV_G];\r\n b = frames[frame + TwoColorTimeline.PREV_B];\r\n a = frames[frame + TwoColorTimeline.PREV_A];\r\n r2 = frames[frame + TwoColorTimeline.PREV_R2];\r\n g2 = frames[frame + TwoColorTimeline.PREV_G2];\r\n b2 = frames[frame + TwoColorTimeline.PREV_B2];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime));\r\n\r\n r += (frames[frame + TwoColorTimeline.R] - r) * percent;\r\n g += (frames[frame + TwoColorTimeline.G] - g) * percent;\r\n b += (frames[frame + TwoColorTimeline.B] - b) * percent;\r\n a += (frames[frame + TwoColorTimeline.A] - a) * percent;\r\n r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent;\r\n g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent;\r\n b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent;\r\n }\r\n if (alpha == 1) {\r\n slot.color.set(r, g, b, a);\r\n slot.darkColor.set(r2, g2, b2, 1);\r\n } else {\r\n let light = slot.color, dark = slot.darkColor;\r\n if (blend == MixBlend.setup) {\r\n light.setFromColor(slot.data.color);\r\n dark.setFromColor(slot.data.darkColor);\r\n }\r\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\r\n dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);\r\n }\r\n }\r\n }\r\n\r\n /** Changes a slot's {@link Slot#attachment}. */\r\n export class AttachmentTimeline implements Timeline {\r\n /** The index of the slot in {@link Skeleton#slots} that will be changed. */\r\n slotIndex: number;\r\n\r\n /** The time in seconds for each key frame. */\r\n frames: ArrayLike // time, ...\r\n\r\n /** The attachment name for each key frame. May contain null values to clear the attachment. */\r\n attachmentNames: Array;\r\n\r\n constructor (frameCount: number) {\r\n this.frames = Utils.newFloatArray(frameCount);\r\n this.attachmentNames = new Array(frameCount);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.attachment << 24) + this.slotIndex;\r\n }\r\n\r\n /** The number of key frames for this timeline. */\r\n getFrameCount () {\r\n return this.frames.length;\r\n }\r\n\r\n /** Sets the time in seconds and the attachment name for the specified key frame. */\r\n setFrame (frameIndex: number, time: number, attachmentName: string) {\r\n this.frames[frameIndex] = time;\r\n this.attachmentNames[frameIndex] = attachmentName;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active) return;\r\n if (direction == MixDirection.mixOut) {\r\n if (blend == MixBlend.setup)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first) this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n\r\n let frameIndex = 0;\r\n if (time >= frames[frames.length - 1]) // Time is after last frame.\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = Animation.binarySearch(frames, time, 1) - 1;\r\n\r\n let attachmentName = this.attachmentNames[frameIndex];\r\n skeleton.slots[this.slotIndex]\r\n .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n }\r\n\r\n setAttachment(skeleton: Skeleton, slot: Slot, attachmentName: string) {\r\n slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName);\r\n }\r\n }\r\n\r\n let zeros : ArrayLike = null;\r\n\r\n /** Changes a slot's {@link Slot#deform} to deform a {@link VertexAttachment}. */\r\n export class DeformTimeline extends CurveTimeline {\r\n /** The index of the slot in {@link Skeleton#getSlots()} that will be changed. */\r\n slotIndex: number;\r\n\r\n /** The attachment that will be deformed. */\r\n attachment: VertexAttachment;\r\n\r\n /** The time in seconds for each key frame. */\r\n frames: ArrayLike; // time, ...\r\n\r\n /** The vertices for each key frame. */\r\n frameVertices: Array>;\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount);\r\n this.frameVertices = new Array>(frameCount);\r\n if (zeros == null) zeros = Utils.newFloatArray(64);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.deform << 27) + + this.attachment.id + this.slotIndex;\r\n }\r\n\r\n /** Sets the time in seconds and the vertices for the specified key frame.\r\n * @param vertices Vertex positions for an unweighted VertexAttachment, or deform offsets if it has weights. */\r\n setFrame (frameIndex: number, time: number, vertices: ArrayLike) {\r\n this.frames[frameIndex] = time;\r\n this.frameVertices[frameIndex] = vertices;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let slot: Slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active) return;\r\n let slotAttachment: Attachment = slot.getAttachment();\r\n if (!(slotAttachment instanceof VertexAttachment) || !((slotAttachment).deformAttachment == this.attachment)) return;\r\n\r\n let deformArray: Array = slot.deform;\r\n if (deformArray.length == 0) blend = MixBlend.setup;\r\n\r\n let frameVertices = this.frameVertices;\r\n let vertexCount = frameVertices[0].length;\r\n\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n let vertexAttachment = slotAttachment;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n deformArray.length = 0;\r\n return;\r\n case MixBlend.first:\r\n if (alpha == 1) {\r\n deformArray.length = 0;\r\n break;\r\n }\r\n let deform: Array = Utils.setArraySize(deformArray, vertexCount);\r\n if (vertexAttachment.bones == null) {\r\n // Unweighted vertex positions.\r\n let setupVertices = vertexAttachment.vertices;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform[i] += (setupVertices[i] - deform[i]) * alpha;\r\n } else {\r\n // Weighted deform offsets.\r\n alpha = 1 - alpha;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform[i] *= alpha;\r\n }\r\n }\r\n return;\r\n }\r\n\r\n let deform: Array = Utils.setArraySize(deformArray, vertexCount);\r\n if (time >= frames[frames.length - 1]) { // Time is after last frame.\r\n let lastVertices = frameVertices[frames.length - 1];\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n let vertexAttachment = slotAttachment as VertexAttachment;\r\n if (vertexAttachment.bones == null) {\r\n // Unweighted vertex positions, with alpha.\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i = 0; i < vertexCount; i++) {\r\n deform[i] += lastVertices[i] - setupVertices[i];\r\n }\r\n } else {\r\n // Weighted deform offsets, with alpha.\r\n for (let i = 0; i < vertexCount; i++)\r\n deform[i] += lastVertices[i];\r\n }\r\n } else {\r\n Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\r\n }\r\n } else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n let vertexAttachment = slotAttachment as VertexAttachment;\r\n if (vertexAttachment.bones == null) {\r\n // Unweighted vertex positions, with alpha.\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i = 0; i < vertexCount; i++) {\r\n let setup = setupVertices[i];\r\n deform[i] = setup + (lastVertices[i] - setup) * alpha;\r\n }\r\n } else {\r\n // Weighted deform offsets, with alpha.\r\n for (let i = 0; i < vertexCount; i++)\r\n deform[i] = lastVertices[i] * alpha;\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (let i = 0; i < vertexCount; i++)\r\n deform[i] += (lastVertices[i] - deform[i]) * alpha;\r\n break;\r\n case MixBlend.add:\r\n let vertexAttachment = slotAttachment as VertexAttachment;\r\n if (vertexAttachment.bones == null) {\r\n // Unweighted vertex positions, with alpha.\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i = 0; i < vertexCount; i++) {\r\n deform[i] += (lastVertices[i] - setupVertices[i]) * alpha;\r\n }\r\n } else {\r\n // Weighted deform offsets, with alpha.\r\n for (let i = 0; i < vertexCount; i++)\r\n deform[i] += lastVertices[i] * alpha;\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time);\r\n let prevVertices = frameVertices[frame - 1];\r\n let nextVertices = frameVertices[frame];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\r\n\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n let vertexAttachment = slotAttachment as VertexAttachment;\r\n if (vertexAttachment.bones == null) {\r\n // Unweighted vertex positions, with alpha.\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i = 0; i < vertexCount; i++) {\r\n let prev = prevVertices[i];\r\n deform[i] += prev + (nextVertices[i] - prev) * percent - setupVertices[i];\r\n }\r\n } else {\r\n // Weighted deform offsets, with alpha.\r\n for (let i = 0; i < vertexCount; i++) {\r\n let prev = prevVertices[i];\r\n deform[i] += prev + (nextVertices[i] - prev) * percent;\r\n }\r\n }\r\n } else {\r\n for (let i = 0; i < vertexCount; i++) {\r\n let prev = prevVertices[i];\r\n deform[i] = prev + (nextVertices[i] - prev) * percent;\r\n }\r\n }\r\n } else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n let vertexAttachment = slotAttachment as VertexAttachment;\r\n if (vertexAttachment.bones == null) {\r\n // Unweighted vertex positions, with alpha.\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i = 0; i < vertexCount; i++) {\r\n let prev = prevVertices[i], setup = setupVertices[i];\r\n deform[i] = setup + (prev + (nextVertices[i] - prev) * percent - setup) * alpha;\r\n }\r\n } else {\r\n // Weighted deform offsets, with alpha.\r\n for (let i = 0; i < vertexCount; i++) {\r\n let prev = prevVertices[i];\r\n deform[i] = (prev + (nextVertices[i] - prev) * percent) * alpha;\r\n }\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (let i = 0; i < vertexCount; i++) {\r\n let prev = prevVertices[i];\r\n deform[i] += (prev + (nextVertices[i] - prev) * percent - deform[i]) * alpha;\r\n }\r\n break;\r\n case MixBlend.add:\r\n let vertexAttachment = slotAttachment as VertexAttachment;\r\n if (vertexAttachment.bones == null) {\r\n // Unweighted vertex positions, with alpha.\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i = 0; i < vertexCount; i++) {\r\n let prev = prevVertices[i];\r\n deform[i] += (prev + (nextVertices[i] - prev) * percent - setupVertices[i]) * alpha;\r\n }\r\n } else {\r\n // Weighted deform offsets, with alpha.\r\n for (let i = 0; i < vertexCount; i++) {\r\n let prev = prevVertices[i];\r\n deform[i] += (prev + (nextVertices[i] - prev) * percent) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /** Fires an {@link Event} when specific animation times are reached. */\r\n export class EventTimeline implements Timeline {\r\n /** The time in seconds for each key frame. */\r\n frames: ArrayLike; // time, ...\r\n\r\n /** The event for each key frame. */\r\n events: Array;\r\n\r\n constructor (frameCount: number) {\r\n this.frames = Utils.newFloatArray(frameCount);\r\n this.events = new Array(frameCount);\r\n }\r\n\r\n getPropertyId () {\r\n return TimelineType.event << 24;\r\n }\r\n\r\n /** The number of key frames for this timeline. */\r\n getFrameCount () {\r\n return this.frames.length;\r\n }\r\n\r\n /** Sets the time in seconds and the event for the specified key frame. */\r\n setFrame (frameIndex: number, event: Event) {\r\n this.frames[frameIndex] = event.time;\r\n this.events[frameIndex] = event;\r\n }\r\n\r\n /** Fires events for frames > `lastTime` and <= `time`. */\r\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n if (firedEvents == null) return;\r\n let frames = this.frames;\r\n let frameCount = this.frames.length;\r\n\r\n if (lastTime > time) { // Fire events after last time for looped animations.\r\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\r\n lastTime = -1;\r\n } else if (lastTime >= frames[frameCount - 1]) // Last time is after last frame.\r\n return;\r\n if (time < frames[0]) return; // Time is before first frame.\r\n\r\n let frame = 0;\r\n if (lastTime < frames[0])\r\n frame = 0;\r\n else {\r\n frame = Animation.binarySearch(frames, lastTime);\r\n let frameTime = frames[frame];\r\n while (frame > 0) { // Fire multiple events with the same frame.\r\n if (frames[frame - 1] != frameTime) break;\r\n frame--;\r\n }\r\n }\r\n for (; frame < frameCount && time >= frames[frame]; frame++)\r\n firedEvents.push(this.events[frame]);\r\n }\r\n }\r\n\r\n /** Changes a skeleton's {@link Skeleton#drawOrder}. */\r\n export class DrawOrderTimeline implements Timeline {\r\n /** The time in seconds for each key frame. */\r\n frames: ArrayLike; // time, ...\r\n\r\n /** The draw order for each key frame. See {@link #setFrame(int, float, int[])}. */\r\n drawOrders: Array>;\r\n\r\n constructor (frameCount: number) {\r\n this.frames = Utils.newFloatArray(frameCount);\r\n this.drawOrders = new Array>(frameCount);\r\n }\r\n\r\n getPropertyId () {\r\n return TimelineType.drawOrder << 24;\r\n }\r\n\r\n /** The number of key frames for this timeline. */\r\n getFrameCount () {\r\n return this.frames.length;\r\n }\r\n\r\n /** Sets the time in seconds and the draw order for the specified key frame.\r\n * @param drawOrder For each slot in {@link Skeleton#slots}, the index of the new draw order. May be null to use setup pose\r\n * draw order. */\r\n setFrame (frameIndex: number, time: number, drawOrder: Array) {\r\n this.frames[frameIndex] = time;\r\n this.drawOrders[frameIndex] = drawOrder;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let drawOrder: Array = skeleton.drawOrder;\r\n let slots: Array = skeleton.slots;\r\n if (direction == MixDirection.mixOut && blend == MixBlend.setup) {\r\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first) Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n\r\n let frame = 0;\r\n if (time >= frames[frames.length - 1]) // Time is after last frame.\r\n frame = frames.length - 1;\r\n else\r\n frame = Animation.binarySearch(frames, time) - 1;\r\n\r\n let drawOrderToSetupIndex = this.drawOrders[frame];\r\n if (drawOrderToSetupIndex == null)\r\n Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\r\n else {\r\n for (let i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\r\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\r\n }\r\n }\r\n }\r\n\r\n /** Changes an IK constraint's {@link IkConstraint#mix}, {@link IkConstraint#softness},\r\n * {@link IkConstraint#bendDirection}, {@link IkConstraint#stretch}, and {@link IkConstraint#compress}. */\r\n export class IkConstraintTimeline extends CurveTimeline {\r\n static ENTRIES = 6;\r\n static PREV_TIME = -6; static PREV_MIX = -5; static PREV_SOFTNESS = -4; static PREV_BEND_DIRECTION = -3; static PREV_COMPRESS = -2; static PREV_STRETCH = -1;\r\n static MIX = 1; static SOFTNESS = 2; static BEND_DIRECTION = 3; static COMPRESS = 4; static STRETCH = 5;\r\n\r\n /** The index of the IK constraint slot in {@link Skeleton#ikConstraints} that will be changed. */\r\n ikConstraintIndex: number;\r\n\r\n /** The time in seconds, mix, softness, bend direction, compress, and stretch for each key frame. */\r\n frames: ArrayLike; // time, mix, softness, bendDirection, compress, stretch, ...\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex;\r\n }\r\n\r\n /** Sets the time in seconds, mix, softness, bend direction, compress, and stretch for the specified key frame. */\r\n setFrame (frameIndex: number, time: number, mix: number, softness: number, bendDirection: number, compress: boolean, stretch: boolean) {\r\n frameIndex *= IkConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\r\n this.frames[frameIndex + IkConstraintTimeline.SOFTNESS] = softness;\r\n this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\r\n this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0;\r\n this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n let constraint: IkConstraint = skeleton.ikConstraints[this.ikConstraintIndex];\r\n if (!constraint.active) return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n return;\r\n case MixBlend.first:\r\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\r\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n return;\r\n }\r\n\r\n if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) { // Time is after last frame.\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n } else {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION]\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n } else {\r\n constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\r\n constraint.softness += (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n return;\r\n }\r\n\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\r\n let mix = frames[frame + IkConstraintTimeline.PREV_MIX];\r\n let softness = frames[frame + IkConstraintTimeline.PREV_SOFTNESS];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\r\n\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n } else {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n } else {\r\n constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\r\n constraint.softness += (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /** Changes a transform constraint's {@link TransformConstraint#rotateMix}, {@link TransformConstraint#translateMix},\r\n * {@link TransformConstraint#scaleMix}, and {@link TransformConstraint#shearMix}. */\r\n export class TransformConstraintTimeline extends CurveTimeline {\r\n static ENTRIES = 5;\r\n static PREV_TIME = -5; static PREV_ROTATE = -4; static PREV_TRANSLATE = -3; static PREV_SCALE = -2; static PREV_SHEAR = -1;\r\n static ROTATE = 1; static TRANSLATE = 2; static SCALE = 3; static SHEAR = 4;\r\n\r\n /** The index of the transform constraint slot in {@link Skeleton#transformConstraints} that will be changed. */\r\n transformConstraintIndex: number;\r\n\r\n /** The time in seconds, rotate mix, translate mix, scale mix, and shear mix for each key frame. */\r\n frames: ArrayLike; // time, rotate mix, translate mix, scale mix, shear mix, ...\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex;\r\n }\r\n\r\n /** The time in seconds, rotate mix, translate mix, scale mix, and shear mix for the specified key frame. */\r\n setFrame (frameIndex: number, time: number, rotateMix: number, translateMix: number, scaleMix: number, shearMix: number) {\r\n frameIndex *= TransformConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n\r\n let constraint: TransformConstraint = skeleton.transformConstraints[this.transformConstraintIndex];\r\n if (!constraint.active) return;\r\n if (time < frames[0]) {\r\n let data = constraint.data;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha;\r\n }\r\n return;\r\n }\r\n\r\n let rotate = 0, translate = 0, scale = 0, shear = 0;\r\n if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) { // Time is after last frame.\r\n let i = frames.length;\r\n rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[i + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[i + TransformConstraintTimeline.PREV_SHEAR];\r\n } else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\r\n rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\r\n\r\n rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent;\r\n scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent;\r\n shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n let data = constraint.data;\r\n constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha;\r\n constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha;\r\n constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha;\r\n constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha;\r\n } else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (scale - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (shear - constraint.shearMix) * alpha;\r\n }\r\n }\r\n }\r\n\r\n /** Changes a path constraint's {@link PathConstraint#position}. */\r\n export class PathConstraintPositionTimeline extends CurveTimeline {\r\n static ENTRIES = 2;\r\n static PREV_TIME = -2; static PREV_VALUE = -1;\r\n static VALUE = 1;\r\n\r\n /** The index of the path constraint slot in {@link Skeleton#pathConstraints} that will be changed. */\r\n pathConstraintIndex: number;\r\n\r\n /** The time in seconds and path constraint position for each key frame. */\r\n frames: ArrayLike; // time, position, ...\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex;\r\n }\r\n\r\n /** Sets the time in seconds and path constraint position for the specified key frame. */\r\n setFrame (frameIndex: number, time: number, value: number) {\r\n frameIndex *= PathConstraintPositionTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n let constraint: PathConstraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active) return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.position = constraint.data.position;\r\n return;\r\n case MixBlend.first:\r\n constraint.position += (constraint.data.position - constraint.position) * alpha;\r\n }\r\n return;\r\n }\r\n\r\n let position = 0;\r\n if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES]) // Time is after last frame.\r\n position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE];\r\n else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\r\n position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\r\n\r\n position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\r\n else\r\n constraint.position += (position - constraint.position) * alpha;\r\n }\r\n }\r\n\r\n /** Changes a path constraint's {@link PathConstraint#spacing}. */\r\n export class PathConstraintSpacingTimeline extends PathConstraintPositionTimeline {\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n let constraint: PathConstraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active) return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.spacing = constraint.data.spacing;\r\n return;\r\n case MixBlend.first:\r\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\r\n }\r\n return;\r\n }\r\n\r\n let spacing = 0;\r\n if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES]) // Time is after last frame.\r\n spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE];\r\n else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\r\n spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\r\n\r\n spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent;\r\n }\r\n\r\n if (blend == MixBlend.setup)\r\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\r\n else\r\n constraint.spacing += (spacing - constraint.spacing) * alpha;\r\n }\r\n }\r\n\r\n /** Changes a transform constraint's {@link PathConstraint#rotateMix} and\r\n * {@link TransformConstraint#translateMix}. */\r\n export class PathConstraintMixTimeline extends CurveTimeline {\r\n static ENTRIES = 3;\r\n static PREV_TIME = -3; static PREV_ROTATE = -2; static PREV_TRANSLATE = -1;\r\n static ROTATE = 1; static TRANSLATE = 2;\r\n\r\n /** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */\r\n pathConstraintIndex: number;\r\n\r\n /** The time in seconds, rotate mix, and translate mix for each key frame. */\r\n frames: ArrayLike; // time, rotate mix, translate mix, ...\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex;\r\n }\r\n\r\n /** The time in seconds, rotate mix, and translate mix for the specified key frame. */\r\n setFrame (frameIndex: number, time: number, rotateMix: number, translateMix: number) {\r\n frameIndex *= PathConstraintMixTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n let constraint: PathConstraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active) return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = constraint.data.rotateMix;\r\n constraint.translateMix = constraint.data.translateMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha;\r\n }\r\n return;\r\n }\r\n\r\n let rotate = 0, translate = 0;\r\n if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) { // Time is after last frame.\r\n rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n } else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\r\n rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\r\n\r\n rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent;\r\n }\r\n\r\n if (blend == MixBlend.setup) {\r\n constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha;\r\n constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha;\r\n } else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n }\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n /** Applies animations over time, queues animations for later playback, mixes (crossfading) between animations, and applies\r\n * multiple animations on top of each other (layering).\r\n *\r\n * See [Applying Animations](http://esotericsoftware.com/spine-applying-animations/) in the Spine Runtimes Guide. */\r\n export class AnimationState {\r\n static emptyAnimation = new Animation(\"\", [], 0);\r\n\r\n /** 1. A previously applied timeline has set this property.\r\n *\r\n * Result: Mix from the current pose to the timeline pose. */\r\n static SUBSEQUENT = 0;\r\n /** 1. This is the first timeline to set this property.\r\n * 2. The next track entry applied after this one does not have a timeline to set this property.\r\n *\r\n * Result: Mix from the setup pose to the timeline pose. */\r\n static FIRST = 1;\r\n /** 1) A previously applied timeline has set this property.
\r\n * 2) The next track entry to be applied does have a timeline to set this property.
\r\n * 3) The next track entry after that one does not have a timeline to set this property.
\r\n * Result: Mix from the current pose to the timeline pose, but do not mix out. This avoids \"dipping\" when crossfading\r\n * animations that key the same property. A subsequent timeline will set this property using a mix. */\r\n static HOLD_SUBSEQUENT = 2;\r\n /** 1) This is the first timeline to set this property.
\r\n * 2) The next track entry to be applied does have a timeline to set this property.
\r\n * 3) The next track entry after that one does not have a timeline to set this property.
\r\n * Result: Mix from the setup pose to the timeline pose, but do not mix out. This avoids \"dipping\" when crossfading animations\r\n * that key the same property. A subsequent timeline will set this property using a mix. */\r\n static HOLD_FIRST = 3;\r\n /** 1. This is the first timeline to set this property.\r\n * 2. The next track entry to be applied does have a timeline to set this property.\r\n * 3. The next track entry after that one does have a timeline to set this property.\r\n * 4. timelineHoldMix stores the first subsequent track entry that does not have a timeline to set this property.\r\n *\r\n * Result: The same as HOLD except the mix percentage from the timelineHoldMix track entry is used. This handles when more than\r\n * 2 track entries in a row have a timeline that sets the same property.\r\n *\r\n * Eg, A -> B -> C -> D where A, B, and C have a timeline setting same property, but D does not. When A is applied, to avoid\r\n * \"dipping\" A is not mixed out, however D (the first entry that doesn't set the property) mixing in is used to mix out A\r\n * (which affects B and C). Without using D to mix out, A would be applied fully until mixing completes, then snap into\r\n * place. */\r\n static HOLD_MIX = 4;\r\n\r\n static SETUP = 1;\r\n static CURRENT = 2;\r\n\r\n /** The AnimationStateData to look up mix durations. */\r\n data: AnimationStateData;\r\n\r\n /** The list of tracks that currently have animations, which may contain null entries. */\r\n tracks = new Array();\r\n\r\n /** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower\r\n * or faster. Defaults to 1.\r\n *\r\n * See TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */\r\n timeScale = 1;\r\n unkeyedState = 0;\r\n\r\n events = new Array();\r\n listeners = new Array();\r\n queue = new EventQueue(this);\r\n propertyIDs = new IntSet();\r\n animationsChanged = false;\r\n\r\n trackEntryPool = new Pool(() => new TrackEntry());\r\n\r\n constructor (data: AnimationStateData) {\r\n this.data = data;\r\n }\r\n\r\n /** Increments each track entry {@link TrackEntry#trackTime()}, setting queued animations as current if needed. */\r\n update (delta: number) {\r\n delta *= this.timeScale;\r\n let tracks = this.tracks;\r\n for (let i = 0, n = tracks.length; i < n; i++) {\r\n let current = tracks[i];\r\n if (current == null) continue;\r\n\r\n current.animationLast = current.nextAnimationLast;\r\n current.trackLast = current.nextTrackLast;\r\n\r\n let currentDelta = delta * current.timeScale;\r\n\r\n if (current.delay > 0) {\r\n current.delay -= currentDelta;\r\n if (current.delay > 0) continue;\r\n currentDelta = -current.delay;\r\n current.delay = 0;\r\n }\r\n\r\n let next = current.next;\r\n if (next != null) {\r\n // When the next entry's delay is passed, change to the next entry, preserving leftover time.\r\n let nextTime = current.trackLast - next.delay;\r\n if (nextTime >= 0) {\r\n next.delay = 0;\r\n next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\r\n current.trackTime += currentDelta;\r\n this.setCurrent(i, next, true);\r\n while (next.mixingFrom != null) {\r\n next.mixTime += delta;\r\n next = next.mixingFrom;\r\n }\r\n continue;\r\n }\r\n } else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {\r\n tracks[i] = null;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n continue;\r\n }\r\n if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) {\r\n // End mixing from entries once all have completed.\r\n let from = current.mixingFrom;\r\n current.mixingFrom = null;\r\n if (from != null) from.mixingTo = null;\r\n while (from != null) {\r\n this.queue.end(from);\r\n from = from.mixingFrom;\r\n }\r\n }\r\n\r\n current.trackTime += currentDelta;\r\n }\r\n\r\n this.queue.drain();\r\n }\r\n\r\n /** Returns true when all mixing from entries are complete. */\r\n updateMixingFrom (to: TrackEntry, delta: number): boolean {\r\n let from = to.mixingFrom;\r\n if (from == null) return true;\r\n\r\n let finished = this.updateMixingFrom(from, delta);\r\n\r\n from.animationLast = from.nextAnimationLast;\r\n from.trackLast = from.nextTrackLast;\r\n\r\n // Require mixTime > 0 to ensure the mixing from entry was applied at least once.\r\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\r\n // Require totalAlpha == 0 to ensure mixing is complete, unless mixDuration == 0 (the transition is a single frame).\r\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\r\n to.mixingFrom = from.mixingFrom;\r\n if (from.mixingFrom != null) from.mixingFrom.mixingTo = to;\r\n to.interruptAlpha = from.interruptAlpha;\r\n this.queue.end(from);\r\n }\r\n return finished;\r\n }\r\n\r\n from.trackTime += delta * from.timeScale;\r\n to.mixTime += delta;\r\n return false;\r\n }\r\n\r\n /** Poses the skeleton using the track entry animations. There are no side effects other than invoking listeners, so the\r\n * animation state can be applied to multiple skeletons to pose them identically.\r\n * @returns True if any animations were applied. */\r\n apply (skeleton: Skeleton) : boolean {\r\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\r\n if (this.animationsChanged) this._animationsChanged();\r\n\r\n let events = this.events;\r\n let tracks = this.tracks;\r\n let applied = false;\r\n\r\n for (let i = 0, n = tracks.length; i < n; i++) {\r\n let current = tracks[i];\r\n if (current == null || current.delay > 0) continue;\r\n applied = true;\r\n let blend: MixBlend = i == 0 ? MixBlend.first : current.mixBlend;\r\n\r\n // Apply mixing from entries first.\r\n let mix = current.alpha;\r\n if (current.mixingFrom != null)\r\n mix *= this.applyMixingFrom(current, skeleton, blend);\r\n else if (current.trackTime >= current.trackEnd && current.next == null)\r\n mix = 0;\r\n\r\n // Apply current entry.\r\n let animationLast = current.animationLast, animationTime = current.getAnimationTime();\r\n let timelineCount = current.animation.timelines.length;\r\n let timelines = current.animation.timelines;\r\n if ((i == 0 && mix == 1) || blend == MixBlend.add) {\r\n for (let ii = 0; ii < timelineCount; ii++) {\r\n // Fixes issue #302 on IOS9 where mix, blend sometimes became undefined and caused assets\r\n // to sometimes stop rendering when using color correction, as their RGBA values become NaN.\r\n // (https://github.com/pixijs/pixi-spine/issues/302)\r\n Utils.webkit602BugfixHelper(mix, blend);\r\n var timeline = timelines[ii];\r\n if (timeline instanceof AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true);\r\n else\r\n timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, MixDirection.mixIn);\r\n }\r\n } else {\r\n let timelineMode = current.timelineMode;\r\n\r\n let firstFrame = current.timelinesRotation.length == 0;\r\n if (firstFrame) Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);\r\n let timelinesRotation = current.timelinesRotation;\r\n\r\n for (let ii = 0; ii < timelineCount; ii++) {\r\n let timeline = timelines[ii];\r\n let timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : MixBlend.setup;\r\n if (timeline instanceof RotateTimeline) {\r\n this.applyRotateTimeline(timeline, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);\r\n } else if (timeline instanceof AttachmentTimeline) {\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true);\r\n } else {\r\n // This fixes the WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109\r\n Utils.webkit602BugfixHelper(mix, blend);\r\n timeline.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, MixDirection.mixIn);\r\n }\r\n }\r\n }\r\n this.queueEvents(current, animationTime);\r\n events.length = 0;\r\n current.nextAnimationLast = animationTime;\r\n current.nextTrackLast = current.trackTime;\r\n }\r\n\r\n // Set slots attachments to the setup pose, if needed. This occurs if an animation that is mixing out sets attachments so\r\n // subsequent timelines see any deform, but the subsequent timelines don't set an attachment (eg they are also mixing out or\r\n // the time is before the first key).\r\n var setupState = this.unkeyedState + AnimationState.SETUP;\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = skeleton.slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.attachmentState == setupState) {\r\n var attachmentName = slot.data.attachmentName;\r\n slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n }\r\n }\r\n this.unkeyedState += 2; // Increasing after each use avoids the need to reset attachmentState for every slot.\r\n\r\n this.queue.drain();\r\n return applied;\r\n }\r\n\r\n applyMixingFrom (to: TrackEntry, skeleton: Skeleton, blend: MixBlend) {\r\n let from = to.mixingFrom;\r\n if (from.mixingFrom != null) this.applyMixingFrom(from, skeleton, blend);\r\n\r\n let mix = 0;\r\n if (to.mixDuration == 0) { // Single frame mix to undo mixingFrom changes.\r\n mix = 1;\r\n if (blend == MixBlend.first) blend = MixBlend.setup;\r\n } else {\r\n mix = to.mixTime / to.mixDuration;\r\n if (mix > 1) mix = 1;\r\n if (blend != MixBlend.first) blend = from.mixBlend;\r\n }\r\n\r\n let events = mix < from.eventThreshold ? this.events : null;\r\n let attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\r\n let animationLast = from.animationLast, animationTime = from.getAnimationTime();\r\n let timelineCount = from.animation.timelines.length;\r\n let timelines = from.animation.timelines;\r\n let alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\r\n if (blend == MixBlend.add) {\r\n for (let i = 0; i < timelineCount; i++)\r\n timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, MixDirection.mixOut);\r\n } else {\r\n let timelineMode = from.timelineMode;\r\n let timelineHoldMix = from.timelineHoldMix;\r\n\r\n let firstFrame = from.timelinesRotation.length == 0;\r\n if (firstFrame) Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);\r\n let timelinesRotation = from.timelinesRotation;\r\n\r\n from.totalAlpha = 0;\r\n for (let i = 0; i < timelineCount; i++) {\r\n let timeline = timelines[i];\r\n let direction = MixDirection.mixOut;\r\n let timelineBlend: MixBlend;\r\n let alpha = 0;\r\n switch (timelineMode[i]) {\r\n case AnimationState.SUBSEQUENT:\r\n if (!drawOrder && timeline instanceof DrawOrderTimeline) continue;\r\n timelineBlend = blend;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.FIRST:\r\n timelineBlend = MixBlend.setup;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.HOLD_SUBSEQUENT:\r\n timelineBlend = blend;\r\n alpha = alphaHold;\r\n break;\r\n case AnimationState.HOLD_FIRST:\r\n timelineBlend = MixBlend.setup;\r\n alpha = alphaHold;\r\n break;\r\n default:\r\n timelineBlend = MixBlend.setup;\r\n let holdMix = timelineHoldMix[i];\r\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\r\n break;\r\n }\r\n from.totalAlpha += alpha;\r\n\r\n if (timeline instanceof RotateTimeline)\r\n this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);\r\n else if (timeline instanceof AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments);\r\n else {\r\n // This fixes the WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109\r\n Utils.webkit602BugfixHelper(alpha, blend);\r\n if (drawOrder && timeline instanceof DrawOrderTimeline && timelineBlend == MixBlend.setup)\r\n direction = MixDirection.mixIn;\r\n timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction);\r\n }\r\n }\r\n }\r\n\r\n if (to.mixDuration > 0) this.queueEvents(from, animationTime);\r\n this.events.length = 0;\r\n from.nextAnimationLast = animationTime;\r\n from.nextTrackLast = from.trackTime;\r\n\r\n return mix;\r\n }\r\n\r\n applyAttachmentTimeline (timeline: AttachmentTimeline, skeleton: Skeleton, time: number, blend: MixBlend, attachments: boolean) {\r\n\r\n var slot = skeleton.slots[timeline.slotIndex];\r\n if (!slot.bone.active) return;\r\n\r\n var frames = timeline.frames;\r\n if (time < frames[0]) { // Time is before first frame.\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\r\n }\r\n else {\r\n var frameIndex;\r\n if (time >= frames[frames.length - 1]) // Time is after last frame.\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = Animation.binarySearch(frames, time) - 1;\r\n this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments);\r\n }\r\n\r\n // If an attachment wasn't set (ie before the first frame or attachments is false), set the setup attachment later.\r\n if (slot.attachmentState <= this.unkeyedState) slot.attachmentState = this.unkeyedState + AnimationState.SETUP;\r\n }\r\n\r\n setAttachment (skeleton: Skeleton, slot: Slot, attachmentName: string, attachments: boolean) {\r\n slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName);\r\n if (attachments) slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;\r\n }\r\n\r\n\r\n applyRotateTimeline (timeline: Timeline, skeleton: Skeleton, time: number, alpha: number, blend: MixBlend,\r\n timelinesRotation: Array, i: number, firstFrame: boolean) {\r\n\r\n if (firstFrame) timelinesRotation[i] = 0;\r\n\r\n if (alpha == 1) {\r\n timeline.apply(skeleton, 0, time, null, 1, blend, MixDirection.mixIn);\r\n return;\r\n }\r\n\r\n let rotateTimeline = timeline as RotateTimeline;\r\n let frames = rotateTimeline.frames;\r\n let bone = skeleton.bones[rotateTimeline.boneIndex];\r\n if (!bone.active) return;\r\n let r1 = 0, r2 = 0;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n default:\r\n return;\r\n case MixBlend.first:\r\n r1 = bone.rotation;\r\n r2 = bone.data.rotation;\r\n }\r\n } else {\r\n r1 = blend == MixBlend.setup ? bone.data.rotation : bone.rotation;\r\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) // Time is after last frame.\r\n r2 = bone.data.rotation + frames[frames.length + RotateTimeline.PREV_ROTATION];\r\n else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\r\n let prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\r\n let frameTime = frames[frame];\r\n let percent = rotateTimeline.getCurvePercent((frame >> 1) - 1,\r\n 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\r\n\r\n r2 = frames[frame + RotateTimeline.ROTATION] - prevRotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n r2 = prevRotation + r2 * percent + bone.data.rotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n }\r\n }\r\n\r\n // Mix between rotations using the direction of the shortest route on the first frame while detecting crosses.\r\n let total = 0, diff = r2 - r1;\r\n diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\r\n if (diff == 0) {\r\n total = timelinesRotation[i];\r\n } else {\r\n let lastTotal = 0, lastDiff = 0;\r\n if (firstFrame) {\r\n lastTotal = 0;\r\n lastDiff = diff;\r\n } else {\r\n lastTotal = timelinesRotation[i]; // Angle and direction of mix, including loops.\r\n lastDiff = timelinesRotation[i + 1]; // Difference between bones.\r\n }\r\n let current = diff > 0, dir = lastTotal >= 0;\r\n // Detect cross at 0 (not 180).\r\n if (MathUtils.signum(lastDiff) != MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\r\n // A cross after a 360 rotation is a loop.\r\n if (Math.abs(lastTotal) > 180) lastTotal += 360 * MathUtils.signum(lastTotal);\r\n dir = current;\r\n }\r\n total = diff + lastTotal - lastTotal % 360; // Store loops as part of lastTotal.\r\n if (dir != current) total += 360 * MathUtils.signum(lastTotal);\r\n timelinesRotation[i] = total;\r\n }\r\n timelinesRotation[i + 1] = diff;\r\n r1 += total * alpha;\r\n bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360;\r\n }\r\n\r\n queueEvents (entry: TrackEntry, animationTime: number) {\r\n let animationStart = entry.animationStart, animationEnd = entry.animationEnd;\r\n let duration = animationEnd - animationStart;\r\n let trackLastWrapped = entry.trackLast % duration;\r\n\r\n // Queue events before complete.\r\n let events = this.events;\r\n let i = 0, n = events.length;\r\n for (; i < n; i++) {\r\n let event = events[i];\r\n if (event.time < trackLastWrapped) break;\r\n if (event.time > animationEnd) continue; // Discard events outside animation start/end.\r\n this.queue.event(entry, event);\r\n }\r\n\r\n // Queue complete if completed a loop iteration or the animation.\r\n let complete = false;\r\n if (entry.loop)\r\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\r\n else\r\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\r\n if (complete) this.queue.complete(entry);\r\n\r\n // Queue events after complete.\r\n for (; i < n; i++) {\r\n let event = events[i];\r\n if (event.time < animationStart) continue; // Discard events outside animation start/end.\r\n this.queue.event(entry, events[i]);\r\n }\r\n }\r\n\r\n /** Removes all animations from all tracks, leaving skeletons in their current pose.\r\n *\r\n * It may be desired to use {@link AnimationState#setEmptyAnimation()} to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose. */\r\n clearTracks () {\r\n let oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (let i = 0, n = this.tracks.length; i < n; i++)\r\n this.clearTrack(i);\r\n this.tracks.length = 0;\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n }\r\n\r\n /** Removes all animations from the track, leaving skeletons in their current pose.\r\n *\r\n * It may be desired to use {@link AnimationState#setEmptyAnimation()} to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose. */\r\n clearTrack (trackIndex: number) {\r\n if (trackIndex >= this.tracks.length) return;\r\n let current = this.tracks[trackIndex];\r\n if (current == null) return;\r\n\r\n this.queue.end(current);\r\n\r\n this.disposeNext(current);\r\n\r\n let entry = current;\r\n while (true) {\r\n let from = entry.mixingFrom;\r\n if (from == null) break;\r\n this.queue.end(from);\r\n entry.mixingFrom = null;\r\n entry.mixingTo = null;\r\n entry = from;\r\n }\r\n\r\n this.tracks[current.trackIndex] = null;\r\n\r\n this.queue.drain();\r\n }\r\n\r\n setCurrent (index: number, current: TrackEntry, interrupt: boolean) {\r\n let from = this.expandToIndex(index);\r\n this.tracks[index] = current;\r\n\r\n if (from != null) {\r\n if (interrupt) this.queue.interrupt(from);\r\n current.mixingFrom = from;\r\n from.mixingTo = current;\r\n current.mixTime = 0;\r\n\r\n // Store the interrupted mix percentage.\r\n if (from.mixingFrom != null && from.mixDuration > 0)\r\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\r\n\r\n from.timelinesRotation.length = 0; // Reset rotation for mixing out, in case entry was mixed in.\r\n }\r\n\r\n this.queue.start(current);\r\n }\r\n\r\n /** Sets an animation by name.\r\n *\r\n * {@link #setAnimationWith(}. */\r\n setAnimation (trackIndex: number, animationName: string, loop: boolean) {\r\n let animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null) throw new Error(\"Animation not found: \" + animationName);\r\n return this.setAnimationWith(trackIndex, animation, loop);\r\n }\r\n\r\n /** Sets the current animation for a track, discarding any queued animations. If the formerly current track entry was never\r\n * applied to a skeleton, it is replaced (not mixed from).\r\n * @param loop If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its\r\n * duration. In either case {@link TrackEntry#trackEnd} determines when the track is cleared.\r\n * @returns A track entry to allow further customization of animation playback. References to the track entry must not be kept\r\n * after the {@link AnimationStateListener#dispose()} event occurs. */\r\n setAnimationWith (trackIndex: number, animation: Animation, loop: boolean) {\r\n if (animation == null) throw new Error(\"animation cannot be null.\");\r\n let interrupt = true;\r\n let current = this.expandToIndex(trackIndex);\r\n if (current != null) {\r\n if (current.nextTrackLast == -1) {\r\n // Don't mix from an entry that was never applied.\r\n this.tracks[trackIndex] = current.mixingFrom;\r\n this.queue.interrupt(current);\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n current = current.mixingFrom;\r\n interrupt = false;\r\n } else\r\n this.disposeNext(current);\r\n }\r\n let entry = this.trackEntry(trackIndex, animation, loop, current);\r\n this.setCurrent(trackIndex, entry, interrupt);\r\n this.queue.drain();\r\n return entry;\r\n }\r\n\r\n /** Queues an animation by name.\r\n *\r\n * See {@link #addAnimationWith()}. */\r\n addAnimation (trackIndex: number, animationName: string, loop: boolean, delay: number) {\r\n let animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null) throw new Error(\"Animation not found: \" + animationName);\r\n return this.addAnimationWith(trackIndex, animation, loop, delay);\r\n }\r\n\r\n /** Adds an animation to be played after the current or last queued animation for a track. If the track is empty, it is\r\n * equivalent to calling {@link #setAnimationWith()}.\r\n * @param delay If > 0, sets {@link TrackEntry#delay}. If <= 0, the delay set is the duration of the previous track entry\r\n * minus any mix duration (from the {@link AnimationStateData}) plus the specified `delay` (ie the mix\r\n * ends at (`delay` = 0) or before (`delay` < 0) the previous track entry duration). If the\r\n * previous entry is looping, its next loop completion is used instead of its duration.\r\n * @returns A track entry to allow further customization of animation playback. References to the track entry must not be kept\r\n * after the {@link AnimationStateListener#dispose()} event occurs. */\r\n addAnimationWith (trackIndex: number, animation: Animation, loop: boolean, delay: number) {\r\n if (animation == null) throw new Error(\"animation cannot be null.\");\r\n\r\n let last = this.expandToIndex(trackIndex);\r\n if (last != null) {\r\n while (last.next != null)\r\n last = last.next;\r\n }\r\n\r\n let entry = this.trackEntry(trackIndex, animation, loop, last);\r\n\r\n if (last == null) {\r\n this.setCurrent(trackIndex, entry, true);\r\n this.queue.drain();\r\n } else {\r\n last.next = entry;\r\n if (delay <= 0) {\r\n let duration = last.animationEnd - last.animationStart;\r\n if (duration != 0) {\r\n if (last.loop)\r\n delay += duration * (1 + ((last.trackTime / duration) | 0));\r\n else\r\n delay += Math.max(duration, last.trackTime);\r\n delay -= this.data.getMix(last.animation, animation);\r\n } else\r\n delay = last.trackTime;\r\n }\r\n }\r\n\r\n entry.delay = delay;\r\n return entry;\r\n }\r\n\r\n /** Sets an empty animation for a track, discarding any queued animations, and sets the track entry's\r\n * {@link TrackEntry#mixduration}. An empty animation has no timelines and serves as a placeholder for mixing in or out.\r\n *\r\n * Mixing out is done by setting an empty animation with a mix duration using either {@link #setEmptyAnimation()},\r\n * {@link #setEmptyAnimations()}, or {@link #addEmptyAnimation()}. Mixing to an empty animation causes\r\n * the previous animation to be applied less and less over the mix duration. Properties keyed in the previous animation\r\n * transition to the value from lower tracks or to the setup pose value if no lower tracks key the property. A mix duration of\r\n * 0 still mixes out over one frame.\r\n *\r\n * Mixing in is done by first setting an empty animation, then adding an animation using\r\n * {@link #addAnimation()} and on the returned track entry, set the\r\n * {@link TrackEntry#setMixDuration()}. Mixing from an empty animation causes the new animation to be applied more and\r\n * more over the mix duration. Properties keyed in the new animation transition from the value from lower tracks or from the\r\n * setup pose value if no lower tracks key the property to the value keyed in the new animation. */\r\n setEmptyAnimation (trackIndex: number, mixDuration: number) {\r\n let entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n }\r\n\r\n /** Adds an empty animation to be played after the current or last queued animation for a track, and sets the track entry's\r\n * {@link TrackEntry#mixDuration}. If the track is empty, it is equivalent to calling\r\n * {@link #setEmptyAnimation()}.\r\n *\r\n * See {@link #setEmptyAnimation()}.\r\n * @param delay If > 0, sets {@link TrackEntry#delay}. If <= 0, the delay set is the duration of the previous track entry\r\n * minus any mix duration plus the specified `delay` (ie the mix ends at (`delay` = 0) or\r\n * before (`delay` < 0) the previous track entry duration). If the previous entry is looping, its next\r\n * loop completion is used instead of its duration.\r\n * @return A track entry to allow further customization of animation playback. References to the track entry must not be kept\r\n * after the {@link AnimationStateListener#dispose()} event occurs. */\r\n addEmptyAnimation (trackIndex: number, mixDuration: number, delay: number) {\r\n if (delay <= 0) delay -= mixDuration;\r\n let entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n }\r\n\r\n /** Sets an empty animation for every track, discarding any queued animations, and mixes to it over the specified mix\r\n * duration. */\r\n setEmptyAnimations (mixDuration: number) {\r\n let oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (let i = 0, n = this.tracks.length; i < n; i++) {\r\n let current = this.tracks[i];\r\n if (current != null) this.setEmptyAnimation(current.trackIndex, mixDuration);\r\n }\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n }\r\n\r\n expandToIndex (index: number) {\r\n if (index < this.tracks.length) return this.tracks[index];\r\n Utils.ensureArrayCapacity(this.tracks, index + 1, null);\r\n this.tracks.length = index + 1;\r\n return null;\r\n }\r\n\r\n /** @param last May be null. */\r\n trackEntry (trackIndex: number, animation: Animation, loop: boolean, last: TrackEntry) {\r\n let entry = this.trackEntryPool.obtain();\r\n entry.trackIndex = trackIndex;\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.holdPrevious = false;\r\n\r\n entry.eventThreshold = 0;\r\n entry.attachmentThreshold = 0;\r\n entry.drawOrderThreshold = 0;\r\n\r\n entry.animationStart = 0;\r\n entry.animationEnd = animation.duration;\r\n entry.animationLast = -1;\r\n entry.nextAnimationLast = -1;\r\n\r\n entry.delay = 0;\r\n entry.trackTime = 0;\r\n entry.trackLast = -1;\r\n entry.nextTrackLast = -1;\r\n entry.trackEnd = Number.MAX_VALUE;\r\n entry.timeScale = 1;\r\n\r\n entry.alpha = 1;\r\n entry.interruptAlpha = 1;\r\n entry.mixTime = 0;\r\n entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation);\r\n entry.mixBlend = MixBlend.replace;\r\n return entry;\r\n }\r\n\r\n disposeNext (entry: TrackEntry) {\r\n let next = entry.next;\r\n while (next != null) {\r\n this.queue.dispose(next);\r\n next = next.next;\r\n }\r\n entry.next = null;\r\n }\r\n\r\n _animationsChanged () {\r\n this.animationsChanged = false;\r\n\r\n this.propertyIDs.clear();\r\n\r\n for (let i = 0, n = this.tracks.length; i < n; i++) {\r\n let entry = this.tracks[i];\r\n if (entry == null) continue;\r\n while (entry.mixingFrom != null)\r\n entry = entry.mixingFrom;\r\n\r\n do {\r\n if (entry.mixingFrom == null || entry.mixBlend != MixBlend.add) this.computeHold(entry);\r\n entry = entry.mixingTo;\r\n } while (entry != null)\r\n }\r\n }\r\n\r\n computeHold (entry: TrackEntry) {\r\n let to = entry.mixingTo;\r\n let timelines = entry.animation.timelines;\r\n let timelinesCount = entry.animation.timelines.length;\r\n let timelineMode = Utils.setArraySize(entry.timelineMode, timelinesCount);\r\n entry.timelineHoldMix.length = 0;\r\n let timelineDipMix = Utils.setArraySize(entry.timelineHoldMix, timelinesCount);\r\n let propertyIDs = this.propertyIDs;\r\n\r\n if (to != null && to.holdPrevious) {\r\n for (let i = 0; i < timelinesCount; i++) {\r\n timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT;\r\n }\r\n return;\r\n }\r\n\r\n outer:\r\n for (let i = 0; i < timelinesCount; i++) {\r\n let timeline = timelines[i];\r\n let id = timeline.getPropertyId();\r\n if (!propertyIDs.add(id))\r\n timelineMode[i] = AnimationState.SUBSEQUENT;\r\n else if (to == null || timeline instanceof AttachmentTimeline || timeline instanceof DrawOrderTimeline\r\n || timeline instanceof EventTimeline || !to.animation.hasTimeline(id)) {\r\n timelineMode[i] = AnimationState.FIRST;\r\n } else {\r\n for (let next = to.mixingTo; next != null; next = next.mixingTo) {\r\n if (next.animation.hasTimeline(id)) continue;\r\n if (entry.mixDuration > 0) {\r\n timelineMode[i] = AnimationState.HOLD_MIX;\r\n timelineDipMix[i] = next;\r\n continue outer;\r\n }\r\n break;\r\n }\r\n timelineMode[i] = AnimationState.HOLD_FIRST;\r\n }\r\n }\r\n }\r\n\r\n /** Returns the track entry for the animation currently playing on the track, or null if no animation is currently playing. */\r\n getCurrent (trackIndex: number) {\r\n if (trackIndex >= this.tracks.length) return null;\r\n return this.tracks[trackIndex];\r\n }\r\n\r\n /** Adds a listener to receive events for all track entries. */\r\n addListener (listener: AnimationStateListener) {\r\n if (listener == null) throw new Error(\"listener cannot be null.\");\r\n this.listeners.push(listener);\r\n }\r\n\r\n /** Removes the listener added with {@link #addListener()}. */\r\n removeListener (listener: AnimationStateListener) {\r\n let index = this.listeners.indexOf(listener);\r\n if (index >= 0) this.listeners.splice(index, 1);\r\n }\r\n\r\n /** Removes all listeners added with {@link #addListener()}. */\r\n clearListeners () {\r\n this.listeners.length = 0;\r\n }\r\n\r\n /** Discards all listener notifications that have not yet been delivered. This can be useful to call from an\r\n * {@link AnimationStateListener} when it is known that further notifications that may have been already queued for delivery\r\n * are not wanted because new animations are being set. */\r\n clearListenerNotifications () {\r\n this.queue.clear();\r\n }\r\n\r\n //deprecated stuff\r\n onComplete: (trackIndex: number, loopCount: number) => any;\r\n onEvent: (trackIndex: number, event: Event) => any;\r\n onStart: (trackIndex: number) => any;\r\n onEnd: (trackIndex: number) => any;\r\n\r\n private static deprecatedWarning1: boolean = false;\r\n\r\n setAnimationByName(trackIndex: number, animationName: string, loop: boolean) {\r\n if (!AnimationState.deprecatedWarning1) {\r\n AnimationState.deprecatedWarning1 = true;\r\n console.warn(\"Spine Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.\");\r\n }\r\n this.setAnimation(trackIndex, animationName, loop);\r\n }\r\n\r\n private static deprecatedWarning2: boolean = false;\r\n\r\n addAnimationByName(trackIndex: number, animationName: string, loop: boolean, delay: number) {\r\n if (!AnimationState.deprecatedWarning2) {\r\n AnimationState.deprecatedWarning2 = true;\r\n console.warn(\"Spine Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.\");\r\n }\r\n this.addAnimation(trackIndex, animationName, loop, delay);\r\n }\r\n\r\n private static deprecatedWarning3: boolean = false;\r\n\r\n hasAnimation(animationName: string): boolean {\r\n let animation = this.data.skeletonData.findAnimation(animationName);\r\n return animation !== null;\r\n }\r\n\r\n hasAnimationByName(animationName: string): boolean {\r\n if (!AnimationState.deprecatedWarning3) {\r\n AnimationState.deprecatedWarning3 = true;\r\n console.warn(\"Spine Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.\");\r\n }\r\n return this.hasAnimation(animationName);\r\n }\r\n }\r\n\r\n /** Stores settings and other state for the playback of an animation on an {@link AnimationState} track.\r\n *\r\n * References to a track entry must not be kept after the {@link AnimationStateListener#dispose()} event occurs. */\r\n export class TrackEntry {\r\n /** The animation to apply for this track entry. */\r\n animation: Animation;\r\n\r\n /** The animation queued to start after this animation, or null. `next` makes up a linked list. */\r\n next: TrackEntry;\r\n\r\n /** The track entry for the previous animation when mixing from the previous animation to this animation, or null if no\r\n * mixing is currently occuring. When mixing from multiple animations, `mixingFrom` makes up a linked list. */\r\n mixingFrom: TrackEntry;\r\n\r\n /** The track entry for the next animation when mixing from this animation to the next animation, or null if no mixing is\r\n * currently occuring. When mixing to multiple animations, `mixingTo` makes up a linked list. */\r\n mixingTo: TrackEntry;\r\n\r\n /** The listener for events generated by this track entry, or null.\r\n *\r\n * A track entry returned from {@link AnimationState#setAnimation()} is already the current animation\r\n * for the track, so the track entry listener {@link AnimationStateListener#start()} will not be called. */\r\n listener: AnimationStateListener;\r\n\r\n /** The index of the track where this track entry is either current or queued.\r\n *\r\n * See {@link AnimationState#getCurrent()}. */\r\n trackIndex: number;\r\n\r\n /** If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its\r\n * duration. */\r\n loop: boolean;\r\n\r\n /** If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead\r\n * of being mixed out.\r\n *\r\n * When mixing between animations that key the same property, if a lower track also keys that property then the value will\r\n * briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0%\r\n * while the second animation mixes from 0% to 100%. Setting `holdPrevious` to true applies the first animation\r\n * at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which\r\n * keys the property, only when a higher track also keys the property.\r\n *\r\n * Snapping will occur if `holdPrevious` is true and this animation does not key all the same properties as the\r\n * previous animation. */\r\n holdPrevious: boolean;\r\n\r\n /** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the\r\n * `eventThreshold`, event timelines are applied while this animation is being mixed out. Defaults to 0, so event\r\n * timelines are not applied while this animation is being mixed out. */\r\n eventThreshold: number;\r\n\r\n /** When the mix percentage ({@link #mixtime} / {@link #mixDuration}) is less than the\r\n * `attachmentThreshold`, attachment timelines are applied while this animation is being mixed out. Defaults to\r\n * 0, so attachment timelines are not applied while this animation is being mixed out. */\r\n attachmentThreshold: number;\r\n\r\n /** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the\r\n * `drawOrderThreshold`, draw order timelines are applied while this animation is being mixed out. Defaults to 0,\r\n * so draw order timelines are not applied while this animation is being mixed out. */\r\n drawOrderThreshold: number;\r\n\r\n /** Seconds when this animation starts, both initially and after looping. Defaults to 0.\r\n *\r\n * When changing the `animationStart` time, it often makes sense to set {@link #animationLast} to the same\r\n * value to prevent timeline keys before the start time from triggering. */\r\n animationStart: number;\r\n\r\n /** Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will\r\n * loop back to {@link #animationStart} at this time. Defaults to the animation {@link Animation#duration}. */\r\n animationEnd: number;\r\n\r\n\r\n /** The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this\r\n * animation is applied, event timelines will fire all events between the `animationLast` time (exclusive) and\r\n * `animationTime` (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation\r\n * is applied. */\r\n animationLast: number;\r\n\r\n nextAnimationLast: number;\r\n\r\n /** Seconds to postpone playing the animation. When this track entry is the current track entry, `delay`\r\n * postpones incrementing the {@link #trackTime}. When this track entry is queued, `delay` is the time from\r\n * the start of the previous animation to when this track entry will become the current track entry (ie when the previous\r\n * track entry {@link TrackEntry#trackTime} >= this track entry's `delay`).\r\n *\r\n * {@link #timeScale} affects the delay. */\r\n delay: number;\r\n\r\n /** Current time in seconds this track entry has been the current track entry. The track time determines\r\n * {@link #animationTime}. The track time can be set to start the animation at a time other than 0, without affecting\r\n * looping. */\r\n trackTime: number;\r\n\r\n trackLast: number; nextTrackLast: number;\r\n\r\n /** The track time in seconds when this animation will be removed from the track. Defaults to the highest possible float\r\n * value, meaning the animation will be applied until a new animation is set or the track is cleared. If the track end time\r\n * is reached, no other animations are queued for playback, and mixing from any previous animations is complete, then the\r\n * properties keyed by the animation are set to the setup pose and the track is cleared.\r\n *\r\n * It may be desired to use {@link AnimationState#addEmptyAnimation()} rather than have the animation\r\n * abruptly cease being applied. */\r\n trackEnd: number;\r\n\r\n /** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or\r\n * faster. Defaults to 1.\r\n *\r\n * {@link #mixTime} is not affected by track entry time scale, so {@link #mixDuration} may need to be adjusted to\r\n * match the animation speed.\r\n *\r\n * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the\r\n * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, assuming time scale to be 1. If\r\n * the time scale is not 1, the delay may need to be adjusted.\r\n *\r\n * See AnimationState {@link AnimationState#timeScale} for affecting all animations. */\r\n timeScale: number;\r\n\r\n /** Values < 1 mix this animation with the skeleton's current pose (usually the pose resulting from lower tracks). Defaults\r\n * to 1, which overwrites the skeleton's current pose with this animation.\r\n *\r\n * Typically track 0 is used to completely pose the skeleton, then alpha is used on higher tracks. It doesn't make sense to\r\n * use alpha on track 0 if the skeleton pose is from the last frame render. */\r\n alpha: number;\r\n\r\n /** Seconds from 0 to the {@link #getMixDuration()} when mixing from the previous animation to this animation. May be\r\n * slightly more than `mixDuration` when the mix is complete. */\r\n mixTime: number;\r\n\r\n /** Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData\r\n * {@link AnimationStateData#getMix()} based on the animation before this animation (if any).\r\n *\r\n * A mix duration of 0 still mixes out over one frame to provide the track entry being mixed out a chance to revert the\r\n * properties it was animating.\r\n *\r\n * The `mixDuration` can be set manually rather than use the value from\r\n * {@link AnimationStateData#getMix()}. In that case, the `mixDuration` can be set for a new\r\n * track entry only before {@link AnimationState#update(float)} is first called.\r\n *\r\n * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the\r\n * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, not a mix duration set\r\n * afterward. */\r\n mixDuration: number; interruptAlpha: number; totalAlpha: number;\r\n\r\n /** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which\r\n * replaces the values from the lower tracks with the animation values. {@link MixBlend#add} adds the animation values to\r\n * the values from the lower tracks.\r\n *\r\n * The `mixBlend` can be set for a new track entry only before {@link AnimationState#apply()} is first\r\n * called. */\r\n mixBlend = MixBlend.replace;\r\n timelineMode = new Array();\r\n timelineHoldMix = new Array();\r\n timelinesRotation = new Array();\r\n\r\n reset () {\r\n this.next = null;\r\n this.mixingFrom = null;\r\n this.mixingTo = null;\r\n this.animation = null;\r\n this.listener = null;\r\n this.timelineMode.length = 0;\r\n this.timelineHoldMix.length = 0;\r\n this.timelinesRotation.length = 0;\r\n }\r\n\r\n /** Uses {@link #trackTime} to compute the `animationTime`, which is between {@link #animationStart}\r\n * and {@link #animationEnd}. When the `trackTime` is 0, the `animationTime` is equal to the\r\n * `animationStart` time. */\r\n getAnimationTime () {\r\n if (this.loop) {\r\n let duration = this.animationEnd - this.animationStart;\r\n if (duration == 0) return this.animationStart;\r\n return (this.trackTime % duration) + this.animationStart;\r\n }\r\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\r\n }\r\n\r\n setAnimationLast(animationLast: number) {\r\n this.animationLast = animationLast;\r\n this.nextAnimationLast = animationLast;\r\n }\r\n\r\n /** Returns true if at least one loop has been completed.\r\n *\r\n * See {@link AnimationStateListener#complete()}. */\r\n isComplete () {\r\n return this.trackTime >= this.animationEnd - this.animationStart;\r\n }\r\n\r\n /** Resets the rotation directions for mixing this entry's rotate timelines. This can be useful to avoid bones rotating the\r\n * long way around when using {@link #alpha} and starting animations on other tracks.\r\n *\r\n * Mixing with {@link MixBlend#replace} involves finding a rotation between two others, which has two possible solutions:\r\n * the short way or the long way around. The two rotations likely change over time, so which direction is the short or long\r\n * way also changes. If the short way was always chosen, bones would flip to the other side when that direction became the\r\n * long way. TrackEntry chooses the short way the first time it is applied and remembers that direction. */\r\n resetRotationDirections () {\r\n this.timelinesRotation.length = 0;\r\n }\r\n\r\n //deprecated stuff\r\n onComplete: (trackIndex: number, loopCount: number) => any;\r\n onEvent: (trackIndex: number, event: Event) => any;\r\n onStart: (trackIndex: number) => any;\r\n onEnd: (trackIndex: number) => any;\r\n\r\n private static deprecatedWarning1: Boolean = false;\r\n private static deprecatedWarning2: Boolean = false;\r\n\r\n get time() {\r\n if (!TrackEntry.deprecatedWarning1) {\r\n TrackEntry.deprecatedWarning1 = true;\r\n console.warn(\"Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.\");\r\n }\r\n return this.trackTime;\r\n }\r\n\r\n set time(value: number) {\r\n if (!TrackEntry.deprecatedWarning1) {\r\n TrackEntry.deprecatedWarning1 = true;\r\n console.warn(\"Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.\");\r\n }\r\n this.trackTime = value;\r\n }\r\n\r\n get endTime() {\r\n if (!TrackEntry.deprecatedWarning2) {\r\n TrackEntry.deprecatedWarning2 = true;\r\n console.warn(\"Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.\");\r\n }\r\n return this.trackTime;\r\n }\r\n\r\n set endTime(value: number) {\r\n if (!TrackEntry.deprecatedWarning2) {\r\n TrackEntry.deprecatedWarning2 = true;\r\n console.warn(\"Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.\");\r\n }\r\n this.trackTime = value;\r\n }\r\n\r\n loopsCount() {\r\n return Math.floor(this.trackTime / this.trackEnd);\r\n }\r\n }\r\n\r\n export class EventQueue {\r\n objects: Array = [];\r\n drainDisabled = false;\r\n animState: AnimationState;\r\n\r\n constructor(animState: AnimationState) {\r\n this.animState = animState;\r\n }\r\n\r\n start (entry: TrackEntry) {\r\n this.objects.push(EventType.start);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n }\r\n\r\n interrupt (entry: TrackEntry) {\r\n this.objects.push(EventType.interrupt);\r\n this.objects.push(entry);\r\n }\r\n\r\n end (entry: TrackEntry) {\r\n this.objects.push(EventType.end);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n }\r\n\r\n dispose (entry: TrackEntry) {\r\n this.objects.push(EventType.dispose);\r\n this.objects.push(entry);\r\n }\r\n\r\n complete (entry: TrackEntry) {\r\n this.objects.push(EventType.complete);\r\n this.objects.push(entry);\r\n }\r\n\r\n event (entry: TrackEntry, event: Event) {\r\n this.objects.push(EventType.event);\r\n this.objects.push(entry);\r\n this.objects.push(event);\r\n }\r\n\r\n private static deprecatedWarning1: Boolean = false;\r\n\r\n deprecateStuff() {\r\n if (!EventQueue.deprecatedWarning1) {\r\n EventQueue.deprecatedWarning1 = true;\r\n console.warn(\"Spine Deprecation Warning: onComplete, onStart, onEnd, onEvent art deprecated, please use listeners from now on. 'state.addListener({ complete: function(track, event) { } })'\");\r\n }\r\n return true;\r\n }\r\n\r\n drain () {\r\n if (this.drainDisabled) return;\r\n this.drainDisabled = true;\r\n\r\n let objects = this.objects;\r\n let listeners = this.animState.listeners;\r\n\r\n for (let i = 0; i < objects.length; i += 2) {\r\n let type = objects[i] as EventType;\r\n let entry = objects[i + 1] as TrackEntry;\r\n switch (type) {\r\n case EventType.start:\r\n if (entry.listener != null && entry.listener.start) entry.listener.start(entry);\r\n for (let ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].start) listeners[ii].start(entry);\r\n //deprecation\r\n entry.onStart && this.deprecateStuff() && entry.onStart(entry.trackIndex);\r\n this.animState.onStart && this.deprecateStuff() && this.deprecateStuff && this.animState.onStart(entry.trackIndex);\r\n break;\r\n case EventType.interrupt:\r\n if (entry.listener != null && entry.listener.interrupt) entry.listener.interrupt(entry);\r\n for (let ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].interrupt) listeners[ii].interrupt(entry);\r\n break;\r\n case EventType.end:\r\n if (entry.listener != null && entry.listener.end) entry.listener.end(entry);\r\n for (let ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].end) listeners[ii].end(entry);\r\n //deprecation\r\n entry.onEnd && this.deprecateStuff() && entry.onEnd(entry.trackIndex);\r\n this.animState.onEnd && this.deprecateStuff() && this.animState.onEnd(entry.trackIndex);\r\n // Fall through.\r\n case EventType.dispose:\r\n if (entry.listener != null && entry.listener.dispose) entry.listener.dispose(entry);\r\n for (let ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].dispose) listeners[ii].dispose(entry);\r\n this.animState.trackEntryPool.free(entry);\r\n break;\r\n case EventType.complete:\r\n if (entry.listener != null && entry.listener.complete) entry.listener.complete(entry);\r\n for (let ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].complete) listeners[ii].complete(entry);\r\n //deprecation\r\n\r\n let count = MathUtils.toInt(entry.loopsCount()) ;\r\n entry.onComplete && this.deprecateStuff() && entry.onComplete(entry.trackIndex, count);\r\n this.animState.onComplete && this.deprecateStuff() && this.animState.onComplete(entry.trackIndex, count);\r\n break;\r\n case EventType.event:\r\n let event = objects[i++ + 2] as Event;\r\n if (entry.listener != null && entry.listener.event) entry.listener.event(entry, event);\r\n for (let ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].event) listeners[ii].event(entry, event);\r\n //deprecation\r\n entry.onEvent && this.deprecateStuff() && entry.onEvent(entry.trackIndex, event);\r\n this.animState.onEvent && this.deprecateStuff() && this.animState.onEvent(entry.trackIndex, event);\r\n break;\r\n }\r\n }\r\n this.clear();\r\n\r\n this.drainDisabled = false;\r\n }\r\n\r\n clear () {\r\n this.objects.length = 0;\r\n }\r\n }\r\n\r\n export enum EventType {\r\n start, interrupt, end, dispose, complete, event\r\n }\r\n\r\n export interface AnimationStateListener {\r\n /** Invoked when this entry has been set as the current entry. */\r\n start? (entry: TrackEntry): void;\r\n\r\n /** Invoked when another entry has replaced this entry as the current entry. This entry may continue being applied for\r\n * mixing. */\r\n interrupt? (entry: TrackEntry): void;\r\n\r\n /** Invoked when this entry is no longer the current entry and will never be applied again. */\r\n end? (entry: TrackEntry): void;\r\n\r\n /** Invoked when this entry will be disposed. This may occur without the entry ever being set as the current entry.\r\n * References to the entry should not be kept after dispose is called, as it may be destroyed or reused. */\r\n dispose? (entry: TrackEntry): void;\r\n\r\n /** Invoked every time this entry's animation completes a loop. */\r\n complete? (entry: TrackEntry): void;\r\n\r\n /** Invoked when this entry's animation triggers an event. */\r\n event? (entry: TrackEntry, event: Event): void;\r\n }\r\n\r\n export abstract class AnimationStateAdapter implements AnimationStateListener {\r\n start (entry: TrackEntry) {\r\n }\r\n\r\n interrupt (entry: TrackEntry) {\r\n }\r\n\r\n end (entry: TrackEntry) {\r\n }\r\n\r\n dispose (entry: TrackEntry) {\r\n }\r\n\r\n complete (entry: TrackEntry) {\r\n }\r\n\r\n event (entry: TrackEntry, event: Event) {\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class AnimationStateData {\r\n skeletonData: SkeletonData;\r\n animationToMixTime: Map = {};\r\n defaultMix = 0;\r\n\r\n constructor(skeletonData: SkeletonData) {\r\n if (skeletonData == null) throw new Error(\"skeletonData cannot be null.\");\r\n this.skeletonData = skeletonData;\r\n }\r\n\r\n setMix(fromName: string, toName: string, duration: number) {\r\n let from = this.skeletonData.findAnimation(fromName);\r\n if (from == null) throw new Error(\"Animation not found: \" + fromName);\r\n let to = this.skeletonData.findAnimation(toName);\r\n if (to == null) throw new Error(\"Animation not found: \" + toName);\r\n this.setMixWith(from, to, duration);\r\n }\r\n\r\n private static deprecatedWarning1: boolean = false;\r\n\r\n setMixByName(fromName: string, toName: string, duration: number) {\r\n if (!AnimationStateData.deprecatedWarning1) {\r\n AnimationStateData.deprecatedWarning1 = true;\r\n console.warn(\"Deprecation Warning: AnimationStateData.setMixByName is deprecated, please use setMix from now on.\");\r\n }\r\n this.setMix(fromName, toName, duration);\r\n }\r\n\r\n setMixWith(from: Animation, to: Animation, duration: number) {\r\n if (from == null) throw new Error(\"from cannot be null.\");\r\n if (to == null) throw new Error(\"to cannot be null.\");\r\n let key = from.name + \".\" + to.name;\r\n this.animationToMixTime[key] = duration;\r\n }\r\n\r\n getMix(from: Animation, to: Animation) {\r\n let key = from.name + \".\" + to.name;\r\n let value = this.animationToMixTime[key];\r\n return value === undefined ? this.defaultMix : value;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class AtlasAttachmentLoader implements AttachmentLoader {\r\n atlas: TextureAtlas;\r\n\r\n constructor(atlas: TextureAtlas) {\r\n this.atlas = atlas;\r\n }\r\n\r\n /** @return May be null to not load an attachment. */\r\n newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment {\r\n let region = this.atlas.findRegion(path);\r\n if (region == null) throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\r\n let attachment = new RegionAttachment(name);\r\n attachment.region = region;\r\n return attachment;\r\n }\r\n\r\n /** @return May be null to not load an attachment. */\r\n newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment {\r\n let region = this.atlas.findRegion(path);\r\n if (region == null) throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\r\n let attachment = new MeshAttachment(name);\r\n attachment.region = region;\r\n return attachment;\r\n }\r\n\r\n /** @return May be null to not load an attachment. */\r\n newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment {\r\n return new BoundingBoxAttachment(name);\r\n }\r\n\r\n /** @return May be null to not load an attachment */\r\n newPathAttachment(skin: Skin, name: string): PathAttachment {\r\n return new PathAttachment(name);\r\n }\r\n\r\n newPointAttachment(skin: Skin, name: string): PointAttachment {\r\n return new PointAttachment(name);\r\n }\r\n\r\n newClippingAttachment(skin: Skin, name: string): ClippingAttachment {\r\n return new ClippingAttachment(name);\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export enum BlendMode {\r\n Normal = 0,\r\n Additive = 1,\r\n Multiply = 2,\r\n Screen = 3\r\n }\r\n}\r\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class Bone implements Updatable {\n static yDown: boolean = false;\n //be careful! Spine b,c is c,b in pixi matrix\n matrix = new PIXI.Matrix();\n\n get worldX(): number {\n return this.matrix.tx;\n }\n\n get worldY(): number {\n return this.matrix.ty;\n }\n\n data: BoneData;\n skeleton: Skeleton;\n parent: Bone;\n children = new Array();\n x = 0;\n y = 0;\n rotation = 0;\n scaleX = 0;\n scaleY = 0;\n shearX = 0;\n shearY = 0;\n ax = 0;\n ay = 0;\n arotation = 0;\n ascaleX = 0;\n ascaleY = 0;\n ashearX = 0;\n ashearY = 0;\n appliedValid = false;\n\n sorted = false;\n active = false;\n\n /** @param parent May be null. */\n constructor(data: BoneData, skeleton: Skeleton, parent: Bone) {\n if (data == null) throw new Error(\"data cannot be null.\");\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.skeleton = skeleton;\n this.parent = parent;\n this.setToSetupPose();\n }\n\n isActive () {\n return this.active;\n }\n\n /** Same as {@link #updateWorldTransform()}. This method exists for Bone to implement {@link Updatable}. */\n update() {\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\n }\n\n /** Computes the world transform using the parent bone and this bone's local transform. */\n updateWorldTransform() {\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\n }\n\n /** Computes the world transform using the parent bone and the specified local transform. */\n updateWorldTransformWith(x: number, y: number, rotation: number, scaleX: number, scaleY: number, shearX: number, shearY: number) {\n this.ax = x;\n this.ay = y;\n this.arotation = rotation;\n this.ascaleX = scaleX;\n this.ascaleY = scaleY;\n this.ashearX = shearX;\n this.ashearY = shearY;\n this.appliedValid = true;\n\n let parent = this.parent;\n let m = this.matrix;\n\n let sx = this.skeleton.scaleX;\n let sy = Bone.yDown? -this.skeleton.scaleY : this.skeleton.scaleY;\n\n if (parent == null) { // Root bone.\n let skeleton = this.skeleton;\n let rotationY = rotation + 90 + shearY;\n m.a = MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\n m.c = MathUtils.cosDeg(rotationY) * scaleY * sx;\n m.b = MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\n m.d = MathUtils.sinDeg(rotationY) * scaleY * sy;\n m.tx = x * sx + skeleton.x;\n m.ty = y * sy + skeleton.y;\n return;\n }\n\n let pa = parent.matrix.a, pb = parent.matrix.c, pc = parent.matrix.b, pd = parent.matrix.d;\n m.tx = pa * x + pb * y + parent.matrix.tx;\n m.ty = pc * x + pd * y + parent.matrix.ty;\n switch (this.data.transformMode) {\n case TransformMode.Normal: {\n let rotationY = rotation + 90 + shearY;\n let la = MathUtils.cosDeg(rotation + shearX) * scaleX;\n let lb = MathUtils.cosDeg(rotationY) * scaleY;\n let lc = MathUtils.sinDeg(rotation + shearX) * scaleX;\n let ld = MathUtils.sinDeg(rotationY) * scaleY;\n m.a = pa * la + pb * lc;\n m.c = pa * lb + pb * ld;\n m.b = pc * la + pd * lc;\n m.d = pc * lb + pd * ld;\n return;\n }\n case TransformMode.OnlyTranslation: {\n let rotationY = rotation + 90 + shearY;\n m.a = MathUtils.cosDeg(rotation + shearX) * scaleX;\n m.c = MathUtils.cosDeg(rotationY) * scaleY;\n m.b = MathUtils.sinDeg(rotation + shearX) * scaleX;\n m.d = MathUtils.sinDeg(rotationY) * scaleY;\n break;\n }\n case TransformMode.NoRotationOrReflection: {\n let s = pa * pa + pc * pc;\n let prx = 0;\n if (s > 0.0001) {\n s = Math.abs(pa * pd - pb * pc) / s;\n pa /= this.skeleton.scaleX;\n pc /= this.skeleton.scaleY;\n pb = pc * s;\n pd = pa * s;\n prx = Math.atan2(pc, pa) * MathUtils.radDeg;\n } else {\n pa = 0;\n pc = 0;\n prx = 90 - Math.atan2(pd, pb) * MathUtils.radDeg;\n }\n let rx = rotation + shearX - prx;\n let ry = rotation + shearY - prx + 90;\n let la = MathUtils.cosDeg(rx) * scaleX;\n let lb = MathUtils.cosDeg(ry) * scaleY;\n let lc = MathUtils.sinDeg(rx) * scaleX;\n let ld = MathUtils.sinDeg(ry) * scaleY;\n m.a = pa * la - pb * lc;\n m.c = pa * lb - pb * ld;\n m.b = pc * la + pd * lc;\n m.d = pc * lb + pd * ld;\n break;\n }\n case TransformMode.NoScale:\n case TransformMode.NoScaleOrReflection: {\n let cos = MathUtils.cosDeg(rotation);\n let sin = MathUtils.sinDeg(rotation);\n let za = (pa * cos + pb * sin) / sx;\n let zc = (pc * cos + pd * sin) / sy;\n let s = Math.sqrt(za * za + zc * zc);\n if (s > 0.00001) s = 1 / s;\n za *= s;\n zc *= s;\n s = Math.sqrt(za * za + zc * zc);\n if (\n this.data.transformMode == TransformMode.NoScale\n && (pa * pd - pb * pc < 0) != (Bone.yDown?\n (this.skeleton.scaleX < 0 != this.skeleton.scaleY > 0) :\n (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\n ) s = -s;\n let r = Math.PI / 2 + Math.atan2(zc, za);\n let zb = Math.cos(r) * s;\n let zd = Math.sin(r) * s;\n let la = MathUtils.cosDeg(shearX) * scaleX;\n let lb = MathUtils.cosDeg(90 + shearY) * scaleY;\n let lc = MathUtils.sinDeg(shearX) * scaleX;\n let ld = MathUtils.sinDeg(90 + shearY) * scaleY;\n m.a = za * la + zb * lc;\n m.c = za * lb + zb * ld;\n m.b = zc * la + zd * lc;\n m.d = zc * lb + zd * ld;\n break;\n }\n }\n m.a *= sx;\n m.c *= sx;\n m.b *= sy;\n m.d *= sy;\n }\n\n setToSetupPose() {\n let data = this.data;\n this.x = data.x;\n this.y = data.y;\n this.rotation = data.rotation;\n this.scaleX = data.scaleX;\n this.scaleY = data.scaleY;\n this.shearX = data.shearX;\n this.shearY = data.shearY;\n }\n\n getWorldRotationX() {\n return Math.atan2(this.matrix.b, this.matrix.a) * MathUtils.radDeg;\n }\n\n getWorldRotationY() {\n return Math.atan2(this.matrix.d, this.matrix.c) * MathUtils.radDeg;\n }\n\n getWorldScaleX() {\n let m = this.matrix;\n return Math.sqrt(m.a * m.a + m.c * m.c);\n }\n\n getWorldScaleY() {\n let m = this.matrix;\n return Math.sqrt(m.b * m.b + m.d * m.d);\n }\n\n /** Computes the individual applied transform values from the world transform. This can be useful to perform processing using\n * the applied transform after the world transform has been modified directly (eg, by a constraint).\n *

\n * Some information is ambiguous in the world transform, such as -1,-1 scale versus 180 rotation. */\n updateAppliedTransform() {\n this.appliedValid = true;\n let parent = this.parent;\n let m = this.matrix;\n if (parent == null) {\n this.ax = m.tx;\n this.ay = m.ty;\n this.arotation = Math.atan2(m.b, m.a) * MathUtils.radDeg;\n this.ascaleX = Math.sqrt(m.a * m.a + m.b * m.b);\n this.ascaleY = Math.sqrt(m.c * m.c + m.d * m.d);\n this.ashearX = 0;\n this.ashearY = Math.atan2(m.a * m.c + m.b * m.d, m.a * m.d - m.b * m.c) * MathUtils.radDeg;\n return;\n }\n let pm = parent.matrix;\n let pid = 1 / (pm.a * pm.d - pm.b * pm.c);\n let dx = m.tx - pm.tx, dy = m.ty - pm.ty;\n this.ax = (dx * pm.d * pid - dy * pm.c * pid);\n this.ay = (dy * pm.a * pid - dx * pm.b * pid);\n let ia = pid * pm.d;\n let id = pid * pm.a;\n let ib = pid * pm.c;\n let ic = pid * pm.b;\n let ra = ia * m.a - ib * m.b;\n let rb = ia * m.c - ib * m.d;\n let rc = id * m.b - ic * m.a;\n let rd = id * m.d - ic * m.c;\n this.ashearX = 0;\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\n if (this.ascaleX > 0.0001) {\n let det = ra * rd - rb * rc;\n this.ascaleY = det / this.ascaleX;\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * MathUtils.radDeg;\n this.arotation = Math.atan2(rc, ra) * MathUtils.radDeg;\n } else {\n this.ascaleX = 0;\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\n this.ashearY = 0;\n this.arotation = 90 - Math.atan2(rd, rb) * MathUtils.radDeg;\n }\n }\n\n worldToLocal(world: Vector2) {\n let m = this.matrix;\n let a = m.a, b = m.c, c = m.b, d = m.d;\n let invDet = 1 / (a * d - b * c);\n let x = world.x - m.tx, y = world.y - m.ty;\n world.x = (x * d * invDet - y * b * invDet);\n world.y = (y * a * invDet - x * c * invDet);\n return world;\n }\n\n localToWorld(local: Vector2) {\n let m = this.matrix;\n let x = local.x, y = local.y;\n local.x = x * m.a + y * m.c + m.tx;\n local.y = x * m.b + y * m.d + m.ty;\n return local;\n }\n\n worldToLocalRotation (worldRotation: number) {\n let sin = MathUtils.sinDeg(worldRotation), cos = MathUtils.cosDeg(worldRotation);\n let mat = this.matrix;\n return Math.atan2(mat.a * sin - mat.b * cos, mat.d * cos - mat.c * sin) * MathUtils.radDeg;\n }\n\n localToWorldRotation (localRotation: number) {\n let sin = MathUtils.sinDeg(localRotation), cos = MathUtils.cosDeg(localRotation);\n let mat = this.matrix;\n return Math.atan2(cos * mat.b + sin * mat.d, cos * mat.a + sin * mat.c) * MathUtils.radDeg;\n }\n\n rotateWorld (degrees: number) {\n let mat = this.matrix;\n let a = mat.a, b = mat.c, c = mat.b, d = mat.d;\n let cos = MathUtils.cosDeg(degrees), sin = MathUtils.sinDeg(degrees);\n mat.a = cos * a - sin * c;\n mat.c = cos * b - sin * d;\n mat.b = sin * a + cos * c;\n mat.d = sin * b + cos * d;\n this.appliedValid = false;\n }\n }\n}\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class BoneData {\r\n index: number;\r\n name: string;\r\n parent: BoneData;\r\n length: number;\r\n x = 0;\r\n y = 0;\r\n rotation = 0;\r\n scaleX = 1;\r\n scaleY = 1;\r\n shearX = 0;\r\n shearY = 0;\r\n transformMode = TransformMode.Normal;\r\n skinRequired = false;\r\n\r\n color = new Color();\r\n\r\n constructor(index: number, name: string, parent: BoneData) {\r\n if (index < 0) throw new Error(\"index must be >= 0.\");\r\n if (name == null) throw new Error(\"name cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.parent = parent;\r\n }\r\n }\r\n\r\n export enum TransformMode {\r\n Normal, OnlyTranslation, NoRotationOrReflection, NoScale, NoScaleOrReflection\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export abstract class ConstraintData {\r\n constructor(public name: string, public order: number, public skinRequired: boolean) { }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class Event {\r\n data: EventData;\r\n intValue: number;\r\n floatValue: number;\r\n stringValue: string;\r\n time: number;\r\n volume: number;\r\n balance: number;\r\n\r\n\r\n constructor(time: number, data: EventData) {\r\n if (data == null) throw new Error(\"data cannot be null.\");\r\n this.time = time;\r\n this.data = data;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class EventData {\r\n name: string;\r\n intValue: number;\r\n floatValue: number;\r\n stringValue: string;\r\n audioPath: string;\r\n volume: number;\r\n balance: number;\r\n\r\n constructor (name: string) {\r\n this.name = name;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class IkConstraint implements Updatable {\r\n data: IkConstraintData;\r\n bones: Array;\r\n target: Bone;\r\n bendDirection = 0;\r\n compress = false;\r\n stretch = false;\r\n mix = 1;\r\n softness = 0;\r\n active = false;\r\n\r\n constructor (data: IkConstraintData, skeleton: Skeleton) {\r\n if (data == null) throw new Error(\"data cannot be null.\");\r\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.mix = data.mix;\r\n this.softness = data.softness;\r\n this.bendDirection = data.bendDirection;\r\n this.compress = data.compress;\r\n this.stretch = data.stretch;\r\n\r\n this.bones = new Array();\r\n for (let i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n\r\n isActive () {\r\n return this.active;\r\n }\r\n\r\n apply () {\r\n this.update();\r\n }\r\n\r\n update () {\r\n let target = this.target;\r\n let bones = this.bones;\r\n switch (bones.length) {\r\n case 1:\r\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\r\n break;\r\n case 2:\r\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.softness, this.mix);\r\n break;\r\n }\r\n }\r\n\r\n /** Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified in the world\r\n * coordinate system. */\r\n apply1 (bone: Bone, targetX: number, targetY: number, compress: boolean, stretch: boolean, uniform: boolean, alpha: number) {\r\n if (!bone.appliedValid) bone.updateAppliedTransform();\r\n let p = bone.parent.matrix;\r\n\r\n\r\n let pa = p.a, pb = p.c, pc = p.b, pd = p.d;\r\n let rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\r\n\r\n switch(bone.data.transformMode) {\r\n case TransformMode.OnlyTranslation:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n break;\r\n case TransformMode.NoRotationOrReflection:\r\n let s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\r\n let sa = pa / bone.skeleton.scaleX;\r\n let sc = pc / bone.skeleton.scaleY;\r\n pb = -sc * s * bone.skeleton.scaleX;\r\n pd = sa * s * bone.skeleton.scaleY;\r\n rotationIK += Math.atan2(sc, sa) * MathUtils.radDeg;\r\n // Fall through\r\n default:\r\n let x = targetX - p.tx, y = targetY - p.ty;\r\n let d = pa * pd - pb * pc;\r\n tx = (x * pd - y * pb) / d - bone.ax;\r\n ty = (y * pa - x * pc) / d - bone.ay;\r\n }\r\n rotationIK += Math.atan2(ty, tx) * MathUtils.radDeg;\r\n\r\n if (bone.ascaleX < 0) rotationIK += 180;\r\n if (rotationIK > 180)\r\n rotationIK -= 360;\r\n else if (rotationIK < -180) rotationIK += 360;\r\n let sx = bone.ascaleX, sy = bone.ascaleY;\r\n if (compress || stretch) {\r\n switch (bone.data.transformMode) {\r\n case TransformMode.NoScale:\r\n case TransformMode.NoScaleOrReflection:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n }\r\n let b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\r\n if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) {\r\n let s = (dd / b - 1) * alpha + 1;\r\n sx *= s;\r\n if (uniform) sy *= s;\r\n }\r\n }\r\n bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX,\r\n bone.ashearY);\r\n }\r\n\r\n /** Adjusts the parent and child bone rotations so the tip of the child is as close to the target position as possible. The\r\n * target is specified in the world coordinate system.\r\n * @param child A direct descendant of the parent bone. */\r\n apply2 (parent: Bone, child: Bone, targetX: number, targetY: number, bendDir: number, stretch: boolean, softness: number, alpha: number) {\r\n if (alpha == 0) {\r\n child.updateWorldTransform();\r\n return;\r\n }\r\n if (!parent.appliedValid) parent.updateAppliedTransform();\r\n if (!child.appliedValid) child.updateAppliedTransform();\r\n let px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;\r\n let pmat = parent.matrix;\r\n let os1 = 0, os2 = 0, s2 = 0;\r\n if (psx < 0) {\r\n psx = -psx;\r\n os1 = 180;\r\n s2 = -1;\r\n } else {\r\n os1 = 0;\r\n s2 = 1;\r\n }\r\n if (psy < 0) {\r\n psy = -psy;\r\n s2 = -s2;\r\n }\r\n if (csx < 0) {\r\n csx = -csx;\r\n os2 = 180;\r\n } else\r\n os2 = 0;\r\n let cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = pmat.a, b = pmat.c, c = pmat.b, d = pmat.d;\r\n let u = Math.abs(psx - psy) <= 0.0001;\r\n if (!u) {\r\n cy = 0;\r\n cwx = a * cx + pmat.tx;\r\n cwy = c * cx + pmat.ty;\r\n } else {\r\n cy = child.ay;\r\n cwx = a * cx + b * cy + pmat.tx;\r\n cwy = c * cx + d * cy + pmat.ty;\r\n }\r\n let pp = parent.parent.matrix;\r\n a = pp.a;\r\n b = pp.c;\r\n c = pp.b;\r\n d = pp.d;\r\n let id = 1 / (a * d - b * c), x = cwx - pp.tx, y = cwy - pp.ty;\r\n let dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\r\n let l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\r\n if (l1 < 0.0001) {\r\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\r\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n return;\r\n }\r\n x = targetX - pp.tx;\r\n y = targetY - pp.ty;\r\n let tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\r\n let dd = tx * tx + ty * ty;\r\n if (softness != 0) {\r\n softness *= psx * (csx + 1) / 2;\r\n let td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\r\n if (sd > 0) {\r\n let p = Math.min(1, sd / (softness * 2)) - 1;\r\n p = (sd - softness * (1 - p * p)) / td;\r\n tx -= p * tx;\r\n ty -= p * ty;\r\n dd = tx * tx + ty * ty;\r\n }\r\n }\r\n outer:\r\n if (u) {\r\n l2 *= psx;\r\n let cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\r\n if (cos < -1)\r\n cos = -1;\r\n else if (cos > 1) {\r\n cos = 1;\r\n if (stretch) sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\r\n }\r\n a2 = Math.acos(cos) * bendDir;\r\n a = l1 + l2 * cos;\r\n b = l2 * Math.sin(a2);\r\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\r\n } else {\r\n a = psx * l2;\r\n b = psy * l2;\r\n let aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\r\n c = bb * l1 * l1 + aa * dd - aa * bb;\r\n let c1 = -2 * bb * l1, c2 = bb - aa;\r\n d = c1 * c1 - 4 * c2 * c;\r\n if (d >= 0) {\r\n let q = Math.sqrt(d);\r\n if (c1 < 0) q = -q;\r\n q = -(c1 + q) / 2;\r\n let r0 = q / c2, r1 = c / q;\r\n let r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\r\n if (r * r <= dd) {\r\n y = Math.sqrt(dd - r * r) * bendDir;\r\n a1 = ta - Math.atan2(y, r);\r\n a2 = Math.atan2(y / psy, (r - l1) / psx);\r\n break outer;\r\n }\r\n }\r\n let minAngle = MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\r\n let maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\r\n c = -a * l1 / (aa - bb);\r\n if (c >= -1 && c <= 1) {\r\n c = Math.acos(c);\r\n x = a * Math.cos(c) + l1;\r\n y = b * Math.sin(c);\r\n d = x * x + y * y;\r\n if (d < minDist) {\r\n minAngle = c;\r\n minDist = d;\r\n minX = x;\r\n minY = y;\r\n }\r\n if (d > maxDist) {\r\n maxAngle = c;\r\n maxDist = d;\r\n maxX = x;\r\n maxY = y;\r\n }\r\n }\r\n if (dd <= (minDist + maxDist) / 2) {\r\n a1 = ta - Math.atan2(minY * bendDir, minX);\r\n a2 = minAngle * bendDir;\r\n } else {\r\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\r\n a2 = maxAngle * bendDir;\r\n }\r\n }\r\n let os = Math.atan2(cy, cx) * s2;\r\n let rotation = parent.arotation;\r\n a1 = (a1 - os) * MathUtils.radDeg + os1 - rotation;\r\n if (a1 > 180)\r\n a1 -= 360;\r\n else if (a1 < -180) a1 += 360;\r\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0);\r\n rotation = child.arotation;\r\n a2 = ((a2 + os) * MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\r\n if (a2 > 180)\r\n a2 -= 360;\r\n else if (a2 < -180) a2 += 360;\r\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class IkConstraintData extends ConstraintData {\r\n bones = new Array();\r\n target: BoneData;\r\n bendDirection = 1;\r\n compress = false;\r\n stretch = false;\r\n uniform = false;\r\n mix = 1;\r\n softness = 0;\r\n\r\n constructor (name: string) {\r\n super(name, 0, false);\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class PathConstraint implements Updatable {\r\n static NONE = -1; static BEFORE = -2; static AFTER = -3;\r\n static epsilon = 0.00001;\r\n\r\n data: PathConstraintData;\r\n bones: Array;\r\n target: Slot;\r\n position = 0; spacing = 0; rotateMix = 0; translateMix = 0;\r\n\r\n spaces = new Array(); positions = new Array();\r\n world = new Array(); curves = new Array(); lengths = new Array();\r\n segments = new Array();\r\n\r\n active = false;\r\n\r\n constructor (data: PathConstraintData, skeleton: Skeleton) {\r\n if (data == null) throw new Error(\"data cannot be null.\");\r\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (let i = 0, n = data.bones.length; i < n; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findSlot(data.target.name);\r\n this.position = data.position;\r\n this.spacing = data.spacing;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n }\r\n\r\n isActive () {\r\n return this.active;\r\n }\r\n\r\n apply () {\r\n this.update();\r\n }\r\n\r\n update () {\r\n let attachment = this.target.getAttachment();\r\n if (!(attachment instanceof PathAttachment)) return;\r\n\r\n let rotateMix = this.rotateMix, translateMix = this.translateMix;\r\n let translate = translateMix > 0, rotate = rotateMix > 0;\r\n if (!translate && !rotate) return;\r\n\r\n let data = this.data;\r\n let spacingMode = data.spacingMode;\r\n let lengthSpacing = spacingMode == SpacingMode.Length;\r\n let rotateMode = data.rotateMode;\r\n let tangents = rotateMode == RotateMode.Tangent, scale = rotateMode == RotateMode.ChainScale;\r\n let boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\r\n let bones = this.bones;\r\n let spaces = Utils.setArraySize(this.spaces, spacesCount), lengths: Array = null;\r\n let spacing = this.spacing;\r\n if (scale || lengthSpacing) {\r\n if (scale) lengths = Utils.setArraySize(this.lengths, boneCount);\r\n for (let i = 0, n = spacesCount - 1; i < n;) {\r\n let bone = bones[i];\r\n let setupLength = bone.data.length;\r\n if (setupLength < PathConstraint.epsilon) {\r\n if (scale) lengths[i] = 0;\r\n spaces[++i] = 0;\r\n } else {\r\n let x = setupLength * bone.matrix.a, y = setupLength * bone.matrix.b;\r\n let length = Math.sqrt(x * x + y * y);\r\n if (scale) lengths[i] = length;\r\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length / setupLength;\r\n }\r\n }\r\n } else {\r\n for (let i = 1; i < spacesCount; i++)\r\n spaces[i] = spacing;\r\n }\r\n\r\n let positions = this.computeWorldPositions(attachment, spacesCount, tangents,\r\n data.positionMode == PositionMode.Percent, spacingMode == SpacingMode.Percent);\r\n let boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\r\n let tip = false;\r\n if (offsetRotation == 0)\r\n tip = rotateMode == RotateMode.Chain;\r\n else {\r\n tip = false;\r\n let p = this.target.bone.matrix;\r\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n }\r\n for (let i = 0, p = 3; i < boneCount; i++, p += 3) {\r\n let bone = bones[i];\r\n let mat = bone.matrix;\r\n mat.tx += (boneX - mat.tx) * translateMix;\r\n mat.ty += (boneY - mat.ty) * translateMix;\r\n let x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\r\n if (scale) {\r\n let length = lengths[i];\r\n if (length != 0) {\r\n let s = (Math.sqrt(dx * dx + dy * dy) / length - 1) * rotateMix + 1;\r\n mat.a *= s;\r\n mat.b *= s;\r\n }\r\n }\r\n boneX = x;\r\n boneY = y;\r\n if (rotate) {\r\n let a = mat.a, b = mat.c, c = mat.b, d = mat.d, r = 0, cos = 0, sin = 0;\r\n if (tangents)\r\n r = positions[p - 1];\r\n else if (spaces[i + 1] == 0)\r\n r = positions[p + 2];\r\n else\r\n r = Math.atan2(dy, dx);\r\n r -= Math.atan2(c, a);\r\n if (tip) {\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n let length = bone.data.length;\r\n boneX += (length * (cos * a - sin * c) - dx) * rotateMix;\r\n boneY += (length * (sin * a + cos * c) - dy) * rotateMix;\r\n } else {\r\n r += offsetRotation;\r\n }\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI) //\r\n r += MathUtils.PI2;\r\n r *= rotateMix;\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n mat.a = cos * a - sin * c;\r\n mat.c = cos * b - sin * d;\r\n mat.b = sin * a + cos * c;\r\n mat.d = sin * b + cos * d;\r\n }\r\n bone.appliedValid = false;\r\n }\r\n }\r\n\r\n computeWorldPositions (path: PathAttachment, spacesCount: number, tangents: boolean, percentPosition: boolean,\r\n percentSpacing: boolean) {\r\n let target = this.target;\r\n let position = this.position;\r\n let spaces = this.spaces, out = Utils.setArraySize(this.positions, spacesCount * 3 + 2), world: Array = null;\r\n let closed = path.closed;\r\n let verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\r\n\r\n if (!path.constantSpeed) {\r\n let lengths = path.lengths;\r\n curveCount -= closed ? 1 : 2;\r\n let pathLength = lengths[curveCount];\r\n if (percentPosition) position *= pathLength;\r\n if (percentSpacing) {\r\n for (let i = 0; i < spacesCount; i++)\r\n spaces[i] *= pathLength;\r\n }\r\n world = Utils.setArraySize(this.world, 8);\r\n for (let i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\r\n let space = spaces[i];\r\n position += space;\r\n let p = position;\r\n\r\n if (closed) {\r\n p %= pathLength;\r\n if (p < 0) p += pathLength;\r\n curve = 0;\r\n } else if (p < 0) {\r\n if (prevCurve != PathConstraint.BEFORE) {\r\n prevCurve = PathConstraint.BEFORE;\r\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\r\n }\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n } else if (p > pathLength) {\r\n if (prevCurve != PathConstraint.AFTER) {\r\n prevCurve = PathConstraint.AFTER;\r\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\r\n }\r\n this.addAfterPosition(p - pathLength, world, 0, out, o);\r\n continue;\r\n }\r\n\r\n // Determine curve containing position.\r\n for (;; curve++) {\r\n let length = lengths[curve];\r\n if (p > length) continue;\r\n if (curve == 0)\r\n p /= length;\r\n else {\r\n let prev = lengths[curve - 1];\r\n p = (p - prev) / (length - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n if (closed && curve == curveCount) {\r\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\r\n } else\r\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\r\n }\r\n this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o,\r\n tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n }\r\n\r\n // World vertices.\r\n if (closed) {\r\n verticesLength += 2;\r\n world = Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\r\n world[verticesLength - 2] = world[0];\r\n world[verticesLength - 1] = world[1];\r\n } else {\r\n curveCount--;\r\n verticesLength -= 4;\r\n world = Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\r\n }\r\n\r\n // Curve lengths.\r\n let curves = Utils.setArraySize(this.curves, curveCount);\r\n let pathLength = 0;\r\n let x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\r\n let tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\r\n for (let i = 0, w = 2; i < curveCount; i++, w += 6) {\r\n cx1 = world[w];\r\n cy1 = world[w + 1];\r\n cx2 = world[w + 2];\r\n cy2 = world[w + 3];\r\n x2 = world[w + 4];\r\n y2 = world[w + 5];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n curves[i] = pathLength;\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n if (percentPosition) position *= pathLength;\r\n if (percentSpacing) {\r\n for (let i = 0; i < spacesCount; i++)\r\n spaces[i] *= pathLength;\r\n }\r\n\r\n let segments = this.segments;\r\n let curveLength = 0;\r\n for (let i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\r\n let space = spaces[i];\r\n position += space;\r\n let p = position;\r\n\r\n if (closed) {\r\n p %= pathLength;\r\n if (p < 0) p += pathLength;\r\n curve = 0;\r\n } else if (p < 0) {\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n } else if (p > pathLength) {\r\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\r\n continue;\r\n }\r\n\r\n // Determine curve containing position.\r\n for (;; curve++) {\r\n let length = curves[curve];\r\n if (p > length) continue;\r\n if (curve == 0)\r\n p /= length;\r\n else {\r\n let prev = curves[curve - 1];\r\n p = (p - prev) / (length - prev);\r\n }\r\n break;\r\n }\r\n\r\n // Curve segment lengths.\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n let ii = curve * 6;\r\n x1 = world[ii];\r\n y1 = world[ii + 1];\r\n cx1 = world[ii + 2];\r\n cy1 = world[ii + 3];\r\n cx2 = world[ii + 4];\r\n cy2 = world[ii + 5];\r\n x2 = world[ii + 6];\r\n y2 = world[ii + 7];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\r\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[0] = curveLength;\r\n for (ii = 1; ii < 8; ii++) {\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[ii] = curveLength;\r\n }\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[8] = curveLength;\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[9] = curveLength;\r\n segment = 0;\r\n }\r\n\r\n // Weight by segment length.\r\n p *= curveLength;\r\n for (;; segment++) {\r\n let length = segments[segment];\r\n if (p > length) continue;\r\n if (segment == 0)\r\n p /= length;\r\n else {\r\n let prev = segments[segment - 1];\r\n p = segment + (p - prev) / (length - prev);\r\n }\r\n break;\r\n }\r\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n }\r\n\r\n addBeforePosition (p: number, temp: Array, i: number, out: Array, o: number) {\r\n let x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n }\r\n\r\n addAfterPosition (p: number, temp: Array, i: number, out: Array, o: number) {\r\n let x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n }\r\n\r\n addCurvePosition (p: number, x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number,\r\n out: Array, o: number, tangents: boolean) {\r\n if (p == 0 || isNaN(p)) p = 0.0001;\r\n let tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\r\n let ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\r\n let x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\r\n out[o] = x;\r\n out[o + 1] = y;\r\n if (tangents) out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class PathConstraintData extends ConstraintData {\r\n bones = new Array();\r\n target: SlotData;\r\n positionMode: PositionMode;\r\n spacingMode: SpacingMode;\r\n rotateMode: RotateMode;\r\n offsetRotation: number;\r\n position: number; spacing: number; rotateMix: number; translateMix: number;\r\n\r\n constructor (name: string) {\r\n super(name, 0, false);\r\n }\r\n }\r\n\r\n export enum PositionMode {\r\n Fixed, Percent\r\n }\r\n\r\n export enum SpacingMode {\r\n Length, Fixed, Percent\r\n }\r\n\r\n export enum RotateMode {\r\n Tangent, Chain, ChainScale\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class Skeleton {\r\n data: SkeletonData;\r\n bones: Array;\r\n slots: Array;\r\n drawOrder: Array;\r\n ikConstraints: Array;\r\n transformConstraints: Array;\r\n pathConstraints: Array;\r\n _updateCache = new Array();\r\n updateCacheReset = new Array();\r\n skin: Skin;\r\n color: Color;\r\n time = 0;\r\n scaleX = 1; scaleY = 1;\r\n x = 0; y = 0;\r\n\r\n constructor (data: SkeletonData) {\r\n if (data == null) throw new Error(\"data cannot be null.\");\r\n this.data = data;\r\n\r\n this.bones = new Array();\r\n for (let i = 0; i < data.bones.length; i++) {\r\n let boneData = data.bones[i];\r\n let bone: Bone;\r\n if (boneData.parent == null)\r\n bone = new Bone(boneData, this, null);\r\n else {\r\n let parent = this.bones[boneData.parent.index];\r\n bone = new Bone(boneData, this, parent);\r\n parent.children.push(bone);\r\n }\r\n this.bones.push(bone);\r\n }\r\n\r\n this.slots = new Array();\r\n this.drawOrder = new Array();\r\n for (let i = 0; i < data.slots.length; i++) {\r\n let slotData = data.slots[i];\r\n let bone = this.bones[slotData.boneData.index];\r\n let slot = new Slot(slotData, bone);\r\n this.slots.push(slot);\r\n this.drawOrder.push(slot);\r\n }\r\n\r\n this.ikConstraints = new Array();\r\n for (let i = 0; i < data.ikConstraints.length; i++) {\r\n let ikConstraintData = data.ikConstraints[i];\r\n this.ikConstraints.push(new IkConstraint(ikConstraintData, this));\r\n }\r\n\r\n this.transformConstraints = new Array();\r\n for (let i = 0; i < data.transformConstraints.length; i++) {\r\n let transformConstraintData = data.transformConstraints[i];\r\n this.transformConstraints.push(new TransformConstraint(transformConstraintData, this));\r\n }\r\n\r\n this.pathConstraints = new Array();\r\n for (let i = 0; i < data.pathConstraints.length; i++) {\r\n let pathConstraintData = data.pathConstraints[i];\r\n this.pathConstraints.push(new PathConstraint(pathConstraintData, this));\r\n }\r\n\r\n this.color = new Color(1, 1, 1, 1);\r\n this.updateCache();\r\n }\r\n\r\n updateCache () {\r\n let updateCache = this._updateCache;\r\n updateCache.length = 0;\r\n this.updateCacheReset.length = 0;\r\n\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n bone.sorted = bone.data.skinRequired;\r\n bone.active = !bone.sorted;\r\n }\r\n\r\n if (this.skin != null) {\r\n let skinBones = this.skin.bones;\r\n for (let i = 0, n = this.skin.bones.length; i < n; i++) {\r\n let bone = this.bones[skinBones[i].index];\r\n do {\r\n bone.sorted = false;\r\n bone.active = true;\r\n bone = bone.parent;\r\n } while (bone != null);\r\n }\r\n }\r\n\r\n // IK first, lowest hierarchy depth first.\r\n let ikConstraints = this.ikConstraints;\r\n let transformConstraints = this.transformConstraints;\r\n let pathConstraints = this.pathConstraints;\r\n let ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\r\n let constraintCount = ikCount + transformCount + pathCount;\r\n\r\n outer:\r\n for (let i = 0; i < constraintCount; i++) {\r\n for (let ii = 0; ii < ikCount; ii++) {\r\n let constraint = ikConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortIkConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (let ii = 0; ii < transformCount; ii++) {\r\n let constraint = transformConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortTransformConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (let ii = 0; ii < pathCount; ii++) {\r\n let constraint = pathConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortPathConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n }\r\n\r\n for (let i = 0, n = bones.length; i < n; i++)\r\n this.sortBone(bones[i]);\r\n }\r\n\r\n sortIkConstraint (constraint: IkConstraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active) return;\r\n\r\n let target = constraint.target;\r\n this.sortBone(target);\r\n\r\n let constrained = constraint.bones;\r\n let parent = constrained[0];\r\n this.sortBone(parent);\r\n\r\n if (constrained.length > 1) {\r\n let child = constrained[constrained.length - 1];\r\n if (!(this._updateCache.indexOf(child) > -1)) this.updateCacheReset.push(child);\r\n }\r\n\r\n this._updateCache.push(constraint);\r\n\r\n this.sortReset(parent.children);\r\n constrained[constrained.length - 1].sorted = true;\r\n }\r\n\r\n sortPathConstraint (constraint: PathConstraint) {\r\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin != null && Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active) return;\r\n\r\n let slot = constraint.target;\r\n let slotIndex = slot.data.index;\r\n let slotBone = slot.bone;\r\n if (this.skin != null) this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\r\n if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\r\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\r\n for (let i = 0, n = this.data.skins.length; i < n; i++)\r\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\r\n\r\n let attachment = slot.getAttachment();\r\n if (attachment instanceof PathAttachment) this.sortPathConstraintAttachmentWith(attachment, slotBone);\r\n\r\n let constrained = constraint.bones;\r\n let boneCount = constrained.length;\r\n for (let i = 0; i < boneCount; i++)\r\n this.sortBone(constrained[i]);\r\n\r\n this._updateCache.push(constraint);\r\n\r\n for (let i = 0; i < boneCount; i++)\r\n this.sortReset(constrained[i].children);\r\n for (let i = 0; i < boneCount; i++)\r\n constrained[i].sorted = true;\r\n }\r\n\r\n sortTransformConstraint (constraint: TransformConstraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active) return;\r\n\r\n this.sortBone(constraint.target);\r\n\r\n let constrained = constraint.bones;\r\n let boneCount = constrained.length;\r\n if (constraint.data.local) {\r\n for (let i = 0; i < boneCount; i++) {\r\n let child = constrained[i];\r\n this.sortBone(child.parent);\r\n if (!(this._updateCache.indexOf(child) > -1)) this.updateCacheReset.push(child);\r\n }\r\n } else {\r\n for (let i = 0; i < boneCount; i++) {\r\n this.sortBone(constrained[i]);\r\n }\r\n }\r\n\r\n this._updateCache.push(constraint);\r\n\r\n for (let ii = 0; ii < boneCount; ii++)\r\n this.sortReset(constrained[ii].children);\r\n for (let ii = 0; ii < boneCount; ii++)\r\n constrained[ii].sorted = true;\r\n }\r\n\r\n sortPathConstraintAttachment (skin: Skin, slotIndex: number, slotBone: Bone) {\r\n let attachments = skin.attachments[slotIndex];\r\n if (!attachments) return;\r\n for (let key in attachments) {\r\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\r\n }\r\n }\r\n\r\n sortPathConstraintAttachmentWith (attachment: Attachment, slotBone: Bone) {\r\n if (!(attachment instanceof PathAttachment)) return;\r\n let pathBones = (attachment).bones;\r\n if (pathBones == null)\r\n this.sortBone(slotBone);\r\n else {\r\n let bones = this.bones;\r\n let i = 0;\r\n while (i < pathBones.length) {\r\n let boneCount = pathBones[i++];\r\n for (let n = i + boneCount; i < n; i++) {\r\n let boneIndex = pathBones[i];\r\n this.sortBone(bones[boneIndex]);\r\n }\r\n }\r\n }\r\n }\r\n\r\n sortBone (bone: Bone) {\r\n if (bone.sorted) return;\r\n let parent = bone.parent;\r\n if (parent != null) this.sortBone(parent);\r\n bone.sorted = true;\r\n this._updateCache.push(bone);\r\n }\r\n\r\n sortReset (bones: Array) {\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (!bone.active) continue;\r\n if (bone.sorted) this.sortReset(bone.children);\r\n bone.sorted = false;\r\n }\r\n }\r\n\r\n /** Updates the world transform for each bone and applies constraints. */\r\n updateWorldTransform () {\r\n let updateCacheReset = this.updateCacheReset;\r\n for (let i = 0, n = updateCacheReset.length; i < n; i++) {\r\n let bone = updateCacheReset[i] as Bone;\r\n bone.ax = bone.x;\r\n bone.ay = bone.y;\r\n bone.arotation = bone.rotation;\r\n bone.ascaleX = bone.scaleX;\r\n bone.ascaleY = bone.scaleY;\r\n bone.ashearX = bone.shearX;\r\n bone.ashearY = bone.shearY;\r\n bone.appliedValid = true;\r\n }\r\n let updateCache = this._updateCache;\r\n for (let i = 0, n = updateCache.length; i < n; i++)\r\n updateCache[i].update();\r\n }\r\n\r\n /** Sets the bones, constraints, and slots to their setup pose values. */\r\n setToSetupPose () {\r\n this.setBonesToSetupPose();\r\n this.setSlotsToSetupPose();\r\n }\r\n\r\n /** Sets the bones and constraints to their setup pose values. */\r\n setBonesToSetupPose () {\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++)\r\n bones[i].setToSetupPose();\r\n\r\n let ikConstraints = this.ikConstraints;\r\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\r\n let constraint = ikConstraints[i];\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n\r\n let transformConstraints = this.transformConstraints;\r\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\r\n let constraint = transformConstraints[i];\r\n let data = constraint.data;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n }\r\n\r\n let pathConstraints = this.pathConstraints;\r\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\r\n let constraint = pathConstraints[i];\r\n let data = constraint.data;\r\n constraint.position = data.position;\r\n constraint.spacing = data.spacing;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n }\r\n }\r\n\r\n setSlotsToSetupPose () {\r\n let slots = this.slots;\r\n Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\r\n for (let i = 0, n = slots.length; i < n; i++)\r\n slots[i].setToSetupPose();\r\n }\r\n\r\n /** @return May return null. */\r\n getRootBone () {\r\n if (this.bones.length == 0) return null;\r\n return this.bones[0];\r\n }\r\n\r\n /** @return May be null. */\r\n findBone (boneName: string) {\r\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (bone.data.name == boneName) return bone;\r\n }\r\n return null;\r\n }\r\n\r\n /** @return -1 if the bone was not found. */\r\n findBoneIndex (boneName: string) {\r\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].data.name == boneName) return i;\r\n return -1;\r\n }\r\n\r\n /** @return May be null. */\r\n findSlot (slotName: string) {\r\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (slot.data.name == slotName) return slot;\r\n }\r\n return null;\r\n }\r\n\r\n /** @return -1 if the bone was not found. */\r\n findSlotIndex (slotName: string) {\r\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].data.name == slotName) return i;\r\n return -1;\r\n }\r\n\r\n /** Sets a skin by name.\r\n * @see #setSkin(Skin) */\r\n setSkinByName (skinName: string) {\r\n let skin = this.data.findSkin(skinName);\r\n if (skin == null) throw new Error(\"Skin not found: \" + skinName);\r\n this.setSkin(skin);\r\n }\r\n\r\n /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default skin}.\r\n * Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no\r\n * old skin, each slot's setup mode attachment is attached from the new skin.\r\n * @param newSkin May be null. */\r\n setSkin (newSkin: Skin) {\r\n if (newSkin == this.skin) return;\r\n if (newSkin != null) {\r\n if (this.skin != null)\r\n newSkin.attachAll(this, this.skin);\r\n else {\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n let name = slot.data.attachmentName;\r\n if (name != null) {\r\n let attachment: Attachment = newSkin.getAttachment(i, name);\r\n if (attachment != null) slot.setAttachment(attachment);\r\n }\r\n }\r\n }\r\n }\r\n this.skin = newSkin;\r\n this.updateCache();\r\n }\r\n\r\n /** @return May be null. */\r\n getAttachmentByName (slotName: string, attachmentName: string): Attachment {\r\n return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\r\n }\r\n\r\n /** @return May be null. */\r\n getAttachment (slotIndex: number, attachmentName: string): Attachment {\r\n if (attachmentName == null) throw new Error(\"attachmentName cannot be null.\");\r\n if (this.skin != null) {\r\n let attachment: Attachment = this.skin.getAttachment(slotIndex, attachmentName);\r\n if (attachment != null) return attachment;\r\n }\r\n if (this.data.defaultSkin != null) return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\r\n return null;\r\n }\r\n\r\n /** @param attachmentName May be null. */\r\n setAttachment (slotName: string, attachmentName?: string) {\r\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (slot.data.name == slotName) {\r\n let attachment: Attachment = null;\r\n if (attachmentName != null) {\r\n attachment = this.getAttachment(i, attachmentName);\r\n if (attachment == null)\r\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\r\n }\r\n slot.setAttachment(attachment);\r\n return;\r\n }\r\n }\r\n throw new Error(\"Slot not found: \" + slotName);\r\n }\r\n\r\n /** @return May be null. */\r\n findIkConstraint (constraintName: string) {\r\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\r\n let ikConstraints = this.ikConstraints;\r\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\r\n let ikConstraint = ikConstraints[i];\r\n if (ikConstraint.data.name == constraintName) return ikConstraint;\r\n }\r\n return null;\r\n }\r\n\r\n /** @return May be null. */\r\n findTransformConstraint (constraintName: string) {\r\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\r\n let transformConstraints = this.transformConstraints;\r\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\r\n let constraint = transformConstraints[i];\r\n if (constraint.data.name == constraintName) return constraint;\r\n }\r\n return null;\r\n }\r\n\r\n /** @return May be null. */\r\n findPathConstraint (constraintName: string) {\r\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\r\n let pathConstraints = this.pathConstraints;\r\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\r\n let constraint = pathConstraints[i];\r\n if (constraint.data.name == constraintName) return constraint;\r\n }\r\n return null;\r\n }\r\n\r\n /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n * @param offset The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * @param size The width and height of the AABB.\r\n * @param temp Working memory */\r\n getBounds (offset: Vector2, size: Vector2, temp: Array = new Array(2)) {\r\n if (offset == null) throw new Error(\"offset cannot be null.\");\r\n if (size == null) throw new Error(\"size cannot be null.\");\r\n let drawOrder = this.drawOrder;\r\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n for (let i = 0, n = drawOrder.length; i < n; i++) {\r\n let slot = drawOrder[i];\r\n if (!slot.bone.active) continue;\r\n let verticesLength = 0;\r\n let vertices: ArrayLike = null;\r\n let attachment = slot.getAttachment();\r\n if (attachment instanceof RegionAttachment) {\r\n verticesLength = 8;\r\n vertices = Utils.setArraySize(temp, verticesLength, 0);\r\n (attachment).computeWorldVertices(slot.bone, vertices, 0, 2);\r\n } else if (attachment instanceof MeshAttachment) {\r\n let mesh = (attachment);\r\n verticesLength = mesh.worldVerticesLength;\r\n vertices = Utils.setArraySize(temp, verticesLength, 0);\r\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\r\n }\r\n if (vertices != null) {\r\n for (let ii = 0, nn = vertices.length; ii < nn; ii += 2) {\r\n let x = vertices[ii], y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n }\r\n offset.set(minX, minY);\r\n size.set(maxX - minX, maxY - minY);\r\n }\r\n\r\n update (delta: number) {\r\n this.time += delta;\r\n }\r\n\r\n get flipX(): boolean {\r\n return this.scaleX == -1;\r\n }\r\n\r\n set flipX(value: boolean) {\r\n if (!Skeleton.deprecatedWarning1) {\r\n Skeleton.deprecatedWarning1 = true;\r\n console.warn(\"Spine Deprecation Warning: `Skeleton.flipX/flipY` was deprecated, please use scaleX/scaleY\");\r\n }\r\n this.scaleX = value ? 1.0 : -1.0;\r\n }\r\n\r\n get flipY(): boolean {\r\n return this.scaleY == -1;\r\n }\r\n\r\n set flipY(value: boolean) {\r\n if (!Skeleton.deprecatedWarning1) {\r\n Skeleton.deprecatedWarning1 = true;\r\n console.warn(\"Spine Deprecation Warning: `Skeleton.flipX/flipY` was deprecated, please use scaleX/scaleY\");\r\n }\r\n this.scaleY = value ? 1.0 : -1.0;\r\n }\r\n\r\n private static deprecatedWarning1: boolean = false;\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes License Agreement\r\n * Last updated May 1, 2019. Replaces all prior versions.\r\n *\r\n * Copyright (c) 2013-2019, Esoteric Software LLC\r\n *\r\n * Integration of the Spine Runtimes into software or otherwise creating\r\n * derivative works of the Spine Runtimes is permitted under the terms and\r\n * conditions of Section 2 of the Spine Editor License Agreement:\r\n * http://esotericsoftware.com/spine-editor-license\r\n *\r\n * Otherwise, it is permitted to integrate the Spine Runtimes into software\r\n * or otherwise create derivative works of the Spine Runtimes (collectively,\r\n * \"Products\"), provided that each user of the Products must obtain their own\r\n * Spine Editor license and redistribution of the Products in any form must\r\n * include this license and copyright notice.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY EXPRESS\r\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\r\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN\r\n * NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY DIRECT, INDIRECT,\r\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r\n * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS\r\n * INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY\r\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r\n * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n\texport class SkeletonBinary {\r\n\t\tstatic AttachmentTypeValues = [ 0 /*AttachmentType.Region*/, 1/*AttachmentType.BoundingBox*/, 2/*AttachmentType.Mesh*/, 3/*AttachmentType.LinkedMesh*/, 4/*AttachmentType.Path*/, 5/*AttachmentType.Point*/, 6/*AttachmentType.Clipping*/ ];\r\n\t\tstatic TransformModeValues = [TransformMode.Normal, TransformMode.OnlyTranslation, TransformMode.NoRotationOrReflection, TransformMode.NoScale, TransformMode.NoScaleOrReflection];\r\n\t\tstatic PositionModeValues = [ PositionMode.Fixed, PositionMode.Percent ];\r\n\t\tstatic SpacingModeValues = [ SpacingMode.Length, SpacingMode.Fixed, SpacingMode.Percent];\r\n\t\tstatic RotateModeValues = [ RotateMode.Tangent, RotateMode.Chain, RotateMode.ChainScale ];\r\n\t\tstatic BlendModeValues = [ BlendMode.Normal, BlendMode.Additive, BlendMode.Multiply, BlendMode.Screen];\r\n\r\n\t\tstatic BONE_ROTATE = 0;\r\n\t\tstatic BONE_TRANSLATE = 1;\r\n\t\tstatic BONE_SCALE = 2;\r\n\t\tstatic BONE_SHEAR = 3;\r\n\r\n\t\tstatic SLOT_ATTACHMENT = 0;\r\n\t\tstatic SLOT_COLOR = 1;\r\n\t\tstatic SLOT_TWO_COLOR = 2;\r\n\r\n\t\tstatic PATH_POSITION = 0;\r\n\t\tstatic PATH_SPACING = 1;\r\n\t\tstatic PATH_MIX = 2;\r\n\r\n\t\tstatic CURVE_LINEAR = 0;\r\n\t\tstatic CURVE_STEPPED = 1;\r\n\t\tstatic CURVE_BEZIER = 2;\r\n\r\n\t\tattachmentLoader: AttachmentLoader;\r\n\t\tscale = 1;\r\n\t\tprivate linkedMeshes = new Array();\r\n\r\n\t\tconstructor (attachmentLoader: AttachmentLoader) {\r\n\t\t\tthis.attachmentLoader = attachmentLoader;\r\n\t\t}\r\n\r\n\t\treadSkeletonData (binary: Uint8Array): SkeletonData {\r\n\t\t\tlet scale = this.scale;\r\n\r\n\t\t\tlet skeletonData = new SkeletonData();\r\n\t\t\tskeletonData.name = \"\"; // BOZO\r\n\r\n\t\t\tlet input = new BinaryInput(binary);\r\n\r\n\t\t\tskeletonData.hash = input.readString();\r\n\t\t\tskeletonData.version = input.readString();\r\n if (skeletonData.version === '3.8.75')\r\n {\r\n let error = `Unsupported skeleton data, 3.8.75 is deprecated, please export with a newer version of Spine.`;\r\n console.error(error);\r\n }\r\n\t\t\tskeletonData.x = input.readFloat();\r\n\t\t\tskeletonData.y = input.readFloat();\r\n\t\t\tskeletonData.width = input.readFloat();\r\n\t\t\tskeletonData.height = input.readFloat();\r\n\r\n\t\t\tlet nonessential = input.readBoolean();\r\n\t\t\tif (nonessential) {\r\n\t\t\t\tskeletonData.fps = input.readFloat();\r\n\r\n\t\t\t\tskeletonData.imagesPath = input.readString();\r\n\t\t\t\tskeletonData.audioPath = input.readString();\r\n\t\t\t}\r\n\r\n\t\t\tlet n = 0;\r\n\t\t\t// Strings.\r\n\t\t\tn = input.readInt(true)\r\n\t\t\tfor (let i = 0; i < n; i++)\r\n\t\t\t\tinput.strings.push(input.readString());\r\n\r\n\t\t\t// Bones.\r\n\t\t\tn = input.readInt(true)\r\n\t\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\t\tlet name = input.readString();\r\n\t\t\t\tlet parent = i == 0 ? null : skeletonData.bones[input.readInt(true)];\r\n\t\t\t\tlet data = new BoneData(i, name, parent);\r\n\t\t\t\tdata.rotation = input.readFloat();\r\n\t\t\t\tdata.x = input.readFloat() * scale;\r\n\t\t\t\tdata.y = input.readFloat() * scale;\r\n\t\t\t\tdata.scaleX = input.readFloat();\r\n\t\t\t\tdata.scaleY = input.readFloat();\r\n\t\t\t\tdata.shearX = input.readFloat();\r\n\t\t\t\tdata.shearY = input.readFloat();\r\n\t\t\t\tdata.length = input.readFloat() * scale;\r\n\t\t\t\tdata.transformMode = SkeletonBinary.TransformModeValues[input.readInt(true)];\r\n\t\t\t\tdata.skinRequired = input.readBoolean();\r\n\t\t\t\tif (nonessential) Color.rgba8888ToColor(data.color, input.readInt32());\r\n\t\t\t\tskeletonData.bones.push(data);\r\n\t\t\t}\r\n\r\n\t\t\t// Slots.\r\n\t\t\tn = input.readInt(true);\r\n\t\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\t\tlet slotName = input.readString();\r\n\t\t\t\tlet boneData = skeletonData.bones[input.readInt(true)];\r\n\t\t\t\tlet data = new SlotData(i, slotName, boneData);\r\n\t\t\t\tColor.rgba8888ToColor(data.color, input.readInt32());\r\n\r\n\t\t\t\tlet darkColor = input.readInt32();\r\n\t\t\t\tif (darkColor != -1) Color.rgb888ToColor(data.darkColor = new Color(), darkColor);\r\n\r\n\t\t\t\tdata.attachmentName = input.readStringRef();\r\n\t\t\t\tdata.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)];\r\n\t\t\t\tskeletonData.slots.push(data);\r\n\t\t\t}\r\n\r\n\t\t\t// IK constraints.\r\n\t\t\tn = input.readInt(true);\r\n\t\t\tfor (let i = 0, nn; i < n; i++) {\r\n\t\t\t\tlet data = new IkConstraintData(input.readString());\r\n\t\t\t\tdata.order = input.readInt(true);\r\n\t\t\t\tdata.skinRequired = input.readBoolean();\r\n\t\t\t\tnn = input.readInt(true);\r\n\t\t\t\tfor (let ii = 0; ii < nn; ii++)\r\n\t\t\t\t\tdata.bones.push(skeletonData.bones[input.readInt(true)]);\r\n\t\t\t\tdata.target = skeletonData.bones[input.readInt(true)];\r\n\t\t\t\tdata.mix = input.readFloat();\r\n\t\t\t\tdata.softness = input.readFloat() * scale;\r\n\t\t\t\tdata.bendDirection = input.readByte();\r\n\t\t\t\tdata.compress = input.readBoolean();\r\n\t\t\t\tdata.stretch = input.readBoolean();\r\n\t\t\t\tdata.uniform = input.readBoolean();\r\n\t\t\t\tskeletonData.ikConstraints.push(data);\r\n\t\t\t}\r\n\r\n\t\t\t// Transform constraints.\r\n\t\t\tn = input.readInt(true);\r\n\t\t\tfor (let i = 0, nn; i < n; i++) {\r\n\t\t\t\tlet data = new TransformConstraintData(input.readString());\r\n\t\t\t\tdata.order = input.readInt(true);\r\n\t\t\t\tdata.skinRequired = input.readBoolean();\r\n\t\t\t\tnn = input.readInt(true);\r\n\t\t\t\tfor (let ii = 0; ii < nn; ii++)\r\n\t\t\t\t\tdata.bones.push(skeletonData.bones[input.readInt(true)]);\r\n\t\t\t\tdata.target = skeletonData.bones[input.readInt(true)];\r\n\t\t\t\tdata.local = input.readBoolean();\r\n\t\t\t\tdata.relative = input.readBoolean();\r\n\t\t\t\tdata.offsetRotation = input.readFloat();\r\n\t\t\t\tdata.offsetX = input.readFloat() * scale;\r\n\t\t\t\tdata.offsetY = input.readFloat() * scale;\r\n\t\t\t\tdata.offsetScaleX = input.readFloat();\r\n\t\t\t\tdata.offsetScaleY = input.readFloat();\r\n\t\t\t\tdata.offsetShearY = input.readFloat();\r\n\t\t\t\tdata.rotateMix = input.readFloat();\r\n\t\t\t\tdata.translateMix = input.readFloat();\r\n\t\t\t\tdata.scaleMix = input.readFloat();\r\n\t\t\t\tdata.shearMix = input.readFloat();\r\n\t\t\t\tskeletonData.transformConstraints.push(data);\r\n\t\t\t}\r\n\r\n\t\t\t// Path constraints.\r\n\t\t\tn = input.readInt(true);\r\n\t\t\tfor (let i = 0, nn; i < n; i++) {\r\n\t\t\t\tlet data = new PathConstraintData(input.readString());\r\n\t\t\t\tdata.order = input.readInt(true);\r\n\t\t\t\tdata.skinRequired = input.readBoolean();\r\n\t\t\t\tnn = input.readInt(true);\r\n\t\t\t\tfor (let ii = 0; ii < nn; ii++)\r\n\t\t\t\t\tdata.bones.push(skeletonData.bones[input.readInt(true)]);\r\n\t\t\t\tdata.target = skeletonData.slots[input.readInt(true)];\r\n\t\t\t\tdata.positionMode = SkeletonBinary.PositionModeValues[input.readInt(true)];\r\n\t\t\t\tdata.spacingMode = SkeletonBinary.SpacingModeValues[input.readInt(true)];\r\n\t\t\t\tdata.rotateMode = SkeletonBinary.RotateModeValues[input.readInt(true)];\r\n\t\t\t\tdata.offsetRotation = input.readFloat();\r\n\t\t\t\tdata.position = input.readFloat();\r\n\t\t\t\tif (data.positionMode == PositionMode.Fixed) data.position *= scale;\r\n\t\t\t\tdata.spacing = input.readFloat();\r\n\t\t\t\tif (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) data.spacing *= scale;\r\n\t\t\t\tdata.rotateMix = input.readFloat();\r\n\t\t\t\tdata.translateMix = input.readFloat();\r\n\t\t\t\tskeletonData.pathConstraints.push(data);\r\n\t\t\t}\r\n\r\n\t\t\t// Default skin.\r\n\t\t\tlet defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\r\n\t\t\tif (defaultSkin != null) {\r\n\t\t\t\tskeletonData.defaultSkin = defaultSkin;\r\n\t\t\t\tskeletonData.skins.push(defaultSkin);\r\n\t\t\t}\r\n\r\n\t\t\t// Skins.\r\n\t\t\t{\r\n\t\t\t\tlet i = skeletonData.skins.length;\r\n\t\t\t\tUtils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\r\n\t\t\t\tfor (; i < n; i++)\r\n\t\t\t\t\tskeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential);\r\n\t\t\t}\r\n\r\n\t\t\t// Linked meshes.\r\n\t\t\tn = this.linkedMeshes.length;\r\n\t\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\t\tlet linkedMesh = this.linkedMeshes[i];\r\n\t\t\t\tlet skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n\t\t\t\tif (skin == null) throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n\t\t\t\tlet parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n\t\t\t\tif (parent == null) throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n\t\t\t\tlinkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent as VertexAttachment : linkedMesh.mesh;\r\n\t\t\t\tlinkedMesh.mesh.setParentMesh(parent as MeshAttachment);\r\n\t\t\t\t// linkedMesh.mesh.updateUVs();\r\n\t\t\t}\r\n\t\t\tthis.linkedMeshes.length = 0;\r\n\r\n\t\t\t// Events.\r\n\t\t\tn = input.readInt(true);\r\n\t\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\t\tlet data = new EventData(input.readStringRef());\r\n\t\t\t\tdata.intValue = input.readInt(false);\r\n\t\t\t\tdata.floatValue = input.readFloat();\r\n\t\t\t\tdata.stringValue = input.readString();\r\n\t\t\t\tdata.audioPath = input.readString();\r\n\t\t\t\tif (data.audioPath != null) {\r\n\t\t\t\t\tdata.volume = input.readFloat();\r\n\t\t\t\t\tdata.balance = input.readFloat();\r\n\t\t\t\t}\r\n\t\t\t\tskeletonData.events.push(data);\r\n\t\t\t}\r\n\r\n\t\t\t// Animations.\r\n\t\t\tn = input.readInt(true);\r\n\t\t\tfor (let i = 0; i < n; i++)\r\n\t\t\t\tskeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData));\r\n\t\t\treturn skeletonData;\r\n\t\t}\r\n\r\n\t\tprivate readSkin (input: BinaryInput, skeletonData: SkeletonData, defaultSkin: boolean, nonessential: boolean): Skin {\r\n let skin = null;\r\n let slotCount = 0;\r\n\r\n if (defaultSkin) {\r\n slotCount = input.readInt(true)\r\n if (slotCount == 0) return null;\r\n skin = new Skin(\"default\");\r\n } else {\r\n skin = new Skin(input.readStringRef());\r\n skin.bones.length = input.readInt(true);\r\n for (let i = 0, n = skin.bones.length; i < n; i++)\r\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\r\n\r\n for (let i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\r\n for (let i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\r\n for (let i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\r\n\r\n slotCount = input.readInt(true);\r\n }\r\n\r\n for (let i = 0; i < slotCount; i++) {\r\n let slotIndex = input.readInt(true);\r\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n let name = input.readStringRef();\r\n let attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name, nonessential);\r\n if (attachment != null) skin.setAttachment(slotIndex, name, attachment);\r\n }\r\n }\r\n return skin;\r\n\t\t}\r\n\r\n\t\tprivate readAttachment(input: BinaryInput, skeletonData: SkeletonData, skin: Skin, slotIndex: number, attachmentName: string, nonessential: boolean): Attachment {\r\n\t\t\tlet scale = this.scale;\r\n\r\n\t\t\tlet name = input.readStringRef();\r\n\t\t\tif (name == null) name = attachmentName;\r\n\r\n\t\t\tlet typeIndex = input.readByte();\r\n\t\t\tlet type = SkeletonBinary.AttachmentTypeValues[typeIndex];\r\n\t\t\tswitch (type) {\r\n\t\t\tcase AttachmentType.Region: {\r\n\t\t\t\tlet path = input.readStringRef();\r\n\t\t\t\tlet rotation = input.readFloat();\r\n\t\t\t\tlet x = input.readFloat();\r\n\t\t\t\tlet y = input.readFloat();\r\n\t\t\t\tlet scaleX = input.readFloat();\r\n\t\t\t\tlet scaleY = input.readFloat();\r\n\t\t\t\tlet width = input.readFloat();\r\n\t\t\t\tlet height = input.readFloat();\r\n\t\t\t\tlet color = input.readInt32();\r\n\r\n\t\t\t\tif (path == null) path = name;\r\n\t\t\t\tlet region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n\t\t\t\tif (region == null) return null;\r\n\t\t\t\tregion.path = path;\r\n\t\t\t\tregion.x = x * scale;\r\n\t\t\t\tregion.y = y * scale;\r\n\t\t\t\tregion.scaleX = scaleX;\r\n\t\t\t\tregion.scaleY = scaleY;\r\n\t\t\t\tregion.rotation = rotation;\r\n\t\t\t\tregion.width = width * scale;\r\n\t\t\t\tregion.height = height * scale;\r\n\t\t\t\tColor.rgba8888ToColor(region.color, color);\r\n\t\t\t\t// region.updateOffset();\r\n\t\t\t\treturn region;\r\n\t\t\t}\r\n\t\t\tcase AttachmentType.BoundingBox: {\r\n\t\t\t\tlet vertexCount = input.readInt(true);\r\n\t\t\t\tlet vertices = this.readVertices(input, vertexCount);\r\n\t\t\t\tlet color = nonessential ? input.readInt32() : 0;\r\n\r\n\t\t\t\tlet box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n\t\t\t\tif (box == null) return null;\r\n\t\t\t\tbox.worldVerticesLength = vertexCount << 1;\r\n\t\t\t\tbox.vertices = vertices.vertices;\r\n\t\t\t\tbox.bones = vertices.bones;\r\n\t\t\t\tif (nonessential) Color.rgba8888ToColor(box.color, color);\r\n\t\t\t\treturn box;\r\n\t\t\t}\r\n\t\t\tcase AttachmentType.Mesh: {\r\n\t\t\t\tlet path = input.readStringRef();\r\n\t\t\t\tlet color = input.readInt32();\r\n\t\t\t\tlet vertexCount = input.readInt(true);\r\n\t\t\t\tlet uvs = this.readFloatArray(input, vertexCount << 1, 1);\r\n\t\t\t\tlet triangles = this.readShortArray(input);\r\n\t\t\t\tlet vertices = this.readVertices(input, vertexCount);\r\n\t\t\t\tlet hullLength = input.readInt(true);\r\n\t\t\t\tlet edges = null;\r\n\t\t\t\tlet width = 0, height = 0;\r\n\t\t\t\tif (nonessential) {\r\n\t\t\t\t\tedges = this.readShortArray(input);\r\n\t\t\t\t\twidth = input.readFloat();\r\n\t\t\t\t\theight = input.readFloat();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (path == null) path = name;\r\n\t\t\t\tlet mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n\t\t\t\tif (mesh == null) return null;\r\n\t\t\t\tmesh.path = path;\r\n\t\t\t\tColor.rgba8888ToColor(mesh.color, color);\r\n\t\t\t\tmesh.bones = vertices.bones;\r\n\t\t\t\tmesh.vertices = vertices.vertices;\r\n\t\t\t\tmesh.worldVerticesLength = vertexCount << 1;\r\n\t\t\t\tmesh.triangles = triangles;\r\n\t\t\t\tmesh.regionUVs = new Float32Array(uvs);\r\n\t\t\t\t// mesh.updateUVs();\r\n\t\t\t\tmesh.hullLength = hullLength << 1;\r\n\t\t\t\tif (nonessential) {\r\n\t\t\t\t\tmesh.edges = edges;\r\n\t\t\t\t\tmesh.width = width * scale;\r\n\t\t\t\t\tmesh.height = height * scale;\r\n\t\t\t\t}\r\n\t\t\t\treturn mesh;\r\n\t\t\t}\r\n\t\t\tcase AttachmentType.LinkedMesh: {\r\n\t\t\t\tlet path = input.readStringRef();\r\n\t\t\t\tlet color = input.readInt32();\r\n\t\t\t\tlet skinName = input.readStringRef();\r\n\t\t\t\tlet parent = input.readStringRef();\r\n\t\t\t\tlet inheritDeform = input.readBoolean();\r\n\t\t\t\tlet width = 0, height = 0;\r\n\t\t\t\tif (nonessential) {\r\n\t\t\t\t\twidth = input.readFloat();\r\n\t\t\t\t\theight = input.readFloat();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (path == null) path = name;\r\n\t\t\t\tlet mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n\t\t\t\tif (mesh == null) return null;\r\n\t\t\t\tmesh.path = path;\r\n\t\t\t\tColor.rgba8888ToColor(mesh.color, color);\r\n\t\t\t\tif (nonessential) {\r\n\t\t\t\t\tmesh.width = width * scale;\r\n\t\t\t\t\tmesh.height = height * scale;\r\n\t\t\t\t}\r\n\t\t\t\tthis.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent, inheritDeform));\r\n\t\t\t\treturn mesh;\r\n\t\t\t}\r\n\t\t\tcase AttachmentType.Path: {\r\n\t\t\t\tlet closed = input.readBoolean();\r\n\t\t\t\tlet constantSpeed = input.readBoolean();\r\n\t\t\t\tlet vertexCount = input.readInt(true);\r\n\t\t\t\tlet vertices = this.readVertices(input, vertexCount);\r\n\t\t\t\tlet lengths = Utils.newArray(vertexCount / 3, 0);\r\n\t\t\t\tfor (let i = 0, n = lengths.length; i < n; i++)\r\n\t\t\t\t\tlengths[i] = input.readFloat() * scale;\r\n\t\t\t\tlet color = nonessential ? input.readInt32() : 0;\r\n\r\n\t\t\t\tlet path = this.attachmentLoader.newPathAttachment(skin, name);\r\n\t\t\t\tif (path == null) return null;\r\n\t\t\t\tpath.closed = closed;\r\n\t\t\t\tpath.constantSpeed = constantSpeed;\r\n\t\t\t\tpath.worldVerticesLength = vertexCount << 1;\r\n\t\t\t\tpath.vertices = vertices.vertices;\r\n\t\t\t\tpath.bones = vertices.bones;\r\n\t\t\t\tpath.lengths = lengths;\r\n\t\t\t\tif (nonessential) Color.rgba8888ToColor(path.color, color);\r\n\t\t\t\treturn path;\r\n\t\t\t}\r\n\t\t\tcase AttachmentType.Point: {\r\n\t\t\t\tlet rotation = input.readFloat();\r\n\t\t\t\tlet x = input.readFloat();\r\n\t\t\t\tlet y = input.readFloat();\r\n\t\t\t\tlet color = nonessential ? input.readInt32() : 0;\r\n\r\n\t\t\t\tlet point = this.attachmentLoader.newPointAttachment(skin, name);\r\n\t\t\t\tif (point == null) return null;\r\n\t\t\t\tpoint.x = x * scale;\r\n\t\t\t\tpoint.y = y * scale;\r\n\t\t\t\tpoint.rotation = rotation;\r\n\t\t\t\tif (nonessential) Color.rgba8888ToColor(point.color, color);\r\n\t\t\t\treturn point;\r\n\t\t\t}\r\n\t\t\tcase AttachmentType.Clipping: {\r\n\t\t\t\tlet endSlotIndex = input.readInt(true);\r\n\t\t\t\tlet vertexCount = input.readInt(true);\r\n\t\t\t\tlet vertices = this.readVertices(input, vertexCount);\r\n\t\t\t\tlet color = nonessential ? input.readInt32() : 0;\r\n\r\n\t\t\t\tlet clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n\t\t\t\tif (clip == null) return null;\r\n\t\t\t\tclip.endSlot = skeletonData.slots[endSlotIndex];\r\n\t\t\t\tclip.worldVerticesLength = vertexCount << 1;\r\n\t\t\t\tclip.vertices = vertices.vertices;\r\n\t\t\t\tclip.bones = vertices.bones;\r\n\t\t\t\tif (nonessential) Color.rgba8888ToColor(clip.color, color);\r\n\t\t\t\treturn clip;\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tprivate readVertices (input: BinaryInput, vertexCount: number): Vertices {\r\n\t\t\tlet verticesLength = vertexCount << 1;\r\n\t\t\tlet vertices = new Vertices();\r\n\t\t\tlet scale = this.scale;\r\n\t\t\tif (!input.readBoolean()) {\r\n\t\t\t\tvertices.vertices = this.readFloatArray(input, verticesLength, scale);\r\n\t\t\t\treturn vertices;\r\n\t\t\t}\r\n\t\t\tlet weights = new Array();\r\n\t\t\tlet bonesArray = new Array();\r\n\t\t\tfor (let i = 0; i < vertexCount; i++) {\r\n\t\t\t\tlet boneCount = input.readInt(true);\r\n\t\t\t\tbonesArray.push(boneCount);\r\n\t\t\t\tfor (let ii = 0; ii < boneCount; ii++) {\r\n\t\t\t\t\tbonesArray.push(input.readInt(true));\r\n\t\t\t\t\tweights.push(input.readFloat() * scale);\r\n\t\t\t\t\tweights.push(input.readFloat() * scale);\r\n\t\t\t\t\tweights.push(input.readFloat());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvertices.vertices = Utils.toFloatArray(weights);\r\n\t\t\tvertices.bones = bonesArray;\r\n\t\t\treturn vertices;\r\n\t\t}\r\n\r\n\t\tprivate readFloatArray (input: BinaryInput, n: number, scale: number): number[] {\r\n\t\t\tlet array = new Array(n);\r\n\t\t\tif (scale == 1) {\r\n\t\t\t\tfor (let i = 0; i < n; i++)\r\n\t\t\t\t\tarray[i] = input.readFloat();\r\n\t\t\t} else {\r\n\t\t\t\tfor (let i = 0; i < n; i++)\r\n\t\t\t\t\tarray[i] = input.readFloat() * scale;\r\n\t\t\t}\r\n\t\t\treturn array;\r\n\t\t}\r\n\r\n\t\tprivate readShortArray (input: BinaryInput): number[] {\r\n\t\t\tlet n = input.readInt(true);\r\n\t\t\tlet array = new Array(n);\r\n\t\t\tfor (let i = 0; i < n; i++)\r\n\t\t\t\tarray[i] = input.readShort();\r\n\t\t\treturn array;\r\n\t\t}\r\n\r\n\t\tprivate readAnimation (input: BinaryInput, name: string, skeletonData: SkeletonData): Animation {\r\n\t\t\tlet timelines = new Array();\r\n\t\t\tlet scale = this.scale;\r\n\t\t\tlet duration = 0;\r\n\t\t\tlet tempColor1 = new Color();\r\n\t\t\tlet tempColor2 = new Color();\r\n\r\n\t\t\t// Slot timelines.\r\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\r\n\t\t\t\tlet slotIndex = input.readInt(true);\r\n\t\t\t\tfor (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n\t\t\t\t\tlet timelineType = input.readByte();\r\n\t\t\t\t\tlet frameCount = input.readInt(true);\r\n\t\t\t\t\tswitch (timelineType) {\r\n\t\t\t\t\tcase SkeletonBinary.SLOT_ATTACHMENT: {\r\n\t\t\t\t\t\tlet timeline = new AttachmentTimeline(frameCount);\r\n\t\t\t\t\t\ttimeline.slotIndex = slotIndex;\r\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++)\r\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readStringRef());\r\n\t\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcase SkeletonBinary.SLOT_COLOR: {\r\n\t\t\t\t\t\tlet timeline = new ColorTimeline(frameCount);\r\n\t\t\t\t\t\ttimeline.slotIndex = slotIndex;\r\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n\t\t\t\t\t\t\tlet time = input.readFloat();\r\n\t\t\t\t\t\t\tColor.rgba8888ToColor(tempColor1, input.readInt32());\r\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a);\r\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * ColorTimeline.ENTRIES]);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcase SkeletonBinary.SLOT_TWO_COLOR: {\r\n\t\t\t\t\t\tlet timeline = new TwoColorTimeline(frameCount);\r\n\t\t\t\t\t\ttimeline.slotIndex = slotIndex;\r\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n\t\t\t\t\t\t\tlet time = input.readFloat();\r\n\t\t\t\t\t\t\tColor.rgba8888ToColor(tempColor1, input.readInt32());\r\n\t\t\t\t\t\t\tColor.rgb888ToColor(tempColor2, input.readInt32());\r\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a, tempColor2.r,\r\n\t\t\t\t\t\t\t\ttempColor2.g, tempColor2.b);\r\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * TwoColorTimeline.ENTRIES]);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Bone timelines.\r\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\r\n\t\t\t\tlet boneIndex = input.readInt(true);\r\n\t\t\t\tfor (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n\t\t\t\t\tlet timelineType = input.readByte();\r\n\t\t\t\t\tlet frameCount = input.readInt(true);\r\n\t\t\t\t\tswitch (timelineType) {\r\n\t\t\t\t\tcase SkeletonBinary.BONE_ROTATE: {\r\n\t\t\t\t\t\tlet timeline = new RotateTimeline(frameCount);\r\n\t\t\t\t\t\ttimeline.boneIndex = boneIndex;\r\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readFloat());\r\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * RotateTimeline.ENTRIES]);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcase SkeletonBinary.BONE_TRANSLATE:\r\n\t\t\t\t\tcase SkeletonBinary.BONE_SCALE:\r\n\t\t\t\t\tcase SkeletonBinary.BONE_SHEAR: {\r\n\t\t\t\t\t\tlet timeline;\r\n\t\t\t\t\t\tlet timelineScale = 1;\r\n\t\t\t\t\t\tif (timelineType == SkeletonBinary.BONE_SCALE)\r\n\t\t\t\t\t\t\ttimeline = new ScaleTimeline(frameCount);\r\n\t\t\t\t\t\telse if (timelineType == SkeletonBinary.BONE_SHEAR)\r\n\t\t\t\t\t\t\ttimeline = new ShearTimeline(frameCount);\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\ttimeline = new TranslateTimeline(frameCount);\r\n\t\t\t\t\t\t\ttimelineScale = scale;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttimeline.boneIndex = boneIndex;\r\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale,\r\n\t\t\t\t\t\t\t\tinput.readFloat() * timelineScale);\r\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * TranslateTimeline.ENTRIES]);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// IK constraint timelines.\r\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\r\n\t\t\t\tlet index = input.readInt(true);\r\n\t\t\t\tlet frameCount = input.readInt(true);\r\n\t\t\t\tlet timeline = new IkConstraintTimeline(frameCount);\r\n\t\t\t\ttimeline.ikConstraintIndex = index;\r\n\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(),\r\n\t\t\t\t\t\tinput.readBoolean());\r\n\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\r\n\t\t\t\t}\r\n\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * IkConstraintTimeline.ENTRIES]);\r\n\t\t\t}\r\n\r\n\t\t\t// Transform constraint timelines.\r\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\r\n\t\t\t\tlet index = input.readInt(true);\r\n\t\t\t\tlet frameCount = input.readInt(true);\r\n\t\t\t\tlet timeline = new TransformConstraintTimeline(frameCount);\r\n\t\t\t\ttimeline.transformConstraintIndex = index;\r\n\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat(),\r\n\t\t\t\t\t\tinput.readFloat());\r\n\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\r\n\t\t\t\t}\r\n\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * TransformConstraintTimeline.ENTRIES]);\r\n\t\t\t}\r\n\r\n\t\t\t// Path constraint timelines.\r\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\r\n\t\t\t\tlet index = input.readInt(true);\r\n\t\t\t\tlet data = skeletonData.pathConstraints[index];\r\n\t\t\t\tfor (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n\t\t\t\t\tlet timelineType = input.readByte();\r\n\t\t\t\t\tlet frameCount = input.readInt(true);\r\n\t\t\t\t\tswitch (timelineType) {\r\n\t\t\t\t\tcase SkeletonBinary.PATH_POSITION:\r\n\t\t\t\t\tcase SkeletonBinary.PATH_SPACING: {\r\n\t\t\t\t\t\tlet timeline;\r\n\t\t\t\t\t\tlet timelineScale = 1;\r\n\t\t\t\t\t\tif (timelineType == SkeletonBinary.PATH_SPACING) {\r\n\t\t\t\t\t\t\ttimeline = new PathConstraintSpacingTimeline(frameCount);\r\n\t\t\t\t\t\t\tif (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) timelineScale = scale;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttimeline = new PathConstraintPositionTimeline(frameCount);\r\n\t\t\t\t\t\t\tif (data.positionMode == PositionMode.Fixed) timelineScale = scale;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttimeline.pathConstraintIndex = index;\r\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale);\r\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * PathConstraintPositionTimeline.ENTRIES]);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcase SkeletonBinary.PATH_MIX: {\r\n\t\t\t\t\t\tlet timeline = new PathConstraintMixTimeline(frameCount);\r\n\t\t\t\t\t\ttimeline.pathConstraintIndex = index;\r\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat());\r\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * PathConstraintMixTimeline.ENTRIES]);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Deform timelines.\r\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\r\n\t\t\t\tlet skin = skeletonData.skins[input.readInt(true)];\r\n\t\t\t\tfor (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n\t\t\t\t\tlet slotIndex = input.readInt(true);\r\n\t\t\t\t\tfor (let iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\r\n\t\t\t\t\t\tlet attachment = skin.getAttachment(slotIndex, input.readStringRef()) as VertexAttachment;\r\n\t\t\t\t\t\tlet weighted = attachment.bones != null;\r\n\t\t\t\t\t\tlet vertices = attachment.vertices;\r\n\t\t\t\t\t\tlet deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n\r\n\t\t\t\t\t\tlet frameCount = input.readInt(true);\r\n\t\t\t\t\t\tlet timeline = new DeformTimeline(frameCount);\r\n\t\t\t\t\t\ttimeline.slotIndex = slotIndex;\r\n\t\t\t\t\t\ttimeline.attachment = attachment;\r\n\r\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n\t\t\t\t\t\t\tlet time = input.readFloat();\r\n\t\t\t\t\t\t\tlet deform;\r\n\t\t\t\t\t\t\tlet end = input.readInt(true);\r\n\t\t\t\t\t\t\tif (end == 0)\r\n\t\t\t\t\t\t\t\tdeform = weighted ? Utils.newFloatArray(deformLength) : vertices;\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tdeform = Utils.newFloatArray(deformLength);\r\n\t\t\t\t\t\t\t\tlet start = input.readInt(true);\r\n\t\t\t\t\t\t\t\tend += start;\r\n\t\t\t\t\t\t\t\tif (scale == 1) {\r\n\t\t\t\t\t\t\t\t\tfor (let v = start; v < end; v++)\r\n\t\t\t\t\t\t\t\t\t\tdeform[v] = input.readFloat();\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tfor (let v = start; v < end; v++)\r\n\t\t\t\t\t\t\t\t\t\tdeform[v] = input.readFloat() * scale;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (!weighted) {\r\n\t\t\t\t\t\t\t\t\tfor (let v = 0, vn = deform.length; v < vn; v++)\r\n\t\t\t\t\t\t\t\t\t\tdeform[v] += vertices[v];\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, time, deform);\r\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Draw order timeline.\r\n\t\t\tlet drawOrderCount = input.readInt(true);\r\n\t\t\tif (drawOrderCount > 0) {\r\n\t\t\t\tlet timeline = new DrawOrderTimeline(drawOrderCount);\r\n\t\t\t\tlet slotCount = skeletonData.slots.length;\r\n\t\t\t\tfor (let i = 0; i < drawOrderCount; i++) {\r\n\t\t\t\t\tlet time = input.readFloat();\r\n\t\t\t\t\tlet offsetCount = input.readInt(true);\r\n\t\t\t\t\tlet drawOrder = Utils.newArray(slotCount, 0);\r\n\t\t\t\t\tfor (let ii = slotCount - 1; ii >= 0; ii--)\r\n\t\t\t\t\t\tdrawOrder[ii] = -1;\r\n\t\t\t\t\tlet unchanged = Utils.newArray(slotCount - offsetCount, 0);\r\n\t\t\t\t\tlet originalIndex = 0, unchangedIndex = 0;\r\n\t\t\t\t\tfor (let ii = 0; ii < offsetCount; ii++) {\r\n\t\t\t\t\t\tlet slotIndex = input.readInt(true);\r\n\t\t\t\t\t\t// Collect unchanged items.\r\n\t\t\t\t\t\twhile (originalIndex != slotIndex)\r\n\t\t\t\t\t\t\tunchanged[unchangedIndex++] = originalIndex++;\r\n\t\t\t\t\t\t// Set changed items.\r\n\t\t\t\t\t\tdrawOrder[originalIndex + input.readInt(true)] = originalIndex++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Collect remaining unchanged items.\r\n\t\t\t\t\twhile (originalIndex < slotCount)\r\n\t\t\t\t\t\tunchanged[unchangedIndex++] = originalIndex++;\r\n\t\t\t\t\t// Fill in unchanged items.\r\n\t\t\t\t\tfor (let ii = slotCount - 1; ii >= 0; ii--)\r\n\t\t\t\t\t\tif (drawOrder[ii] == -1) drawOrder[ii] = unchanged[--unchangedIndex];\r\n\t\t\t\t\ttimeline.setFrame(i, time, drawOrder);\r\n\t\t\t\t}\r\n\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\tduration = Math.max(duration, timeline.frames[drawOrderCount - 1]);\r\n\t\t\t}\r\n\r\n\t\t\t// Event timeline.\r\n\t\t\tlet eventCount = input.readInt(true);\r\n\t\t\tif (eventCount > 0) {\r\n\t\t\t\tlet timeline = new EventTimeline(eventCount);\r\n\t\t\t\tfor (let i = 0; i < eventCount; i++) {\r\n\t\t\t\t\tlet time = input.readFloat();\r\n\t\t\t\t\tlet eventData = skeletonData.events[input.readInt(true)];\r\n\t\t\t\t\tlet event = new Event(time, eventData);\r\n\t\t\t\t\tevent.intValue = input.readInt(false);\r\n\t\t\t\t\tevent.floatValue = input.readFloat();\r\n\t\t\t\t\tevent.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\r\n\t\t\t\t\tif (event.data.audioPath != null) {\r\n\t\t\t\t\t\tevent.volume = input.readFloat();\r\n\t\t\t\t\t\tevent.balance = input.readFloat();\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttimeline.setFrame(i, event);\r\n\t\t\t\t}\r\n\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\tduration = Math.max(duration, timeline.frames[eventCount - 1]);\r\n\t\t\t}\r\n\r\n\t\t\treturn new Animation(name, timelines, duration);\r\n\t\t}\r\n\r\n\t\tprivate readCurve (input: BinaryInput, frameIndex: number, timeline: CurveTimeline) {\r\n\t\t\tswitch (input.readByte()) {\r\n\t\t\tcase SkeletonBinary.CURVE_STEPPED:\r\n\t\t\t\ttimeline.setStepped(frameIndex);\r\n\t\t\t\tbreak;\r\n\t\t\tcase SkeletonBinary.CURVE_BEZIER:\r\n\t\t\t\tthis.setCurve(timeline, frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tsetCurve (timeline: CurveTimeline, frameIndex: number, cx1: number, cy1: number, cx2: number, cy2: number) {\r\n\t\t\ttimeline.setCurve(frameIndex, cx1, cy1, cx2, cy2);\r\n\t\t}\r\n\t}\r\n\r\n\tclass BinaryInput {\r\n\t\tconstructor(data: Uint8Array, public strings = new Array(), private index: number = 0, private buffer = new DataView(data.buffer)) { \r\n\r\n\t\t}\r\n\r\n\t\treadByte(): number {\r\n\t\t\treturn this.buffer.getInt8(this.index++);\r\n\t\t}\r\n\r\n\t\treadShort(): number {\r\n\t\t\tlet value = this.buffer.getInt16(this.index);\r\n\t\t\tthis.index += 2;\r\n\t\t\treturn value;\r\n\t\t}\r\n\r\n\t\treadInt32(): number {\r\n\t\t\t let value = this.buffer.getInt32(this.index)\r\n\t\t\t this.index += 4;\r\n\t\t\t return value;\r\n\t\t}\r\n\r\n\t\treadInt(optimizePositive: boolean) {\r\n\t\t\tlet b = this.readByte();\r\n\t\t\tlet result = b & 0x7F;\r\n\t\t\tif ((b & 0x80) != 0) {\r\n\t\t\t\tb = this.readByte();\r\n\t\t\t\tresult |= (b & 0x7F) << 7;\r\n\t\t\t\tif ((b & 0x80) != 0) {\r\n\t\t\t\t\tb = this.readByte();\r\n\t\t\t\t\tresult |= (b & 0x7F) << 14;\r\n\t\t\t\t\tif ((b & 0x80) != 0) {\r\n\t\t\t\t\t\tb = this.readByte();\r\n\t\t\t\t\t\tresult |= (b & 0x7F) << 21;\r\n\t\t\t\t\t\tif ((b & 0x80) != 0) {\r\n\t\t\t\t\t\t\tb = this.readByte();\r\n\t\t\t\t\t\t\tresult |= (b & 0x7F) << 28;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn optimizePositive ? result : ((result >>> 1) ^ -(result & 1));\r\n\t\t}\r\n\r\n\t\treadStringRef (): string {\r\n\t\t\tlet index = this.readInt(true);\r\n\t\t\treturn index == 0 ? null : this.strings[index - 1];\r\n\t\t}\r\n\r\n\t\treadString (): string {\r\n\t\t\tlet byteCount = this.readInt(true);\r\n\t\t\tswitch (byteCount) {\r\n\t\t\tcase 0:\r\n\t\t\t\treturn null;\r\n\t\t\tcase 1:\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t\tbyteCount--;\r\n\t\t\tlet chars = \"\";\r\n\t\t\tlet charCount = 0;\r\n\t\t\tfor (let i = 0; i < byteCount;) {\r\n\t\t\t\tlet b = this.readByte();\r\n\t\t\t\tswitch (b >> 4) {\r\n\t\t\t\tcase 12:\r\n\t\t\t\tcase 13:\r\n\t\t\t\t\tchars += String.fromCharCode(((b & 0x1F) << 6 | this.readByte() & 0x3F));\r\n\t\t\t\t\ti += 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 14:\r\n\t\t\t\t\tchars += String.fromCharCode(((b & 0x0F) << 12 | (this.readByte() & 0x3F) << 6 | this.readByte() & 0x3F));\r\n\t\t\t\t\ti += 3;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tchars += String.fromCharCode(b);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn chars;\r\n\t\t}\r\n\r\n\t\treadFloat (): number {\r\n\t\t\tlet value = this.buffer.getFloat32(this.index);\r\n\t\t\tthis.index += 4;\r\n\t\t\treturn value;\r\n\t\t}\r\n\r\n\t\treadBoolean (): boolean {\r\n\t\t\treturn this.readByte() != 0;\r\n\t\t}\r\n\t}\r\n\r\n\tclass LinkedMesh {\r\n\t\tparent: string; skin: string;\r\n\t\tslotIndex: number;\r\n\t\tmesh: MeshAttachment;\r\n\t\tinheritDeform: boolean;\r\n\r\n\t\tconstructor (mesh: MeshAttachment, skin: string, slotIndex: number, parent: string, inheritDeform: boolean) {\r\n\t\t\tthis.mesh = mesh;\r\n\t\t\tthis.skin = skin;\r\n\t\t\tthis.slotIndex = slotIndex;\r\n\t\t\tthis.parent = parent;\r\n\t\t\tthis.inheritDeform = inheritDeform;\r\n\t\t}\r\n\t}\r\n\r\n\tclass Vertices {\r\n\t\tconstructor(public bones: Array = null, public vertices: Array | Float32Array = null) { }\r\n\t}\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class SkeletonBounds {\r\n minX = 0; minY = 0; maxX = 0; maxY = 0;\r\n boundingBoxes = new Array();\r\n polygons = new Array>();\r\n private polygonPool = new Pool>(() => {\r\n return Utils.newFloatArray(16);\r\n });\r\n\r\n update (skeleton: Skeleton, updateAabb: boolean) {\r\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\r\n let boundingBoxes = this.boundingBoxes;\r\n let polygons = this.polygons;\r\n let polygonPool = this.polygonPool;\r\n let slots = skeleton.slots;\r\n let slotCount = slots.length;\r\n\r\n boundingBoxes.length = 0;\r\n polygonPool.freeAll(polygons);\r\n polygons.length = 0;\r\n\r\n for (let i = 0; i < slotCount; i++) {\r\n let slot = slots[i];\r\n if (!slot.bone.active) continue;\r\n let attachment = slot.getAttachment();\r\n if (attachment instanceof BoundingBoxAttachment) {\r\n let boundingBox = attachment as BoundingBoxAttachment;\r\n boundingBoxes.push(boundingBox);\r\n\r\n let polygon = polygonPool.obtain();\r\n if (polygon.length != boundingBox.worldVerticesLength) {\r\n polygon = Utils.newFloatArray(boundingBox.worldVerticesLength);\r\n }\r\n polygons.push(polygon);\r\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\r\n }\r\n }\r\n\r\n if (updateAabb) {\r\n this.aabbCompute();\r\n } else {\r\n this.minX = Number.POSITIVE_INFINITY;\r\n this.minY = Number.POSITIVE_INFINITY;\r\n this.maxX = Number.NEGATIVE_INFINITY;\r\n this.maxY = Number.NEGATIVE_INFINITY;\r\n }\r\n }\r\n\r\n aabbCompute () {\r\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n let polygons = this.polygons;\r\n for (let i = 0, n = polygons.length; i < n; i++) {\r\n let polygon = polygons[i];\r\n let vertices = polygon;\r\n for (let ii = 0, nn = polygon.length; ii < nn; ii += 2) {\r\n let x = vertices[ii];\r\n let y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n this.minX = minX;\r\n this.minY = minY;\r\n this.maxX = maxX;\r\n this.maxY = maxY;\r\n }\r\n\r\n /** Returns true if the axis aligned bounding box contains the point. */\r\n aabbContainsPoint (x: number, y: number) {\r\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\r\n }\r\n\r\n /** Returns true if the axis aligned bounding box intersects the line segment. */\r\n aabbIntersectsSegment (x1: number, y1: number, x2: number, y2: number) {\r\n let minX = this.minX;\r\n let minY = this.minY;\r\n let maxX = this.maxX;\r\n let maxY = this.maxY;\r\n if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\r\n return false;\r\n let m = (y2 - y1) / (x2 - x1);\r\n let y = m * (minX - x1) + y1;\r\n if (y > minY && y < maxY) return true;\r\n y = m * (maxX - x1) + y1;\r\n if (y > minY && y < maxY) return true;\r\n let x = (minY - y1) / m + x1;\r\n if (x > minX && x < maxX) return true;\r\n x = (maxY - y1) / m + x1;\r\n if (x > minX && x < maxX) return true;\r\n return false;\r\n }\r\n\r\n /** Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds. */\r\n aabbIntersectsSkeleton (bounds: SkeletonBounds) {\r\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\r\n }\r\n\r\n /** Returns the first bounding box attachment that contains the point, or null. When doing many checks, it is usually more\r\n * efficient to only call this method if {@link #aabbContainsPoint(float, float)} returns true. */\r\n containsPoint (x: number, y: number): BoundingBoxAttachment {\r\n let polygons = this.polygons;\r\n for (let i = 0, n = polygons.length; i < n; i++)\r\n if (this.containsPointPolygon(polygons[i], x, y)) return this.boundingBoxes[i];\r\n return null;\r\n }\r\n\r\n /** Returns true if the polygon contains the point. */\r\n containsPointPolygon (polygon: ArrayLike, x: number, y: number) {\r\n let vertices = polygon;\r\n let nn = polygon.length;\r\n\r\n let prevIndex = nn - 2;\r\n let inside = false;\r\n for (let ii = 0; ii < nn; ii += 2) {\r\n let vertexY = vertices[ii + 1];\r\n let prevY = vertices[prevIndex + 1];\r\n if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\r\n let vertexX = vertices[ii];\r\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x) inside = !inside;\r\n }\r\n prevIndex = ii;\r\n }\r\n return inside;\r\n }\r\n\r\n /** Returns the first bounding box attachment that contains any part of the line segment, or null. When doing many checks, it\r\n * is usually more efficient to only call this method if {@link #aabbIntersectsSegment(float, float, float, float)} returns\r\n * true. */\r\n intersectsSegment (x1: number, y1: number, x2: number, y2: number) {\r\n let polygons = this.polygons;\r\n for (let i = 0, n = polygons.length; i < n; i++)\r\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2)) return this.boundingBoxes[i];\r\n return null;\r\n }\r\n\r\n /** Returns true if the polygon contains any part of the line segment. */\r\n intersectsSegmentPolygon (polygon: ArrayLike, x1: number, y1: number, x2: number, y2: number) {\r\n let vertices = polygon;\r\n let nn = polygon.length;\r\n\r\n let width12 = x1 - x2, height12 = y1 - y2;\r\n let det1 = x1 * y2 - y1 * x2;\r\n let x3 = vertices[nn - 2], y3 = vertices[nn - 1];\r\n for (let ii = 0; ii < nn; ii += 2) {\r\n let x4 = vertices[ii], y4 = vertices[ii + 1];\r\n let det2 = x3 * y4 - y3 * x4;\r\n let width34 = x3 - x4, height34 = y3 - y4;\r\n let det3 = width12 * height34 - height12 * width34;\r\n let x = (det1 * width34 - width12 * det2) / det3;\r\n if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\r\n let y = (det1 * height34 - height12 * det2) / det3;\r\n if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1))) return true;\r\n }\r\n x3 = x4;\r\n y3 = y4;\r\n }\r\n return false;\r\n }\r\n\r\n /** Returns the polygon for the specified bounding box, or null. */\r\n getPolygon (boundingBox: BoundingBoxAttachment) {\r\n if (boundingBox == null) throw new Error(\"boundingBox cannot be null.\");\r\n let index = this.boundingBoxes.indexOf(boundingBox);\r\n return index == -1 ? null : this.polygons[index];\r\n }\r\n\r\n getWidth () {\r\n return this.maxX - this.minX;\r\n }\r\n\r\n getHeight () {\r\n return this.maxY - this.minY;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n\texport class SkeletonClipping {\r\n\t\tprivate triangulator = new Triangulator();\r\n\t\tprivate clippingPolygon = new Array();\r\n\t\tprivate clipOutput = new Array();\r\n\t\tclippedVertices = new Array();\r\n\t\tclippedTriangles = new Array();\r\n\t\tprivate scratch = new Array();\r\n\r\n\t\tprivate clipAttachment: ClippingAttachment;\r\n\t\tprivate clippingPolygons: Array>;\r\n\r\n\t\tclipStart (slot: Slot, clip: ClippingAttachment): number {\r\n\t\t\tif (this.clipAttachment != null) return 0;\r\n\t\t\tthis.clipAttachment = clip;\r\n\r\n\t\t\tlet n = clip.worldVerticesLength;\r\n\t\t\tlet vertices = Utils.setArraySize(this.clippingPolygon, n);\r\n\t\t\tclip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\r\n\t\t\tlet clippingPolygon = this.clippingPolygon;\r\n\t\t\tSkeletonClipping.makeClockwise(clippingPolygon);\r\n\t\t\tlet clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\r\n\t\t\tfor (let i = 0, n = clippingPolygons.length; i < n; i++) {\r\n\t\t\t\tlet polygon = clippingPolygons[i];\r\n\t\t\t\tSkeletonClipping.makeClockwise(polygon);\r\n\t\t\t\tpolygon.push(polygon[0]);\r\n\t\t\t\tpolygon.push(polygon[1]);\r\n\t\t\t}\r\n\r\n\t\t\treturn clippingPolygons.length;\r\n\t\t}\r\n\r\n\t\tclipEndWithSlot (slot: Slot) {\r\n\t\t\tif (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data) this.clipEnd();\r\n\t\t}\r\n\r\n\t\tclipEnd () {\r\n\t\t\tif (this.clipAttachment == null) return;\r\n\t\t\tthis.clipAttachment = null;\r\n\t\t\tthis.clippingPolygons = null;\r\n\t\t\tthis.clippedVertices.length = 0;\r\n\t\t\tthis.clippedTriangles.length = 0;\r\n\t\t\tthis.clippingPolygon.length = 0;\r\n\t\t}\r\n\r\n\t\tisClipping (): boolean {\r\n\t\t\treturn this.clipAttachment != null;\r\n\t\t}\r\n\r\n\t\tclipTriangles (vertices: ArrayLike, verticesLength: number, triangles: ArrayLike, trianglesLength: number, uvs: ArrayLike,\r\n\t\t\tlight: Color, dark: Color, twoColor: boolean) {\r\n\r\n\t\t\tlet clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\r\n\t\t\tlet clippedTriangles = this.clippedTriangles;\r\n\t\t\tlet polygons = this.clippingPolygons;\r\n\t\t\tlet polygonsCount = this.clippingPolygons.length;\r\n\t\t\tlet vertexSize = twoColor ? 12 : 8;\r\n\r\n\t\t\tlet index = 0;\r\n\t\t\tclippedVertices.length = 0;\r\n\t\t\tclippedTriangles.length = 0;\r\n\t\t\touter:\r\n\t\t\tfor (let i = 0; i < trianglesLength; i += 3) {\r\n\t\t\t\tlet vertexOffset = triangles[i] << 1;\r\n\t\t\t\tlet x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\r\n\t\t\t\tlet u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\r\n\r\n\t\t\t\tvertexOffset = triangles[i + 1] << 1;\r\n\t\t\t\tlet x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\r\n\t\t\t\tlet u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\r\n\r\n\t\t\t\tvertexOffset = triangles[i + 2] << 1;\r\n\t\t\t\tlet x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\r\n\t\t\t\tlet u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\r\n\r\n\t\t\t\tfor (let p = 0; p < polygonsCount; p++) {\r\n\t\t\t\t\tlet s = clippedVertices.length;\r\n\t\t\t\t\tif (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\r\n\t\t\t\t\t\tlet clipOutputLength = clipOutput.length;\r\n\t\t\t\t\t\tif (clipOutputLength == 0) continue;\r\n\t\t\t\t\t\tlet d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\r\n\t\t\t\t\t\tlet d = 1 / (d0 * d2 + d1 * (y1 - y3));\r\n\r\n\t\t\t\t\t\tlet clipOutputCount = clipOutputLength >> 1;\r\n\t\t\t\t\t\tlet clipOutputItems = this.clipOutput;\r\n\t\t\t\t\t\tlet clippedVerticesItems = Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\r\n\t\t\t\t\t\tfor (let ii = 0; ii < clipOutputLength; ii += 2) {\r\n\t\t\t\t\t\t\tlet x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\r\n\t\t\t\t\t\t\tclippedVerticesItems[s] = x;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 1] = y;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 2] = light.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 3] = light.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 4] = light.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 5] = light.a;\r\n\t\t\t\t\t\t\tlet c0 = x - x3, c1 = y - y3;\r\n\t\t\t\t\t\t\tlet a = (d0 * c0 + d1 * c1) * d;\r\n\t\t\t\t\t\t\tlet b = (d4 * c0 + d2 * c1) * d;\r\n\t\t\t\t\t\t\tlet c = 1 - a - b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\r\n\t\t\t\t\t\t\tif (twoColor) {\r\n\t\t\t\t\t\t\t\tclippedVerticesItems[s + 8] = dark.r;\r\n\t\t\t\t\t\t\t\tclippedVerticesItems[s + 9] = dark.g;\r\n\t\t\t\t\t\t\t\tclippedVerticesItems[s + 10] = dark.b;\r\n\t\t\t\t\t\t\t\tclippedVerticesItems[s + 11] = dark.a;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ts += vertexSize;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ts = clippedTriangles.length;\r\n\t\t\t\t\t\tlet clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\r\n\t\t\t\t\t\tclipOutputCount--;\r\n\t\t\t\t\t\tfor (let ii = 1; ii < clipOutputCount; ii++) {\r\n\t\t\t\t\t\t\tclippedTrianglesItems[s] = index;\r\n\t\t\t\t\t\t\tclippedTrianglesItems[s + 1] = (index + ii);\r\n\t\t\t\t\t\t\tclippedTrianglesItems[s + 2] = (index + ii + 1);\r\n\t\t\t\t\t\t\ts += 3;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tindex += clipOutputCount + 1;\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tlet clippedVerticesItems = Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\r\n\t\t\t\t\t\tclippedVerticesItems[s] = x1;\r\n\t\t\t\t\t\tclippedVerticesItems[s + 1] = y1;\r\n\t\t\t\t\t\tclippedVerticesItems[s + 2] = light.r;\r\n\t\t\t\t\t\tclippedVerticesItems[s + 3] = light.g;\r\n\t\t\t\t\t\tclippedVerticesItems[s + 4] = light.b;\r\n\t\t\t\t\t\tclippedVerticesItems[s + 5] = light.a;\r\n\t\t\t\t\t\tif (!twoColor) {\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 6] = u1;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 7] = v1;\r\n\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 8] = x2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 9] = y2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 10] = light.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 11] = light.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 12] = light.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 13] = light.a;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 14] = u2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 15] = v2;\r\n\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 16] = x3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 17] = y3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 18] = light.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 19] = light.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 20] = light.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 21] = light.a;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 22] = u3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 23] = v3;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 6] = u1;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 7] = v1;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 8] = dark.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 9] = dark.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 10] = dark.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 11] = dark.a;\r\n\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 12] = x2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 13] = y2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 14] = light.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 15] = light.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 16] = light.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 17] = light.a;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 18] = u2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 19] = v2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 20] = dark.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 21] = dark.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 22] = dark.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 23] = dark.a;\r\n\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 24] = x3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 25] = y3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 26] = light.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 27] = light.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 28] = light.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 29] = light.a;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 30] = u3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 31] = v3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 32] = dark.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 33] = dark.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 34] = dark.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 35] = dark.a;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ts = clippedTriangles.length;\r\n\t\t\t\t\t\tlet clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3);\r\n\t\t\t\t\t\tclippedTrianglesItems[s] = index;\r\n\t\t\t\t\t\tclippedTrianglesItems[s + 1] = (index + 1);\r\n\t\t\t\t\t\tclippedTrianglesItems[s + 2] = (index + 2);\r\n\t\t\t\t\t\tindex += 3;\r\n\t\t\t\t\t\tcontinue outer;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/** Clips the input triangle against the convex, clockwise clipping area. If the triangle lies entirely within the clipping\r\n\t\t * area, false is returned. The clipping area must duplicate the first vertex at the end of the vertices list. */\r\n\t\tclip (x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, clippingArea: Array, output: Array) {\r\n\t\t\tlet originalOutput = output;\r\n\t\t\tlet clipped = false;\r\n\r\n\t\t\t// Avoid copy at the end.\r\n\t\t\tlet input: Array = null;\r\n\t\t\tif (clippingArea.length % 4 >= 2) {\r\n\t\t\t\tinput = output;\r\n\t\t\t\toutput = this.scratch;\r\n\t\t\t} else\r\n\t\t\t\tinput = this.scratch;\r\n\r\n\t\t\tinput.length = 0;\r\n\t\t\tinput.push(x1);\r\n\t\t\tinput.push(y1);\r\n\t\t\tinput.push(x2);\r\n\t\t\tinput.push(y2);\r\n\t\t\tinput.push(x3);\r\n\t\t\tinput.push(y3);\r\n\t\t\tinput.push(x1);\r\n\t\t\tinput.push(y1);\r\n\t\t\toutput.length = 0;\r\n\r\n\t\t\tlet clippingVertices = clippingArea;\r\n\t\t\tlet clippingVerticesLast = clippingArea.length - 4;\r\n\t\t\tfor (let i = 0;; i += 2) {\r\n\t\t\t\tlet edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\r\n\t\t\t\tlet edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\r\n\t\t\t\tlet deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\r\n\r\n\t\t\t\tlet inputVertices = input;\r\n\t\t\t\tlet inputVerticesLength = input.length - 2, outputStart = output.length;\r\n\t\t\t\tfor (let ii = 0; ii < inputVerticesLength; ii += 2) {\r\n\t\t\t\t\tlet inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\r\n\t\t\t\t\tlet inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\r\n\t\t\t\t\tlet side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\r\n\t\t\t\t\tif (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\r\n\t\t\t\t\t\tif (side2) { // v1 inside, v2 inside\r\n\t\t\t\t\t\t\toutput.push(inputX2);\r\n\t\t\t\t\t\t\toutput.push(inputY2);\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// v1 inside, v2 outside\r\n\t\t\t\t\t\tlet c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n\t\t\t\t\t\tlet ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / (c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY));\r\n\t\t\t\t\t\toutput.push(edgeX + (edgeX2 - edgeX) * ua);\r\n\t\t\t\t\t\toutput.push(edgeY + (edgeY2 - edgeY) * ua);\r\n\t\t\t\t\t} else if (side2) { // v1 outside, v2 inside\r\n\t\t\t\t\t\tlet c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n\t\t\t\t\t\tlet ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / (c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY));\r\n\t\t\t\t\t\toutput.push(edgeX + (edgeX2 - edgeX) * ua);\r\n\t\t\t\t\t\toutput.push(edgeY + (edgeY2 - edgeY) * ua);\r\n\t\t\t\t\t\toutput.push(inputX2);\r\n\t\t\t\t\t\toutput.push(inputY2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tclipped = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (outputStart == output.length) { // All edges outside.\r\n\t\t\t\t\toriginalOutput.length = 0;\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\toutput.push(output[0]);\r\n\t\t\t\toutput.push(output[1]);\r\n\r\n\t\t\t\tif (i == clippingVerticesLast) break;\r\n\t\t\t\tlet temp = output;\r\n\t\t\t\toutput = input;\r\n\t\t\t\toutput.length = 0;\r\n\t\t\t\tinput = temp;\r\n\t\t\t}\r\n\r\n\t\t\tif (originalOutput != output) {\r\n\t\t\t\toriginalOutput.length = 0;\r\n\t\t\t\tfor (let i = 0, n = output.length - 2; i < n; i++)\r\n\t\t\t\t\toriginalOutput[i] = output[i];\r\n\t\t\t} else\r\n\t\t\t\toriginalOutput.length = originalOutput.length - 2;\r\n\r\n\t\t\treturn clipped;\r\n\t\t}\r\n\r\n\t\tpublic static makeClockwise (polygon: ArrayLike) {\r\n\t\t\tlet vertices = polygon;\r\n\t\t\tlet verticeslength = polygon.length;\r\n\r\n\t\t\tlet area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\r\n\t\t\tfor (let i = 0, n = verticeslength - 3; i < n; i += 2) {\r\n\t\t\t\tp1x = vertices[i];\r\n\t\t\t\tp1y = vertices[i + 1];\r\n\t\t\t\tp2x = vertices[i + 2];\r\n\t\t\t\tp2y = vertices[i + 3];\r\n\t\t\t\tarea += p1x * p2y - p2x * p1y;\r\n\t\t\t}\r\n\t\t\tif (area < 0) return;\r\n\r\n\t\t\tfor (let i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\r\n\t\t\t\tlet x = vertices[i], y = vertices[i + 1];\r\n\t\t\t\tlet other = lastX - i;\r\n\t\t\t\tvertices[i] = vertices[other];\r\n\t\t\t\tvertices[i + 1] = vertices[other + 1];\r\n\t\t\t\tvertices[other] = x;\r\n\t\t\t\tvertices[other + 1] = y;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class SkeletonData {\r\n name: string;\r\n bones = new Array(); // Ordered parents first.\r\n slots = new Array(); // Setup pose draw order.\r\n skins = new Array();\r\n defaultSkin: Skin;\r\n events = new Array();\r\n animations = new Array();\r\n ikConstraints = new Array();\r\n transformConstraints = new Array();\r\n pathConstraints = new Array();\r\n x: number; y: number; width: number; height: number;\r\n version: string; hash: string;\r\n\r\n // Nonessential\r\n fps = 0;\r\n imagesPath: string;\r\n audioPath: string;\r\n\r\n findBone (boneName: string) {\r\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (bone.name == boneName) return bone;\r\n }\r\n return null;\r\n }\r\n\r\n findBoneIndex (boneName: string) {\r\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].name == boneName) return i;\r\n return -1;\r\n }\r\n\r\n findSlot (slotName: string) {\r\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (slot.name == slotName) return slot;\r\n }\r\n return null;\r\n }\r\n\r\n findSlotIndex (slotName: string) {\r\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].name == slotName) return i;\r\n return -1;\r\n }\r\n\r\n findSkin (skinName: string) {\r\n if (skinName == null) throw new Error(\"skinName cannot be null.\");\r\n let skins = this.skins;\r\n for (let i = 0, n = skins.length; i < n; i++) {\r\n let skin = skins[i];\r\n if (skin.name == skinName) return skin;\r\n }\r\n return null;\r\n }\r\n\r\n findEvent (eventDataName: string) {\r\n if (eventDataName == null) throw new Error(\"eventDataName cannot be null.\");\r\n let events = this.events;\r\n for (let i = 0, n = events.length; i < n; i++) {\r\n let event = events[i];\r\n if (event.name == eventDataName) return event;\r\n }\r\n return null;\r\n }\r\n\r\n findAnimation (animationName: string) {\r\n if (animationName == null) throw new Error(\"animationName cannot be null.\");\r\n let animations = this.animations;\r\n for (let i = 0, n = animations.length; i < n; i++) {\r\n let animation = animations[i];\r\n if (animation.name == animationName) return animation;\r\n }\r\n return null;\r\n }\r\n\r\n findIkConstraint (constraintName: string) {\r\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\r\n let ikConstraints = this.ikConstraints;\r\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\r\n let constraint = ikConstraints[i];\r\n if (constraint.name == constraintName) return constraint;\r\n }\r\n return null;\r\n }\r\n\r\n findTransformConstraint (constraintName: string) {\r\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\r\n let transformConstraints = this.transformConstraints;\r\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\r\n let constraint = transformConstraints[i];\r\n if (constraint.name == constraintName) return constraint;\r\n }\r\n return null;\r\n }\r\n\r\n findPathConstraint (constraintName: string) {\r\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\r\n let pathConstraints = this.pathConstraints;\r\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\r\n let constraint = pathConstraints[i];\r\n if (constraint.name == constraintName) return constraint;\r\n }\r\n return null;\r\n }\r\n\r\n findPathConstraintIndex (pathConstraintName: string) {\r\n if (pathConstraintName == null) throw new Error(\"pathConstraintName cannot be null.\");\r\n let pathConstraints = this.pathConstraints;\r\n for (let i = 0, n = pathConstraints.length; i < n; i++)\r\n if (pathConstraints[i].name == pathConstraintName) return i;\r\n return -1;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n /**\r\n * pixi-spine gives option to not fail at certain parsing errors\r\n * spine-ts fails here\r\n */\r\n export let FAIL_ON_NON_EXISTING_SKIN = false;\r\n\r\n export class SkeletonJson {\r\n attachmentLoader: AttachmentLoader;\r\n scale = 1;\r\n private linkedMeshes = new Array();\r\n\r\n constructor (attachmentLoader: AttachmentLoader) {\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n\r\n readSkeletonData (json: string | any): SkeletonData {\r\n let scale = this.scale;\r\n let skeletonData = new SkeletonData();\r\n let root = typeof(json) === \"string\" ? JSON.parse(json) : json;\r\n\r\n // Skeleton\r\n let skeletonMap = root.skeleton;\r\n if (skeletonMap != null) {\r\n skeletonData.hash = skeletonMap.hash;\r\n skeletonData.version = skeletonMap.spine;\r\n if (skeletonData.version.substr(0, 3) !== '3.8') {\r\n let error = `PixiJS Spine plugin supports only format for Spine 3.8. Your model has version ${skeletonMap.spine}. Please look in pixi-spine repository README for another branch.`;\r\n console.error(error);\r\n }\r\n if (skeletonData.version === '3.8.75')\r\n {\r\n let error = `Unsupported skeleton data, 3.8.75 is deprecated, please export with a newer version of Spine.`;\r\n console.error(error);\r\n }\r\n skeletonData.x = skeletonMap.x;\r\n skeletonData.y = skeletonMap.y;\r\n skeletonData.width = skeletonMap.width;\r\n skeletonData.height = skeletonMap.height;\r\n skeletonData.fps = skeletonMap.fps;\r\n skeletonData.imagesPath = skeletonMap.images;\r\n }\r\n\r\n // Bones\r\n if (root.bones) {\r\n for (let i = 0; i < root.bones.length; i++) {\r\n let boneMap = root.bones[i];\r\n\r\n let parent: BoneData = null;\r\n let parentName: string = this.getValue(boneMap, \"parent\", null);\r\n if (parentName != null) {\r\n parent = skeletonData.findBone(parentName);\r\n if (parent == null) throw new Error(\"Parent bone not found: \" + parentName);\r\n }\r\n let data = new BoneData(skeletonData.bones.length, boneMap.name, parent);\r\n data.length = this.getValue(boneMap, \"length\", 0) * scale;\r\n data.x = this.getValue(boneMap, \"x\", 0) * scale;\r\n data.y = this.getValue(boneMap, \"y\", 0) * scale;\r\n data.rotation = this.getValue(boneMap, \"rotation\", 0);\r\n data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\r\n data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\r\n data.shearX = this.getValue(boneMap, \"shearX\", 0);\r\n data.shearY = this.getValue(boneMap, \"shearY\", 0);\r\n data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\r\n data.skinRequired = this.getValue(boneMap, \"skin\", false);\r\n\r\n skeletonData.bones.push(data);\r\n }\r\n }\r\n\r\n // Slots.\r\n if (root.slots) {\r\n for (let i = 0; i < root.slots.length; i++) {\r\n let slotMap = root.slots[i];\r\n let slotName: string = slotMap.name;\r\n let boneName: string = slotMap.bone;\r\n let boneData = skeletonData.findBone(boneName);\r\n if (boneData == null) throw new Error(\"Slot bone not found: \" + boneName);\r\n let data = new SlotData(skeletonData.slots.length, slotName, boneData);\r\n\r\n let color: string = this.getValue(slotMap, \"color\", null);\r\n if (color != null) data.color.setFromString(color);\r\n\r\n let dark: string = this.getValue(slotMap, \"dark\", null);\r\n if (dark != null) {\r\n data.darkColor = new Color(1, 1, 1, 1);\r\n data.darkColor.setFromString(dark);\r\n }\r\n\r\n data.attachmentName = this.getValue(slotMap, \"attachment\", null);\r\n data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\r\n skeletonData.slots.push(data);\r\n }\r\n }\r\n\r\n // IK constraints\r\n if (root.ik) {\r\n for (let i = 0; i < root.ik.length; i++) {\r\n let constraintMap = root.ik[i];\r\n let data = new IkConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n\r\n for (let j = 0; j < constraintMap.bones.length; j++) {\r\n let boneName = constraintMap.bones[j];\r\n let bone = skeletonData.findBone(boneName);\r\n if (bone == null) throw new Error(\"IK bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n\r\n let targetName: string = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null) throw new Error(\"IK target bone not found: \" + targetName);\r\n\r\n data.mix = this.getValue(constraintMap, \"mix\", 1);\r\n data.softness = this.getValue(constraintMap, \"softness\", 0) * scale;\r\n data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\r\n data.compress = this.getValue(constraintMap, \"compress\", false);\r\n data.stretch = this.getValue(constraintMap, \"stretch\", false);\r\n data.uniform = this.getValue(constraintMap, \"uniform\", false);\r\n\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n }\r\n\r\n // Transform constraints.\r\n if (root.transform) {\r\n for (let i = 0; i < root.transform.length; i++) {\r\n let constraintMap = root.transform[i];\r\n let data = new TransformConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n\r\n for (let j = 0; j < constraintMap.bones.length; j++) {\r\n let boneName = constraintMap.bones[j];\r\n let bone = skeletonData.findBone(boneName);\r\n if (bone == null) throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n\r\n let targetName: string = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null) throw new Error(\"Transform constraint target bone not found: \" + targetName);\r\n\r\n data.local = this.getValue(constraintMap, \"local\", false);\r\n data.relative = this.getValue(constraintMap, \"relative\", false);\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\r\n data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\r\n data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\r\n data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\r\n data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\r\n\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\r\n data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\r\n\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n }\r\n\r\n // Path constraints.\r\n if (root.path) {\r\n for (let i = 0; i < root.path.length; i++) {\r\n let constraintMap = root.path[i];\r\n let data = new PathConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n\r\n for (let j = 0; j < constraintMap.bones.length; j++) {\r\n let boneName = constraintMap.bones[j];\r\n let bone = skeletonData.findBone(boneName);\r\n if (bone == null) throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n\r\n let targetName: string = constraintMap.target;\r\n data.target = skeletonData.findSlot(targetName);\r\n if (data.target == null) throw new Error(\"Path target slot not found: \" + targetName);\r\n\r\n data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\r\n data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\r\n data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.position = this.getValue(constraintMap, \"position\", 0);\r\n if (data.positionMode == PositionMode.Fixed) data.position *= scale;\r\n data.spacing = this.getValue(constraintMap, \"spacing\", 0);\r\n if (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) data.spacing *= scale;\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n }\r\n\r\n // Skins.\r\n if (root.skins) {\r\n for (let i = 0; i < root.skins.length; i++) {\r\n let skinMap = root.skins[i]\r\n let skin = new Skin(skinMap.name);\r\n\r\n if (skinMap.bones) {\r\n for (let ii = 0; ii < skinMap.bones.length; ii++) {\r\n let bone = skeletonData.findBone(skinMap.bones[ii]);\r\n if (bone == null) throw new Error(\"Skin bone not found: \" + skinMap.bones[i]);\r\n skin.bones.push(bone);\r\n }\r\n }\r\n\r\n if (skinMap.ik) {\r\n for (let ii = 0; ii < skinMap.ik.length; ii++) {\r\n let constraint = skeletonData.findIkConstraint(skinMap.ik[ii]);\r\n if (constraint == null) throw new Error(\"Skin IK constraint not found: \" + skinMap.ik[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n\r\n if (skinMap.transform) {\r\n for (let ii = 0; ii < skinMap.transform.length; ii++) {\r\n let constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]);\r\n if (constraint == null) throw new Error(\"Skin transform constraint not found: \" + skinMap.transform[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n\r\n if (skinMap.path) {\r\n for (let ii = 0; ii < skinMap.path.length; ii++) {\r\n let constraint = skeletonData.findPathConstraint(skinMap.path[ii]);\r\n if (constraint == null) throw new Error(\"Skin path constraint not found: \" + skinMap.path[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n\r\n for (let slotName in skinMap.attachments) {\r\n let slot = skeletonData.findSlot(slotName);\r\n if (slot == null) throw new Error(\"Slot not found: \" + slotName);\r\n let slotMap = skinMap.attachments[slotName];\r\n for (let entryName in slotMap) {\r\n let attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\r\n if (attachment != null) skin.setAttachment(slot.index, entryName, attachment);\r\n }\r\n }\r\n skeletonData.skins.push(skin);\r\n if (skin.name == \"default\") skeletonData.defaultSkin = skin;\r\n }\r\n }\r\n\r\n // Linked meshes.\r\n for (let i = 0, n = this.linkedMeshes.length; i < n; i++) {\r\n let linkedMesh = this.linkedMeshes[i];\r\n let skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null) throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent == null) throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh( parent);\r\n // linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n\r\n // Events.\r\n if (root.events) {\r\n for (let eventName in root.events) {\r\n let eventMap = root.events[eventName];\r\n let data = new EventData(eventName);\r\n data.intValue = this.getValue(eventMap, \"int\", 0);\r\n data.floatValue = this.getValue(eventMap, \"float\", 0);\r\n data.stringValue = this.getValue(eventMap, \"string\", \"\");\r\n data.audioPath = this.getValue(eventMap, \"audio\", null);\r\n if (data.audioPath != null) {\r\n data.volume = this.getValue(eventMap, \"volume\", 1);\r\n data.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n }\r\n\r\n // Animations.\r\n if (root.animations) {\r\n for (let animationName in root.animations) {\r\n let animationMap = root.animations[animationName];\r\n this.readAnimation(animationMap, animationName, skeletonData);\r\n }\r\n }\r\n\r\n return skeletonData;\r\n }\r\n\r\n readAttachment (map: any, skin: Skin, slotIndex: number, name: string, skeletonData: SkeletonData): Attachment {\r\n let scale = this.scale;\r\n name = this.getValue(map, \"name\", name);\r\n\r\n let type = this.getValue(map, \"type\", \"region\");\r\n\r\n switch (type) {\r\n case \"region\": {\r\n let path = this.getValue(map, \"path\", name);\r\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null) return null;\r\n region.path = path;\r\n region.x = this.getValue(map, \"x\", 0) * scale;\r\n region.y = this.getValue(map, \"y\", 0) * scale;\r\n region.scaleX = this.getValue(map, \"scaleX\", 1);\r\n region.scaleY = this.getValue(map, \"scaleY\", 1);\r\n region.rotation = this.getValue(map, \"rotation\", 0);\r\n region.width = map.width * scale;\r\n region.height = map.height * scale;\r\n\r\n let color: string = this.getValue(map, \"color\", null);\r\n if (color != null) region.color.setFromString(color);\r\n\r\n // region.updateOffset();\r\n return region;\r\n }\r\n case \"boundingbox\": {\r\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null) return null;\r\n this.readVertices(map, box, map.vertexCount << 1);\r\n let color: string = this.getValue(map, \"color\", null);\r\n if (color != null) box.color.setFromString(color);\r\n return box;\r\n }\r\n case \"mesh\":\r\n case \"linkedmesh\": {\r\n let path = this.getValue(map, \"path\", name);\r\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null) return null;\r\n mesh.path = path;\r\n\r\n let color = this.getValue(map, \"color\", null);\r\n if (color != null) mesh.color.setFromString(color);\r\n\r\n mesh.width = this.getValue(map, \"width\", 0) * scale;\r\n mesh.height = this.getValue(map, \"height\", 0) * scale;\r\n\r\n let parent: string = this.getValue(map, \"parent\", null);\r\n if (parent != null) {\r\n this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent, this.getValue(map, \"deform\", true)));\r\n return mesh;\r\n }\r\n\r\n let uvs: Array = map.uvs;\r\n this.readVertices(map, mesh, uvs.length);\r\n mesh.triangles = map.triangles;\r\n mesh.regionUVs = new Float32Array(uvs);\r\n // mesh.updateUVs();\r\n\r\n mesh.edges = this.getValue(map, \"edges\", null);\r\n mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\r\n return mesh;\r\n }\r\n case \"path\": {\r\n let path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null) return null;\r\n path.closed = this.getValue(map, \"closed\", false);\r\n path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\r\n\r\n let vertexCount = map.vertexCount;\r\n this.readVertices(map, path, vertexCount << 1);\r\n\r\n let lengths: Array = Utils.newArray(vertexCount / 3, 0);\r\n for (let i = 0; i < map.lengths.length; i++)\r\n lengths[i] = map.lengths[i] * scale;\r\n path.lengths = lengths;\r\n\r\n let color: string = this.getValue(map, \"color\", null);\r\n if (color != null) path.color.setFromString(color);\r\n return path;\r\n }\r\n case \"point\": {\r\n let point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null) return null;\r\n point.x = this.getValue(map, \"x\", 0) * scale;\r\n point.y = this.getValue(map, \"y\", 0) * scale;\r\n point.rotation = this.getValue(map, \"rotation\", 0);\r\n\r\n let color = this.getValue(map, \"color\", null);\r\n if (color != null) point.color.setFromString(color);\r\n return point;\r\n }\r\n case \"clipping\": {\r\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null) return null;\r\n\r\n let end = this.getValue(map, \"end\", null);\r\n if (end != null) {\r\n let slot = skeletonData.findSlot(end);\r\n if (slot == null) throw new Error(\"Clipping end slot not found: \" + end);\r\n clip.endSlot = slot;\r\n }\r\n\r\n let vertexCount = map.vertexCount;\r\n this.readVertices(map, clip, vertexCount << 1);\r\n\r\n let color: string = this.getValue(map, \"color\", null);\r\n if (color != null) clip.color.setFromString(color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n readVertices (map: any, attachment: VertexAttachment, verticesLength: number) {\r\n let scale = this.scale;\r\n attachment.worldVerticesLength = verticesLength;\r\n let vertices: Array = map.vertices;\r\n if (verticesLength == vertices.length) {\r\n let scaledVertices = Utils.toFloatArray(vertices);\r\n if (scale != 1) {\r\n for (let i = 0, n = vertices.length; i < n; i++)\r\n scaledVertices[i] *= scale;\r\n }\r\n attachment.vertices = scaledVertices;\r\n return;\r\n }\r\n let weights = new Array();\r\n let bones = new Array();\r\n for (let i = 0, n = vertices.length; i < n;) {\r\n let boneCount = vertices[i++];\r\n bones.push(boneCount);\r\n for (let nn = i + boneCount * 4; i < nn; i += 4) {\r\n bones.push(vertices[i]);\r\n weights.push(vertices[i + 1] * scale);\r\n weights.push(vertices[i + 2] * scale);\r\n weights.push(vertices[i + 3]);\r\n }\r\n }\r\n attachment.bones = bones;\r\n attachment.vertices = Utils.toFloatArray(weights);\r\n }\r\n\r\n readAnimation (map: any, name: string, skeletonData: SkeletonData) {\r\n let scale = this.scale;\r\n let timelines = new Array();\r\n let duration = 0;\r\n\r\n // Slot timelines.\r\n if (map.slots) {\r\n for (let slotName in map.slots) {\r\n let slotMap = map.slots[slotName];\r\n let slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1) throw new Error(\"Slot not found: \" + slotName);\r\n for (let timelineName in slotMap) {\r\n let timelineMap = slotMap[timelineName];\r\n if (timelineName == \"attachment\") {\r\n let timeline = new AttachmentTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n\r\n let frameIndex = 0;\r\n for (let i = 0; i < timelineMap.length; i++) {\r\n let valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex++, this.getValue(valueMap, \"time\", 0), valueMap.name);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n } else if (timelineName == \"color\") {\r\n let timeline = new ColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n\r\n let frameIndex = 0;\r\n for (let i = 0; i < timelineMap.length; i++) {\r\n let valueMap = timelineMap[i];\r\n let color = new Color();\r\n color.setFromString(valueMap.color || \"ffffffff\");\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), color.r, color.g, color.b, color.a);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * ColorTimeline.ENTRIES]);\r\n\r\n } else if (timelineName == \"twoColor\") {\r\n let timeline = new TwoColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n\r\n let frameIndex = 0;\r\n for (let i = 0; i < timelineMap.length; i++) {\r\n let valueMap = timelineMap[i];\r\n let light = new Color();\r\n let dark = new Color();\r\n light.setFromString(valueMap.light);\r\n dark.setFromString(valueMap.dark);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * TwoColorTimeline.ENTRIES]);\r\n\r\n } else\r\n throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\r\n }\r\n }\r\n }\r\n\r\n // Bone timelines.\r\n if (map.bones) {\r\n for (let boneName in map.bones) {\r\n let boneMap = map.bones[boneName];\r\n let boneIndex = skeletonData.findBoneIndex(boneName);\r\n if (boneIndex == -1) throw new Error(\"Bone not found: \" + boneName);\r\n for (let timelineName in boneMap) {\r\n let timelineMap = boneMap[timelineName];\r\n if (timelineName === \"rotate\") {\r\n let timeline = new RotateTimeline(timelineMap.length);\r\n timeline.boneIndex = boneIndex;\r\n\r\n let frameIndex = 0;\r\n for (let i = 0; i < timelineMap.length; i++) {\r\n let valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"angle\", 0));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * RotateTimeline.ENTRIES]);\r\n\r\n } else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\r\n let timeline: TranslateTimeline = null;\r\n let timelineScale = 1, defaultValue = 0;\r\n if (timelineName === \"scale\") {\r\n timeline = new ScaleTimeline(timelineMap.length);\r\n defaultValue = 1;\r\n } else if (timelineName === \"shear\")\r\n timeline = new ShearTimeline(timelineMap.length);\r\n else {\r\n timeline = new TranslateTimeline(timelineMap.length);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n\r\n let frameIndex = 0;\r\n for (let i = 0; i < timelineMap.length; i++) {\r\n let valueMap = timelineMap[i];\r\n let x = this.getValue(valueMap, \"x\", defaultValue), y = this.getValue(valueMap, \"y\", defaultValue);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), x * timelineScale, y * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * TranslateTimeline.ENTRIES]);\r\n\r\n } else\r\n throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\r\n }\r\n }\r\n }\r\n\r\n // IK constraint timelines.\r\n if (map.ik) {\r\n for (let constraintName in map.ik) {\r\n let constraintMap = map.ik[constraintName];\r\n let constraint = skeletonData.findIkConstraint(constraintName);\r\n let timeline = new IkConstraintTimeline(constraintMap.length);\r\n timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\r\n let frameIndex = 0;\r\n for (let i = 0; i < constraintMap.length; i++) {\r\n let valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"mix\", 1), this.getValue(valueMap, \"softness\", 0) * scale,\r\n this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1, this.getValue(valueMap, \"compress\", false), this.getValue(valueMap, \"stretch\", false));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * IkConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n\r\n // Transform constraint timelines.\r\n if (map.transform) {\r\n for (let constraintName in map.transform) {\r\n let constraintMap = map.transform[constraintName];\r\n let constraint = skeletonData.findTransformConstraint(constraintName);\r\n let timeline = new TransformConstraintTimeline(constraintMap.length);\r\n timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\r\n let frameIndex = 0;\r\n for (let i = 0; i < constraintMap.length; i++) {\r\n let valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1),\r\n this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration,\r\n timeline.frames[(timeline.getFrameCount() - 1) * TransformConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n\r\n // Path constraint timelines.\r\n if (map.path) {\r\n for (let constraintName in map.path) {\r\n let constraintMap = map.path[constraintName];\r\n let index = skeletonData.findPathConstraintIndex(constraintName);\r\n if (index == -1) throw new Error(\"Path constraint not found: \" + constraintName);\r\n let data = skeletonData.pathConstraints[index];\r\n for (let timelineName in constraintMap) {\r\n let timelineMap = constraintMap[timelineName];\r\n if (timelineName === \"position\" || timelineName === \"spacing\") {\r\n let timeline: PathConstraintPositionTimeline = null;\r\n let timelineScale = 1;\r\n if (timelineName === \"spacing\") {\r\n timeline = new PathConstraintSpacingTimeline(timelineMap.length);\r\n if (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) timelineScale = scale;\r\n } else {\r\n timeline = new PathConstraintPositionTimeline(timelineMap.length);\r\n if (data.positionMode == PositionMode.Fixed) timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n let frameIndex = 0;\r\n for (let i = 0; i < timelineMap.length; i++) {\r\n let valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, timelineName, 0) * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration,\r\n timeline.frames[(timeline.getFrameCount() - 1) * PathConstraintPositionTimeline.ENTRIES]);\r\n } else if (timelineName === \"mix\") {\r\n let timeline = new PathConstraintMixTimeline(timelineMap.length);\r\n timeline.pathConstraintIndex = index;\r\n let frameIndex = 0;\r\n for (let i = 0; i < timelineMap.length; i++) {\r\n let valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1),\r\n this.getValue(valueMap, \"translateMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration,\r\n timeline.frames[(timeline.getFrameCount() - 1) * PathConstraintMixTimeline.ENTRIES]);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Deform timelines.\r\n if (map.deform) {\r\n for (let deformName in map.deform) {\r\n let deformMap = map.deform[deformName];\r\n let skin = skeletonData.findSkin(deformName);\r\n if (skin == null) {\r\n if (FAIL_ON_NON_EXISTING_SKIN) {\r\n throw new Error(\"Skin not found: \" + deformName);\r\n } else {\r\n continue;\r\n }\r\n }\r\n for (let slotName in deformMap) {\r\n let slotMap = deformMap[slotName];\r\n let slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1) throw new Error(\"Slot not found: \" + slotMap.name);\r\n for (let timelineName in slotMap) {\r\n let timelineMap = slotMap[timelineName];\r\n let attachment = skin.getAttachment(slotIndex, timelineName);\r\n if (attachment == null) throw new Error(\"Deform attachment not found: \" + timelineMap.name);\r\n let weighted = attachment.bones != null;\r\n let vertices = attachment.vertices;\r\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n\r\n let timeline = new DeformTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n\r\n let frameIndex = 0;\r\n for (let j = 0; j < timelineMap.length; j++) {\r\n let valueMap = timelineMap[j];\r\n let deform: ArrayLike;\r\n let verticesValue: Array = this.getValue(valueMap, \"vertices\", null);\r\n if (verticesValue == null)\r\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = Utils.newFloatArray(deformLength);\r\n let start = this.getValue(valueMap, \"offset\", 0);\r\n Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\r\n if (scale != 1) {\r\n for (let i = start, n = i + verticesValue.length; i < n; i++)\r\n deform[i] *= scale;\r\n }\r\n if (!weighted) {\r\n for (let i = 0; i < deformLength; i++)\r\n deform[i] += vertices[i];\r\n }\r\n }\r\n\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), deform);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Draw order timeline.\r\n let drawOrderNode = map.drawOrder;\r\n if (drawOrderNode == null) drawOrderNode = map.draworder;\r\n if (drawOrderNode != null) {\r\n let timeline = new DrawOrderTimeline(drawOrderNode.length);\r\n let slotCount = skeletonData.slots.length;\r\n let frameIndex = 0;\r\n for (let j = 0; j < drawOrderNode.length; j++) {\r\n let drawOrderMap = drawOrderNode[j];\r\n let drawOrder: Array = null;\r\n let offsets = this.getValue(drawOrderMap, \"offsets\", null);\r\n if (offsets != null) {\r\n drawOrder = Utils.newArray(slotCount, -1);\r\n let unchanged = Utils.newArray(slotCount - offsets.length, 0);\r\n let originalIndex = 0, unchangedIndex = 0;\r\n for (let i = 0; i < offsets.length; i++) {\r\n let offsetMap = offsets[i];\r\n let slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\r\n if (slotIndex == -1) throw new Error(\"Slot not found: \" + offsetMap.slot);\r\n // Collect unchanged items.\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n // Set changed items.\r\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\r\n }\r\n // Collect remaining unchanged items.\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n // Fill in unchanged items.\r\n for (let i = slotCount - 1; i >= 0; i--)\r\n if (drawOrder[i] == -1) drawOrder[i] = unchanged[--unchangedIndex];\r\n }\r\n timeline.setFrame(frameIndex++, this.getValue(drawOrderMap, \"time\", 0), drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n\r\n // Event timeline.\r\n if (map.events) {\r\n let timeline = new EventTimeline(map.events.length);\r\n let frameIndex = 0;\r\n for (let i = 0; i < map.events.length; i++) {\r\n let eventMap = map.events[i];\r\n let eventData = skeletonData.findEvent(eventMap.name);\r\n if (eventData == null) throw new Error(\"Event not found: \" + eventMap.name);\r\n let event = new Event(Utils.toSinglePrecision(this.getValue(eventMap, \"time\", 0)), eventData);\r\n event.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\r\n event.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\r\n event.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\r\n if (event.data.audioPath != null) {\r\n event.volume = this.getValue(eventMap, \"volume\", 1);\r\n event.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n timeline.setFrame(frameIndex++, event);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n\r\n if (isNaN(duration)) {\r\n throw new Error(\"Error while parsing animation, duration is NaN\");\r\n }\r\n\r\n skeletonData.animations.push(new Animation(name, timelines, duration));\r\n }\r\n\r\n readCurve (map: any, timeline: CurveTimeline, frameIndex: number) {\r\n if (!map.hasOwnProperty(\"curve\")) return;\r\n if (map.curve === \"stepped\")\r\n timeline.setStepped(frameIndex);\r\n else {\r\n let curve: number = map.curve;\r\n timeline.setCurve(frameIndex, curve, this.getValue(map, \"c2\", 0), this.getValue(map, \"c3\", 1), this.getValue(map, \"c4\", 1));\r\n }\r\n }\r\n\r\n getValue (map: any, prop: string, defaultValue: any) {\r\n return map[prop] !== undefined ? map[prop] : defaultValue;\r\n }\r\n\r\n static blendModeFromString (str: string) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\") return BlendMode.Normal;\r\n if (str == \"additive\") return BlendMode.Additive;\r\n if (str == \"multiply\") return BlendMode.Multiply;\r\n if (str == \"screen\") return BlendMode.Screen;\r\n throw new Error(`Unknown blend mode: ${str}`);\r\n }\r\n\r\n static positionModeFromString (str: string) {\r\n str = str.toLowerCase();\r\n if (str == \"fixed\") return PositionMode.Fixed;\r\n if (str == \"percent\") return PositionMode.Percent;\r\n throw new Error(`Unknown position mode: ${str}`);\r\n }\r\n\r\n static spacingModeFromString (str: string) {\r\n str = str.toLowerCase();\r\n if (str == \"length\") return SpacingMode.Length;\r\n if (str == \"fixed\") return SpacingMode.Fixed;\r\n if (str == \"percent\") return SpacingMode.Percent;\r\n throw new Error(`Unknown position mode: ${str}`);\r\n }\r\n\r\n static rotateModeFromString (str: string) {\r\n str = str.toLowerCase();\r\n if (str == \"tangent\") return RotateMode.Tangent;\r\n if (str == \"chain\") return RotateMode.Chain;\r\n if (str == \"chainscale\") return RotateMode.ChainScale;\r\n throw new Error(`Unknown rotate mode: ${str}`);\r\n }\r\n\r\n static transformModeFromString(str: string) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\") return TransformMode.Normal;\r\n if (str == \"onlytranslation\") return TransformMode.OnlyTranslation;\r\n if (str == \"norotationorreflection\") return TransformMode.NoRotationOrReflection;\r\n if (str == \"noscale\") return TransformMode.NoScale;\r\n if (str == \"noscaleorreflection\") return TransformMode.NoScaleOrReflection;\r\n throw new Error(`Unknown transform mode: ${str}`);\r\n }\r\n }\r\n\r\n class LinkedMesh {\r\n parent: string; skin: string;\r\n slotIndex: number;\r\n mesh: MeshAttachment;\r\n inheritDeform: boolean;\r\n\r\n constructor (mesh: MeshAttachment, skin: string, slotIndex: number, parent: string, inheritDeform: boolean) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class SkinEntry {\r\n constructor(public slotIndex: number, public name: string, public attachment: Attachment) { }\r\n }\r\n\r\n export class Skin {\r\n name: string;\r\n attachments = new Array>();\r\n bones = Array();\r\n constraints = new Array();\r\n\r\n constructor (name: string) {\r\n if (name == null) throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n\r\n setAttachment (slotIndex: number, name: string, attachment: Attachment) {\r\n if (attachment == null) throw new Error(\"attachment cannot be null.\");\r\n let attachments = this.attachments;\r\n if (slotIndex >= attachments.length) attachments.length = slotIndex + 1;\r\n if (!attachments[slotIndex]) attachments[slotIndex] = { };\r\n attachments[slotIndex][name] = attachment;\r\n }\r\n\r\n addSkin (skin: Skin) {\r\n for(let i = 0; i < skin.bones.length; i++) {\r\n let bone = skin.bones[i];\r\n let contained = false;\r\n for (let j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained) this.bones.push(bone);\r\n }\r\n\r\n for(let i = 0; i < skin.constraints.length; i++) {\r\n let constraint = skin.constraints[i];\r\n let contained = false;\r\n for (let j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained) this.constraints.push(constraint);\r\n }\r\n\r\n let attachments = skin.getAttachments();\r\n for (let i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n\r\n copySkin (skin: Skin) {\r\n for(let i = 0; i < skin.bones.length; i++) {\r\n let bone = skin.bones[i];\r\n let contained = false;\r\n for (let j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained) this.bones.push(bone);\r\n }\r\n\r\n for(let i = 0; i < skin.constraints.length; i++) {\r\n let constraint = skin.constraints[i];\r\n let contained = false;\r\n for (let j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained) this.constraints.push(constraint);\r\n }\r\n\r\n let attachments = skin.getAttachments();\r\n for (let i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n if (attachment.attachment == null) continue;\r\n if (attachment.attachment instanceof MeshAttachment) {\r\n attachment.attachment = attachment.attachment.newLinkedMesh();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n } else {\r\n attachment.attachment = attachment.attachment.copy();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n }\r\n\r\n /** @return May be null. */\r\n getAttachment (slotIndex: number, name: string): Attachment {\r\n let dictionary = this.attachments[slotIndex];\r\n return dictionary ? dictionary[name] : null;\r\n }\r\n\r\n removeAttachment (slotIndex: number, name: string) {\r\n let dictionary = this.attachments[slotIndex];\r\n if (dictionary) dictionary[name] = null;\r\n }\r\n\r\n getAttachments (): Array {\r\n let entries = new Array();\r\n for (var i = 0; i < this.attachments.length; i++) {\r\n let slotAttachments = this.attachments[i];\r\n if (slotAttachments) {\r\n for (let name in slotAttachments) {\r\n let attachment = slotAttachments[name];\r\n if (attachment) entries.push(new SkinEntry(i, name, attachment));\r\n }\r\n }\r\n }\r\n return entries;\r\n }\r\n\r\n getAttachmentsForSlot (slotIndex: number, attachments: Array) {\r\n let slotAttachments = this.attachments[slotIndex];\r\n if (slotAttachments) {\r\n for (let name in slotAttachments) {\r\n let attachment = slotAttachments[name];\r\n if (attachment) attachments.push(new SkinEntry(slotIndex, name, attachment));\r\n }\r\n }\r\n }\r\n\r\n clear () {\r\n this.attachments.length = 0;\r\n this.bones.length = 0;\r\n this.constraints.length = 0;\r\n }\r\n\r\n /** Attach each attachment in this skin if the corresponding attachment in the old skin is currently attached. */\r\n attachAll (skeleton: Skeleton, oldSkin: Skin) {\r\n let slotIndex = 0;\r\n for (let i = 0; i < skeleton.slots.length; i++) {\r\n let slot = skeleton.slots[i];\r\n let slotAttachment = slot.getAttachment();\r\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\r\n let dictionary = oldSkin.attachments[slotIndex];\r\n for (let key in dictionary) {\r\n let skinAttachment:Attachment = dictionary[key];\r\n if (slotAttachment == skinAttachment) {\r\n let attachment = this.getAttachment(slotIndex, key);\r\n if (attachment != null) slot.setAttachment(attachment);\r\n break;\r\n }\r\n }\r\n }\r\n slotIndex++;\r\n }\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class Slot {\r\n //this is for PIXI\r\n currentMesh: any;\r\n currentSprite: any;\r\n currentGraphics: any;\r\n clippingContainer: any;\r\n\r\n meshes: any;\r\n currentMeshName: string;\r\n sprites: any;\r\n currentSpriteName: string;\r\n\r\n blendMode: number;\r\n //assign hack region a bit later\r\n hackRegion: TextureRegion;\r\n hackAttachment: Attachment;\r\n\r\n //this is canon\r\n data: SlotData;\r\n bone: Bone;\r\n color: Color;\r\n darkColor: Color;\r\n attachment: Attachment;\r\n private attachmentTime: number;\r\n attachmentState: number;\r\n deform = new Array();\r\n\r\n constructor (data: SlotData, bone: Bone) {\r\n if (data == null) throw new Error(\"data cannot be null.\");\r\n if (bone == null) throw new Error(\"bone cannot be null.\");\r\n this.data = data;\r\n this.bone = bone;\r\n this.color = new Color();\r\n this.darkColor = data.darkColor == null ? null : new Color();\r\n this.setToSetupPose();\r\n\r\n this.blendMode = this.data.blendMode;\r\n }\r\n\r\n /** @return May be null. */\r\n getAttachment (): Attachment {\r\n return this.attachment;\r\n }\r\n\r\n /** Sets the attachment and if it changed, resets {@link #getAttachmentTime()} and clears {@link #getAttachmentVertices()}.\r\n * @param attachment May be null. */\r\n setAttachment (attachment: Attachment) {\r\n if (this.attachment == attachment) return;\r\n this.attachment = attachment;\r\n this.attachmentTime = this.bone.skeleton.time;\r\n this.deform.length = 0;\r\n }\r\n\r\n setAttachmentTime (time: number) {\r\n this.attachmentTime = this.bone.skeleton.time - time;\r\n }\r\n\r\n /** Returns the time since the attachment was set. */\r\n getAttachmentTime (): number {\r\n return this.bone.skeleton.time - this.attachmentTime;\r\n }\r\n\r\n setToSetupPose () {\r\n this.color.setFromColor(this.data.color);\r\n if (this.darkColor != null) this.darkColor.setFromColor(this.data.darkColor);\r\n if (this.data.attachmentName == null)\r\n this.attachment = null;\r\n else {\r\n this.attachment = null;\r\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\r\n }\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class SlotData {\r\n index: number;\r\n name: string;\r\n boneData: BoneData;\r\n color = new Color(1, 1, 1, 1);\r\n darkColor: Color;\r\n attachmentName: string;\r\n blendMode: BlendMode;\r\n\r\n constructor (index: number, name: string, boneData: BoneData) {\r\n if (index < 0) throw new Error(\"index must be >= 0.\");\r\n if (name == null) throw new Error(\"name cannot be null.\");\r\n if (boneData == null) throw new Error(\"boneData cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.boneData = boneData;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export abstract class Texture {\r\n protected _image: HTMLImageElement;\r\n\r\n constructor (image: HTMLImageElement) {\r\n this._image = image;\r\n }\r\n\r\n getImage (): HTMLImageElement {\r\n return this._image;\r\n }\r\n\r\n abstract setFilters (minFilter: TextureFilter, magFilter: TextureFilter): void;\r\n abstract setWraps (uWrap: TextureWrap, vWrap: TextureWrap): void;\r\n abstract dispose (): void;\r\n\r\n\r\n public static filterFromString (text: string): TextureFilter {\r\n switch (text.toLowerCase()) {\r\n case \"nearest\": return TextureFilter.Nearest;\r\n case \"linear\": return TextureFilter.Linear;\r\n case \"mipmap\": return TextureFilter.MipMap;\r\n case \"mipmapnearestnearest\": return TextureFilter.MipMapNearestNearest;\r\n case \"mipmaplinearnearest\": return TextureFilter.MipMapLinearNearest;\r\n case \"mipmapnearestlinear\": return TextureFilter.MipMapNearestLinear;\r\n case \"mipmaplinearlinear\": return TextureFilter.MipMapLinearLinear;\r\n default: throw new Error(`Unknown texture filter ${text}`);\r\n }\r\n }\r\n\r\n public static wrapFromString (text: string): TextureWrap {\r\n switch (text.toLowerCase()) {\r\n case \"mirroredtepeat\": return TextureWrap.MirroredRepeat;\r\n case \"clamptoedge\": return TextureWrap.ClampToEdge;\r\n case \"repeat\": return TextureWrap.Repeat;\r\n default: throw new Error(`Unknown texture wrap ${text}`);\r\n }\r\n }\r\n }\r\n\r\n export enum TextureFilter {\r\n Nearest = 9728, // WebGLRenderingContext.NEAREST\r\n Linear = 9729, // WebGLRenderingContext.LINEAR\r\n MipMap = 9987, // WebGLRenderingContext.LINEAR_MIPMAP_LINEAR\r\n MipMapNearestNearest = 9984, // WebGLRenderingContext.NEAREST_MIPMAP_NEAREST\r\n MipMapLinearNearest = 9985, // WebGLRenderingContext.LINEAR_MIPMAP_NEAREST\r\n MipMapNearestLinear = 9986, // WebGLRenderingContext.NEAREST_MIPMAP_LINEAR\r\n MipMapLinearLinear = 9987 // WebGLRenderingContext.LINEAR_MIPMAP_LINEAR\r\n }\r\n\r\n export enum TextureWrap {\r\n MirroredRepeat = 33648, // WebGLRenderingContext.MIRRORED_REPEAT\r\n ClampToEdge = 33071, // WebGLRenderingContext.CLAMP_TO_EDGE\r\n Repeat = 10497 // WebGLRenderingContext.REPEAT\r\n }\r\n\r\n export class TextureRegion {\r\n texture: PIXI.Texture;\r\n\r\n //thats for overrides\r\n size: PIXI.Rectangle = null;\r\n\r\n get width(): number {\r\n const tex = this.texture;\r\n if (PIXI.VERSION[0] == '3') {\r\n return (tex as any).crop.width;\r\n }\r\n if (tex.trim) {\r\n return tex.trim.width;\r\n }\r\n return tex.orig.width;\r\n }\r\n\r\n get height(): number {\r\n const tex = this.texture;\r\n if (PIXI.VERSION[0] == '3') {\r\n return (tex as any).crop.height;\r\n }\r\n if (tex.trim) {\r\n return tex.trim.height;\r\n }\r\n return tex.orig.height;\r\n }\r\n\r\n get u(): number {\r\n return (this.texture as any)._uvs.x0;\r\n }\r\n\r\n get v(): number {\r\n return (this.texture as any)._uvs.y0;\r\n }\r\n\r\n get u2(): number {\r\n return (this.texture as any)._uvs.x2;\r\n }\r\n\r\n get v2(): number {\r\n return (this.texture as any)._uvs.y2;\r\n }\r\n\r\n get offsetX(): number {\r\n const tex = this.texture;\r\n return tex.trim ? tex.trim.x : 0;\r\n }\r\n\r\n get offsetY(): number {\r\n console.warn(\"Deprecation Warning: @Hackerham: I guess, if you are using PIXI-SPINE ATLAS region.offsetY, you want a texture, right? Use region.texture from now on.\");\r\n return this.spineOffsetY;\r\n }\r\n\r\n get pixiOffsetY(): number {\r\n const tex = this.texture;\r\n return tex.trim ? tex.trim.y : 0;\r\n }\r\n\r\n get spineOffsetY(): number {\r\n let tex = this.texture;\r\n return this.originalHeight - this.height - (tex.trim ? tex.trim.y : 0);\r\n }\r\n\r\n get originalWidth(): number {\r\n let tex = this.texture;\r\n if (PIXI.VERSION[0] == '3') {\r\n if (tex.trim) {\r\n return tex.trim.width;\r\n }\r\n return (tex as any).crop.width;\r\n }\r\n return tex.orig.width;\r\n }\r\n\r\n get originalHeight(): number {\r\n const tex = this.texture;\r\n if (PIXI.VERSION[0] == '3') {\r\n if (tex.trim) {\r\n return tex.trim.height;\r\n }\r\n return (tex as any).crop.height;\r\n }\r\n return tex.orig.height;\r\n }\r\n\r\n get x(): number {\r\n return this.texture.frame.x;\r\n }\r\n\r\n get y(): number {\r\n return this.texture.frame.y;\r\n }\r\n\r\n get rotate(): boolean {\r\n return this.texture.rotate !== 0;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class TextureAtlas implements Disposable {\r\n pages = new Array();\r\n regions = new Array();\r\n\r\n constructor(atlasText?: string, textureLoader?: (path: string, loaderFunction: (tex: PIXI.BaseTexture) => any) => any, callback?: (obj: TextureAtlas) => any) {\r\n if (atlasText) {\r\n this.addSpineAtlas(atlasText, textureLoader, callback);\r\n }\r\n }\r\n\r\n addTexture(name: string, texture: PIXI.Texture) {\r\n let pages = this.pages;\r\n let page: TextureAtlasPage = null;\r\n for (let i = 0; i < pages.length; i++) {\r\n if (pages[i].baseTexture === texture.baseTexture) {\r\n page = pages[i];\r\n break;\r\n }\r\n }\r\n if (page === null) {\r\n page = new TextureAtlasPage();\r\n page.name = 'texturePage';\r\n let baseTexture = texture.baseTexture;\r\n page.width = baseTexture.realWidth;\r\n page.height = baseTexture.realHeight;\r\n page.baseTexture = baseTexture;\r\n //those fields are not relevant in Pixi\r\n page.minFilter = page.magFilter = TextureFilter.Nearest;\r\n page.uWrap = TextureWrap.ClampToEdge;\r\n page.vWrap = TextureWrap.ClampToEdge;\r\n pages.push(page);\r\n }\r\n let region = new TextureAtlasRegion();\r\n region.name = name;\r\n region.page = page;\r\n region.texture = texture;\r\n region.index = -1;\r\n this.regions.push(region);\r\n return region;\r\n }\r\n\r\n addTextureHash(textures: Map, stripExtension: boolean) {\r\n for (let key in textures) {\r\n if (textures.hasOwnProperty(key)) {\r\n this.addTexture(stripExtension && key.indexOf('.') !== -1 ? key.substr(0, key.lastIndexOf('.')) : key, textures[key]);\r\n }\r\n }\r\n }\r\n\r\n public addSpineAtlas(atlasText: string, textureLoader: (path: string, loaderFunction: (tex: PIXI.BaseTexture) => any) => any, callback: (obj: TextureAtlas) => any) {\r\n return this.load(atlasText, textureLoader, callback);\r\n }\r\n\r\n private load(atlasText: string, textureLoader: (path: string, loaderFunction: (tex: PIXI.BaseTexture) => any) => any, callback: (obj: TextureAtlas) => any) {\r\n if (textureLoader == null)\r\n throw new Error(\"textureLoader cannot be null.\");\r\n\r\n let reader = new TextureAtlasReader(atlasText);\r\n let tuple = new Array(4);\r\n let page: TextureAtlasPage = null;\r\n\r\n let iterateParser = () => {\r\n while (true) {\r\n let line = reader.readLine();\r\n if (line == null) {\r\n return callback && callback(this);\r\n }\r\n line = line.trim();\r\n if (line.length == 0)\r\n page = null;\r\n else if (!page) {\r\n page = new TextureAtlasPage();\r\n page.name = line;\r\n\r\n if (reader.readTuple(tuple) == 2) { // size is only optional for an atlas packed with an old TexturePacker.\r\n page.width = parseInt(tuple[0]);\r\n page.height = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n }\r\n // page.format = Format[tuple[0]]; we don't need format in WebGL\r\n\r\n reader.readTuple(tuple);\r\n page.minFilter = Texture.filterFromString(tuple[0]);\r\n page.magFilter = Texture.filterFromString(tuple[1]);\r\n\r\n let direction = reader.readValue();\r\n page.uWrap = TextureWrap.ClampToEdge;\r\n page.vWrap = TextureWrap.ClampToEdge;\r\n if (direction == \"x\")\r\n page.uWrap = TextureWrap.Repeat;\r\n else if (direction == \"y\")\r\n page.vWrap = TextureWrap.Repeat;\r\n else if (direction == \"xy\")\r\n page.uWrap = page.vWrap = TextureWrap.Repeat;\r\n\r\n textureLoader(line, (texture: PIXI.BaseTexture) => {\r\n if (texture === null) {\r\n this.pages.splice(this.pages.indexOf(page), 1);\r\n return callback && callback(null);\r\n }\r\n page.baseTexture = texture;\r\n if (!texture.valid) {\r\n texture.setSize(page.width, page.height);\r\n }\r\n this.pages.push(page);\r\n page.setFilters();\r\n\r\n if (!page.width || !page.height) {\r\n page.width = texture.realWidth;\r\n page.height = texture.realHeight;\r\n if (!page.width || !page.height) {\r\n console.log(\"ERROR spine atlas page \" + page.name + \": meshes wont work if you dont specify size in atlas (http://www.html5gamedevs.com/topic/18888-pixi-spines-and-meshes/?p=107121)\");\r\n }\r\n }\r\n iterateParser();\r\n });\r\n this.pages.push(page);\r\n break;\r\n } else {\r\n let region: TextureAtlasRegion = new TextureAtlasRegion();\r\n region.name = line;\r\n region.page = page;\r\n\r\n let rotateValue = reader.readValue();\r\n let rotate = 0;\r\n if (rotateValue.toLocaleLowerCase() == \"true\") {\r\n rotate = 6;\r\n } else if (rotateValue.toLocaleLowerCase() == \"false\") {\r\n rotate = 0;\r\n } else {\r\n rotate = ((720 - parseFloat(rotateValue))% 360) / 45;\r\n }\r\n\r\n reader.readTuple(tuple);\r\n let x = parseInt(tuple[0]);\r\n let y = parseInt(tuple[1]);\r\n\r\n reader.readTuple(tuple);\r\n let width = parseInt(tuple[0]);\r\n let height = parseInt(tuple[1]);\r\n\r\n let resolution = page.baseTexture.resolution;\r\n x /= resolution;\r\n y /= resolution;\r\n width /= resolution;\r\n height /= resolution;\r\n\r\n const swapWH = rotate % 4 != 0;\r\n let frame = new PIXI.Rectangle(x, y, swapWH ? height : width, swapWH ? width : height);\r\n\r\n if (reader.readTuple(tuple) == 4) { // split is optional\r\n // region.splits = new Vector.(parseInt(tuple[0]), parseInt(tuple[1]), parseInt(tuple[2]), parseInt(tuple[3]));\r\n\r\n if (reader.readTuple(tuple) == 4) { // pad is optional, but only present with splits\r\n //region.pads = Vector.(parseInt(tuple[0]), parseInt(tuple[1]), parseInt(tuple[2]), parseInt(tuple[3]));\r\n\r\n reader.readTuple(tuple);\r\n }\r\n }\r\n\r\n let originalWidth = parseInt(tuple[0]) / resolution;\r\n let originalHeight = parseInt(tuple[1]) / resolution;\r\n reader.readTuple(tuple);\r\n let offsetX = parseInt(tuple[0]) / resolution;\r\n let offsetY = parseInt(tuple[1]) / resolution;\r\n\r\n let orig = new PIXI.Rectangle(0, 0, originalWidth, originalHeight);\r\n let trim = new PIXI.Rectangle(offsetX, originalHeight - height - offsetY, width, height);\r\n\r\n //TODO: pixiv3 uses different frame/crop/trim\r\n\r\n if (PIXI.VERSION[0] != '3') {\r\n // pixi v4 or v5\r\n region.texture = new PIXI.Texture(region.page.baseTexture, frame, orig, trim, rotate);\r\n } else {\r\n // pixi v3.0.11\r\n let frame2 = new PIXI.Rectangle(x, y, width, height);\r\n let crop = frame2.clone();\r\n trim.width = originalWidth;\r\n trim.height = originalHeight;\r\n region.texture = new PIXI.Texture(region.page.baseTexture, frame2, crop, trim, rotate);\r\n }\r\n\r\n region.index = parseInt(reader.readValue());\r\n region.texture.updateUvs();\r\n\r\n this.regions.push(region);\r\n }\r\n }\r\n };\r\n\r\n iterateParser();\r\n }\r\n\r\n findRegion(name: string): TextureAtlasRegion {\r\n for (let i = 0; i < this.regions.length; i++) {\r\n if (this.regions[i].name == name) {\r\n return this.regions[i];\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n dispose() {\r\n for (let i = 0; i < this.pages.length; i++) {\r\n this.pages[i].baseTexture.dispose();\r\n }\r\n }\r\n }\r\n\r\n class TextureAtlasReader {\r\n lines: Array;\r\n index: number = 0;\r\n\r\n constructor(text: string) {\r\n this.lines = text.split(/\\r\\n|\\r|\\n/);\r\n }\r\n\r\n readLine(): string {\r\n if (this.index >= this.lines.length)\r\n return null;\r\n return this.lines[this.index++];\r\n }\r\n\r\n readValue(): string {\r\n let line = this.readLine();\r\n let colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n return line.substring(colon + 1).trim();\r\n }\r\n\r\n readTuple(tuple: Array): number {\r\n let line = this.readLine();\r\n let colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n let i = 0, lastMatch = colon + 1;\r\n for (; i < 3; i++) {\r\n let comma = line.indexOf(\",\", lastMatch);\r\n if (comma == -1) break;\r\n tuple[i] = line.substr(lastMatch, comma - lastMatch).trim();\r\n lastMatch = comma + 1;\r\n }\r\n tuple[i] = line.substring(lastMatch).trim();\r\n return i + 1;\r\n }\r\n }\r\n\r\n export class TextureAtlasPage {\r\n name: string;\r\n minFilter: TextureFilter;\r\n magFilter: TextureFilter;\r\n uWrap: TextureWrap;\r\n vWrap: TextureWrap;\r\n baseTexture: PIXI.BaseTexture;\r\n width: number;\r\n height: number;\r\n\r\n public setFilters() {\r\n let tex = this.baseTexture;\r\n let filter = this.minFilter;\r\n if (filter == TextureFilter.Linear) {\r\n tex.scaleMode = PIXI.SCALE_MODES.LINEAR;\r\n } else if (this.minFilter == TextureFilter.Nearest) {\r\n tex.scaleMode = PIXI.SCALE_MODES.NEAREST;\r\n } else {\r\n tex.mipmap = PIXI.MIPMAP_MODES.POW2;\r\n if (filter == TextureFilter.MipMapNearestNearest) {\r\n tex.scaleMode = PIXI.SCALE_MODES.NEAREST;\r\n } else {\r\n tex.scaleMode = PIXI.SCALE_MODES.LINEAR;\r\n }\r\n }\r\n }\r\n }\r\n\r\n export class TextureAtlasRegion extends TextureRegion {\r\n page: TextureAtlasPage;\r\n name: string;\r\n index: number;\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class TransformConstraint implements Updatable {\r\n data: TransformConstraintData;\r\n bones: Array;\r\n target: Bone;\r\n rotateMix = 0;\r\n translateMix = 0;\r\n scaleMix = 0;\r\n shearMix = 0;\r\n temp = new Vector2();\r\n active = false;\r\n\r\n constructor(data: TransformConstraintData, skeleton: Skeleton) {\r\n if (data == null) throw new Error(\"data cannot be null.\");\r\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n this.scaleMix = data.scaleMix;\r\n this.shearMix = data.shearMix;\r\n this.bones = new Array();\r\n for (let i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n\r\n isActive () {\r\n return this.active;\r\n }\r\n\r\n apply() {\r\n this.update();\r\n }\r\n\r\n update() {\r\n if (this.data.local) {\r\n if (this.data.relative)\r\n this.applyRelativeLocal();\r\n else\r\n this.applyAbsoluteLocal();\r\n\r\n } else {\r\n if (this.data.relative)\r\n this.applyRelativeWorld();\r\n else\r\n this.applyAbsoluteWorld();\r\n }\r\n }\r\n\r\n applyAbsoluteWorld() {\r\n let rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix,\r\n shearMix = this.shearMix;\r\n let target = this.target;\r\n let targetMat = target.matrix;\r\n let ta = targetMat.a, tb = targetMat.c, tc = targetMat.b, td = targetMat.d;\r\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n let offsetRotation = this.data.offsetRotation * degRadReflect;\r\n let offsetShearY = this.data.offsetShearY * degRadReflect;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n let modified = false;\r\n let mat = bone.matrix;\r\n\r\n if (rotateMix != 0) {\r\n let a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n let r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n r *= rotateMix;\r\n let cos = Math.cos(r), sin = Math.sin(r);\r\n mat.a = cos * a - sin * c;\r\n mat.c = cos * b - sin * d;\r\n mat.b = sin * a + cos * c;\r\n mat.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n\r\n if (translateMix != 0) {\r\n let temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n mat.tx += (temp.x - mat.tx) * translateMix;\r\n mat.ty += (temp.y - mat.ty) * translateMix;\r\n modified = true;\r\n }\r\n\r\n if (scaleMix > 0) {\r\n let s = Math.sqrt(mat.a * mat.a + mat.b * mat.b);\r\n let ts = Math.sqrt(ta * ta + tc * tc);\r\n if (s > 0.00001) s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\r\n mat.a *= s;\r\n mat.b *= s;\r\n s = Math.sqrt(mat.c * mat.c + mat.d * mat.d);\r\n ts = Math.sqrt(tb * tb + td * td);\r\n if (s > 0.00001) s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\r\n mat.c *= s;\r\n mat.d *= s;\r\n modified = true;\r\n }\r\n\r\n if (shearMix > 0) {\r\n let b = mat.c, d = mat.d;\r\n let by = Math.atan2(d, b);\r\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(mat.b, mat.a));\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n r = by + (r + offsetShearY) * shearMix;\r\n let s = Math.sqrt(b * b + d * d);\r\n mat.c = Math.cos(r) * s;\r\n mat.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n\r\n if (modified) bone.appliedValid = false;\r\n }\r\n }\r\n\r\n applyRelativeWorld() {\r\n let rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix,\r\n shearMix = this.shearMix;\r\n let target = this.target;\r\n let targetMat = target.matrix;\r\n let ta = targetMat.a, tb = targetMat.c, tc = targetMat.b, td = targetMat.d;\r\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n let offsetRotation = this.data.offsetRotation * degRadReflect,\r\n offsetShearY = this.data.offsetShearY * degRadReflect;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n let modified = false;\r\n let mat = bone.matrix;\r\n\r\n if (rotateMix != 0) {\r\n let a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n let r = Math.atan2(tc, ta) + offsetRotation;\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI) r += MathUtils.PI2;\r\n r *= rotateMix;\r\n let cos = Math.cos(r), sin = Math.sin(r);\r\n mat.a = cos * a - sin * c;\r\n mat.c = cos * b - sin * d;\r\n mat.b = sin * a + cos * c;\r\n mat.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n\r\n if (translateMix != 0) {\r\n let temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n mat.tx += temp.x * translateMix;\r\n mat.ty += temp.y * translateMix;\r\n modified = true;\r\n }\r\n\r\n if (scaleMix > 0) {\r\n let s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1;\r\n mat.a *= s;\r\n mat.b *= s;\r\n s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1;\r\n mat.c *= s;\r\n mat.d *= s;\r\n modified = true;\r\n }\r\n\r\n if (shearMix > 0) {\r\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta);\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI) r += MathUtils.PI2;\r\n let b = mat.c, d = mat.d;\r\n r = Math.atan2(d, b) + (r - MathUtils.PI / 2 + offsetShearY) * shearMix;\r\n let s = Math.sqrt(b * b + d * d);\r\n mat.c = Math.cos(r) * s;\r\n mat.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n\r\n if (modified) bone.appliedValid = false;\r\n }\r\n }\r\n\r\n applyAbsoluteLocal() {\r\n let rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix,\r\n shearMix = this.shearMix;\r\n let target = this.target;\r\n if (!target.appliedValid) target.updateAppliedTransform();\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (!bone.appliedValid) bone.updateAppliedTransform();\r\n\r\n let rotation = bone.arotation;\r\n if (rotateMix != 0) {\r\n let r = target.arotation - rotation + this.data.offsetRotation;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n rotation += r * rotateMix;\r\n }\r\n\r\n let x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax - x + this.data.offsetX) * translateMix;\r\n y += (target.ay - y + this.data.offsetY) * translateMix;\r\n }\r\n\r\n let scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix > 0) {\r\n if (scaleX > 0.00001) scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX;\r\n if (scaleY > 0.00001) scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY;\r\n }\r\n\r\n let shearY = bone.ashearY;\r\n if (shearMix > 0) {\r\n let r = target.ashearY - shearY + this.data.offsetShearY;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n bone.shearY += r * shearMix;\r\n }\r\n\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n }\r\n\r\n applyRelativeLocal() {\r\n let rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix,\r\n shearMix = this.shearMix;\r\n let target = this.target;\r\n if (!target.appliedValid) target.updateAppliedTransform();\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (!bone.appliedValid) bone.updateAppliedTransform();\r\n\r\n let rotation = bone.arotation;\r\n if (rotateMix != 0) rotation += (target.arotation + this.data.offsetRotation) * rotateMix;\r\n\r\n let x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax + this.data.offsetX) * translateMix;\r\n y += (target.ay + this.data.offsetY) * translateMix;\r\n }\r\n\r\n let scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix > 0) {\r\n if (scaleX > 0.00001) scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1;\r\n if (scaleY > 0.00001) scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1;\r\n }\r\n\r\n let shearY = bone.ashearY;\r\n if (shearMix > 0) shearY += (target.ashearY + this.data.offsetShearY) * shearMix;\r\n\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n }\r\n }\r\n\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class TransformConstraintData extends ConstraintData {\r\n bones = new Array();\r\n target: BoneData;\r\n rotateMix = 0; translateMix = 0; scaleMix = 0; shearMix = 0;\r\n offsetRotation = 0; offsetX = 0; offsetY = 0; offsetScaleX = 0; offsetScaleY = 0; offsetShearY = 0;\r\n relative = false;\r\n local = false;\r\n\r\n constructor (name: string) {\r\n super(name, 0, false);\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n\texport class Triangulator {\r\n\t\tprivate convexPolygons = new Array>();\r\n\t\tprivate convexPolygonsIndices = new Array>();\r\n\r\n\t\tprivate indicesArray = new Array();\r\n\t\tprivate isConcaveArray = new Array();\r\n\t\tprivate triangles = new Array();\r\n\r\n\t\tprivate polygonPool = new Pool>(() => {\r\n\t\t\treturn new Array();\r\n\t\t});\r\n\r\n\t\tprivate polygonIndicesPool = new Pool>(() => {\r\n\t\t\treturn new Array();\r\n\t\t});\r\n\r\n\t\tpublic triangulate (verticesArray: ArrayLike): Array {\r\n\t\t\tlet vertices = verticesArray;\r\n\t\t\tlet vertexCount = verticesArray.length >> 1;\r\n\r\n\t\t\tlet indices = this.indicesArray;\r\n\t\t\tindices.length = 0;\r\n\t\t\tfor (let i = 0; i < vertexCount; i++)\r\n\t\t\t\tindices[i] = i;\r\n\r\n\t\t\tlet isConcave = this.isConcaveArray;\r\n\t\t\tisConcave.length = 0;\r\n\t\t\tfor (let i = 0, n = vertexCount; i < n; ++i)\r\n\t\t\t\tisConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\r\n\r\n\t\t\tlet triangles = this.triangles;\r\n\t\t\ttriangles.length = 0;\r\n\r\n\t\t\twhile (vertexCount > 3) {\r\n\t\t\t\t// Find ear tip.\r\n\t\t\t\tlet previous = vertexCount - 1, i = 0, next = 1;\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\touter:\r\n\t\t\t\t\tif (!isConcave[i]) {\r\n\t\t\t\t\t\tlet p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\r\n\t\t\t\t\t\tlet p1x = vertices[p1], p1y = vertices[p1 + 1];\r\n\t\t\t\t\t\tlet p2x = vertices[p2], p2y = vertices[p2 + 1];\r\n\t\t\t\t\t\tlet p3x = vertices[p3], p3y = vertices[p3 + 1];\r\n\t\t\t\t\t\tfor (let ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\r\n\t\t\t\t\t\t\tif (!isConcave[ii]) continue;\r\n\t\t\t\t\t\t\tlet v = indices[ii] << 1;\r\n\t\t\t\t\t\t\tlet vx = vertices[v], vy = vertices[v + 1];\r\n\t\t\t\t\t\t\tif (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\r\n\t\t\t\t\t\t\t\tif (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\r\n\t\t\t\t\t\t\t\t\tif (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy)) break outer;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (next == 0) {\r\n\t\t\t\t\t\tdo {\r\n\t\t\t\t\t\t\tif (!isConcave[i]) break;\r\n\t\t\t\t\t\t\ti--;\r\n\t\t\t\t\t\t} while (i > 0);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tprevious = i;\r\n\t\t\t\t\ti = next;\r\n\t\t\t\t\tnext = (next + 1) % vertexCount;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Cut ear tip.\r\n\t\t\t\ttriangles.push(indices[(vertexCount + i - 1) % vertexCount]);\r\n\t\t\t\ttriangles.push(indices[i]);\r\n\t\t\t\ttriangles.push(indices[(i + 1) % vertexCount]);\r\n\t\t\t\tindices.splice(i, 1);\r\n\t\t\t\tisConcave.splice(i, 1);\r\n\t\t\t\tvertexCount--;\r\n\r\n\t\t\t\tlet previousIndex = (vertexCount + i - 1) % vertexCount;\r\n\t\t\t\tlet nextIndex = i == vertexCount ? 0 : i;\r\n\t\t\t\tisConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\r\n\t\t\t\tisConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\r\n\t\t\t}\r\n\r\n\t\t\tif (vertexCount == 3) {\r\n\t\t\t\ttriangles.push(indices[2]);\r\n\t\t\t\ttriangles.push(indices[0]);\r\n\t\t\t\ttriangles.push(indices[1]);\r\n\t\t\t}\r\n\r\n\t\t\treturn triangles;\r\n\t\t}\r\n\r\n\t\tdecompose (verticesArray: Array, triangles: Array) : Array> {\r\n\t\t\tlet vertices = verticesArray;\r\n\t\t\tlet convexPolygons = this.convexPolygons;\r\n\t\t\tthis.polygonPool.freeAll(convexPolygons);\r\n\t\t\tconvexPolygons.length = 0;\r\n\r\n\t\t\tlet convexPolygonsIndices = this.convexPolygonsIndices;\r\n\t\t\tthis.polygonIndicesPool.freeAll(convexPolygonsIndices);\r\n\t\t\tconvexPolygonsIndices.length = 0;\r\n\r\n\t\t\tlet polygonIndices = this.polygonIndicesPool.obtain();\r\n\t\t\tpolygonIndices.length = 0;\r\n\r\n\t\t\tlet polygon = this.polygonPool.obtain();\r\n\t\t\tpolygon.length = 0;\r\n\r\n\t\t\t// Merge subsequent triangles if they form a triangle fan.\r\n\t\t\tlet fanBaseIndex = -1, lastWinding = 0;\r\n\t\t\tfor (let i = 0, n = triangles.length; i < n; i += 3) {\r\n\t\t\t\tlet t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\r\n\t\t\t\tlet x1 = vertices[t1], y1 = vertices[t1 + 1];\r\n\t\t\t\tlet x2 = vertices[t2], y2 = vertices[t2 + 1];\r\n\t\t\t\tlet x3 = vertices[t3], y3 = vertices[t3 + 1];\r\n\r\n\t\t\t\t// If the base of the last triangle is the same as this triangle, check if they form a convex polygon (triangle fan).\r\n\t\t\t\tlet merged = false;\r\n\t\t\t\tif (fanBaseIndex == t1) {\r\n\t\t\t\t\tlet o = polygon.length - 4;\r\n\t\t\t\t\tlet winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\r\n\t\t\t\t\tlet winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\r\n\t\t\t\t\tif (winding1 == lastWinding && winding2 == lastWinding) {\r\n\t\t\t\t\t\tpolygon.push(x3);\r\n\t\t\t\t\t\tpolygon.push(y3);\r\n\t\t\t\t\t\tpolygonIndices.push(t3);\r\n\t\t\t\t\t\tmerged = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Otherwise make this triangle the new base.\r\n\t\t\t\tif (!merged) {\r\n\t\t\t\t\tif (polygon.length > 0) {\r\n\t\t\t\t\t\tconvexPolygons.push(polygon);\r\n\t\t\t\t\t\tconvexPolygonsIndices.push(polygonIndices);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.polygonPool.free(polygon)\r\n\t\t\t\t\t\tthis.polygonIndicesPool.free(polygonIndices);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpolygon = this.polygonPool.obtain();\r\n\t\t\t\t\tpolygon.length = 0;\r\n\t\t\t\t\tpolygon.push(x1);\r\n\t\t\t\t\tpolygon.push(y1);\r\n\t\t\t\t\tpolygon.push(x2);\r\n\t\t\t\t\tpolygon.push(y2);\r\n\t\t\t\t\tpolygon.push(x3);\r\n\t\t\t\t\tpolygon.push(y3);\r\n\t\t\t\t\tpolygonIndices = this.polygonIndicesPool.obtain();\r\n\t\t\t\t\tpolygonIndices.length = 0;\r\n\t\t\t\t\tpolygonIndices.push(t1);\r\n\t\t\t\t\tpolygonIndices.push(t2);\r\n\t\t\t\t\tpolygonIndices.push(t3);\r\n\t\t\t\t\tlastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\r\n\t\t\t\t\tfanBaseIndex = t1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (polygon.length > 0) {\r\n\t\t\t\tconvexPolygons.push(polygon);\r\n\t\t\t\tconvexPolygonsIndices.push(polygonIndices);\r\n\t\t\t}\r\n\r\n\t\t\t// Go through the list of polygons and try to merge the remaining triangles with the found triangle fans.\r\n\t\t\tfor (let i = 0, n = convexPolygons.length; i < n; i++) {\r\n\t\t\t\tpolygonIndices = convexPolygonsIndices[i];\r\n\t\t\t\tif (polygonIndices.length == 0) continue;\r\n\t\t\t\tlet firstIndex = polygonIndices[0];\r\n\t\t\t\tlet lastIndex = polygonIndices[polygonIndices.length - 1];\r\n\r\n\t\t\t\tpolygon = convexPolygons[i];\r\n\t\t\t\tlet o = polygon.length - 4;\r\n\t\t\t\tlet prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\r\n\t\t\t\tlet prevX = polygon[o + 2], prevY = polygon[o + 3];\r\n\t\t\t\tlet firstX = polygon[0], firstY = polygon[1];\r\n\t\t\t\tlet secondX = polygon[2], secondY = polygon[3];\r\n\t\t\t\tlet winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\r\n\r\n\t\t\t\tfor (let ii = 0; ii < n; ii++) {\r\n\t\t\t\t\tif (ii == i) continue;\r\n\t\t\t\t\tlet otherIndices = convexPolygonsIndices[ii];\r\n\t\t\t\t\tif (otherIndices.length != 3) continue;\r\n\t\t\t\t\tlet otherFirstIndex = otherIndices[0];\r\n\t\t\t\t\tlet otherSecondIndex = otherIndices[1];\r\n\t\t\t\t\tlet otherLastIndex = otherIndices[2];\r\n\r\n\t\t\t\t\tlet otherPoly = convexPolygons[ii];\r\n\t\t\t\t\tlet x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\r\n\r\n\t\t\t\t\tif (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex) continue;\r\n\t\t\t\t\tlet winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\r\n\t\t\t\t\tlet winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\r\n\t\t\t\t\tif (winding1 == winding && winding2 == winding) {\r\n\t\t\t\t\t\totherPoly.length = 0;\r\n\t\t\t\t\t\totherIndices.length = 0;\r\n\t\t\t\t\t\tpolygon.push(x3);\r\n\t\t\t\t\t\tpolygon.push(y3);\r\n\t\t\t\t\t\tpolygonIndices.push(otherLastIndex);\r\n\t\t\t\t\t\tprevPrevX = prevX;\r\n\t\t\t\t\t\tprevPrevY = prevY;\r\n\t\t\t\t\t\tprevX = x3;\r\n\t\t\t\t\t\tprevY = y3;\r\n\t\t\t\t\t\tii = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Remove empty polygons that resulted from the merge step above.\r\n\t\t\tfor (let i = convexPolygons.length - 1; i >= 0; i--) {\r\n\t\t\t\tpolygon = convexPolygons[i];\r\n\t\t\t\tif (polygon.length == 0) {\r\n\t\t\t\t\tconvexPolygons.splice(i, 1);\r\n\t\t\t\t\tthis.polygonPool.free(polygon);\r\n\t\t\t\t\tpolygonIndices = convexPolygonsIndices[i]\r\n\t\t\t\t\tconvexPolygonsIndices.splice(i, 1)\r\n\t\t\t\t\tthis.polygonIndicesPool.free(polygonIndices);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn convexPolygons;\r\n\t\t}\r\n\r\n\t\tprivate static isConcave (index: number, vertexCount: number, vertices: ArrayLike, indices: ArrayLike): boolean {\r\n\t\t\tlet previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\r\n\t\t\tlet current = indices[index] << 1;\r\n\t\t\tlet next = indices[(index + 1) % vertexCount] << 1;\r\n\t\t\treturn !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next],\r\n\t\t\t\tvertices[next + 1]);\r\n\t\t}\r\n\r\n\t\tprivate static positiveArea (p1x: number, p1y: number, p2x: number, p2y: number, p3x: number, p3y: number): boolean {\r\n\t\t\treturn p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\r\n\t\t}\r\n\r\n\t\tprivate static winding (p1x: number, p1y: number, p2x: number, p2y: number, p3x: number, p3y: number): number {\r\n\t\t\tlet px = p2x - p1x, py = p2y - p1y;\r\n\t\t\treturn p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\r\n\t\t}\r\n\t}\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export interface Updatable {\r\n update(): void;\r\n\r\n isActive(): boolean;\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export interface Map {\r\n [key: string]: T;\r\n }\r\n\r\n export class IntSet {\r\n array = new Array();\r\n\r\n add (value: number): boolean {\r\n let contains = this.contains(value);\r\n this.array[value | 0] = value | 0;\r\n return !contains;\r\n }\r\n\r\n contains (value: number) {\r\n return this.array[value | 0] != undefined;\r\n }\r\n\r\n remove (value: number) {\r\n this.array[value | 0] = undefined;\r\n }\r\n\r\n clear () {\r\n this.array.length = 0;\r\n }\r\n }\r\n\r\n export interface Disposable {\r\n dispose (): void;\r\n }\r\n\r\n export interface Restorable {\r\n restore (): void;\r\n }\r\n\r\n export class Color {\r\n public static WHITE = new Color(1, 1, 1, 1);\r\n public static RED = new Color(1, 0, 0, 1);\r\n public static GREEN = new Color(0, 1, 0, 1);\r\n public static BLUE = new Color(0, 0, 1, 1);\r\n public static MAGENTA = new Color(1, 0, 1, 1);\r\n\r\n constructor (public r: number = 0, public g: number = 0, public b: number = 0, public a: number = 0) {\r\n }\r\n\r\n set (r: number, g: number, b: number, a: number) {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n this.clamp();\r\n return this;\r\n }\r\n\r\n setFromColor (c: Color) {\r\n this.r = c.r;\r\n this.g = c.g;\r\n this.b = c.b;\r\n this.a = c.a;\r\n return this;\r\n }\r\n\r\n setFromString (hex: string) {\r\n hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\r\n this.r = parseInt(hex.substr(0, 2), 16) / 255.0;\r\n this.g = parseInt(hex.substr(2, 2), 16) / 255.0;\r\n this.b = parseInt(hex.substr(4, 2), 16) / 255.0;\r\n this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\r\n return this;\r\n }\r\n\r\n add (r: number, g: number, b: number, a: number) {\r\n this.r += r;\r\n this.g += g;\r\n this.b += b;\r\n this.a += a;\r\n this.clamp();\r\n return this;\r\n }\r\n\r\n clamp () {\r\n if (this.r < 0) this.r = 0;\r\n else if (this.r > 1) this.r = 1;\r\n\r\n if (this.g < 0) this.g = 0;\r\n else if (this.g > 1) this.g = 1;\r\n\r\n if (this.b < 0) this.b = 0;\r\n else if (this.b > 1) this.b = 1;\r\n\r\n if (this.a < 0) this.a = 0;\r\n else if (this.a > 1) this.a = 1;\r\n return this;\r\n }\r\n\r\n static rgba8888ToColor(color: Color, value: number) {\r\n color.r = ((value & 0xff000000) >>> 24) / 255;\r\n color.g = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.b = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.a = ((value & 0x000000ff)) / 255;\r\n }\r\n\r\n static rgb888ToColor (color: Color, value: number) {\r\n color.r = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.g = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.b = ((value & 0x000000ff)) / 255;\r\n }\r\n }\r\n\r\n export class MathUtils {\r\n static PI = 3.1415927;\r\n static PI2 = MathUtils.PI * 2;\r\n static radiansToDegrees = 180 / MathUtils.PI;\r\n static radDeg = MathUtils.radiansToDegrees;\r\n static degreesToRadians = MathUtils.PI / 180;\r\n static degRad = MathUtils.degreesToRadians;\r\n\r\n static clamp (value: number, min: number, max: number) {\r\n if (value < min) return min;\r\n if (value > max) return max;\r\n return value;\r\n }\r\n\r\n static cosDeg (degrees: number) {\r\n return Math.cos(degrees * MathUtils.degRad);\r\n }\r\n\r\n static sinDeg (degrees: number) {\r\n return Math.sin(degrees * MathUtils.degRad);\r\n }\r\n\r\n static signum (value: number): number {\r\n return value > 0 ? 1 : value < 0 ? -1 : 0;\r\n }\r\n\r\n static toInt (x: number) {\r\n return x > 0 ? Math.floor(x) : Math.ceil(x);\r\n }\r\n\r\n static cbrt (x: number) {\r\n let y = Math.pow(Math.abs(x), 1/3);\r\n return x < 0 ? -y : y;\r\n }\r\n\r\n static randomTriangular (min: number, max: number): number {\r\n return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\r\n }\r\n\r\n static randomTriangularWith (min: number, max: number, mode: number): number {\r\n let u = Math.random();\r\n let d = max - min;\r\n if (u <= (mode - min) / d) return min + Math.sqrt(u * d * (mode - min));\r\n return max - Math.sqrt((1 - u) * d * (max - mode));\r\n }\r\n }\r\n\r\n export abstract class Interpolation {\r\n protected abstract applyInternal (a: number): number;\r\n apply(start: number, end: number, a: number): number {\r\n return start + (end - start) * this.applyInternal(a);\r\n }\r\n }\r\n\r\n export class Pow extends Interpolation {\r\n protected power = 2;\r\n\r\n constructor (power: number) {\r\n super();\r\n this.power = power;\r\n }\r\n\r\n applyInternal (a: number): number {\r\n if (a <= 0.5) return Math.pow(a * 2, this.power) / 2;\r\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\r\n }\r\n }\r\n\r\n export class PowOut extends Pow {\r\n constructor (power: number) {\r\n super(power);\r\n }\r\n\r\n applyInternal (a: number) : number {\r\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\r\n }\r\n }\r\n\r\n export class Utils {\r\n static SUPPORTS_TYPED_ARRAYS = typeof(Float32Array) !== \"undefined\";\r\n\r\n static arrayCopy (source: ArrayLike, sourceStart: number, dest: ArrayLike, destStart: number, numElements: number) {\r\n for (let i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\r\n dest[j] = source[i];\r\n }\r\n }\r\n\r\n static setArraySize (array: Array, size: number, value: any = 0): Array {\r\n let oldSize = array.length;\r\n if (oldSize == size) return array;\r\n array.length = size;\r\n if (oldSize < size) {\r\n for (let i = oldSize; i < size; i++) array[i] = value;\r\n }\r\n return array;\r\n }\r\n\r\n static ensureArrayCapacity (array: Array, size: number, value: any = 0): Array {\r\n if (array.length >= size) return array;\r\n return Utils.setArraySize(array, size, value);\r\n }\r\n\r\n static newArray (size: number, defaultValue: T): Array {\r\n let array = new Array(size);\r\n for (let i = 0; i < size; i++) array[i] = defaultValue;\r\n return array;\r\n }\r\n\r\n static newFloatArray (size: number): ArrayLike {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Float32Array(size)\r\n } else {\r\n let array = new Array(size);\r\n for (let i = 0; i < array.length; i++) array[i] = 0;\r\n return array;\r\n }\r\n }\r\n\r\n static newShortArray (size: number): ArrayLike {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Int16Array(size)\r\n } else {\r\n let array = new Array(size);\r\n for (let i = 0; i < array.length; i++) array[i] = 0;\r\n return array;\r\n }\r\n }\r\n\r\n static toFloatArray (array: Array) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\r\n }\r\n\r\n static toSinglePrecision (value: number) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\r\n }\r\n\r\n // This function is used to fix WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109\r\n static webkit602BugfixHelper (alpha: number, blend: MixBlend) {\r\n\r\n }\r\n\r\n static contains (array: Array, element: T, identity = true) {\r\n for (let i = 0; i < array.length; i++) {\r\n if (array[i] == element) return true;\r\n }\r\n return false;\r\n }\r\n }\r\n\r\n export class DebugUtils {\r\n static logBones(skeleton: Skeleton) {\r\n for (let i = 0; i < skeleton.bones.length; i++) {\r\n let bone = skeleton.bones[i];\r\n let mat = bone.matrix;\r\n console.log(bone.data.name + \", \" + mat.a + \", \" + mat.b + \", \" + mat.c + \", \" + mat.d + \", \" + mat.tx + \", \" + mat.ty);\r\n }\r\n }\r\n }\r\n\r\n export class Pool {\r\n private items = new Array();\r\n private instantiator: () => T;\r\n\r\n constructor (instantiator: () => T) {\r\n this.instantiator = instantiator;\r\n }\r\n\r\n obtain () {\r\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\r\n }\r\n\r\n free (item: T) {\r\n if ((item as any).reset) (item as any).reset();\r\n this.items.push(item);\r\n }\r\n\r\n freeAll (items: ArrayLike) {\r\n for (let i = 0; i < items.length; i++) {\r\n this.free(items[i]);\r\n }\r\n }\r\n\r\n clear () {\r\n this.items.length = 0;\r\n }\r\n }\r\n\r\n export class Vector2 {\r\n constructor (public x = 0, public y = 0) {\r\n }\r\n\r\n set (x: number, y: number): Vector2 {\r\n this.x = x;\r\n this.y = y;\r\n return this;\r\n }\r\n\r\n length () {\r\n let x = this.x;\r\n let y = this.y;\r\n return Math.sqrt(x * x + y * y);\r\n }\r\n\r\n normalize () {\r\n let len = this.length();\r\n if (len != 0) {\r\n this.x /= len;\r\n this.y /= len;\r\n }\r\n return this;\r\n }\r\n }\r\n\r\n export class TimeKeeper {\r\n maxDelta = 0.064;\r\n framesPerSecond = 0;\r\n delta = 0;\r\n totalTime = 0;\r\n\r\n private lastTime = Date.now() / 1000;\r\n private frameCount = 0;\r\n private frameTime = 0;\r\n\r\n update () {\r\n let now = Date.now() / 1000;\r\n this.delta = now - this.lastTime;\r\n this.frameTime += this.delta;\r\n this.totalTime += this.delta;\r\n if (this.delta > this.maxDelta) this.delta = this.maxDelta;\r\n this.lastTime = now;\r\n\r\n this.frameCount++;\r\n if (this.frameTime > 1) {\r\n this.framesPerSecond = this.frameCount / this.frameTime;\r\n this.frameTime = 0;\r\n this.frameCount = 0;\r\n }\r\n }\r\n }\r\n\r\n export interface ArrayLike {\r\n length: number;\r\n [n: number]: T;\r\n }\r\n\r\n export class WindowedMean {\r\n values: Array;\r\n addedValues = 0;\r\n lastValue = 0;\r\n mean = 0;\r\n dirty = true;\r\n\r\n constructor (windowSize: number = 32) {\r\n this.values = new Array(windowSize);\r\n }\r\n\r\n hasEnoughData () {\r\n return this.addedValues >= this.values.length;\r\n }\r\n\r\n addValue (value: number) {\r\n if (this.addedValues < this.values.length)\r\n this.addedValues++;\r\n this.values[this.lastValue++] = value;\r\n if (this.lastValue > this.values.length - 1) this.lastValue = 0;\r\n this.dirty = true;\r\n }\r\n\r\n getMean () {\r\n if (this.hasEnoughData()) {\r\n if (this.dirty) {\r\n let mean = 0;\r\n for (let i = 0; i < this.values.length; i++) {\r\n mean += this.values[i];\r\n }\r\n this.mean = mean / this.values.length;\r\n this.dirty = false;\r\n }\r\n return this.mean;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n\texport interface VertexEffect {\r\n\t\tbegin(skeleton: Skeleton): void;\r\n\t\ttransform(position: Vector2, uv: Vector2, light: Color, dark: Color): void;\r\n\t\tend(): void;\r\n\t}\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export abstract class Attachment {\r\n name: string;\r\n\r\n constructor(name: string) {\r\n if (name == null) throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n\r\n abstract copy (): Attachment;\r\n }\r\n\r\n export abstract class VertexAttachment extends Attachment {\r\n private static nextID = 0;\r\n\r\n id = (VertexAttachment.nextID++ & 65535) << 11;\r\n bones: Array;\r\n vertices: ArrayLike;\r\n worldVerticesLength = 0;\r\n deformAttachment: VertexAttachment = this;\r\n\r\n constructor(name: string) {\r\n super(name);\r\n }\r\n\r\n computeWorldVerticesOld(slot: Slot, worldVertices: ArrayLike) {\r\n this.computeWorldVertices(slot, 0, this.worldVerticesLength, worldVertices, 0, 2);\r\n }\r\n\r\n /** Transforms local vertices to world coordinates.\r\n * @param start The index of the first local vertex value to transform. Each vertex has 2 values, x and y.\r\n * @param count The number of world vertex values to output. Must be <= {@link #getWorldVerticesLength()} - start.\r\n * @param worldVertices The output world vertices. Must have a length >= offset + count.\r\n * @param offset The worldVertices index to begin writing values. */\r\n computeWorldVertices (slot: Slot, start: number, count: number, worldVertices: ArrayLike, offset: number, stride: number) {\r\n count = offset + (count >> 1) * stride;\r\n let skeleton = slot.bone.skeleton;\r\n let deformArray = slot.deform;\r\n let vertices = this.vertices;\r\n let bones = this.bones;\r\n if (bones == null) {\r\n if (deformArray.length > 0) vertices = deformArray;\r\n let mat = slot.bone.matrix;\r\n let x = mat.tx;\r\n let y = mat.ty;\r\n let a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n for (let v = start, w = offset; w < count; v += 2, w += stride) {\r\n let vx = vertices[v], vy = vertices[v + 1];\r\n worldVertices[w] = vx * a + vy * b + x;\r\n worldVertices[w + 1] = vx * c + vy * d + y;\r\n }\r\n return;\r\n }\r\n let v = 0, skip = 0;\r\n for (let i = 0; i < start; i += 2) {\r\n let n = bones[v];\r\n v += n + 1;\r\n skip += n;\r\n }\r\n let skeletonBones = skeleton.bones;\r\n if (deformArray.length == 0) {\r\n for (let w = offset, b = skip * 3; w < count; w += stride) {\r\n let wx = 0, wy = 0;\r\n let n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3) {\r\n let mat = skeletonBones[bones[v]].matrix;\r\n let vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\r\n wx += (vx * mat.a + vy * mat.c + mat.tx) * weight;\r\n wy += (vx * mat.b + vy * mat.d + mat.ty) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n } else {\r\n let deform = deformArray;\r\n for (let w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\r\n let wx = 0, wy = 0;\r\n let n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3, f += 2) {\r\n let mat = skeletonBones[bones[v]].matrix;\r\n let vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\r\n wx += (vx * mat.a + vy * mat.c + mat.tx) * weight;\r\n wy += (vx * mat.b + vy * mat.d + mat.ty) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n }\r\n\r\n copyTo (attachment: VertexAttachment) {\r\n if (this.bones != null) {\r\n attachment.bones = new Array(this.bones.length);\r\n Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\r\n } else\r\n attachment.bones = null;\r\n\r\n if (this.vertices != null) {\r\n attachment.vertices = Utils.newFloatArray(this.vertices.length);\r\n Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\r\n } else\r\n attachment.vertices = null;\r\n\r\n attachment.worldVerticesLength = this.worldVerticesLength;\r\n attachment.deformAttachment = this.deformAttachment;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export interface AttachmentLoader {\r\n /** @return May be null to not load an attachment. */\r\n newRegionAttachment (skin: Skin, name: string, path: string): RegionAttachment;\r\n\r\n /** @return May be null to not load an attachment. */\r\n newMeshAttachment (skin: Skin, name: string, path: string): MeshAttachment;\r\n\r\n /** @return May be null to not load an attachment. */\r\n newBoundingBoxAttachment (skin: Skin, name: string): BoundingBoxAttachment;\r\n\r\n /** @return May be null to not load an attachment */\r\n newPathAttachment(skin: Skin, name: string): PathAttachment;\r\n\r\n /** @return May be null to not load an attachment */\r\n newPointAttachment(skin: Skin, name: string): PointAttachment;\r\n\r\n /** @return May be null to not load an attachment */\r\n newClippingAttachment(skin: Skin, name: string): ClippingAttachment;\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export enum AttachmentType {\r\n Region, BoundingBox, Mesh, LinkedMesh, Path, Point, Clipping\r\n }\r\n}\r\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class BoundingBoxAttachment extends VertexAttachment {\n color = new Color(1, 1, 1, 1);\n\n constructor (name: string) {\n super(name);\n }\n\n copy (): Attachment {\n let copy = new BoundingBoxAttachment(this.name);\n this.copyTo(copy);\n copy.color.setFromColor(this.color);\n return copy;\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License v2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class ClippingAttachment extends VertexAttachment {\n endSlot: SlotData;\n\n // Nonessential.\n color = new Color(0.2275, 0.2275, 0.8078, 1); // ce3a3aff\n\n constructor (name: string) {\n super(name);\n }\n\n copy (): Attachment {\n let copy = new ClippingAttachment(this.name);\n this.copyTo(copy);\n copy.endSlot = this.endSlot;\n copy.color.setFromColor(this.color);\n return copy;\n }\n }\n}\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class MeshAttachment extends VertexAttachment {\r\n region: TextureRegion;\r\n path: string;\r\n regionUVs: Float32Array; uvs: ArrayLike;\r\n triangles: Array;\r\n color = new Color(1, 1, 1, 1);\r\n width: number;\r\n height: number;\r\n hullLength: number;\r\n edges: Array;\r\n private parentMesh: MeshAttachment;\r\n tempColor = new Color(0, 0, 0, 0);\r\n\r\n constructor (name: string) {\r\n super(name);\r\n }\r\n\r\n getParentMesh () {\r\n return this.parentMesh;\r\n }\r\n\r\n /** @param parentMesh May be null. */\r\n setParentMesh (parentMesh: MeshAttachment) {\r\n this.parentMesh = parentMesh;\r\n if (parentMesh != null) {\r\n this.bones = parentMesh.bones;\r\n this.vertices = parentMesh.vertices;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n this.regionUVs = parentMesh.regionUVs;\r\n this.triangles = parentMesh.triangles;\r\n this.hullLength = parentMesh.hullLength;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength\r\n }\r\n }\r\n\r\n copy (): Attachment {\r\n if (this.parentMesh != null) return this.newLinkedMesh();\r\n\r\n let copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n\r\n this.copyTo(copy);\r\n copy.regionUVs = new Float32Array(this.regionUVs.length);\r\n Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\r\n copy.uvs = new Array(this.uvs.length);\r\n Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\r\n copy.triangles = new Array(this.triangles.length);\r\n Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\r\n copy.hullLength = this.hullLength;\r\n\r\n // Nonessential.\r\n if (this.edges != null) {\r\n copy.edges = new Array(this.edges.length);\r\n Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\r\n }\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n\r\n return copy;\r\n }\r\n\r\n newLinkedMesh (): MeshAttachment {\r\n let copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n copy.deformAttachment = this.deformAttachment;\r\n copy.setParentMesh(this.parentMesh != null ? this.parentMesh : this);\r\n // copy.updateUVs();\r\n return copy;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class PathAttachment extends VertexAttachment {\n lengths: Array;\n closed = false; constantSpeed = false;\n color = new Color(1, 1, 1, 1);\n\n constructor (name: string) {\n super(name);\n }\n\n copy (): Attachment {\n let copy = new PathAttachment(this.name);\n this.copyTo(copy);\n copy.lengths = new Array(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 return copy;\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License v2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class PointAttachment extends VertexAttachment {\n x: number; y: number; rotation: number;\n color = new Color(0.38, 0.94, 0, 1);\n\n constructor (name: string) {\n super(name);\n }\n\n computeWorldPosition(bone: Bone, point: Vector2) {\n const mat = bone.matrix;\n point.x = this.x * mat.a + this.y * mat.c + bone.worldX;\n point.y = this.x * mat.b + this.y * mat.d + bone.worldY;\n return point;\n }\n\n computeWorldRotation(bone: Bone) {\n const mat = bone.matrix;\n let cos = MathUtils.cosDeg(this.rotation), sin = MathUtils.sinDeg(this.rotation);\n let x = cos * mat.a + sin * mat.c;\n let y = cos * mat.b + sin * mat.d;\n return Math.atan2(y, x) * MathUtils.radDeg;\n }\n\n copy (): Attachment {\n let copy = new PointAttachment(this.name);\n copy.x = this.x;\n copy.y = this.y;\n copy.rotation = this.rotation;\n copy.color.setFromColor(this.color);\n return copy;\n }\n }\n}\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class RegionAttachment extends Attachment {\r\n static OX1 = 0;\r\n static OY1 = 1;\r\n static OX2 = 2;\r\n static OY2 = 3;\r\n static OX3 = 4;\r\n static OY3 = 5;\r\n static OX4 = 6;\r\n static OY4 = 7;\r\n\r\n static X1 = 0;\r\n static Y1 = 1;\r\n static C1R = 2;\r\n static C1G = 3;\r\n static C1B = 4;\r\n static C1A = 5;\r\n static U1 = 6;\r\n static V1 = 7;\r\n\r\n static X2 = 8;\r\n static Y2 = 9;\r\n static C2R = 10;\r\n static C2G = 11;\r\n static C2B = 12;\r\n static C2A = 13;\r\n static U2 = 14;\r\n static V2 = 15;\r\n\r\n static X3 = 16;\r\n static Y3 = 17;\r\n static C3R = 18;\r\n static C3G = 19;\r\n static C3B = 20;\r\n static C3A = 21;\r\n static U3 = 22;\r\n static V3 = 23;\r\n\r\n static X4 = 24;\r\n static Y4 = 25;\r\n static C4R = 26;\r\n static C4G = 27;\r\n static C4B = 28;\r\n static C4A = 29;\r\n static U4 = 30;\r\n static V4 = 31;\r\n\r\n x = 0;\r\n y = 0;\r\n scaleX = 1;\r\n scaleY = 1;\r\n rotation = 0;\r\n width = 0;\r\n height = 0;\r\n color = new Color(1, 1, 1, 1);\r\n\r\n path: string;\r\n rendererObject: any;\r\n region: TextureRegion;\r\n\r\n offset = Utils.newFloatArray(8);\r\n uvs = Utils.newFloatArray(8);\r\n\r\n tempColor = new Color(1, 1, 1, 1);\r\n\r\n constructor(name: string) {\r\n super(name);\r\n }\r\n\r\n updateOffset(): void {\r\n let regionScaleX = this.width / this.region.originalWidth * this.scaleX;\r\n let regionScaleY = this.height / this.region.originalHeight * this.scaleY;\r\n let localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\r\n let localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\r\n let localX2 = localX + this.region.width * regionScaleX;\r\n let localY2 = localY + this.region.height * regionScaleY;\r\n let radians = this.rotation * Math.PI / 180;\r\n let cos = Math.cos(radians);\r\n let sin = Math.sin(radians);\r\n let localXCos = localX * cos + this.x;\r\n let localXSin = localX * sin;\r\n let localYCos = localY * cos + this.y;\r\n let localYSin = localY * sin;\r\n let localX2Cos = localX2 * cos + this.x;\r\n let localX2Sin = localX2 * sin;\r\n let localY2Cos = localY2 * cos + this.y;\r\n let localY2Sin = localY2 * sin;\r\n let offset = this.offset;\r\n offset[RegionAttachment.OX1] = localXCos - localYSin;\r\n offset[RegionAttachment.OY1] = localYCos + localXSin;\r\n offset[RegionAttachment.OX2] = localXCos - localY2Sin;\r\n offset[RegionAttachment.OY2] = localY2Cos + localXSin;\r\n offset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\r\n offset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\r\n offset[RegionAttachment.OX4] = localX2Cos - localYSin;\r\n offset[RegionAttachment.OY4] = localYCos + localX2Sin;\r\n }\r\n\r\n setRegion(region: TextureRegion): void {\r\n this.region = region;\r\n let uvs = this.uvs;\r\n if (region.rotate) {\r\n uvs[2] = region.u;\r\n uvs[3] = region.v2;\r\n uvs[4] = region.u;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v;\r\n uvs[0] = region.u2;\r\n uvs[1] = region.v2;\r\n } else {\r\n uvs[0] = region.u;\r\n uvs[1] = region.v2;\r\n uvs[2] = region.u;\r\n uvs[3] = region.v;\r\n uvs[4] = region.u2;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v2;\r\n }\r\n }\r\n\r\n computeWorldVertices(bone: Bone, worldVertices: ArrayLike, offset: number, stride: number) {\r\n let vertexOffset = this.offset;\r\n let mat = bone.matrix;\r\n let x = mat.tx, y = mat.ty;\r\n let a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n let offsetX = 0, offsetY = 0;\r\n\r\n offsetX = vertexOffset[RegionAttachment.OX1];\r\n offsetY = vertexOffset[RegionAttachment.OY1];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x; // br\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n\r\n offsetX = vertexOffset[RegionAttachment.OX2];\r\n offsetY = vertexOffset[RegionAttachment.OY2];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x; // bl\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n\r\n offsetX = vertexOffset[RegionAttachment.OX3];\r\n offsetY = vertexOffset[RegionAttachment.OY3];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x; // ul\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n\r\n offsetX = vertexOffset[RegionAttachment.OX4];\r\n offsetY = vertexOffset[RegionAttachment.OY4];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x; // ur\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n }\r\n\r\n copy (): Attachment {\r\n let copy = new RegionAttachment(this.name);\r\n copy.region = this.region;\r\n copy.rendererObject = this.rendererObject;\r\n copy.path = this.path;\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.scaleX = this.scaleX;\r\n copy.scaleY = this.scaleY;\r\n copy.rotation = this.rotation;\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\r\n Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n\texport class JitterEffect implements VertexEffect {\r\n\t\tjitterX = 0;\r\n\t\tjitterY = 0;\r\n\r\n\t\tconstructor (jitterX: number, jitterY: number) {\r\n\t\t\tthis.jitterX = jitterX;\r\n\t\t\tthis.jitterY = jitterY;\r\n\t\t}\r\n\r\n\t\tbegin(skeleton: Skeleton): void {\r\n\t\t}\r\n\r\n\t\ttransform(position: Vector2, uv: Vector2, light: Color, dark: Color): void {\r\n\t\t\tposition.x += MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n\t\t\tposition.y += MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n\t\t}\r\n\r\n\t\tend(): void {\r\n\t\t}\r\n\t}\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n\texport class SwirlEffect implements VertexEffect {\r\n\t\tstatic interpolation = new PowOut(2);\r\n\t\tcenterX = 0;\r\n\t\tcenterY = 0;\r\n\t\tradius = 0;\r\n\t\tangle = 0;\r\n\t\tprivate worldX = 0;\r\n\t\tprivate worldY = 0;\r\n\r\n\t\tconstructor (radius: number) {\r\n\t\t\tthis.radius = radius;\r\n\t\t}\r\n\r\n\t\tbegin(skeleton: Skeleton): void {\r\n\t\t\tthis.worldX = skeleton.x + this.centerX;\r\n\t\t\tthis.worldY = skeleton.y + this.centerY;\r\n\t\t}\r\n\r\n\t\ttransform(position: Vector2, uv: Vector2, light: Color, dark: Color): void {\r\n\t\t\tlet radAngle = this.angle * MathUtils.degreesToRadians;\r\n\t\t\tlet x = position.x - this.worldX;\r\n\t\t\tlet y = position.y - this.worldY;\r\n\t\t\tlet dist = Math.sqrt(x * x + y * y);\r\n\t\t\tif (dist < this.radius) {\r\n\t\t\t\tlet theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\r\n\t\t\t\tlet cos = Math.cos(theta);\r\n\t\t\t\tlet sin = Math.sin(theta);\r\n\t\t\t\tposition.x = cos * x - sin * y + this.worldX;\r\n\t\t\t\tposition.y = sin * x + cos * y + this.worldY;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tend(): void {\r\n\t\t}\r\n\t}\r\n}\r\n","interface Math {\r\n fround(n: number): number;\r\n}\r\n\r\n(() => {\r\n if (!Math.fround) {\r\n Math.fround = Math.fround = (function(array) {\r\n return function(x: number) {\r\n return array[0] = x, array[0];\r\n };\r\n })(new Float32Array(1));\r\n }\r\n})();\r\n","/// \n/// \n/// \nnamespace pixi_spine {\n /* Esoteric Software SPINE wrapper for pixi.js */\n core.Bone.yDown = true;\n\n let tempRgb = [0, 0, 0];\n\n export interface ISpineDisplayObject extends PIXI.DisplayObject {\n region?: core.TextureRegion;\n attachment?: core.Attachment;\n }\n\n export class SpineSprite extends PIXI.Sprite implements ISpineDisplayObject {\n region?: core.TextureRegion = null;\n attachment?: core.Attachment = null;\n }\n\n const gp = PIXI.GraphicsGeometry.prototype as any;\n if (!gp.invalidate) {\n let tmp = [];\n gp.invalidate = function() {\n const t = this.graphicsData;\n tmp.push(0);\n this.graphicsData = tmp;\n this.clear();\n this.graphicsData = t;\n }\n }\n\n export class SpineMesh extends PIXI.SimpleMesh implements ISpineDisplayObject {\n region?: core.TextureRegion = null;\n attachment?: core.Attachment = null;\n\n constructor(texture: PIXI.Texture, vertices?: Float32Array, uvs?: Float32Array, indices?: Uint16Array, drawMode?: number) {\n super(texture, vertices, uvs, indices, drawMode);\n }\n }\n\n /**\n * A class that enables the you to import and run your spine animations in pixi.\n * The Spine animation data needs to be loaded using either the Loader or a SpineLoader before it can be used by this class\n * See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source\n *\n * ```js\n * let spineAnimation = new spine(spineData);\n * ```\n *\n * @class\n * @extends Container\n * @memberof spine\n * @param spineData {object} The spine data loaded from a spine atlas.\n */\n export class Spine extends PIXI.Container {\n static globalAutoUpdate: boolean = true;\n static globalDelayLimit: number = 0;\n\n tintRgb: ArrayLike;\n spineData: core.SkeletonData;\n skeleton: core.Skeleton;\n stateData: core.AnimationStateData;\n state: core.AnimationState;\n slotContainers: Array;\n tempClipContainers: Array;\n localDelayLimit: number;\n private _autoUpdate: boolean;\n private _visible: boolean;\n\n constructor(spineData: core.SkeletonData) {\n super();\n\n if (!spineData) {\n throw new Error('The spineData param is required.');\n }\n\n if ((typeof spineData) === \"string\") {\n throw new Error('spineData param cant be string. Please use spine.Spine.fromAtlas(\"YOUR_RESOURCE_NAME\") from now on.');\n }\n\n /**\n * The spineData object\n *\n * @member {object}\n */\n this.spineData = spineData;\n\n /**\n * A spine Skeleton object\n *\n * @member {object}\n */\n this.skeleton = new core.Skeleton(spineData);\n this.skeleton.updateWorldTransform();\n\n /**\n * A spine AnimationStateData object created from the spine data passed in the constructor\n *\n * @member {object}\n */\n this.stateData = new core.AnimationStateData(spineData);\n\n /**\n * A spine AnimationState object created from the spine AnimationStateData object\n *\n * @member {object}\n */\n this.state = new core.AnimationState(this.stateData);\n\n /**\n * An array of containers\n *\n * @member {Container[]}\n */\n this.slotContainers = [];\n\n this.tempClipContainers = [];\n\n for (let i = 0, n = this.skeleton.slots.length; i < n; i++) {\n let slot = this.skeleton.slots[i];\n let attachment: any = slot.getAttachment();\n let slotContainer = this.newContainer();\n this.slotContainers.push(slotContainer);\n this.addChild(slotContainer);\n this.tempClipContainers.push(null);\n\n if (attachment instanceof core.RegionAttachment) {\n let spriteName = (attachment.region as core.TextureAtlasRegion).name;\n let sprite = this.createSprite(slot, attachment, spriteName);\n slot.currentSprite = sprite;\n slot.currentSpriteName = spriteName;\n slotContainer.addChild(sprite);\n }\n else if (attachment instanceof core.MeshAttachment) {\n let mesh = this.createMesh(slot, attachment);\n slot.currentMesh = mesh;\n slot.currentMeshName = attachment.name;\n slotContainer.addChild(mesh);\n }\n else if (attachment instanceof core.ClippingAttachment) {\n this.createGraphics(slot, attachment);\n slotContainer.addChild(slot.clippingContainer);\n slotContainer.addChild(slot.currentGraphics);\n }\n else {\n continue;\n }\n\n }\n\n /**\n * The tint applied to all spine slots. This is a [r,g,b] value. A value of [1,1,1] will remove any tint effect.\n *\n * @member {number}\n * @memberof spine.Spine#\n */\n this.tintRgb = new Float32Array([1, 1, 1]);\n\n this.autoUpdate = true;\n this.visible = true;\n }\n\n /**\n * If this flag is set to true, the spine animation will be automatically updated every\n * time the object id drawn. The down side of this approach is that the delta time is\n * automatically calculated and you could miss out on cool effects like slow motion,\n * pause, skip ahead and the sorts. Most of these effects can be achieved even with\n * autoUpdate enabled but are harder to achieve.\n *\n * @member {boolean}\n * @memberof spine.Spine#\n * @default true\n */\n get autoUpdate(): boolean {\n return this._autoUpdate;\n }\n\n set autoUpdate(value: boolean) {\n if (value !== this._autoUpdate) {\n this._autoUpdate = value;\n this.updateTransform = value ? Spine.prototype.autoUpdateTransform : PIXI.Container.prototype.updateTransform;\n }\n }\n\n /**\n * The visibility of the spine object. If false the object will not be drawn,\n * the updateTransform function will not be called, and the spine will not be automatically updated.\n *\n * @member {boolean}\n * @memberof spine.Spine#\n * @default true\n */\n get visible(): boolean {\n return this._visible;\n }\n\n set visible(value: boolean) {\n if (value !== this._visible) {\n this._visible = value;\n if (value) {\n this.lastTime = 0;\n }\n }\n }\n\n /**\n * The tint applied to the spine object. This is a hex value. A value of 0xFFFFFF will remove any tint effect.\n *\n * @member {number}\n * @memberof spine.Spine#\n * @default 0xFFFFFF\n */\n get tint(): number {\n return PIXI.utils.rgb2hex(this.tintRgb as any);\n }\n\n set tint(value: number) {\n this.tintRgb = PIXI.utils.hex2rgb(value, this.tintRgb as any);\n }\n\n /**\n * Limit value for the update dt with Spine.globalDelayLimit\n * that can be overridden with localDelayLimit\n * @return {number} - Maximum processed dt value for the update\n */\n get delayLimit() : number {\n let limit = typeof this.localDelayLimit !== \"undefined\"?\n this.localDelayLimit: Spine.globalDelayLimit;\n\n // If limit is 0, this means there is no limit for the delay\n return limit || Number.MAX_VALUE\n }\n\n /**\n * Update the spine skeleton and its animations by delta time (dt)\n *\n * @param dt {number} Delta time. Time by which the animation should be updated\n */\n update(dt: number) {\n // Limit delta value to avoid animation jumps\n let delayLimit = this.delayLimit;\n if (dt > delayLimit) dt = delayLimit;\n\n this.state.update(dt);\n this.state.apply(this.skeleton);\n\n //check we haven't been destroyed via a spine event callback in state update\n if(!this.skeleton)\n return;\n\n this.skeleton.updateWorldTransform();\n\n let slots = this.skeleton.slots;\n\n // in case pixi has double tint\n let globalClr = (this as any).color;\n let light: ArrayLike = null, dark: ArrayLike = null;\n\n if (globalClr) {\n light = globalClr.light;\n dark = globalClr.dark;\n } else {\n light = this.tintRgb;\n }\n\n let thack = false;\n\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n let attachment = slot.getAttachment();\n let slotContainer = this.slotContainers[i];\n\n if (!attachment) {\n slotContainer.visible = false;\n continue;\n }\n\n let spriteColor: any = null;\n\n let attColor = (attachment as any).color;\n if (attachment instanceof core.RegionAttachment) {\n let region = (attachment as core.RegionAttachment).region;\n if (region) {\n if (slot.currentMesh) {\n slot.currentMesh.visible = false;\n slot.currentMesh = null;\n slot.currentMeshName = undefined;\n }\n let ar = region as core.TextureAtlasRegion;\n if (!slot.currentSpriteName || slot.currentSpriteName !== ar.name) {\n let spriteName = ar.name;\n if (slot.currentSprite) {\n slot.currentSprite.visible = false;\n }\n slot.sprites = slot.sprites || {};\n if (slot.sprites[spriteName] !== undefined) {\n slot.sprites[spriteName].visible = true;\n }\n else {\n let sprite = this.createSprite(slot, attachment, spriteName);\n slotContainer.addChild(sprite);\n }\n slot.currentSprite = slot.sprites[spriteName];\n slot.currentSpriteName = spriteName;\n\n // force sprite update when attachment name is same.\n // issues https://github.com/pixijs/pixi-spine/issues/318\n } else if (slot.currentSpriteName === ar.name && !slot.hackRegion) {\n this.setSpriteRegion(attachment, slot.currentSprite, region);\n }\n }\n\n let transform = slotContainer.transform;\n transform.setFromMatrix(slot.bone.matrix);\n\n if (slot.currentSprite.color) {\n //YAY! double - tint!\n spriteColor = slot.currentSprite.color;\n } else {\n tempRgb[0] = light[0] * slot.color.r * attColor.r;\n tempRgb[1] = light[1] * slot.color.g * attColor.g;\n tempRgb[2] = light[2] * slot.color.b * attColor.b;\n slot.currentSprite.tint = PIXI.utils.rgb2hex(tempRgb);\n }\n slot.currentSprite.blendMode = slot.blendMode;\n }\n else if (attachment instanceof core.MeshAttachment) {\n if (slot.currentSprite) {\n //TODO: refactor this thing, switch it on and off for container\n slot.currentSprite.visible = false;\n slot.currentSprite = null;\n slot.currentSpriteName = undefined;\n\n //TODO: refactor this shit\n const transform = new PIXI.Transform();\n (transform as any)._parentID = -1;\n (transform as any)._worldID = (slotContainer.transform as any)._worldID;\n slotContainer.transform = transform;\n }\n if (!slot.currentMeshName || slot.currentMeshName !== attachment.name) {\n let meshName = attachment.name;\n if (slot.currentMesh) {\n slot.currentMesh.visible = false;\n }\n\n slot.meshes = slot.meshes || {};\n\n if (slot.meshes[meshName] !== undefined) {\n slot.meshes[meshName].visible = true;\n }\n else {\n let mesh = this.createMesh(slot, attachment);\n slotContainer.addChild(mesh);\n }\n\n slot.currentMesh = slot.meshes[meshName];\n slot.currentMeshName = meshName;\n }\n (attachment as core.VertexAttachment).computeWorldVerticesOld(slot, slot.currentMesh.vertices);\n if (slot.currentMesh.color) {\n // pixi-heaven\n spriteColor = slot.currentMesh.color;\n } else {\n tempRgb[0] = light[0] * slot.color.r * attColor.r;\n tempRgb[1] = light[1] * slot.color.g * attColor.g;\n tempRgb[2] = light[2] * slot.color.b * attColor.b;\n slot.currentMesh.tint = PIXI.utils.rgb2hex(tempRgb);\n }\n slot.currentMesh.blendMode = slot.blendMode;\n }\n else if (attachment instanceof core.ClippingAttachment) {\n if (!slot.currentGraphics) {\n this.createGraphics(slot, attachment);\n slotContainer.addChild(slot.clippingContainer);\n slotContainer.addChild(slot.currentGraphics);\n }\n this.updateGraphics(slot, attachment);\n slotContainer.alpha = 1.0;\n slotContainer.visible = true;\n continue;\n }\n else {\n slotContainer.visible = false;\n continue;\n }\n slotContainer.visible = true;\n\n // pixi has double tint\n if (spriteColor) {\n let r0 = slot.color.r * attColor.r;\n let g0 = slot.color.g * attColor.g;\n let b0 = slot.color.b * attColor.b;\n\n //YAY! double-tint!\n spriteColor.setLight(\n light[0] * r0 + dark[0] * (1.0 - r0),\n light[1] * g0 + dark[1] * (1.0 - g0),\n light[2] * b0 + dark[2] * (1.0 - b0),\n );\n if (slot.darkColor) {\n r0 = slot.darkColor.r;\n g0 = slot.darkColor.g;\n b0 = slot.darkColor.b;\n } else {\n r0 = 0.0;\n g0 = 0.0;\n b0 = 0.0;\n }\n spriteColor.setDark(\n light[0] * r0 + dark[0] * (1 - r0),\n light[1] * g0 + dark[1] * (1 - g0),\n light[2] * b0 + dark[2] * (1 - b0),\n );\n }\n\n slotContainer.alpha = slot.color.a;\n }\n\n //== this is clipping implementation ===\n //TODO: remove parent hacks when pixi masks allow it\n let drawOrder = this.skeleton.drawOrder;\n let clippingAttachment: core.ClippingAttachment = null;\n let clippingContainer: PIXI.Container = null;\n\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let slot = slots[drawOrder[i].data.index];\n let slotContainer = this.slotContainers[drawOrder[i].data.index];\n\n if (!clippingContainer) {\n\t\t\t\t\t//Adding null check as it is possible for slotContainer.parent to be null in the event of a spine being disposed off in its loop callback\n if (slotContainer.parent !== null && slotContainer.parent !== this) {\n slotContainer.parent.removeChild(slotContainer);\n //silend add hack\n (slotContainer as any).parent = this;\n }\n }\n if (slot.currentGraphics && slot.getAttachment()) {\n clippingContainer = slot.clippingContainer;\n clippingAttachment = slot.getAttachment() as core.ClippingAttachment;\n clippingContainer.children.length = 0;\n this.children[i] = slotContainer;\n\n if (clippingAttachment.endSlot == slot.data) {\n clippingAttachment.endSlot = null;\n }\n\n } else {\n if (clippingContainer) {\n let c = this.tempClipContainers[i];\n if (!c) {\n c = this.tempClipContainers[i] = this.newContainer();\n c.visible = false;\n }\n this.children[i] = c;\n\n //silent remove hack\n (slotContainer as any).parent = null;\n clippingContainer.addChild(slotContainer);\n if (clippingAttachment.endSlot == slot.data) {\n clippingContainer.renderable = true;\n clippingContainer = null;\n clippingAttachment = null;\n }\n } else {\n this.children[i] = slotContainer;\n }\n }\n }\n };\n\n private setSpriteRegion(attachment: core.RegionAttachment, sprite: SpineSprite, region: core.TextureRegion) {\n // prevent setters calling when attachment and region is same\n if(sprite.attachment === attachment && sprite.region === region) {\n return;\n }\n\n sprite.region = region;\n sprite.attachment = attachment;\n\n sprite.texture = region.texture;\n sprite.rotation = attachment.rotation * core.MathUtils.degRad;\n sprite.position.x = attachment.x;\n sprite.position.y = attachment.y;\n sprite.alpha = attachment.color.a;\n\n if (!region.size) {\n sprite.scale.x = attachment.scaleX * attachment.width / region.originalWidth;\n sprite.scale.y = -attachment.scaleY * attachment.height / region.originalHeight;\n } else {\n //hacked!\n sprite.scale.x = region.size.width / region.originalWidth;\n sprite.scale.y = -region.size.height / region.originalHeight;\n }\n }\n\n private setMeshRegion(attachment: core.MeshAttachment, mesh: SpineMesh, region: core.TextureRegion) {\n\n if(mesh.attachment === attachment && mesh.region === region) {\n return;\n }\n\n mesh.region = region;\n mesh.attachment = attachment;\n mesh.texture = region.texture;\n region.texture.updateUvs();\n mesh.uvBuffer.update(attachment.regionUVs);\n }\n\n protected lastTime: number;\n\n /**\n * When autoupdate is set to yes this function is used as pixi's updateTransform function\n *\n * @private\n */\n autoUpdateTransform() {\n if (Spine.globalAutoUpdate) {\n this.lastTime = this.lastTime || Date.now();\n let timeDelta = (Date.now() - this.lastTime) * 0.001;\n this.lastTime = Date.now();\n this.update(timeDelta);\n } else {\n this.lastTime = 0;\n }\n\n PIXI.Container.prototype.updateTransform.call(this);\n };\n\n /**\n * Create a new sprite to be used with core.RegionAttachment\n *\n * @param slot {spine.Slot} The slot to which the attachment is parented\n * @param attachment {spine.RegionAttachment} The attachment that the sprite will represent\n * @private\n */\n createSprite(slot: core.Slot, attachment: core.RegionAttachment, defName: string) {\n let region = attachment.region;\n if (slot.hackAttachment === attachment) {\n region = slot.hackRegion;\n }\n let texture = region.texture;\n let sprite = this.newSprite(texture);\n\n sprite.anchor.set(0.5);\n this.setSpriteRegion(attachment, sprite, attachment.region);\n\n slot.sprites = slot.sprites || {};\n slot.sprites[defName] = sprite;\n return sprite;\n };\n\n /**\n * Creates a Strip from the spine data\n * @param slot {spine.Slot} The slot to which the attachment is parented\n * @param attachment {spine.RegionAttachment} The attachment that the sprite will represent\n * @private\n */\n createMesh(slot: core.Slot, attachment: core.MeshAttachment) {\n let region = attachment.region;\n if (slot.hackAttachment === attachment) {\n region = slot.hackRegion;\n slot.hackAttachment = null;\n slot.hackRegion = null;\n }\n let strip = this.newMesh(\n region.texture,\n new Float32Array(attachment.regionUVs.length),\n attachment.regionUVs,\n new Uint16Array(attachment.triangles),\n PIXI.DRAW_MODES.TRIANGLES);\n\n if (typeof (strip as any)._canvasPadding !== \"undefined\") {\n (strip as any)._canvasPadding = 1.5;\n }\n\n strip.alpha = attachment.color.a;\n\n strip.region = attachment.region;\n this.setMeshRegion(attachment, strip, region);\n\n slot.meshes = slot.meshes || {};\n slot.meshes[attachment.name] = strip;\n return strip;\n };\n\n static clippingPolygon: Array = [];\n\n createGraphics(slot: core.Slot, clip: core.ClippingAttachment) {\n let graphics = this.newGraphics();\n let poly = new PIXI.Polygon([]);\n graphics.clear();\n graphics.beginFill(0xffffff, 1);\n graphics.drawPolygon(poly as any);\n graphics.renderable = false;\n slot.currentGraphics = graphics;\n slot.clippingContainer = this.newContainer();\n slot.clippingContainer.mask = slot.currentGraphics;\n\n return graphics;\n }\n\n updateGraphics(slot: core.Slot, clip: core.ClippingAttachment) {\n let geom = slot.currentGraphics.geometry;\n let vertices = (geom.graphicsData[0].shape as PIXI.Polygon).points;\n let n = clip.worldVerticesLength;\n vertices.length = n;\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\n geom.invalidate();\n }\n\n /**\n * Changes texture in attachment in specific slot.\n *\n * PIXI runtime feature, it was made to satisfy our users.\n *\n * @param slotIndex {number}\n * @param [texture = null] {PIXI.Texture} If null, take default (original) texture\n * @param [size = null] {PIXI.Point} sometimes we need new size for region attachment, you can pass 'texture.orig' there\n * @returns {boolean} Success flag\n */\n hackTextureBySlotIndex(slotIndex: number, texture: PIXI.Texture = null, size: PIXI.Rectangle = null) {\n let slot = this.skeleton.slots[slotIndex];\n if (!slot) {\n return false;\n }\n let attachment: any = slot.getAttachment();\n let region: core.TextureRegion = attachment.region;\n if (texture) {\n region = new core.TextureRegion();\n region.texture = texture;\n region.size = size;\n slot.hackRegion = region;\n slot.hackAttachment = attachment;\n } else {\n slot.hackRegion = null;\n slot.hackAttachment = null;\n }\n if (slot.currentSprite && slot.currentSprite.region != region) {\n this.setSpriteRegion(attachment, slot.currentSprite, region);\n slot.currentSprite.region = region;\n } else if (slot.currentMesh && slot.currentMesh.region != region) {\n this.setMeshRegion(attachment, slot.currentMesh, region);\n }\n return true;\n }\n\n /**\n * Changes texture in attachment in specific slot.\n *\n * PIXI runtime feature, it was made to satisfy our users.\n *\n * @param slotName {string}\n * @param [texture = null] {PIXI.Texture} If null, take default (original) texture\n * @param [size = null] {PIXI.Point} sometimes we need new size for region attachment, you can pass 'texture.orig' there\n * @returns {boolean} Success flag\n */\n hackTextureBySlotName(slotName: string, texture: PIXI.Texture = null, size: PIXI.Rectangle = null) {\n let index = this.skeleton.findSlotIndex(slotName);\n if (index == -1) {\n return false;\n }\n return this.hackTextureBySlotIndex(index, texture, size);\n }\n\n /**\n * Changes texture of an attachment\n *\n * PIXI runtime feature, it was made to satisfy our users.\n *\n * @param slotName {string}\n * @param attachmentName {string}\n * @param [texture = null] {PIXI.Texture} If null, take default (original) texture\n * @param [size = null] {PIXI.Point} sometimes we need new size for region attachment, you can pass 'texture.orig' there\n * @returns {boolean} Success flag\n */\n hackTextureAttachment(slotName: string, attachmentName: string, texture, size: PIXI.Rectangle = null) {\n // changes the texture of an attachment at the skeleton level\n const slotIndex = this.skeleton.findSlotIndex(slotName)\n const attachment: any = this.skeleton.getAttachmentByName(slotName, attachmentName)\n attachment.region.texture = texture\n\n const slot = this.skeleton.slots[slotIndex]\n if (!slot) {\n return false\n }\n\n // gets the currently active attachment in this slot\n const currentAttachment: any = slot.getAttachment()\n if (attachmentName === currentAttachment.name) {\n // if the attachment we are changing is currently active, change the the live texture\n let region: core.TextureRegion = attachment.region\n if (texture) {\n region = new core.TextureRegion()\n region.texture = texture\n region.size = size\n slot.hackRegion = region\n slot.hackAttachment = currentAttachment\n } else {\n slot.hackRegion = null\n slot.hackAttachment = null\n }\n if (slot.currentSprite && slot.currentSprite.region != region) {\n this.setSpriteRegion(currentAttachment, slot.currentSprite, region)\n slot.currentSprite.region = region\n } else if (slot.currentMesh && slot.currentMesh.region != region) {\n this.setMeshRegion(currentAttachment, slot.currentMesh, region)\n }\n return true\n }\n return false\n }\n\n //those methods can be overriden to spawn different classes\n newContainer() {\n return new PIXI.Container();\n }\n\n newSprite(tex: PIXI.Texture) {\n return new SpineSprite(tex);\n }\n\n newGraphics() {\n return new PIXI.Graphics();\n }\n\n newMesh(texture: PIXI.Texture, vertices?: Float32Array, uvs?: Float32Array, indices?: Uint16Array, drawMode?: number) {\n return new SpineMesh(texture, vertices, uvs, indices, drawMode);\n }\n\n transformHack() {\n return 1;\n }\n\n /**\n * Hack for pixi-display and pixi-lights. Every attachment name ending with a suffix will be added to different layer\n * @param nameSuffix\n * @param group\n * @param outGroup\n */\n hackAttachmentGroups(nameSuffix: string, group: any, outGroup: any) {\n if (!nameSuffix) {\n return;\n }\n const list_d = [], list_n = [];\n for (let i = 0, len = this.skeleton.slots.length; i < len; i++) {\n const slot = this.skeleton.slots[i];\n const name = slot.currentSpriteName || slot.currentMeshName || \"\";\n const target = slot.currentSprite || slot.currentMesh;\n if(name.endsWith(nameSuffix)){\n target.parentGroup = group;\n list_n.push(target);\n }else if(outGroup && target){\n target.parentGroup = outGroup;\n list_d.push(target);\n }\n }\n return [list_d,list_n];\n };\n\n destroy(options?: any): void {\n for (let i = 0, n = this.skeleton.slots.length; i < n; i++) {\n let slot = this.skeleton.slots[i];\n for (let name in slot.meshes) {\n slot.meshes[name].destroy(options);\n }\n slot.meshes = null;\n\n for (let name in slot.sprites) {\n slot.sprites[name].destroy(options);\n }\n slot.sprites = null;\n }\n\n for (let i = 0, n = this.slotContainers.length; i < n; i++) {\n this.slotContainers[i].destroy(options);\n }\n this.spineData = null;\n this.skeleton = null;\n this.slotContainers = null;\n this.stateData = null;\n this.state = null;\n this.tempClipContainers = null;\n\n super.destroy(options);\n }\n }\n\n function SlotContainerUpdateTransformV3() {\n let pt = this.parent.worldTransform;\n let wt = this.worldTransform;\n let lt = this.localTransform;\n wt.a = lt.a * pt.a + lt.b * pt.c;\n wt.b = lt.a * pt.b + lt.b * pt.d;\n wt.c = lt.c * pt.a + lt.d * pt.c;\n wt.d = lt.c * pt.b + lt.d * pt.d;\n wt.tx = lt.tx * pt.a + lt.ty * pt.c + pt.tx;\n wt.ty = lt.tx * pt.b + lt.ty * pt.d + pt.ty;\n this.worldAlpha = this.alpha * this.parent.worldAlpha;\n this._currentBounds = null;\n }\n}\n","namespace pixi_spine {\r\n (PIXI as any).spine = pixi_spine;\r\n\r\n // texture patch for v5\r\n\r\n const TextureProto = PIXI.Texture.prototype as any;\r\n\r\n if (!TextureProto._updateUvs) {\r\n TextureProto._updateUvs = TextureProto.updateUvs;\r\n }\r\n}\r\n","declare namespace PIXI.loaders {\r\n export interface IMetadata {\r\n spineSkeletonScale?: number;\r\n spineAtlas?: any;\r\n spineAtlasSuffix?: string;\r\n spineAtlasFile?: string;\r\n spineMetadata?: any;\r\n imageNamePrefix?: string;\r\n atlasRawData?: string;\r\n imageLoader?: any;\r\n images?: any;\r\n imageMetadata?: any;\r\n image?: any;\r\n }\r\n}\r\n\r\nnamespace pixi_spine {\r\n\r\n function isJson(resource: PIXI.LoaderResource) {\r\n return resource.type === PIXI.LoaderResource.TYPE.JSON;\r\n }\r\n\r\n function isBuffer(resource: PIXI.LoaderResource) {\r\n return resource.xhrType === PIXI.LoaderResource.XHR_RESPONSE_TYPE.BUFFER;\r\n }\r\n\r\n PIXI.LoaderResource.setExtensionXhrType('skel', PIXI.LoaderResource.XHR_RESPONSE_TYPE.BUFFER);\r\n\r\n export class AtlasParser {\r\n static use(this: PIXI.Loader, resource: PIXI.LoaderResource, next: () => any) {\r\n // skip if no data, its not json, or it isn't atlas data\r\n if (!resource.data) {\r\n return next();\r\n }\r\n\r\n const isJsonSpineModel = isJson(resource) && resource.data.bones;\r\n const isBinarySpineModel = isBuffer(resource) && (resource.extension === 'skel' || resource.metadata.spineMetadata);\r\n\r\n if (!isJsonSpineModel && !isBinarySpineModel) {\r\n return next();\r\n }\r\n\r\n let parser: core.SkeletonJson | core.SkeletonBinary = null;\r\n let dataToParse = resource.data;\r\n\r\n if (isJsonSpineModel) {\r\n parser = new core.SkeletonJson(null);\r\n } else {\r\n parser = new core.SkeletonBinary(null);\r\n if (resource.data instanceof ArrayBuffer) {\r\n dataToParse = new Uint8Array(resource.data);\r\n }\r\n }\r\n\r\n const metadata = resource.metadata || {};\r\n const metadataSkeletonScale = metadata ? resource.metadata.spineSkeletonScale : null;\r\n\r\n if (metadataSkeletonScale) {\r\n parser.scale = metadataSkeletonScale;\r\n }\r\n\r\n const metadataAtlas = metadata ? resource.metadata.spineAtlas : null;\r\n if (metadataAtlas === false) {\r\n return next();\r\n }\r\n if (metadataAtlas && metadataAtlas.pages) {\r\n //its an atlas!\r\n parser.attachmentLoader = new core.AtlasAttachmentLoader(metadataAtlas);\r\n resource.spineData = parser.readSkeletonData(dataToParse);\r\n resource.spineAtlas = metadataAtlas;\r\n\r\n return next();\r\n }\r\n\r\n const metadataAtlasSuffix = metadata.spineAtlasSuffix || '.atlas';\r\n\r\n /**\r\n * use a bit of hackery to load the atlas file, here we assume that the .json, .atlas and .png files\r\n * that correspond to the spine file are in the same base URL and that the .json and .atlas files\r\n * have the same name\r\n */\r\n let atlasPath = resource.url;\r\n let queryStringPos = atlasPath.indexOf('?');\r\n if (queryStringPos > 0) {\r\n //remove querystring\r\n atlasPath = atlasPath.substr(0, queryStringPos)\r\n }\r\n atlasPath = atlasPath.substr(0, atlasPath.lastIndexOf('.')) + metadataAtlasSuffix;\r\n // use atlas path as a params. (no need to use same atlas file name with json file name)\r\n if (resource.metadata && resource.metadata.spineAtlasFile) {\r\n atlasPath = resource.metadata.spineAtlasFile;\r\n }\r\n\r\n //remove the baseUrl\r\n atlasPath = atlasPath.replace(this.baseUrl, '');\r\n\r\n const atlasOptions = {\r\n crossOrigin: resource.crossOrigin,\r\n xhrType: PIXI.LoaderResource.XHR_RESPONSE_TYPE.TEXT,\r\n metadata: metadata.spineMetadata || null,\r\n parentResource: resource\r\n };\r\n const imageOptions = {\r\n crossOrigin: resource.crossOrigin,\r\n metadata: metadata.imageMetadata || null,\r\n parentResource: resource\r\n };\r\n let baseUrl = resource.url.substr(0, resource.url.lastIndexOf('/') + 1);\r\n //remove the baseUrl\r\n baseUrl = baseUrl.replace(this.baseUrl, '');\r\n\r\n const namePrefix = metadata.imageNamePrefix || (resource.name + '_atlas_page_');\r\n\r\n const adapter = metadata.images ? staticImageLoader(metadata.images)\r\n : metadata.image ? staticImageLoader({ 'default': metadata.image })\r\n : metadata.imageLoader ? metadata.imageLoader(this, namePrefix, baseUrl, imageOptions)\r\n : imageLoaderAdapter(this, namePrefix, baseUrl, imageOptions);\r\n\r\n const createSkeletonWithRawAtlas = function (rawData: string) {\r\n new core.TextureAtlas(rawData, adapter, function (spineAtlas) {\r\n if (spineAtlas) {\r\n parser.attachmentLoader = new core.AtlasAttachmentLoader(spineAtlas);\r\n resource.spineData = parser.readSkeletonData(dataToParse);\r\n resource.spineAtlas = spineAtlas;\r\n }\r\n next();\r\n });\r\n };\r\n\r\n if (resource.metadata && resource.metadata.atlasRawData) {\r\n createSkeletonWithRawAtlas(resource.metadata.atlasRawData)\r\n } else {\r\n this.add(resource.name + '_atlas', atlasPath, atlasOptions, function (atlasResource: any) {\r\n if (!atlasResource.error) {\r\n createSkeletonWithRawAtlas(atlasResource.data);\r\n } else {\r\n next();\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n export function imageLoaderAdapter(loader: any, namePrefix: any, baseUrl: any, imageOptions: any) {\r\n if (baseUrl && baseUrl.lastIndexOf('/') !== (baseUrl.length - 1)) {\r\n baseUrl += '/';\r\n }\r\n return function (line: string, callback: (baseTexture: PIXI.BaseTexture) => any) {\r\n const name = namePrefix + line;\r\n const url = baseUrl + line;\r\n\r\n const cachedResource = loader.resources[name];\r\n if (cachedResource) {\r\n const done = () => {\r\n callback(cachedResource.texture.baseTexture)\r\n }\r\n if (cachedResource.texture) {\r\n done();\r\n }\r\n else {\r\n cachedResource.onAfterMiddleware.add(done);\r\n }\r\n } else {\r\n loader.add(name, url, imageOptions, (resource: PIXI.LoaderResource) => {\r\n if (!resource.error) {\r\n callback(resource.texture.baseTexture);\r\n } else {\r\n callback(null);\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n export function syncImageLoaderAdapter(baseUrl: any, crossOrigin: any) {\r\n if (baseUrl && baseUrl.lastIndexOf('/') !== (baseUrl.length - 1)) {\r\n baseUrl += '/';\r\n }\r\n return function (line: any, callback: any) {\r\n callback(PIXI.BaseTexture.from(line, crossOrigin));\r\n }\r\n }\r\n\r\n export function staticImageLoader(pages: { [key: string]: (PIXI.BaseTexture | PIXI.Texture) }) {\r\n return function (line: any, callback: any) {\r\n let page = pages[line] || pages['default'] as any;\r\n if (page && page.baseTexture)\r\n callback(page.baseTexture);\r\n else\r\n callback(page);\r\n }\r\n }\r\n\r\n if (PIXI.Loader) {\r\n PIXI.Loader.registerPlugin(AtlasParser);\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/package.json b/package.json index 7e24b30d..88da8452 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pixi-spine", - "version": "2.1.12", + "version": "2.1.13", "description": "Spine implementation for pixi v^5", "author": "Mat Groves", "contributors": [