diff --git a/bin/pixi-spine.js b/bin/pixi-spine.js index a8be2515..94c39d4c 100644 --- a/bin/pixi-spine.js +++ b/bin/pixi-spine.js @@ -1,6 +1,6 @@ /*! * pixi-spine - v1.2.0 - * Compiled Wed Oct 19 2016 21:49:57 GMT+0300 (RTZ 2 (зима)) + * Compiled Wed Oct 19 2016 21:56:10 GMT+0300 (RTZ 2 (зима)) * * pixi-spine is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license @@ -1541,74 +1541,6 @@ var Bone = (function () { } return; } - case BoneData_1.TransformMode.InheritRotation: { - var rotationY = rotation + 90 + shearY; - var la = Utils_1.MathUtils.cosDeg(rotation + shearX) * scaleX; - var lb = Utils_1.MathUtils.cosDeg(rotationY) * scaleY; - var lc = Utils_1.MathUtils.sinDeg(rotation + shearX) * scaleX; - var ld = Utils_1.MathUtils.sinDeg(rotationY) * scaleY; - pa = 1; - pb = 0; - pc = 0; - pd = 1; - do { - var cos = Utils_1.MathUtils.cosDeg(parent.arotation), sin = Utils_1.MathUtils.sinDeg(parent.arotation); - var temp = pa * cos + pb * sin; - pb = pb * cos - pa * sin; - pa = temp; - temp = pc * cos + pd * sin; - pd = pd * cos - pc * sin; - pc = temp; - if (parent.data.transformMode === BoneData_1.TransformMode.InheritScale || - parent.data.transformMode === BoneData_1.TransformMode.OnlyTranslation) - break; - parent = parent.parent; - } while (parent != null); - m.a = pa * la + pb * lc; - m.c = pa * lb + pb * ld; - m.b = pc * la + pd * lc; - m.d = pc * lb + pd * ld; - break; - } - case BoneData_1.TransformMode.InheritScale: { - var rotationY = rotation + 90 + shearY; - var la = Utils_1.MathUtils.cosDeg(rotation + shearX) * scaleX; - var lb = Utils_1.MathUtils.cosDeg(rotationY) * scaleY; - var lc = Utils_1.MathUtils.sinDeg(rotation + shearX) * scaleX; - var ld = Utils_1.MathUtils.sinDeg(rotationY) * scaleY; - pa = 1; - pb = 0; - pc = 0; - pd = 1; - do { - var cos = Utils_1.MathUtils.cosDeg(parent.arotation), sin = Utils_1.MathUtils.sinDeg(parent.arotation); - var psx = parent.scaleX, psy = parent.scaleY; - var za = cos * psx, zb = sin * psy, zc = sin * psx, zd = cos * psy; - var temp = pa * za + pb * zc; - pb = pb * zd - pa * zb; - pa = temp; - temp = pc * za + pd * zc; - pd = pd * zd - pc * zb; - pc = temp; - if (psx >= 0) - sin = -sin; - temp = pa * cos + pb * sin; - pb = pb * cos - pa * sin; - pa = temp; - temp = pc * cos + pd * sin; - pd = pd * cos - pc * sin; - pc = temp; - if (parent.data.transformMode === BoneData_1.TransformMode.InheritRotation || - parent.data.transformMode === BoneData_1.TransformMode.OnlyTranslation) - break; - parent = parent.parent; - } while (parent != null); - m.a = pa * la + pb * lc; - m.c = pa * lb + pb * ld; - m.b = pc * la + pd * lc; - m.d = pc * lb + pd * ld; - break; - } } if (this.skeleton.flipX) { m.a = -m.a; @@ -1758,8 +1690,6 @@ exports.BoneData = BoneData; TransformMode[TransformMode["NoRotationOrReflection"] = 2] = "NoRotationOrReflection"; TransformMode[TransformMode["NoScale"] = 3] = "NoScale"; TransformMode[TransformMode["NoScaleOrReflection"] = 4] = "NoScaleOrReflection"; - TransformMode[TransformMode["InheritRotation"] = 5] = "InheritRotation"; - TransformMode[TransformMode["InheritScale"] = 6] = "InheritScale"; })(exports.TransformMode || (exports.TransformMode = {})); var TransformMode = exports.TransformMode; },{}],9:[function(require,module,exports){ @@ -3760,14 +3690,15 @@ var SkeletonJson = (function () { throw new Error("Unknown transform mode: " + str); }; SkeletonJson.transformModeLegacy = function (inheritRotation, inheritScale) { + console.log("Deprecation Warning: re-export your model with spine 3.5, or downgrade to pixi-spine 1.1 branch. There were many breaking changes, place breakpoint here if you want to know which model is broken"); if (inheritRotation && inheritScale) { return BoneData_1.TransformMode.Normal; } else if (inheritRotation) { - return BoneData_1.TransformMode.InheritRotation; + return BoneData_1.TransformMode.NoScaleOrReflection; } else if (inheritScale) { - return BoneData_1.TransformMode.InheritScale; + return BoneData_1.TransformMode.NoRotationOrReflection; } else { return BoneData_1.TransformMode.OnlyTranslation; diff --git a/bin/pixi-spine.js.map b/bin/pixi-spine.js.map index 704d0c50..8f05d231 100644 --- a/bin/pixi-spine.js.map +++ b/bin/pixi-spine.js.map @@ -1 +1 @@ -{"version":3,"sources":["../pixify/node_modules/browser-pack/_prelude.js","src/Spine.ts","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/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/SkeletonBounds.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/Utils.ts","src/core/attachments/Attachment.ts","src/core/attachments/AttachmentType.ts","src/core/attachments/BoundingBoxAttachment.ts","src/core/attachments/MeshAttachment.ts","src/core/attachments/PathAttachment.ts","src/core/attachments/RegionAttachment.ts","src/core/attachments/index.ts","src/core/index.ts","src/loaders.ts","src/index.ts"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;ACAA,IAAY,KAAK,WAAM,QAAQ,CAAC,CAAA;AAIhC,IAAI,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;AAGvC,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;AAExB,IAAI,OAAO,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAExB;IAAiC,+BAAW;IAGxC,qBAAY,GAAiB;QACzB,kBAAM,GAAG,CAAC,CAAC;IACf,CAAC;IACL,kBAAC;AAAD,CANA,AAMC,CANgC,IAAI,CAAC,MAAM,GAM3C;AANY,mBAAW,cAMvB,CAAA;AAED;IAA+B,6BAAc;IA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AK;AAAE,sCAAS;AAAE,0CAA4B","file":"pixi-spine.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o, uvs?: ArrayLike, indices?: ArrayLike, 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 * var spineAnimation = new PIXI.Spine(spineData);\n * ```\n *\n * @class\n * @extends Container\n * @memberof PIXI.spine\n * @param spineData {object} The spine data loaded from a spine atlas.\n */\nexport class Spine extends PIXI.Container {\n static globalAutoUpdate: boolean = true;\n\n tintRgb: ArrayLike;\n spineData: spine.SkeletonData;\n skeleton: spine.Skeleton;\n stateData: spine.AnimationStateData;\n state: spine.AnimationState;\n slotContainers: Array;\n\n constructor(spineData: spine.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 PIXI.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 spine.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 spine.AnimationStateData(spineData);\n\n /**\n * A spine AnimationState object created from the spine AnimationStateData object\n *\n * @member {object}\n */\n this.state = new spine.AnimationState(this.stateData);\n\n /**\n * An array of containers\n *\n * @member {Container[]}\n */\n this.slotContainers = [];\n\n for (var i = 0, n = this.skeleton.slots.length; i < n; i++) {\n var slot = this.skeleton.slots[i];\n var attachment : any = slot.attachment;\n var slotContainer = new PIXI.Container();\n this.slotContainers.push(slotContainer);\n this.addChild(slotContainer);\n\n if (attachment instanceof spine.RegionAttachment) {\n var spriteName = (attachment.region as TextureAtlasRegion).name;\n var sprite = this.createSprite(slot, attachment, spriteName);\n slot.currentSprite = sprite;\n slot.currentSpriteName = spriteName;\n slotContainer.addChild(sprite);\n }\n else if (attachment instanceof spine.MeshAttachment) {\n var mesh = this.createMesh(slot, attachment);\n slot.currentMesh = mesh;\n slot.currentMeshName = attachment.name;\n slotContainer.addChild(mesh);\n }\n else {\n continue;\n }\n\n }\n\n /**\n * Should the Spine object update its transforms\n *\n * @member {boolean}\n */\n this.autoUpdate = true;\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 PIXI.spine.Spine#\n */\n this.tintRgb = new Float32Array([1, 1, 1]);\n }\n\n /**\n * If this flag is set to true, the spine animation will be autoupdated every time\n * 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 PIXI.spine.Spine#\n * @default true\n */\n get autoUpdate(): boolean {\n return (this.updateTransform === Spine.prototype.autoUpdateTransform);\n }\n\n set autoUpdate(value: boolean) {\n this.updateTransform = value ? Spine.prototype.autoUpdateTransform : PIXI.Container.prototype.updateTransform;\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 PIXI.spine.Spine#\n * @default 0xFFFFFF\n */\n get tint(): number {\n return PIXI.utils.rgb2hex(this.tintRgb);\n }\n\n set tint(value: number) {\n this.tintRgb = PIXI.utils.hex2rgb(value, this.tintRgb);\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 this.state.update(dt);\n this.state.apply(this.skeleton);\n this.skeleton.updateWorldTransform();\n\n let drawOrder = this.skeleton.drawOrder;\n let slots = this.skeleton.slots;\n\n for (var i = 0, n = drawOrder.length; i < n; i++) {\n this.children[i] = this.slotContainers[drawOrder[i].data.index];\n }\n\n var r0 = this.tintRgb[0];\n var g0 = this.tintRgb[1];\n var b0 = this.tintRgb[2];\n\n for (i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n var attachment = slot.attachment;\n var slotContainer = this.slotContainers[i];\n\n if (!attachment) {\n slotContainer.visible = false;\n continue;\n }\n\n var attColor = (attachment as any).color;\n if (attachment instanceof spine.RegionAttachment) {\n let region = (attachment as spine.RegionAttachment).region;\n if (region) {\n let ar = region as TextureAtlasRegion;\n if (!slot.currentSpriteName || slot.currentSpriteName !== ar.name) {\n var 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 var sprite = this.createSprite(slot, attachment, spriteName);\n slotContainer.addChild(sprite);\n }\n slot.currentSprite = slot.sprites[spriteName];\n slot.currentSpriteName = spriteName;\n }\n }\n\n if (slotContainer.transform) {\n var transform = slotContainer.transform;\n let lt : PIXI.Matrix;\n if (slotContainer.transform.matrix2d) {\n //gameofbombs pixi fork\n lt = transform.matrix2d;\n transform._dirtyVersion++;\n transform.version = transform._dirtyVersion;\n transform.isStatic = true;\n transform.operMode = 0;\n } else {\n if (TransformBase) {\n //PIXI v4.0\n if (transform.position) {\n transform = new PIXI.TransformBase();\n slotContainer.transform = transform;\n }\n lt = transform.localTransform;\n } else {\n //PIXI v4.0rc\n if (!transform._dirtyLocal) {\n transform = new PIXI.TransformStatic();\n slotContainer.transform = transform;\n }\n lt = transform.localTransform;\n transform._dirtyParentVersion = -1;\n transform._dirtyLocal = 1;\n transform._versionLocal = 1;\n }\n }\n slot.bone.matrix.copy(lt);\n } else {\n //PIXI v3\n var lt = slotContainer.localTransform || new PIXI.Matrix();\n slot.bone.matrix.copy(lt);\n slotContainer.localTransform = lt;\n slotContainer.displayObjectUpdateTransform = SlotContainerUpdateTransformV3;\n }\n tempRgb[0] = r0 * slot.color.r * attColor.r;\n tempRgb[1] = g0 * slot.color.g * attColor.g;\n tempRgb[2] = b0 * slot.color.b * attColor.b;\n slot.currentSprite.tint = PIXI.utils.rgb2hex(tempRgb);\n slot.currentSprite.blendMode = slot.blendMode;\n }\n else if (attachment instanceof spine.MeshAttachment) {\n if (!slot.currentMeshName || slot.currentMeshName !== attachment.name) {\n var 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 var 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 VertexAttachment).computeWorldVertices(slot, slot.currentMesh.vertices);\n if (PIXI.VERSION[0] !== '3') {\n // PIXI version 4\n // slot.currentMesh.dirty++;\n //only for PIXI v4\n var tintRgb = slot.currentMesh.tintRgb;\n tintRgb[0] = r0 * slot.color.r * attColor.r;\n tintRgb[1] = g0 * slot.color.g * attColor.g;\n tintRgb[2] = b0 * slot.color.b * attColor.b;\n }\n slot.currentMesh.blendMode = slot.blendMode;\n }\n else {\n slotContainer.visible = false;\n continue;\n }\n slotContainer.visible = true;\n\n slotContainer.alpha = slot.color.a;\n }\n };\n\n private setSpriteRegion(attachment: spine.RegionAttachment, sprite: SpineSprite, region: spine.TextureRegion) {\n sprite.region = region;\n sprite.texture = region.texture;\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: spine.MeshAttachment, mesh: SpineMesh, region: spine.TextureRegion) {\n mesh.region = region;\n mesh.texture = region.texture;\n attachment.updateUVs(region, mesh.uvs);\n // if (PIXI.VERSION[0] !== '3') {\n // PIXI version 4\n // mesh.indexDirty++;\n // } else {\n // PIXI version 3\n mesh.dirty++;\n // }\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 var 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 spine.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: spine.Slot, attachment: spine.RegionAttachment, defName: string) {\n let region = attachment.region;\n if (slot.tempAttachment === attachment) {\n region = slot.tempRegion;\n slot.tempAttachment = null;\n slot.tempRegion = null;\n }\n var texture = region.texture;\n var sprite = new SpineSprite(texture);\n sprite.rotation = attachment.rotation * spine.MathUtils.degRad;\n sprite.anchor.x = 0.5;\n sprite.anchor.y = 0.5;\n sprite.position.x = attachment.x;\n sprite.position.y = attachment.y;\n sprite.alpha = attachment.color.a;\n\n sprite.region = attachment.region;\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: spine.Slot, attachment: spine.MeshAttachment) {\n let region = attachment.region;\n if (slot.tempAttachment === attachment) {\n region = slot.tempRegion;\n slot.tempAttachment = null;\n slot.tempRegion = null;\n }\n let strip = new SpineMesh(\n region.texture,\n new Float32Array(attachment.regionUVs.length),\n new Float32Array(attachment.regionUVs.length),\n new Uint16Array(attachment.triangles),\n PIXI.mesh.Mesh.DRAW_MODES.TRIANGLES);\n\n strip.canvasPadding = 1.5;\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 /**\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 var slot = this.skeleton.slots[slotIndex];\n if (!slot) {\n return false;\n }\n var attachment: any = slot.attachment;\n var region: spine.TextureRegion = attachment.region;\n if (texture) {\n region = new spine.TextureRegion();\n region.texture = texture;\n region.size = size;\n }\n if (slot.currentSprite && slot.currentSprite.region != region) {\n this.setSpriteRegion(attachment, slot.currentSprite, region);\n slot.currentSprite.region = region;\n } else\n if (slot.currentMesh && slot.currentMesh.region != region) {\n this.setMeshRegion(attachment, slot.currentMesh, region);\n } else {\n slot.tempRegion = region;\n slot.tempAttachment = attachment;\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 = function (slotName: String, texture: PIXI.Texture = null, size: PIXI.Rectangle = null) {\n var index = this.skeleton.findSlotIndex(slotName);\n if (index == -1) {\n return false;\n }\n return this.hackTextureBySlotIndex(index, texture, size);\n }\n}\n\nfunction SlotContainerUpdateTransformV3() {\n var pt = this.parent.worldTransform;\n var wt = this.worldTransform;\n var 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","import {Event} from \"./Event\";\nimport {Skeleton} from \"./Skeleton\";\nimport {PathConstraint} from \"./PathConstraint\";\nimport {Utils, MathUtils, Color, ArrayLike} from \"./Utils\";\nimport {TransformConstraint} from \"./TransformConstraint\";\nimport {IkConstraint} from \"./IkConstraint\";\nimport {VertexAttachment, Attachment} from \"./attachments\";\nimport {Slot} from \"./Slot\";\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\nexport class Animation {\n name: string;\n timelines: Array;\n duration: number;\n\n constructor (name: string, timelines: Array, duration: number) {\n if (name == null) throw new Error(\"name cannot be null.\");\n if (timelines == null) throw new Error(\"timelines cannot be null.\");\n this.name = name;\n this.timelines = timelines;\n this.duration = duration;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: Array) {\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\n\n if (loop && this.duration != 0) {\n time %= this.duration;\n if (lastTime > 0) lastTime %= this.duration;\n }\n\n let timelines = this.timelines;\n for (let i = 0, n = timelines.length; i < n; i++)\n timelines[i].apply(skeleton, lastTime, time, events, 1);\n }\n\n mix (skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: Array, alpha: number) {\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\n\n if (loop && this.duration != 0) {\n time %= this.duration;\n if (lastTime > 0) lastTime %= this.duration;\n }\n\n let timelines = this.timelines;\n for (let i = 0, n = timelines.length; i < n; i++)\n timelines[i].apply(skeleton, lastTime, time, events, alpha);\n }\n\n static binarySearch (values: ArrayLike, target: number, step: number = 1) {\n let low = 0;\n let high = values.length / step - 2;\n if (high == 0) return step;\n let current = high >>> 1;\n while (true) {\n if (values[(current + 1) * step] <= target)\n low = current + 1;\n else\n high = current;\n if (low == high) return (low + 1) * step;\n current = (low + high) >>> 1;\n }\n }\n\n static linearSearch (values: ArrayLike, target: number, step: number) {\n for (let i = 0, last = values.length - step; i <= last; i += step)\n if (values[i] > target) return i;\n return -1;\n }\n}\n\nexport interface Timeline {\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): void;\n}\n\nexport abstract class CurveTimeline implements Timeline {\n static LINEAR = 0; static STEPPED = 1; static BEZIER = 2;\n static BEZIER_SIZE = 10 * 2 - 1;\n\n private curves: ArrayLike; // type, x, y, ...\n\n constructor (frameCount: number) {\n if (frameCount <= 0) throw new Error(\"frameCount must be > 0: \" + frameCount);\n this.curves = Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\n }\n\n getFrameCount () {\n return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\n }\n\n setLinear (frameIndex: number) {\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\n }\n\n setStepped (frameIndex: number) {\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\n }\n\n getCurveType (frameIndex: number): number {\n let index = frameIndex * CurveTimeline.BEZIER_SIZE;\n if (index == this.curves.length) return CurveTimeline.LINEAR;\n let type = this.curves[index];\n if (type == CurveTimeline.LINEAR) return CurveTimeline.LINEAR;\n if (type == CurveTimeline.STEPPED) return CurveTimeline.STEPPED;\n return CurveTimeline.BEZIER;\n }\n\n /** Sets the control handle positions for an interpolation bezier curve used to transition from this keyframe to the next.\n * cx1 and cx2 are from 0 to 1, representing the percent of time between the two keyframes. cy1 and cy2 are the percent of\n * the difference between the keyframe's values. */\n setCurve (frameIndex: number, cx1: number, cy1: number, cx2: number, cy2: number) {\n let tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\n let dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\n let ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\n let dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\n\n let i = frameIndex * CurveTimeline.BEZIER_SIZE;\n let curves = this.curves;\n curves[i++] = CurveTimeline.BEZIER;\n\n let x = dfx, y = dfy;\n for (let n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n x += dfx;\n y += dfy;\n }\n }\n\n getCurvePercent (frameIndex: number, percent: number) {\n percent = MathUtils.clamp(percent, 0, 1);\n let curves = this.curves;\n let i = frameIndex * CurveTimeline.BEZIER_SIZE;\n let type = curves[i];\n if (type == CurveTimeline.LINEAR) return percent;\n if (type == CurveTimeline.STEPPED) return 0;\n i++;\n let x = 0;\n for (let start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\n x = curves[i];\n if (x >= percent) {\n let prevX: number, prevY: number;\n if (i == start) {\n prevX = 0;\n prevY = 0;\n } else {\n prevX = curves[i - 2];\n prevY = curves[i - 1];\n }\n return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\n }\n }\n let y = curves[i - 1];\n return y + (1 - y) * (percent - x) / (1 - x); // Last point is 1,1.\n }\n\n abstract apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): void;\n}\n\nexport class RotateTimeline extends CurveTimeline {\n static ENTRIES = 2;\n static PREV_TIME = -2; static PREV_ROTATION = -1;\n static ROTATION = 1;\n\n boneIndex: number;\n frames: ArrayLike; // time, degrees, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount << 1);\n }\n\n /** Sets the time and angle of the specified keyframe. */\n setFrame (frameIndex: number, time: number, degrees: number) {\n frameIndex <<= 1;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let bone = skeleton.bones[this.boneIndex];\n\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) { // Time is after last frame.\n let amount = bone.data.rotation + frames[frames.length + RotateTimeline.PREV_ROTATION] - bone.rotation;\n while (amount > 180)\n amount -= 360;\n while (amount < -180)\n amount += 360;\n bone.rotation += amount * alpha;\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\n let prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent((frame >> 1) - 1,\n 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\n\n let amount = frames[frame + RotateTimeline.ROTATION] - prevRotation;\n while (amount > 180)\n amount -= 360;\n while (amount < -180)\n amount += 360;\n amount = bone.data.rotation + (prevRotation + amount * percent) - bone.rotation;\n while (amount > 180)\n amount -= 360;\n while (amount < -180)\n amount += 360;\n bone.rotation += amount * alpha;\n }\n}\n\nexport class TranslateTimeline extends CurveTimeline {\n static ENTRIES = 3;\n static PREV_TIME = -3; static PREV_X = -2; static PREV_Y = -1;\n static X = 1; static Y = 2;\n\n boneIndex: number;\n frames: ArrayLike; // time, x, y, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\n }\n\n /** Sets the time and value of the specified keyframe. */\n setFrame (frameIndex: number, time: number, x: number, y: number) {\n frameIndex *= TranslateTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + TranslateTimeline.X] = x;\n this.frames[frameIndex + TranslateTimeline.Y] = y;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let bone = skeleton.bones[this.boneIndex];\n\n if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) { // Time is after last frame.\n bone.x += (bone.data.x + frames[frames.length + TranslateTimeline.PREV_X] - bone.x) * alpha;\n bone.y += (bone.data.y + frames[frames.length + TranslateTimeline.PREV_Y] - bone.y) * alpha;\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\n let prevX = frames[frame + TranslateTimeline.PREV_X];\n let prevY = frames[frame + TranslateTimeline.PREV_Y];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\n\n bone.x += (bone.data.x + prevX + (frames[frame + TranslateTimeline.X] - prevX) * percent - bone.x) * alpha;\n bone.y += (bone.data.y + prevY + (frames[frame + TranslateTimeline.Y] - prevY) * percent - bone.y) * alpha;\n }\n}\n\nexport class ScaleTimeline extends TranslateTimeline {\n constructor (frameCount: number) {\n super(frameCount);\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let bone = skeleton.bones[this.boneIndex];\n if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) { // Time is after last frame.\n bone.scaleX += (bone.data.scaleX * frames[frames.length + ScaleTimeline.PREV_X] - bone.scaleX) * alpha;\n bone.scaleY += (bone.data.scaleY * frames[frames.length + ScaleTimeline.PREV_Y] - bone.scaleY) * alpha;\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\n let prevX = frames[frame + ScaleTimeline.PREV_X];\n let prevY = frames[frame + ScaleTimeline.PREV_Y];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\n\n bone.scaleX += (bone.data.scaleX * (prevX + (frames[frame + ScaleTimeline.X] - prevX) * percent) - bone.scaleX) * alpha;\n bone.scaleY += (bone.data.scaleY * (prevY + (frames[frame + ScaleTimeline.Y] - prevY) * percent) - bone.scaleY) * alpha;\n }\n}\n\nexport class ShearTimeline extends TranslateTimeline {\n constructor (frameCount: number) {\n super(frameCount);\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let bone = skeleton.bones[this.boneIndex];\n if (time >= frames[frames.length - ShearTimeline.ENTRIES]) { // Time is after last frame.\n bone.shearX += (bone.data.shearX + frames[frames.length + ShearTimeline.PREV_X] - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY + frames[frames.length + ShearTimeline.PREV_Y] - bone.shearY) * alpha;\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\n let prevX = frames[frame + ShearTimeline.PREV_X];\n let prevY = frames[frame + ShearTimeline.PREV_Y];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\n\n bone.shearX += (bone.data.shearX + (prevX + (frames[frame + ShearTimeline.X] - prevX) * percent) - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY + (prevY + (frames[frame + ShearTimeline.Y] - prevY) * percent) - bone.shearY) * alpha;\n }\n}\n\nexport class ColorTimeline extends CurveTimeline {\n static ENTRIES = 5;\n static PREV_TIME = -5; static PREV_R = -4; static PREV_G = -3; static PREV_B = -2; static PREV_A = -1;\n static R = 1; static G = 2; static B = 3; static A = 4;\n\n slotIndex: number;\n frames: ArrayLike; // time, r, g, b, a, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\n }\n\n /** Sets the time and value of the specified keyframe. */\n setFrame (frameIndex: number, time: number, r: number, g: number, b: number, a: number) {\n frameIndex *= ColorTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + ColorTimeline.R] = r;\n this.frames[frameIndex + ColorTimeline.G] = g;\n this.frames[frameIndex + ColorTimeline.B] = b;\n this.frames[frameIndex + ColorTimeline.A] = a;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let r = 0, g = 0, b = 0, a = 0;\n if (time >= frames[frames.length - ColorTimeline.ENTRIES]) { // Time is after last frame.\n let i = frames.length;\n r = frames[i + ColorTimeline.PREV_R];\n g = frames[i + ColorTimeline.PREV_G];\n b = frames[i + ColorTimeline.PREV_B];\n a = frames[i + ColorTimeline.PREV_A];\n } else {\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\n r = frames[frame + ColorTimeline.PREV_R];\n g = frames[frame + ColorTimeline.PREV_G];\n b = frames[frame + ColorTimeline.PREV_B];\n a = frames[frame + ColorTimeline.PREV_A];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\n\n r += (frames[frame + ColorTimeline.R] - r) * percent;\n g += (frames[frame + ColorTimeline.G] - g) * percent;\n b += (frames[frame + ColorTimeline.B] - b) * percent;\n a += (frames[frame + ColorTimeline.A] - a) * percent;\n }\n let color: Color = skeleton.slots[this.slotIndex].color;\n if (alpha < 1)\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\n else\n color.set(r, g, b, a);\n }\n}\n\nexport class AttachmentTimeline implements Timeline {\n slotIndex: number;\n frames: ArrayLike // time, ...\n attachmentNames: Array;\n\n constructor (frameCount: number) {\n this.frames = Utils.newFloatArray(frameCount);\n this.attachmentNames = new Array(frameCount);\n }\n\n getFrameCount () {\n return this.frames.length;\n }\n\n /** Sets the time and value of the specified keyframe. */\n setFrame (frameIndex: number, time: number, attachmentName: string) {\n this.frames[frameIndex] = time;\n this.attachmentNames[frameIndex] = attachmentName;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let frameIndex = 0;\n if (time >= frames[frames.length - 1]) // Time is after last frame.\n frameIndex = frames.length - 1;\n else\n frameIndex = Animation.binarySearch(frames, time, 1) - 1;\n\n let attachmentName = this.attachmentNames[frameIndex];\n skeleton.slots[this.slotIndex]\n .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\n }\n}\n\nexport class EventTimeline implements Timeline {\n frames: ArrayLike; // time, ...\n events: Array;\n\n constructor (frameCount: number) {\n this.frames = Utils.newFloatArray(frameCount);\n this.events = new Array(frameCount);\n }\n\n getFrameCount () {\n return this.frames.length;\n }\n\n /** Sets the time of the specified keyframe. */\n setFrame (frameIndex: number, event: Event) {\n this.frames[frameIndex] = event.time;\n this.events[frameIndex] = event;\n }\n\n /** Fires events for frames > lastTime and <= time. */\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) {\n if (firedEvents == null) return;\n let frames = this.frames;\n let frameCount = this.frames.length;\n\n if (lastTime > time) { // Fire events after last time for looped animations.\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha);\n lastTime = -1;\n } else if (lastTime >= frames[frameCount - 1]) // Last time is after last frame.\n return;\n if (time < frames[0]) return; // Time is before first frame.\n\n let frame = 0;\n if (lastTime < frames[0])\n frame = 0;\n else {\n frame = Animation.binarySearch(frames, lastTime);\n let frameTime = frames[frame];\n while (frame > 0) { // Fire multiple events with the same frame.\n if (frames[frame - 1] != frameTime) break;\n frame--;\n }\n }\n for (; frame < frameCount && time >= frames[frame]; frame++)\n firedEvents.push(this.events[frame]);\n }\n}\n\nexport class DrawOrderTimeline implements Timeline {\n frames: ArrayLike; // time, ...\n drawOrders: Array>;\n\n constructor (frameCount: number) {\n this.frames = Utils.newFloatArray(frameCount);\n this.drawOrders = new Array>(frameCount);\n }\n\n getFrameCount () {\n return this.frames.length;\n }\n\n /** Sets the time of the specified keyframe.\n * @param drawOrder May be null to use bind pose draw order. */\n setFrame (frameIndex: number, time: number, drawOrder: Array) {\n this.frames[frameIndex] = time;\n this.drawOrders[frameIndex] = drawOrder;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let frame = 0;\n if (time >= frames[frames.length - 1]) // Time is after last frame.\n frame = frames.length - 1;\n else\n frame = Animation.binarySearch(frames, time) - 1;\n\n let drawOrder: Array = skeleton.drawOrder;\n let slots: Array = skeleton.slots;\n let drawOrderToSetupIndex = this.drawOrders[frame];\n if (drawOrderToSetupIndex == null)\n Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\n else {\n for (let i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\n }\n }\n}\n\nexport class DeformTimeline extends CurveTimeline {\n frames: ArrayLike; // time, ...\n frameVertices: Array>;\n slotIndex: number;\n attachment: VertexAttachment;\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount);\n this.frameVertices = new Array>(frameCount);\n }\n\n /** Sets the time of the specified keyframe. */\n setFrame (frameIndex: number, time: number, vertices: ArrayLike) {\n this.frames[frameIndex] = time;\n this.frameVertices[frameIndex] = vertices;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) {\n let slot: Slot = skeleton.slots[this.slotIndex];\n let slotAttachment: Attachment = slot.getAttachment();\n if (!(slotAttachment instanceof VertexAttachment) || !(slotAttachment).applyDeform(this.attachment)) return;\n\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let frameVertices = this.frameVertices;\n let vertexCount = frameVertices[0].length;\n\n let verticesArray: Array = slot.attachmentVertices;\n if (verticesArray.length != vertexCount) alpha = 1; // Don't mix from uninitialized slot vertices.\n let vertices: Array = Utils.setArraySize(verticesArray, vertexCount);\n\n if (time >= frames[frames.length - 1]) { // Time is after last frame.\n let lastVertices = frameVertices[frames.length - 1];\n if (alpha < 1) {\n for (let i = 0; i < vertexCount; i++)\n vertices[i] += (lastVertices[i] - vertices[i]) * alpha;\n } else\n Utils.arrayCopy(lastVertices, 0, vertices, 0, vertexCount);\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time);\n let prevVertices = frameVertices[frame - 1];\n let nextVertices = frameVertices[frame];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\n\n if (alpha < 1) {\n for (let i = 0; i < vertexCount; i++) {\n let prev = prevVertices[i];\n vertices[i] += (prev + (nextVertices[i] - prev) * percent - vertices[i]) * alpha;\n }\n } else {\n for (let i = 0; i < vertexCount; i++) {\n let prev = prevVertices[i];\n vertices[i] = prev + (nextVertices[i] - prev) * percent;\n }\n }\n }\n}\n\nexport class IkConstraintTimeline extends CurveTimeline {\n static ENTRIES = 3;\n static PREV_TIME = -3; static PREV_MIX = -2; static PREV_BEND_DIRECTION = -1;\n static MIX = 1; static BEND_DIRECTION = 2;\n\n ikConstraintIndex: number;\n frames: ArrayLike; // time, mix, bendDirection, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\n }\n\n /** Sets the time, mix and bend direction of the specified keyframe. */\n setFrame (frameIndex: number, time: number, mix: number, bendDirection: number) {\n frameIndex *= IkConstraintTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\n this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let constraint: IkConstraint = skeleton.ikConstraints[this.ikConstraintIndex];\n\n if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) { // Time is after last frame.\n constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\n constraint.bendDirection = Math.floor(frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION]);\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\n let mix = frames[frame + IkConstraintTimeline.PREV_MIX];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\n\n constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\n constraint.bendDirection = Math.floor(frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION]);\n }\n}\n\nexport class TransformConstraintTimeline extends CurveTimeline {\n static ENTRIES = 5;\n static PREV_TIME = -5; static PREV_ROTATE = -4; static PREV_TRANSLATE = -3; static PREV_SCALE = -2; static PREV_SHEAR = -1;\n static ROTATE = 1; static TRANSLATE = 2; static SCALE = 3; static SHEAR = 4;\n\n transformConstraintIndex: number;\n frames: ArrayLike; // time, rotate mix, translate mix, scale mix, shear mix, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\n }\n\n /** Sets the time and mixes of the specified keyframe. */\n setFrame (frameIndex: number, time: number, rotateMix: number, translateMix: number, scaleMix: number, shearMix: number) {\n frameIndex *= TransformConstraintTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\n this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\n this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\n this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let constraint: TransformConstraint = skeleton.transformConstraints[this.transformConstraintIndex];\n\n if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) { // Time is after last frame.\n let i = frames.length;\n constraint.rotateMix += (frames[i + TransformConstraintTimeline.PREV_ROTATE] - constraint.rotateMix) * alpha;\n constraint.translateMix += (frames[i + TransformConstraintTimeline.PREV_TRANSLATE] - constraint.translateMix) * alpha;\n constraint.scaleMix += (frames[i + TransformConstraintTimeline.PREV_SCALE] - constraint.scaleMix) * alpha;\n constraint.shearMix += (frames[i + TransformConstraintTimeline.PREV_SHEAR] - constraint.shearMix) * alpha;\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\n\n let rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\n let translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\n let scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\n let shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\n constraint.rotateMix += (rotate + (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent - constraint.rotateMix) * alpha;\n constraint.translateMix += (translate + (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent - constraint.translateMix)\n * alpha;\n constraint.scaleMix += (scale + (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent - constraint.scaleMix) * alpha;\n constraint.shearMix += (shear + (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent - constraint.shearMix) * alpha;\n }\n}\n\nexport class PathConstraintPositionTimeline extends CurveTimeline {\n static ENTRIES = 2;\n static PREV_TIME = -2; static PREV_VALUE = -1;\n static VALUE = 1;\n\n pathConstraintIndex: number;\n\n frames: ArrayLike; // time, position, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\n }\n\n /** Sets the time and value of the specified keyframe. */\n setFrame (frameIndex: number, time: number, value: number) {\n frameIndex *= PathConstraintPositionTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let constraint: PathConstraint = skeleton.pathConstraints[this.pathConstraintIndex];\n\n if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES]) { // Time is after last frame.\n let i = frames.length;\n constraint.position += (frames[i + PathConstraintPositionTimeline.PREV_VALUE] - constraint.position) * alpha;\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\n let position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\n\n constraint.position += (position + (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent - constraint.position) * alpha;\n }\n}\n\nexport class PathConstraintSpacingTimeline extends PathConstraintPositionTimeline {\n constructor (frameCount: number) {\n super(frameCount);\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let constraint: PathConstraint = skeleton.pathConstraints[this.pathConstraintIndex];\n\n if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES]) { // Time is after last frame.\n let i = frames.length;\n constraint.spacing += (frames[i + PathConstraintSpacingTimeline.PREV_VALUE] - constraint.spacing) * alpha;\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\n let spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\n\n constraint.spacing += (spacing + (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent - constraint.spacing) * alpha;\n }\n}\n\nexport class PathConstraintMixTimeline extends CurveTimeline {\n static ENTRIES = 3;\n static PREV_TIME = -3; static PREV_ROTATE = -2; static PREV_TRANSLATE = -1;\n static ROTATE = 1; static TRANSLATE = 2;\n\n pathConstraintIndex: number;\n\n frames: ArrayLike; // time, rotate mix, translate mix, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\n }\n\n /** Sets the time and mixes of the specified keyframe. */\n setFrame (frameIndex: number, time: number, rotateMix: number, translateMix: number) {\n frameIndex *= PathConstraintMixTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\n this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let constraint: PathConstraint = skeleton.pathConstraints[this.pathConstraintIndex];\n\n if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) { // Time is after last frame.\n let i = frames.length;\n constraint.rotateMix += (frames[i + PathConstraintMixTimeline.PREV_ROTATE] - constraint.rotateMix) * alpha;\n constraint.translateMix += (frames[i + PathConstraintMixTimeline.PREV_TRANSLATE] - constraint.translateMix) * alpha;\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\n let rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\n let translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\n\n constraint.rotateMix += (rotate + (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent - constraint.rotateMix) * alpha;\n constraint.translateMix += (translate + (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent - constraint.translateMix)\n * alpha;\n }\n}\n","import {Skeleton} from \"./Skeleton\";\r\nimport {MathUtils, Utils} from \"./Utils\";\r\nimport {Animation} from \"./Animation\";\r\nimport {AnimationStateData} from \"./AnimationStateData\";\r\nimport {Event} from \"./Event\";\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\nexport class AnimationState {\r\n data: AnimationStateData;\r\n tracks = new Array();\r\n events = new Array();\r\n timeScale = 1;\r\n\r\n constructor (data: AnimationStateData = null) {\r\n if (data == null) throw new Error(\"data cannot be null.\");\r\n this.data = data;\r\n }\r\n\r\n update (delta: number) {\r\n delta *= this.timeScale;\r\n for (let i = 0; i < this.tracks.length; i++) {\r\n let current = this.tracks[i];\r\n if (current == null) continue;\r\n\r\n let next = current.next;\r\n if (next != null) {\r\n let nextTime = current.lastTime - next.delay;\r\n if (nextTime >= 0) {\r\n let nextDelta = delta * next.timeScale;\r\n next.time = nextTime + nextDelta; // For start event to see correct time.\r\n current.time += delta * current.timeScale; // For end event to see correct time.\r\n this.setCurrent(i, next);\r\n next.time -= nextDelta; // Prevent increasing time twice, below.\r\n current = next;\r\n }\r\n } else if (!current.loop && current.lastTime >= current.endTime) {\r\n // End non-looping animation when it reaches its end time and there is no next entry.\r\n this.clearTrack(i);\r\n continue;\r\n }\r\n\r\n current.time += delta * current.timeScale;\r\n if (current.previous != null) {\r\n let previousDelta = delta * current.previous.timeScale;\r\n current.previous.time += previousDelta;\r\n current.mixTime += previousDelta;\r\n }\r\n }\r\n }\r\n\r\n apply (skeleton: Skeleton) {\r\n let events = this.events;\r\n\r\n for (let i = 0; i < this.tracks.length; i++) {\r\n let current = this.tracks[i];\r\n if (current == null) continue;\r\n\r\n events.length = 0;\r\n\r\n let time = current.time;\r\n let lastTime = current.lastTime;\r\n let endTime = current.endTime;\r\n let loop = current.loop;\r\n if (!loop && time > endTime) time = endTime;\r\n\r\n let previous = current.previous;\r\n if (previous == null)\r\n current.animation.mix(skeleton, lastTime, time, loop, events, current.mix);\r\n else {\r\n let previousTime = previous.time;\r\n if (!previous.loop && previousTime > previous.endTime) previousTime = previous.endTime;\r\n previous.animation.apply(skeleton, previousTime, previousTime, previous.loop, null);\r\n\r\n let alpha = current.mixTime / current.mixDuration * current.mix;\r\n if (alpha >= 1) {\r\n alpha = 1;\r\n current.previous = null;\r\n }\r\n current.animation.mix(skeleton, lastTime, time, loop, events, alpha);\r\n }\r\n\r\n for (let ii = 0, nn = events.length; ii < nn; ii++) {\r\n let event = events[ii];\r\n if (current.onEvent) current.onEvent(i, event);\r\n if (this.onEvent) this.onEvent(i, event);\r\n }\r\n\r\n // Check if completed the animation or a loop iteration.\r\n if (loop ? (lastTime % endTime > time % endTime) : (lastTime < endTime && time >= endTime)) {\r\n let count = MathUtils.toInt(time / endTime);\r\n if (current.onComplete) current.onComplete(i, count);\r\n if (this.onComplete) this.onComplete(i, count);\r\n }\r\n\r\n current.lastTime = current.time;\r\n }\r\n }\r\n\r\n clearTracks () {\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 }\r\n\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 if (current.onEnd) current.onEnd(trackIndex);\r\n if (this.onEnd) this.onEnd(trackIndex);\r\n\r\n this.tracks[trackIndex] = null;\r\n\r\n this.freeAll(current);\r\n }\r\n\r\n freeAll (entry: TrackEntry) {\r\n while (entry != null) {\r\n let next = entry.next;\r\n entry = next;\r\n }\r\n }\r\n\r\n expandToIndex (index: number) {\r\n if (index < this.tracks.length) return this.tracks[index];\r\n Utils.setArraySize(this.tracks, index - this.tracks.length + 1, null);\r\n this.tracks.length = index + 1;\r\n return null;\r\n }\r\n\r\n setCurrent (index: number, entry: TrackEntry) {\r\n let current = this.expandToIndex(index);\r\n if (current != null) {\r\n let previous = current.previous;\r\n current.previous = null;\r\n\r\n if (entry.onEnd) entry.onEnd(index);\r\n if (this.onEnd) this.onEnd(index);\r\n\r\n entry.mixDuration = this.data.getMix(current.animation, entry.animation);\r\n if (entry.mixDuration > 0) {\r\n entry.mixTime = 0;\r\n // If a mix is in progress, mix from the closest animation.\r\n if (previous != null && current.mixTime / current.mixDuration < 0.5) {\r\n entry.previous = previous;\r\n previous = current;\r\n } else\r\n entry.previous = current;\r\n }\r\n }\r\n\r\n this.tracks[index] = entry;\r\n\r\n if (entry.onStart) entry.onStart(index);\r\n if (this.onStart) this.onStart(index);\r\n }\r\n\r\n /** @see #setAnimation(int, Animation, boolean) */\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 /** Set the current animation. Any queued animations are cleared. */\r\n setAnimationWith (trackIndex: number, animation: Animation, loop: boolean) {\r\n let current = this.expandToIndex(trackIndex);\r\n if (current != null) this.freeAll(current.next);\r\n\r\n let entry = new TrackEntry();\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.endTime = animation.duration;\r\n this.setCurrent(trackIndex, entry);\r\n return entry;\r\n }\r\n\r\n /** {@link #addAnimation(int, Animation, boolean, float)} */\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 hasAnimation(animationName: string): boolean\r\n {\r\n let animation = this.data.skeletonData.findAnimation(animationName);\r\n return animation !== null;\r\n }\r\n\r\n /** Adds an animation to be played delay seconds after the current or last queued animation.\r\n * @param delay May be <= 0 to use duration of previous animation minus any mix duration plus the negative delay. */\r\n addAnimationWith (trackIndex: number, animation: Animation, loop: boolean, delay: number) {\r\n let entry = new TrackEntry();\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.endTime = animation.duration;\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 last.next = entry;\r\n } else\r\n this.tracks[trackIndex] = entry;\r\n\r\n if (delay <= 0) {\r\n if (last != null)\r\n delay += last.endTime - this.data.getMix(last.animation, animation);\r\n else\r\n delay = 0;\r\n }\r\n entry.delay = delay;\r\n\r\n return entry;\r\n }\r\n\r\n /** @return May be null. */\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 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 setAnimationByName (trackIndex: number, animationName: string, loop: boolean) {\r\n if (!AnimationState.deprecatedWarning1) {\r\n AnimationState.deprecatedWarning1 = true;\r\n console.warn(\"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 addAnimationByName (trackIndex: number, animationName: string, loop: boolean, delay: number) {\r\n if (!AnimationState.deprecatedWarning2) {\r\n AnimationState.deprecatedWarning2 = true;\r\n console.warn(\"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 hasAnimationByName (animationName: string): boolean\r\n {\r\n if (!AnimationState.deprecatedWarning3) {\r\n AnimationState.deprecatedWarning3 = true;\r\n console.warn(\"Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.\");\r\n }\r\n let animation = this.data.skeletonData.findAnimation(animationName);\r\n return animation !== null;\r\n }\r\n}\r\n\r\nexport class TrackEntry {\r\n next: TrackEntry; previous: TrackEntry;\r\n animation: Animation;\r\n loop = false;\r\n delay = 0; time = 0; lastTime = -1; endTime = 0; timeScale = 1;\r\n mixTime = 0; mixDuration = 0;\r\n mix = 1;\r\n\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 reset () {\r\n this.next = null;\r\n this.previous = null;\r\n this.animation = null;\r\n this.timeScale = 1;\r\n this.lastTime = -1; // Trigger events on frame zero.\r\n this.time = 0;\r\n }\r\n\r\n /** Returns true if the current time is greater than the end time, regardless of looping. */\r\n isComplete () : boolean {\r\n return this.time >= this.endTime;\r\n }\r\n}\r\n","import {Animation} from \"./Animation\";\nimport {SkeletonData} from \"./SkeletonData\";\nimport {Map} from \"./Utils\";\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\nexport class AnimationStateData {\n skeletonData: SkeletonData;\n animationToMixTime: Map = { };\n defaultMix = 0;\n\n constructor (skeletonData: SkeletonData) {\n if (skeletonData == null) throw new Error(\"skeletonData cannot be null.\");\n this.skeletonData = skeletonData;\n }\n\n setMix (fromName: string, toName: string, duration: number) {\n let from = this.skeletonData.findAnimation(fromName);\n if (from == null) throw new Error(\"Animation not found: \" + fromName);\n let to = this.skeletonData.findAnimation(toName);\n if (to == null) throw new Error(\"Animation not found: \" + toName);\n this.setMixWith(from, to, duration);\n }\n\n private static deprecatedWarning1: boolean = false;\n setMixByName(fromName: string, toName: string, duration: number) {\n if (!AnimationStateData.deprecatedWarning1) {\n AnimationStateData.deprecatedWarning1 = true;\n console.warn(\"Deprecation Warning: AnimationStateData.setMixByName is deprecated, please use setMix from now on.\");\n }\n this.setMix(fromName, toName, duration);\n }\n\n setMixWith (from: Animation, to: Animation, duration: number) {\n if (from == null) throw new Error(\"from cannot be null.\");\n if (to == null) throw new Error(\"to cannot be null.\");\n let key = from.name + to.name;\n this.animationToMixTime[key] = duration;\n }\n\n getMix (from: Animation, to: Animation) {\n let key = from.name + to.name;\n let value = this.animationToMixTime[key];\n return value === undefined ? this.defaultMix : value;\n }\n}\n","import {Skin} from \"./Skin\";\nimport {AttachmentLoader, BoundingBoxAttachment, MeshAttachment, PathAttachment, RegionAttachment} from \"./attachments\";\nimport {TextureAtlas} from \"./TextureAtlas\";\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\nexport class AtlasAttachmentLoader implements AttachmentLoader {\n atlas: TextureAtlas;\n\n constructor (atlas: TextureAtlas) {\n this.atlas = atlas;\n }\n\n /** @return May be null to not load an attachment. */\n newRegionAttachment (skin: Skin, name: string, path: string): RegionAttachment {\n let region = this.atlas.findRegion(path);\n if (region == null) throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\n let attachment = new RegionAttachment(name);\n attachment.region = region;\n return attachment;\n }\n\n /** @return May be null to not load an attachment. */\n newMeshAttachment (skin: Skin, name: string, path: string) : MeshAttachment {\n let region = this.atlas.findRegion(path);\n if (region == null) throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\n let attachment = new MeshAttachment(name);\n attachment.region = region;\n return attachment;\n }\n\n /** @return May be null to not load an attachment. */\n newBoundingBoxAttachment (skin: Skin, name: string) : BoundingBoxAttachment {\n return new BoundingBoxAttachment(name);\n }\n\n /** @return May be null to not load an attachment */\n newPathAttachment (skin: Skin, name: string): PathAttachment {\n return new PathAttachment(name);\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\nexport enum BlendMode {\r\n Normal,\r\n Additive,\r\n Multiply,\r\n Screen\r\n}\r\n","import {Updatable} from \"./Updatable\";\nimport {BoneData, TransformMode} from \"./BoneData\";\nimport {Skeleton} from \"./Skeleton\";\nimport {MathUtils, Vector2} from \"./Utils\";\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\nexport 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; y = 0; rotation = 0; scaleX = 0; scaleY = 0; shearX = 0; shearY = 0;\n ax = 0; ay = 0; arotation = 0; ascaleX = 0; ascaleY = 0; ashearX = 0; ashearY = 0;\n appliedValid = false;\n\n sorted = 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 /** 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 if (parent == null) { // Root bone.\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 let skeleton = this.skeleton;\n if (skeleton.flipX) {\n x = -x;\n la = -la;\n lb = -lb;\n }\n if (skeleton.flipY !== Bone.yDown) {\n y = -y;\n lc = -lc;\n ld = -ld;\n }\n m.a = la;\n m.c = lb;\n m.b = lc;\n m.d = ld;\n m.tx = x + skeleton.x;\n m.ty = y + 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 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;\n let zc = pc * cos + pd * sin;\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 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 if (this.data.transformMode != TransformMode.NoScaleOrReflection ? pa * pd - pb * pc < 0 : (this.skeleton.flipX != this.skeleton.flipY) != Bone.yDown) {\n m.b = -m.b;\n m.d = -m.d;\n }\n return;\n }\n //old < 3.5 stuff\n case TransformMode.InheritRotation: {\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\n pa = 1;\n pb = 0;\n pc = 0;\n pd = 1;\n do {\n let cos = MathUtils.cosDeg(parent.arotation), sin = MathUtils.sinDeg(parent.arotation);\n let temp = pa * cos + pb * sin;\n pb = pb * cos - pa * sin;\n pa = temp;\n temp = pc * cos + pd * sin;\n pd = pd * cos - pc * sin;\n pc = temp;\n\n if (parent.data.transformMode === TransformMode.InheritScale ||\n parent.data.transformMode === TransformMode.OnlyTranslation) break;\n parent = parent.parent;\n } while (parent != null);\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 //old < 3.5 stuff\n case TransformMode.InheritScale: {\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\n pa = 1;\n pb = 0;\n pc = 0;\n pd = 1;\n do {\n let cos = MathUtils.cosDeg(parent.arotation), sin = MathUtils.sinDeg(parent.arotation);\n let psx = parent.scaleX, psy = parent.scaleY;\n let za = cos * psx, zb = sin * psy, zc = sin * psx, zd = cos * psy;\n let temp = pa * za + pb * zc;\n pb = pb * zd - pa * zb;\n pa = temp;\n temp = pc * za + pd * zc;\n pd = pd * zd - pc * zb;\n pc = temp;\n\n if (psx >= 0) sin = -sin;\n temp = pa * cos + pb * sin;\n pb = pb * cos - pa * sin;\n pa = temp;\n temp = pc * cos + pd * sin;\n pd = pd * cos - pc * sin;\n pc = temp;\n\n if (parent.data.transformMode === TransformMode.InheritRotation ||\n parent.data.transformMode === TransformMode.OnlyTranslation) break;\n parent = parent.parent;\n } while (parent != null);\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 }\n if (this.skeleton.flipX) {\n m.a = -m.a;\n m.c = -m.c;\n }\n if (this.skeleton.flipY != Bone.yDown) {\n m.b = -m.b;\n m.d = -m.d;\n }\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 worldToLocalRotationX () {\n let parent = this.parent;\n if (parent == null) return this.arotation;\n let pm = parent.matrix, m = this.matrix;\n return Math.atan2(pm.a * m.b - pm.b * m.a, pm.d * m.a - pm.c * m.b) * MathUtils.radDeg;\n }\n\n worldToLocalRotationY () {\n let parent = this.parent;\n if (parent == null) return this.arotation;\n let pm = parent.matrix, m = this.matrix;\n return Math.atan2(pm.a * m.d - pm.b * m.c, pm.d * m.c - pm.c * m.d) * MathUtils.radDeg;\n }\n\n rotateWorld (degrees: number) {\n let m = this.matrix;\n let a = this.matrix.a, b = m.c, c = m.b, d = m.d;\n let cos = MathUtils.cosDeg(degrees), sin = MathUtils.sinDeg(degrees);\n m.a = cos * a - sin * c;\n m.c = cos * b - sin * d;\n m.b = sin * a + cos * c;\n m.d = sin * b + cos * d;\n this.appliedValid = false;\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","/******************************************************************************\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\nexport class BoneData {\n index: number;\n name: string;\n parent: BoneData;\n length: number;\n x = 0; y = 0; rotation = 0; scaleX = 1; scaleY = 1; shearX = 0; shearY = 0;\n transformMode = TransformMode.Normal;\n\n constructor (index: number, name: string, parent: BoneData) {\n if (index < 0) throw new Error(\"index must be >= 0.\");\n if (name == null) throw new Error(\"name cannot be null.\");\n this.index = index;\n this.name = name;\n this.parent = parent;\n }\n}\n\nexport enum TransformMode {\n Normal, OnlyTranslation, NoRotationOrReflection, NoScale, NoScaleOrReflection, InheritRotation, InheritScale\n}\n","import {EventData} from \"./EventData\";\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\nexport class Event {\r\n data: EventData;\r\n intValue: number;\r\n floatValue: number;\r\n stringValue: string;\r\n time: number;\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 * 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\nexport class EventData {\r\n name: string;\r\n intValue: number;\r\n floatValue: number;\r\n stringValue: string;\r\n\r\n constructor (name: string) {\r\n this.name = name;\r\n }\r\n}\r\n","import {IkConstraintData} from \"./IkConstraintData\";\nimport {Bone} from \"./Bone\";\nimport {Skeleton} from \"./Skeleton\";\nimport {MathUtils} from \"./Utils\";\nimport {Constraint} from \"./Constraint\";\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\nexport class IkConstraint implements Constraint {\n data: IkConstraintData;\n bones: Array;\n target: Bone;\n mix = 1;\n bendDirection = 0;\n\n level = 0;\n\n constructor (data: IkConstraintData, skeleton: Skeleton) {\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.mix = data.mix;\n this.bendDirection = data.bendDirection;\n\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findBone(data.target.name);\n }\n\n getOrder () {\n return this.data.order;\n }\n\n apply () {\n this.update();\n }\n\n update () {\n let target = this.target;\n let bones = this.bones;\n switch (bones.length) {\n case 1:\n this.apply1(bones[0], target.worldX, target.worldY, this.mix);\n break;\n case 2:\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.mix);\n break;\n }\n }\n\n /** Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified in the world\n * coordinate system. */\n apply1 (bone: Bone, targetX: number, targetY: number, alpha: number) {\n if (!bone.appliedValid) bone.updateAppliedTransform();\n let pp = bone.parent.matrix;\n let id = 1 / (pp.a * pp.d - pp.b * pp.c);\n let x = targetX - pp.tx, y = targetY - pp.ty;\n let tx = (x * pp.d - y * pp.c) * id - bone.ax, ty = (y * pp.a - x * pp.b) * id - bone.ay;\n let rotationIK = Math.atan2(ty, tx) * MathUtils.radDeg - bone.ashearX - bone.arotation;\n if (bone.ascaleX < 0) rotationIK += 180;\n if (rotationIK > 180)\n rotationIK -= 360;\n else if (rotationIK < -180) rotationIK += 360;\n bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, bone.ascaleX, bone.ascaleY, bone.ashearX,\n bone.ashearY);\n }\n\n /** Adjusts the parent and child bone rotations so the tip of the child is as close to the target position as possible. The\n * target is specified in the world coordinate system.\n * @param child A direct descendant of the parent bone. */\n apply2 (parent: Bone, child: Bone, targetX: number, targetY: number, bendDir: number, alpha: number) {\n if (alpha == 0) {\n child.updateWorldTransform();\n return;\n }\n if (!parent.appliedValid) parent.updateAppliedTransform();\n if (!child.appliedValid) child.updateAppliedTransform();\n let px = parent.ax, py = parent.ay, psx = parent.ascaleX, psy = parent.ascaleY, csx = child.ascaleX;\n\n let os1 = 0, os2 = 0, s2 = 0;\n if (psx < 0) {\n psx = -psx;\n os1 = 180;\n s2 = -1;\n } else {\n os1 = 0;\n s2 = 1;\n }\n if (psy < 0) {\n psy = -psy;\n s2 = -s2;\n }\n if (csx < 0) {\n csx = -csx;\n os2 = 180;\n } else\n os2 = 0;\n let pm = parent.matrix;\n let cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = pm.a, b = pm.c, c = pm.b, d = pm.d;\n let u = Math.abs(psx - psy) <= 0.0001;\n if (!u) {\n cy = 0;\n cwx = a * cx + pm.tx;\n cwy = c * cx + pm.ty;\n } else {\n cy = child.ay;\n cwx = a * cx + b * cy + pm.tx;\n cwy = c * cx + d * cy + pm.ty;\n }\n let pp = parent.parent;\n let ppm = parent.parent.matrix;\n a = ppm.a;\n b = ppm.c;\n c = ppm.b;\n d = ppm.d;\n let id = 1 / (a * d - b * c), x = targetX - ppm.tx, y = targetY - ppm.ty;\n let tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\n x = cwx - ppm.tx;\n y = cwy - ppm.ty;\n let dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\n let l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1 = 0, a2 = 0;\n outer:\n if (u) {\n l2 *= psx;\n let cos = (tx * tx + ty * ty - l1 * l1 - l2 * l2) / (2 * l1 * l2);\n if (cos < -1)\n cos = -1;\n else if (cos > 1) cos = 1;\n a2 = Math.acos(cos) * bendDir;\n a = l1 + l2 * cos;\n b = l2 * Math.sin(a2);\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\n } else {\n a = psx * l2;\n b = psy * l2;\n let aa = a * a, bb = b * b, dd = tx * tx + ty * ty, ta = Math.atan2(ty, tx);\n c = bb * l1 * l1 + aa * dd - aa * bb;\n let c1 = -2 * bb * l1, c2 = bb - aa;\n d = c1 * c1 - 4 * c2 * c;\n if (d >= 0) {\n let q = Math.sqrt(d);\n if (c1 < 0) q = -q;\n q = -(c1 + q) / 2;\n let r0 = q / c2, r1 = c / q;\n let r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\n if (r * r <= dd) {\n y = Math.sqrt(dd - r * r) * bendDir;\n a1 = ta - Math.atan2(y, r);\n a2 = Math.atan2(y / psy, (r - l1) / psx);\n break outer;\n }\n }\n let minAngle = 0, minDist = Number.MAX_VALUE, minX = 0, minY = 0;\n let maxAngle = 0, maxDist = 0, maxX = 0, maxY = 0;\n x = l1 + a;\n d = x * x;\n if (d > maxDist) {\n maxAngle = 0;\n maxDist = d;\n maxX = x;\n }\n x = l1 - a;\n d = x * x;\n if (d < minDist) {\n minAngle = MathUtils.PI;\n minDist = d;\n minX = x;\n }\n let angle = Math.acos(-a * l1 / (aa - bb));\n x = a * Math.cos(angle) + l1;\n y = b * Math.sin(angle);\n d = x * x + y * y;\n if (d < minDist) {\n minAngle = angle;\n minDist = d;\n minX = x;\n minY = y;\n }\n if (d > maxDist) {\n maxAngle = angle;\n maxDist = d;\n maxX = x;\n maxY = y;\n }\n if (dd <= (minDist + maxDist) / 2) {\n a1 = ta - Math.atan2(minY * bendDir, minX);\n a2 = minAngle * bendDir;\n } else {\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\n a2 = maxAngle * bendDir;\n }\n }\n let os = Math.atan2(cy, cx) * s2;\n let rotation = parent.arotation;\n a1 = (a1 - os) * MathUtils.radDeg + os1 - rotation;\n if (a1 > 180)\n a1 -= 360;\n else if (a1 < -180) a1 += 360;\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, parent.ascaleX, parent.ascaleY, 0, 0);\n rotation = child.arotation;\n a2 = ((a2 + os) * MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\n if (a2 > 180)\n a2 -= 360;\n else if (a2 < -180) a2 += 360;\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\n }\n}\n","import {BoneData} from \"./BoneData\";\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\nexport class IkConstraintData {\n name: string;\n order = 0;\n bones = new Array();\n target: BoneData;\n bendDirection = 1;\n mix = 1;\n\n constructor (name: string) {\n this.name = name;\n }\n}\n","import {PathConstraintData, SpacingMode, RotateMode, PositionMode} from \"./PathConstraintData\";\nimport {Bone} from \"./Bone\";\nimport {Slot} from \"./Slot\";\nimport {Skeleton} from \"./Skeleton\";\nimport {PathAttachment} from \"./attachments\";\nimport {Utils, MathUtils} from \"./Utils\";\nimport {Constraint} from \"./Constraint\";\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\nexport class PathConstraint implements Constraint {\n static NONE = -1; static BEFORE = -2; static AFTER = -3;\n\n data: PathConstraintData;\n bones: Array;\n target: Slot;\n position = 0; spacing = 0; rotateMix = 0; translateMix = 0;\n\n spaces = new Array(); positions = new Array();\n world = new Array(); curves = new Array(); lengths = new Array();\n segments = new Array();\n\n constructor (data: PathConstraintData, skeleton: Skeleton) {\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.bones = new Array();\n for (let i = 0, n = data.bones.length; i < n; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findSlot(data.target.name);\n this.position = data.position;\n this.spacing = data.spacing;\n this.rotateMix = data.rotateMix;\n this.translateMix = data.translateMix;\n }\n\n apply () {\n this.update();\n }\n\n update () {\n let attachment = this.target.getAttachment();\n if (!(attachment instanceof PathAttachment)) return;\n\n let rotateMix = this.rotateMix, translateMix = this.translateMix;\n let translate = translateMix > 0, rotate = rotateMix > 0;\n if (!translate && !rotate) return;\n\n let data = this.data;\n let spacingMode = data.spacingMode;\n let lengthSpacing = spacingMode == SpacingMode.Length;\n let rotateMode = data.rotateMode;\n let tangents = rotateMode == RotateMode.Tangent, scale = rotateMode == RotateMode.ChainScale;\n let boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\n let bones = this.bones;\n let spaces = Utils.setArraySize(this.spaces, spacesCount), lengths: Array = null;\n let spacing = this.spacing;\n if (scale || lengthSpacing) {\n if (scale) lengths = Utils.setArraySize(this.lengths, boneCount);\n for (let i = 0, n = spacesCount - 1; i < n;) {\n let bone = bones[i];\n let m = bone.matrix;\n let length = bone.data.length, x = length * m.a, y = length * m.b;\n length = Math.sqrt(x * x + y * y);\n if (scale) lengths[i] = length;\n spaces[++i] = lengthSpacing ? Math.max(0, length + spacing) : spacing;\n }\n } else {\n for (let i = 1; i < spacesCount; i++)\n spaces[i] = spacing;\n }\n\n let positions = this.computeWorldPositions(attachment, spacesCount, tangents,\n data.positionMode == PositionMode.Percent, spacingMode == SpacingMode.Percent);\n let boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\n let tip = rotateMode == RotateMode.Chain && offsetRotation == 0;\n for (let i = 0, p = 3; i < boneCount; i++, p += 3) {\n let bone = bones[i];\n let m = bone.matrix;\n m.tx += (boneX - m.tx) * translateMix;\n m.ty += (boneY - m.ty) * translateMix;\n let x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\n if (scale) {\n let length = lengths[i];\n if (length != 0) {\n let s = (Math.sqrt(dx * dx + dy * dy) / length - 1) * rotateMix + 1;\n m.a *= s;\n m.b *= s;\n }\n }\n boneX = x;\n boneY = y;\n if (rotate) {\n let a = m.a, b = m.c, c = m.b, d = m.d, r = 0, cos = 0, sin = 0;\n if (tangents)\n r = positions[p - 1];\n else if (spaces[i + 1] == 0)\n r = positions[p + 2];\n else\n r = Math.atan2(dy, dx);\n r -= Math.atan2(c, a) - offsetRotation * MathUtils.degRad;\n if (tip) {\n cos = Math.cos(r);\n sin = Math.sin(r);\n let length = bone.data.length;\n boneX += (length * (cos * a - sin * c) - dx) * rotateMix;\n boneY += (length * (sin * a + cos * c) - dy) * rotateMix;\n }\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI) //\n r += MathUtils.PI2;\n r *= rotateMix;\n cos = Math.cos(r);\n sin = Math.sin(r);\n m.a = cos * a - sin * c;\n m.c = cos * b - sin * d;\n m.b = sin * a + cos * c;\n m.d = sin * b + cos * d;\n }\n bone.appliedValid = false;\n }\n }\n\n computeWorldPositions (path: PathAttachment, spacesCount: number, tangents: boolean, percentPosition: boolean,\n percentSpacing: boolean) {\n let target = this.target;\n let position = this.position;\n let spaces = this.spaces, out = Utils.setArraySize(this.positions, spacesCount * 3 + 2), world: Array = null;\n let closed = path.closed;\n let verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\n\n if (!path.constantSpeed) {\n let lengths = path.lengths;\n curveCount -= closed ? 1 : 2;\n let pathLength = lengths[curveCount];\n if (percentPosition) position *= pathLength;\n if (percentSpacing) {\n for (let i = 0; i < spacesCount; i++)\n spaces[i] *= pathLength;\n }\n world = Utils.setArraySize(this.world, 8);\n for (let i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\n let space = spaces[i];\n position += space;\n let p = position;\n\n if (closed) {\n p %= pathLength;\n if (p < 0) p += pathLength;\n curve = 0;\n } else if (p < 0) {\n if (prevCurve != PathConstraint.BEFORE) {\n prevCurve = PathConstraint.BEFORE;\n path.computeWorldVerticesWith(target, 2, 4, world, 0);\n }\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n } else if (p > pathLength) {\n if (prevCurve != PathConstraint.AFTER) {\n prevCurve = PathConstraint.AFTER;\n path.computeWorldVerticesWith(target, verticesLength - 6, 4, world, 0);\n }\n this.addAfterPosition(p - pathLength, world, 0, out, o);\n continue;\n }\n\n // Determine curve containing position.\n for (;; curve++) {\n let length = lengths[curve];\n if (p > length) continue;\n if (curve == 0)\n p /= length;\n else {\n let prev = lengths[curve - 1];\n p = (p - prev) / (length - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n if (closed && curve == curveCount) {\n path.computeWorldVerticesWith(target, verticesLength - 4, 4, world, 0);\n path.computeWorldVerticesWith(target, 0, 4, world, 4);\n } else\n path.computeWorldVerticesWith(target, curve * 6 + 2, 8, world, 0);\n }\n this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o,\n tangents || (i > 0 && space == 0));\n }\n return out;\n }\n\n // World vertices.\n if (closed) {\n verticesLength += 2;\n world = Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVerticesWith(target, 2, verticesLength - 4, world, 0);\n path.computeWorldVerticesWith(target, 0, 2, world, verticesLength - 4);\n world[verticesLength - 2] = world[0];\n world[verticesLength - 1] = world[1];\n } else {\n curveCount--;\n verticesLength -= 4;\n world = Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVerticesWith(target, 2, verticesLength, world, 0);\n }\n\n // Curve lengths.\n let curves = Utils.setArraySize(this.curves, curveCount);\n let pathLength = 0;\n let x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\n let tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\n for (let i = 0, w = 2; i < curveCount; i++, w += 6) {\n cx1 = world[w];\n cy1 = world[w + 1];\n cx2 = world[w + 2];\n cy2 = world[w + 3];\n x2 = world[w + 4];\n y2 = world[w + 5];\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\n ddfx = tmpx * 2 + dddfx;\n ddfy = tmpy * 2 + dddfy;\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx;\n dfy += ddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx + dddfx;\n dfy += ddfy + dddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n curves[i] = pathLength;\n x1 = x2;\n y1 = y2;\n }\n if (percentPosition) position *= pathLength;\n if (percentSpacing) {\n for (let i = 0; i < spacesCount; i++)\n spaces[i] *= pathLength;\n }\n\n let segments = this.segments;\n let curveLength = 0;\n for (let i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\n let space = spaces[i];\n position += space;\n let p = position;\n\n if (closed) {\n p %= pathLength;\n if (p < 0) p += pathLength;\n curve = 0;\n } else if (p < 0) {\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n } else if (p > pathLength) {\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\n continue;\n }\n\n // Determine curve containing position.\n for (;; curve++) {\n let length = curves[curve];\n if (p > length) continue;\n if (curve == 0)\n p /= length;\n else {\n let prev = curves[curve - 1];\n p = (p - prev) / (length - prev);\n }\n break;\n }\n\n // Curve segment lengths.\n if (curve != prevCurve) {\n prevCurve = curve;\n let ii = curve * 6;\n x1 = world[ii];\n y1 = world[ii + 1];\n cx1 = world[ii + 2];\n cy1 = world[ii + 3];\n cx2 = world[ii + 4];\n cy2 = world[ii + 5];\n x2 = world[ii + 6];\n y2 = world[ii + 7];\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\n ddfx = tmpx * 2 + dddfx;\n ddfy = tmpy * 2 + dddfy;\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\n segments[0] = curveLength;\n for (ii = 1; ii < 8; ii++) {\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[ii] = curveLength;\n }\n dfx += ddfx;\n dfy += ddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[8] = curveLength;\n dfx += ddfx + dddfx;\n dfy += ddfy + dddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[9] = curveLength;\n segment = 0;\n }\n\n // Weight by segment length.\n p *= curveLength;\n for (;; segment++) {\n let length = segments[segment];\n if (p > length) continue;\n if (segment == 0)\n p /= length;\n else {\n let prev = segments[segment - 1];\n p = segment + (p - prev) / (length - prev);\n }\n break;\n }\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\n }\n return out;\n }\n\n addBeforePosition (p: number, temp: Array, i: number, out: Array, o: number) {\n let x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\n out[o] = x1 + p * Math.cos(r);\n out[o + 1] = y1 + p * Math.sin(r);\n out[o + 2] = r;\n }\n\n addAfterPosition (p: number, temp: Array, i: number, out: Array, o: number) {\n let x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\n out[o] = x1 + p * Math.cos(r);\n out[o + 1] = y1 + p * Math.sin(r);\n out[o + 2] = r;\n }\n\n addCurvePosition (p: number, x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number,\n out: Array, o: number, tangents: boolean) {\n if (p == 0 || isNaN(p)) p = 0.0001;\n let tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\n let ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\n let x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\n out[o] = x;\n out[o + 1] = y;\n if (tangents) out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\n }\n\n getOrder () {\n return this.data.order;\n }\n}\n","import {BoneData} from \"./BoneData\";\nimport {SlotData} from \"./SlotData\";\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\nexport class PathConstraintData {\n name: string;\n order = 0;\n bones = new Array();\n target: SlotData;\n positionMode: PositionMode;\n spacingMode: SpacingMode;\n rotateMode: RotateMode;\n offsetRotation: number;\n position: number; spacing: number; rotateMix: number; translateMix: number;\n\n constructor (name: string) {\n this.name = name;\n }\n}\n\nexport enum PositionMode {\n Fixed, Percent\n}\n\nexport enum SpacingMode {\n Length, Fixed, Percent\n}\n\nexport enum RotateMode {\n Tangent, Chain, ChainScale\n}\n","import {Slot} from \"./Slot\";\nimport {Bone} from \"./Bone\";\nimport {IkConstraint} from \"./IkConstraint\";\nimport {TransformConstraint} from \"./TransformConstraint\";\nimport {PathConstraint} from \"./PathConstraint\";\nimport {Color, Utils, Vector2} from \"./Utils\";\nimport {Skin} from \"./Skin\";\nimport {SkeletonData} from \"./SkeletonData\";\nimport {Updatable} from \"./Updatable\";\nimport {Attachment, PathAttachment, RegionAttachment, MeshAttachment} from \"./attachments\";\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\nexport class Skeleton {\n data: SkeletonData;\n bones: Array;\n slots: Array;\n drawOrder: Array;\n ikConstraints: Array;\n transformConstraints: Array;\n pathConstraints: Array;\n _updateCache = new Array();\n updateCacheReset = new Array();\n skin: Skin;\n color: Color;\n time = 0;\n flipX = false; flipY = false;\n x = 0; y = 0;\n\n constructor (data: SkeletonData) {\n if (data == null) throw new Error(\"data cannot be null.\");\n this.data = data;\n\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++) {\n let boneData = data.bones[i];\n let bone: Bone;\n if (boneData.parent == null)\n bone = new Bone(boneData, this, null);\n else {\n let parent = this.bones[boneData.parent.index];\n bone = new Bone(boneData, this, parent);\n parent.children.push(bone);\n }\n this.bones.push(bone);\n }\n\n this.slots = new Array();\n this.drawOrder = new Array();\n for (let i = 0; i < data.slots.length; i++) {\n let slotData = data.slots[i];\n let bone = this.bones[slotData.boneData.index];\n let slot = new Slot(slotData, bone);\n this.slots.push(slot);\n this.drawOrder.push(slot);\n }\n\n this.ikConstraints = new Array();\n for (let i = 0; i < data.ikConstraints.length; i++) {\n let ikConstraintData = data.ikConstraints[i];\n this.ikConstraints.push(new IkConstraint(ikConstraintData, this));\n }\n\n this.transformConstraints = new Array();\n for (let i = 0; i < data.transformConstraints.length; i++) {\n let transformConstraintData = data.transformConstraints[i];\n this.transformConstraints.push(new TransformConstraint(transformConstraintData, this));\n }\n\n this.pathConstraints = new Array();\n for (let i = 0; i < data.pathConstraints.length; i++) {\n let pathConstraintData = data.pathConstraints[i];\n this.pathConstraints.push(new PathConstraint(pathConstraintData, this));\n }\n\n this.color = new Color(1, 1, 1, 1);\n this.updateCache();\n }\n\n updateCache () {\n let updateCache = this._updateCache;\n updateCache.length = 0;\n\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++)\n bones[i].sorted = false;\n\n let ikConstraints = this.ikConstraints;\n let transformConstraints = this.transformConstraints;\n let pathConstraints = this.pathConstraints;\n let ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\n let constraintCount = ikCount + transformCount + pathCount;\n\n outer:\n for (let i = 0; i < constraintCount; i++) {\n for (let ii = 0; ii < ikCount; ii++) {\n let constraint = ikConstraints[ii];\n if (constraint.data.order == i) {\n this.sortIkConstraint(constraint);\n continue outer;\n }\n }\n for (let ii = 0; ii < transformCount; ii++) {\n let constraint = transformConstraints[ii];\n if (constraint.data.order == i) {\n this.sortTransformConstraint(constraint);\n continue outer;\n }\n }\n for (let ii = 0; ii < pathCount; ii++) {\n let constraint = pathConstraints[ii];\n if (constraint.data.order == i) {\n this.sortPathConstraint(constraint);\n continue outer;\n }\n }\n }\n\n for (let i = 0, n = bones.length; i < n; i++)\n this.sortBone(bones[i]);\n }\n\n sortIkConstraint (constraint: IkConstraint) {\n let target = constraint.target;\n this.sortBone(target);\n\n let constrained = constraint.bones;\n let parent = constrained[0];\n this.sortBone(parent);\n\n if (constrained.length > 1) {\n let child = constrained[constrained.length - 1];\n if (!(this._updateCache.indexOf(child) > -1)) this.updateCacheReset.push(child);\n }\n\n this._updateCache.push(constraint);\n\n this.sortReset(parent.children);\n constrained[constrained.length - 1].sorted = true;\n }\n\n sortPathConstraint (constraint: PathConstraint) {\n let slot = constraint.target;\n let slotIndex = slot.data.index;\n let slotBone = slot.bone;\n if (this.skin != null) this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\n if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\n for (let ii = 0, nn = this.data.skins.length; ii < nn; ii++)\n this.sortPathConstraintAttachment(this.data.skins[ii], slotIndex, slotBone);\n\n let attachment = slot.getAttachment();\n if (attachment instanceof PathAttachment) this.sortPathConstraintAttachmentWith(attachment, slotBone);\n\n let constrained = constraint.bones;\n let boneCount = constrained.length;\n for (let ii = 0; ii < boneCount; ii++)\n this.sortBone(constrained[ii]);\n\n this._updateCache.push(constraint);\n\n for (let ii = 0; ii < boneCount; ii++)\n this.sortReset(constrained[ii].children);\n for (let ii = 0; ii < boneCount; ii++)\n constrained[ii].sorted = true;\n }\n\n sortTransformConstraint (constraint: TransformConstraint) {\n this.sortBone(constraint.target);\n\n let constrained = constraint.bones;\n let boneCount = constrained.length;\n for (let ii = 0; ii < boneCount; ii++)\n this.sortBone(constrained[ii]);\n\n this._updateCache.push(constraint);\n\n for (let ii = 0; ii < boneCount; ii++)\n this.sortReset(constrained[ii].children);\n for (let ii = 0; ii < boneCount; ii++)\n constrained[ii].sorted = true;\n }\n\n sortPathConstraintAttachment (skin: Skin, slotIndex: number, slotBone: Bone) {\n let attachments = skin.attachments[slotIndex];\n if (!attachments) return;\n for (let key in attachments) {\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\n }\n }\n\n sortPathConstraintAttachmentWith (attachment: Attachment, slotBone: Bone) {\n if (!(attachment instanceof PathAttachment)) return;\n let pathBones = (attachment).bones;\n if (pathBones == null)\n this.sortBone(slotBone);\n else {\n let bones = this.bones;\n let i = 0;\n while (i < pathBones.length) {\n let boneCount = pathBones[i++];\n for (let n = i + boneCount; i < n; i++) {\n let boneIndex = pathBones[i];\n this.sortBone(bones[boneIndex]);\n }\n }\n }\n }\n\n sortBone (bone: Bone) {\n if (bone.sorted) return;\n let parent = bone.parent;\n if (parent != null) this.sortBone(parent);\n bone.sorted = true;\n this._updateCache.push(bone);\n }\n\n sortReset (bones: Array) {\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.sorted) this.sortReset(bone.children);\n bone.sorted = false;\n }\n }\n\n /** Updates the world transform for each bone and applies constraints. */\n updateWorldTransform () {\n let updateCacheReset = this.updateCacheReset;\n for (let i = 0, n = updateCacheReset.length; i < n; i++) {\n let bone = updateCacheReset[i] as Bone;\n bone.ax = bone.x;\n bone.ay = bone.y;\n bone.arotation = bone.rotation;\n bone.ascaleX = bone.scaleX;\n bone.ascaleY = bone.scaleY;\n bone.ashearX = bone.shearX;\n bone.ashearY = bone.shearY;\n bone.appliedValid = true;\n }\n let updateCache = this._updateCache;\n for (let i = 0, n = updateCache.length; i < n; i++)\n updateCache[i].update();\n }\n\n /** Sets the bones, constraints, and slots to their setup pose values. */\n setToSetupPose () {\n this.setBonesToSetupPose();\n this.setSlotsToSetupPose();\n }\n\n /** Sets the bones and constraints to their setup pose values. */\n setBonesToSetupPose () {\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++)\n bones[i].setToSetupPose();\n\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let constraint = ikConstraints[i];\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.mix = constraint.data.mix;\n }\n\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n let data = constraint.data;\n constraint.rotateMix = data.rotateMix;\n constraint.translateMix = data.translateMix;\n constraint.scaleMix = data.scaleMix;\n constraint.shearMix = data.shearMix;\n }\n\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n let data = constraint.data;\n constraint.position = data.position;\n constraint.spacing = data.spacing;\n constraint.rotateMix = data.rotateMix;\n constraint.translateMix = data.translateMix;\n }\n }\n\n setSlotsToSetupPose () {\n let slots = this.slots;\n Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\n for (let i = 0, n = slots.length; i < n; i++)\n slots[i].setToSetupPose();\n }\n\n /** @return May return null. */\n getRootBone () {\n if (this.bones.length == 0) return null;\n return this.bones[0];\n }\n\n /** @return May be null. */\n findBone (boneName: string) {\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.data.name == boneName) return bone;\n }\n return null;\n }\n\n /** @return -1 if the bone was not found. */\n findBoneIndex (boneName: string) {\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++)\n if (bones[i].data.name == boneName) return i;\n return -1;\n }\n\n /** @return May be null. */\n findSlot (slotName: string) {\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.data.name == slotName) return slot;\n }\n return null;\n }\n\n /** @return -1 if the bone was not found. */\n findSlotIndex (slotName: string) {\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++)\n if (slots[i].data.name == slotName) return i;\n return -1;\n }\n\n /** Sets a skin by name.\n * @see #setSkin(Skin) */\n setSkinByName (skinName: string) {\n let skin = this.data.findSkin(skinName);\n if (skin == null) throw new Error(\"Skin not found: \" + skinName);\n this.setSkin(skin);\n }\n\n /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default skin}.\n * Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no\n * old skin, each slot's setup mode attachment is attached from the new skin.\n * @param newSkin May be null. */\n setSkin (newSkin: Skin) {\n if (newSkin != null) {\n if (this.skin != null)\n newSkin.attachAll(this, this.skin);\n else {\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n let name = slot.data.attachmentName;\n if (name != null) {\n let attachment: Attachment = newSkin.getAttachment(i, name);\n if (attachment != null) slot.setAttachment(attachment);\n }\n }\n }\n }\n this.skin = newSkin;\n }\n\n /** @return May be null. */\n getAttachmentByName (slotName: string, attachmentName: string): Attachment {\n return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\n }\n\n /** @return May be null. */\n getAttachment (slotIndex: number, attachmentName: string): Attachment {\n if (attachmentName == null) throw new Error(\"attachmentName cannot be null.\");\n if (this.skin != null) {\n let attachment: Attachment = this.skin.getAttachment(slotIndex, attachmentName);\n if (attachment != null) return attachment;\n }\n if (this.data.defaultSkin != null) return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\n return null;\n }\n\n /** @param attachmentName May be null. */\n setAttachment (slotName: string, attachmentName: string) {\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.data.name == slotName) {\n let attachment: Attachment = null;\n if (attachmentName != null) {\n attachment = this.getAttachment(i, attachmentName);\n if (attachment == null)\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\n }\n slot.setAttachment(attachment);\n return;\n }\n }\n throw new Error(\"Slot not found: \" + slotName);\n }\n\n /** @return May be null. */\n findIkConstraint (constraintName: string) {\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let ikConstraint = ikConstraints[i];\n if (ikConstraint.data.name == constraintName) return ikConstraint;\n }\n return null;\n }\n\n /** @return May be null. */\n findTransformConstraint (constraintName: string) {\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n if (constraint.data.name == constraintName) return constraint;\n }\n return null;\n }\n\n /** @return May be null. */\n findPathConstraint (constraintName: string) {\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n if (constraint.data.name == constraintName) return constraint;\n }\n return null;\n }\n\n /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\n * @param offset The distance from the skeleton origin to the bottom left corner of the AABB.\n * @param size The width and height of the AABB. */\n getBounds (offset: Vector2, size: Vector2) {\n if (offset == null) throw new Error(\"offset cannot be null.\");\n if (size == null) throw new Error(\"size cannot be null.\");\n let drawOrder = this.drawOrder;\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let slot = drawOrder[i];\n let vertices: ArrayLike = null;\n let attachment = slot.getAttachment();\n if (attachment instanceof RegionAttachment)\n vertices = (attachment).updateWorldVertices(slot, false);\n else if (attachment instanceof MeshAttachment) //\n vertices = (attachment).updateWorldVertices(slot, true);\n if (vertices != null) {\n for (let ii = 0, nn = vertices.length; ii < nn; ii += 8) {\n let x = vertices[ii], y = vertices[ii + 1];\n minX = Math.min(minX, x);\n minY = Math.min(minY, y);\n maxX = Math.max(maxX, x);\n maxY = Math.max(maxY, y);\n }\n }\n }\n offset.set(minX, minY);\n size.set(maxX - minX, maxY - minY);\n }\n\n update (delta: number) {\n this.time += delta;\n }\n}\n","import {Utils, Pool} from \"./Utils\";\r\nimport {Skeleton} from \"./Skeleton\";\r\nimport {BoundingBoxAttachment} from \"./attachments\";\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\nexport 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 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, polygon);\r\n }\r\n }\r\n\r\n if (updateAabb) this.aabbCompute();\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","import {BoneData} from \"./BoneData\";\nimport {SlotData} from \"./SlotData\";\nimport {Skin} from \"./Skin\";\nimport {EventData} from \"./EventData\";\nimport {Animation} from \"./Animation\";\nimport {IkConstraintData} from \"./IkConstraintData\";\nimport {TransformConstraintData} from \"./TransformConstraintData\";\nimport {PathConstraintData} from \"./PathConstraintData\";\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\nexport class SkeletonData {\n name: string;\n bones = new Array(); // Ordered parents first.\n slots = new Array(); // Setup pose draw order.\n skins = new Array();\n defaultSkin: Skin;\n events = new Array();\n animations = new Array();\n ikConstraints = new Array();\n transformConstraints = new Array();\n pathConstraints = new Array();\n width: number; height: number;\n version: string; hash: string;\n\n // Nonessential\n fps = 0;\n imagesPath: string;\n\n findBone (boneName: string) {\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.name == boneName) return bone;\n }\n return null;\n }\n\n findBoneIndex (boneName: string) {\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++)\n if (bones[i].name == boneName) return i;\n return -1;\n }\n\n findSlot (slotName: string) {\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.name == slotName) return slot;\n }\n return null;\n }\n\n findSlotIndex (slotName: string) {\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++)\n if (slots[i].name == slotName) return i;\n return -1;\n }\n\n findSkin (skinName: string) {\n if (skinName == null) throw new Error(\"skinName cannot be null.\");\n let skins = this.skins;\n for (let i = 0, n = skins.length; i < n; i++) {\n let skin = skins[i];\n if (skin.name == skinName) return skin;\n }\n return null;\n }\n\n findEvent (eventDataName: string) {\n if (eventDataName == null) throw new Error(\"eventDataName cannot be null.\");\n let events = this.events;\n for (let i = 0, n = events.length; i < n; i++) {\n let event = events[i];\n if (event.name == eventDataName) return event;\n }\n return null;\n }\n\n findAnimation (animationName: string) {\n if (animationName == null) throw new Error(\"animationName cannot be null.\");\n let animations = this.animations;\n for (let i = 0, n = animations.length; i < n; i++) {\n let animation = animations[i];\n if (animation.name == animationName) return animation;\n }\n return null;\n }\n\n findIkConstraint (constraintName: string) {\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let constraint = ikConstraints[i];\n if (constraint.name == constraintName) return constraint;\n }\n return null;\n }\n\n findTransformConstraint (constraintName: string) {\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n if (constraint.name == constraintName) return constraint;\n }\n return null;\n }\n\n findPathConstraint (constraintName: string) {\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n if (constraint.name == constraintName) return constraint;\n }\n return null;\n }\n\n findPathConstraintIndex (pathConstraintName: string) {\n if (pathConstraintName == null) throw new Error(\"pathConstraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++)\n if (pathConstraints[i].name == pathConstraintName) return i;\n return -1;\n }\n}\n","import {SkeletonData} from \"./SkeletonData\";\nimport {BoneData, TransformMode} from \"./BoneData\";\nimport {SlotData} from \"./SlotData\";\nimport {Event} from \"./Event\";\nimport {IkConstraintData} from \"./IkConstraintData\";\nimport {TransformConstraintData} from \"./TransformConstraintData\";\nimport {PathConstraintData, PositionMode, SpacingMode, RotateMode} from \"./PathConstraintData\";\nimport {Skin} from \"./Skin\";\nimport {EventData} from \"./EventData\";\nimport {Attachment, AttachmentLoader, MeshAttachment, VertexAttachment} from \"./attachments\";\nimport {Utils, Color, ArrayLike} from \"./Utils\";\nimport {\n Timeline, ColorTimeline, AttachmentTimeline, RotateTimeline, TranslateTimeline,\n ScaleTimeline, ShearTimeline, IkConstraintTimeline, TransformConstraintTimeline, PathConstraintPositionTimeline,\n PathConstraintSpacingTimeline, PathConstraintMixTimeline, DeformTimeline, DrawOrderTimeline, EventTimeline,\n Animation, CurveTimeline\n} from \"./Animation\";\nimport {BlendMode} from \"./BlendMode\";\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\nexport class SkeletonJson {\n attachmentLoader: AttachmentLoader;\n scale = 1;\n private linkedMeshes = new Array();\n\n constructor (attachmentLoader: AttachmentLoader) {\n this.attachmentLoader = attachmentLoader;\n }\n\n readSkeletonData (json: string | any ): SkeletonData {\n let scale = this.scale;\n let skeletonData = new SkeletonData();\n let root = typeof(json) === \"string\" ? JSON.parse(json) : json;\n\n // Skeleton\n let skeletonMap = root.skeleton;\n if (skeletonMap != null) {\n skeletonData.hash = skeletonMap.hash;\n skeletonData.version = skeletonMap.spine;\n skeletonData.width = skeletonMap.width;\n skeletonData.height = skeletonMap.height;\n skeletonData.fps = skeletonMap.fps;\n skeletonData.imagesPath = skeletonMap.images;\n }\n\n // Bones\n if (root.bones) {\n for (let i = 0; i < root.bones.length; i++) {\n let boneMap = root.bones[i];\n\n let parent: BoneData = null;\n let parentName: string = this.getValue(boneMap, \"parent\", null);\n if (parentName != null) {\n parent = skeletonData.findBone(parentName);\n if (parent == null) throw new Error(\"Parent bone not found: \" + parentName);\n }\n let data = new BoneData(skeletonData.bones.length, boneMap.name, parent);\n data.length = this.getValue(boneMap, \"length\", 0) * scale;\n data.x = this.getValue(boneMap, \"x\", 0) * scale;\n data.y = this.getValue(boneMap, \"y\", 0) * scale;\n data.rotation = this.getValue(boneMap, \"rotation\", 0);\n data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\n data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\n data.shearX = this.getValue(boneMap, \"shearX\", 0);\n data.shearY = this.getValue(boneMap, \"shearY\", 0);\n\n //this is legacy\n if (boneMap.hasOwnProperty(\"inheritScale\") || boneMap.hasOwnProperty(\"inheritRotation\")) {\n //before 3.5\n data.transformMode = SkeletonJson.transformModeLegacy(\n this.getValue(boneMap, \"inheritRotation\", true),\n this.getValue(boneMap, \"inheritScale\", true));\n } else {\n //after 3.5\n data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\n }\n\n skeletonData.bones.push(data);\n }\n }\n\n // Slots.\n if (root.slots) {\n for (let i = 0; i < root.slots.length; i++) {\n let slotMap = root.slots[i];\n let slotName: string = slotMap.name;\n let boneName: string = slotMap.bone;\n let boneData = skeletonData.findBone(boneName);\n if (boneData == null) throw new Error(\"Slot bone not found: \" + boneName);\n let data = new SlotData(skeletonData.slots.length, slotName, boneData);\n\n let color: string = this.getValue(slotMap, \"color\", null);\n if (color != null) data.color.setFromString(color);\n\n data.attachmentName = this.getValue(slotMap, \"attachment\", null);\n data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\n skeletonData.slots.push(data);\n }\n }\n\n // IK constraints\n if (root.ik) {\n for (let i = 0; i < root.ik.length; i++) {\n let constraintMap = root.ik[i];\n let data = new IkConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n\n for (let j = 0; j < constraintMap.bones.length; j++) {\n let boneName = constraintMap.bones[j];\n let bone = skeletonData.findBone(boneName);\n if (bone == null) throw new Error(\"IK bone not found: \" + boneName);\n data.bones.push(bone);\n }\n\n let targetName: string = constraintMap.target;\n data.target = skeletonData.findBone(targetName);\n if (data.target == null) throw new Error(\"IK target bone not found: \" + targetName);\n\n data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\n data.mix = this.getValue(constraintMap, \"mix\", 1);\n\n skeletonData.ikConstraints.push(data);\n }\n }\n\n // Transform constraints.\n if (root.transform) {\n for (let i = 0; i < root.transform.length; i++) {\n let constraintMap = root.transform[i];\n let data = new TransformConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n\n for (let j = 0; j < constraintMap.bones.length; j++) {\n let boneName = constraintMap.bones[j];\n let bone = skeletonData.findBone(boneName);\n if (bone == null) throw new Error(\"Transform constraint bone not found: \" + boneName);\n data.bones.push(bone);\n }\n\n let targetName: string = constraintMap.target;\n data.target = skeletonData.findBone(targetName);\n if (data.target == null) throw new Error(\"Transform constraint target bone not found: \" + targetName);\n\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\n data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\n data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\n data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\n data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\n data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\n\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\n data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\n data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\n\n skeletonData.transformConstraints.push(data);\n }\n }\n\n // Path constraints.\n if (root.path) {\n for (let i = 0; i < root.path.length; i++) {\n let constraintMap = root.path[i];\n let data = new PathConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n\n for (let j = 0; j < constraintMap.bones.length; j++) {\n let boneName = constraintMap.bones[j];\n let bone = skeletonData.findBone(boneName);\n if (bone == null) throw new Error(\"Transform constraint bone not found: \" + boneName);\n data.bones.push(bone);\n }\n\n let targetName: string = constraintMap.target;\n data.target = skeletonData.findSlot(targetName);\n if (data.target == null) throw new Error(\"Path target slot not found: \" + targetName);\n\n data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\n data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\n data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\n data.position = this.getValue(constraintMap, \"position\", 0);\n if (data.positionMode == PositionMode.Fixed) data.position *= scale;\n data.spacing = this.getValue(constraintMap, \"spacing\", 0);\n if (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) data.spacing *= scale;\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\n\n skeletonData.pathConstraints.push(data);\n }\n }\n\n // Skins.\n if (root.skins) {\n for (let skinName in root.skins) {\n let skinMap = root.skins[skinName]\n let skin = new Skin(skinName);\n for (let slotName in skinMap) {\n let slotIndex = skeletonData.findSlotIndex(slotName);\n if (slotIndex == -1) throw new Error(\"Slot not found: \" + slotName);\n let slotMap = skinMap[slotName];\n for (let entryName in slotMap) {\n let attachment = this.readAttachment(slotMap[entryName], skin, slotIndex, entryName);\n if (attachment != null) skin.addAttachment(slotIndex, entryName, attachment);\n }\n }\n skeletonData.skins.push(skin);\n if (skin.name == \"default\") skeletonData.defaultSkin = skin;\n }\n }\n\n // Linked meshes.\n for (let i = 0, n = this.linkedMeshes.length; i < n; i++) {\n let linkedMesh = this.linkedMeshes[i];\n let skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (skin == null) throw new Error(\"Skin not found: \" + linkedMesh.skin);\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (parent == null) throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\n linkedMesh.mesh.setParentMesh( parent);\n // linkedMesh.mesh.updateUVs();\n }\n this.linkedMeshes.length = 0;\n\n // Events.\n if (root.events) {\n for (let eventName in root.events) {\n let eventMap = root.events[eventName];\n let data = new EventData(eventName);\n data.intValue = this.getValue(eventMap, \"int\", 0);\n data.floatValue = this.getValue(eventMap, \"float\", 0);\n data.stringValue = this.getValue(eventMap, \"string\", null);\n skeletonData.events.push(data);\n }\n }\n\n // Animations.\n if (root.animations) {\n for (let animationName in root.animations) {\n let animationMap = root.animations[animationName];\n this.readAnimation(animationMap, animationName, skeletonData);\n }\n }\n\n return skeletonData;\n }\n\n readAttachment (map: any, skin: Skin, slotIndex: number, name: string): Attachment {\n let scale = this.scale;\n name = this.getValue(map, \"name\", name);\n\n let type = this.getValue(map, \"type\", \"region\");\n\n switch (type) {\n case \"region\": {\n let path = this.getValue(map, \"path\", name);\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path);\n if (region == null) return null;\n region.path = path;\n region.x = this.getValue(map, \"x\", 0) * scale;\n region.y = this.getValue(map, \"y\", 0) * scale;\n region.scaleX = this.getValue(map, \"scaleX\", 1);\n region.scaleY = this.getValue(map, \"scaleY\", 1);\n region.rotation = this.getValue(map, \"rotation\", 0);\n region.width = map.width * scale;\n region.height = map.height * scale;\n\n let color: string = this.getValue(map, \"color\", null);\n if (color != null) region.color.setFromString(color);\n\n return region;\n }\n case \"boundingbox\": {\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (box == null) return null;\n this.readVertices(map, box, map.vertexCount << 1);\n let color: string = this.getValue(map, \"color\", null);\n if (color != null) box.color.setFromString(color);\n return box;\n }\n //weightedmesh is deprecated but who cares\n case \"weightedmesh\":\n case \"skinnedmesh\":\n case \"mesh\":\n case \"linkedmesh\": {\n let path = this.getValue(map, \"path\", name);\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\n if (mesh == null) return null;\n mesh.path = path;\n\n let color = this.getValue(map, \"color\", null);\n if (color != null) mesh.color.setFromString(color);\n\n let parent: string = this.getValue(map, \"parent\", null);\n if (parent != null) {\n mesh.inheritDeform = this.getValue(map, \"deform\", true);\n this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent));\n return mesh;\n }\n\n let uvs: Array = map.uvs;\n this.readVertices(map, mesh, uvs.length);\n mesh.triangles = map.triangles;\n mesh.regionUVs = uvs;\n // mesh.updateUVs();\n\n mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\n return mesh;\n }\n case \"path\": {\n let path = this.attachmentLoader.newPathAttachment(skin, name);\n if (path == null) return null;\n path.closed = this.getValue(map, \"closed\", false);\n path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\n\n let vertexCount = map.vertexCount;\n this.readVertices(map, path, vertexCount << 1);\n\n let lengths: Array = Utils.newArray(vertexCount / 3, 0);\n for (let i = 0; i < map.lengths.length; i++)\n lengths[i++] = map.lengths[i] * scale;\n path.lengths = lengths;\n\n let color: string = this.getValue(map, \"color\", null);\n if (color != null) path.color.setFromString(color);\n return path;\n }\n }\n return null;\n }\n\n readVertices (map: any, attachment: VertexAttachment, verticesLength: number) {\n let scale = this.scale;\n attachment.worldVerticesLength = verticesLength;\n let vertices: Array = map.vertices;\n if (verticesLength == vertices.length) {\n if (scale != 1) {\n for (let i = 0, n = vertices.length; i < n; i++)\n vertices[i] *= scale;\n }\n attachment.vertices = Utils.toFloatArray(vertices);\n return;\n }\n let weights = new Array();\n let bones = new Array();\n for (let i = 0, n = vertices.length; i < n;) {\n let boneCount = vertices[i++];\n bones.push(boneCount);\n for (let nn = i + boneCount * 4; i < nn; i += 4) {\n bones.push(vertices[i]);\n weights.push(vertices[i + 1] * scale);\n weights.push(vertices[i + 2] * scale);\n weights.push(vertices[i + 3]);\n }\n }\n attachment.bones = bones;\n attachment.vertices = Utils.toFloatArray(weights);\n }\n\n readAnimation (map: any, name: string, skeletonData: SkeletonData) {\n let scale = this.scale;\n let timelines = new Array();\n let duration = 0;\n\n // Slot timelines.\n if (map.slots) {\n for (let slotName in map.slots) {\n let slotMap = map.slots[slotName];\n let slotIndex = skeletonData.findSlotIndex(slotName);\n if (slotIndex == -1) throw new Error(\"Slot not found: \" + slotName);\n for (let timelineName in slotMap) {\n let timelineMap = slotMap[timelineName];\n if (timelineName == \"color\") {\n let timeline = new ColorTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n let color = new Color();\n color.setFromString(valueMap.color);\n timeline.setFrame(frameIndex, valueMap.time, color.r, color.g, color.b, color.a);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * ColorTimeline.ENTRIES]);\n\n } else if (timelineName = \"attachment\") {\n let timeline = new AttachmentTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n timeline.setFrame(frameIndex++, valueMap.time, valueMap.name);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n } else\n throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\n }\n }\n }\n\n // Bone timelines.\n if (map.bones) {\n for (let boneName in map.bones) {\n let boneMap = map.bones[boneName];\n let boneIndex = skeletonData.findBoneIndex(boneName);\n if (boneIndex == -1) throw new Error(\"Bone not found: \" + boneName);\n for (let timelineName in boneMap) {\n let timelineMap = boneMap[timelineName];\n if (timelineName === \"rotate\") {\n let timeline = new RotateTimeline(timelineMap.length);\n timeline.boneIndex = boneIndex;\n\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, valueMap.time, valueMap.angle);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * RotateTimeline.ENTRIES]);\n\n } else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\n let timeline: TranslateTimeline = null;\n let timelineScale = 1;\n if (timelineName === \"scale\")\n timeline = new ScaleTimeline(timelineMap.length);\n else if (timelineName === \"shear\")\n timeline = new ShearTimeline(timelineMap.length);\n else {\n timeline = new TranslateTimeline(timelineMap.length);\n timelineScale = scale;\n }\n timeline.boneIndex = boneIndex;\n\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n let x = this.getValue(valueMap, \"x\", 0), y = this.getValue(valueMap, \"y\", 0);\n timeline.setFrame(frameIndex, valueMap.time, x * timelineScale, y * timelineScale);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * TranslateTimeline.ENTRIES]);\n\n } else\n throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\n }\n }\n }\n\n // IK constraint timelines.\n if (map.ik) {\n for (let constraintName in map.ik) {\n let constraintMap = map.ik[constraintName];\n let constraint = skeletonData.findIkConstraint(constraintName);\n let timeline = new IkConstraintTimeline(constraintMap.length);\n timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\n let frameIndex = 0;\n for (let i = 0; i < constraintMap.length; i++) {\n let valueMap = constraintMap[i];\n timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, \"mix\", 1),\n this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * IkConstraintTimeline.ENTRIES]);\n }\n }\n\n // Transform constraint timelines.\n if (map.transform) {\n for (let constraintName in map.transform) {\n let constraintMap = map.transform[constraintName];\n let constraint = skeletonData.findTransformConstraint(constraintName);\n let timeline = new TransformConstraintTimeline(constraintMap.length);\n timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\n let frameIndex = 0;\n for (let i = 0; i < constraintMap.length; i++) {\n let valueMap = constraintMap[i];\n timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, \"rotateMix\", 1),\n this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration,\n timeline.frames[(timeline.getFrameCount() - 1) * TransformConstraintTimeline.ENTRIES]);\n }\n }\n\n // Path constraint timelines.\n if (map.paths) {\n for (let constraintName in map.paths) {\n let constraintMap = map.paths[constraintName];\n let index = skeletonData.findPathConstraintIndex(constraintName);\n if (index == -1) throw new Error(\"Path constraint not found: \" + constraintName);\n let data = skeletonData.pathConstraints[index];\n for (let timelineName in constraintMap) {\n let timelineMap = constraintMap[timelineName];\n if (timelineName === \"position\" || timelineName === \"spacing\") {\n let timeline: PathConstraintPositionTimeline = null;\n let timelineScale = 1;\n if (timelineName === \"spacing\") {\n timeline = new PathConstraintSpacingTimeline(timelineMap.length);\n if (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) timelineScale = scale;\n } else {\n timeline = new PathConstraintPositionTimeline(timelineMap.length);\n if (data.positionMode == PositionMode.Fixed) timelineScale = scale;\n }\n timeline.pathConstraintIndex = index;\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, timelineName, 0) * timelineScale);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration,\n timeline.frames[(timeline.getFrameCount() - 1) * PathConstraintPositionTimeline.ENTRIES]);\n } else if (timelineName === \"mix\") {\n let timeline = new PathConstraintMixTimeline(timelineMap.length);\n timeline.pathConstraintIndex = index;\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, \"rotateMix\", 1),\n this.getValue(valueMap, \"translateMix\", 1));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration,\n timeline.frames[(timeline.getFrameCount() - 1) * PathConstraintMixTimeline.ENTRIES]);\n }\n }\n }\n }\n\n // Deform timelines.\n if (map.deform) {\n for (let deformName in map.deform) {\n let deformMap = map.deform[deformName];\n let skin = skeletonData.findSkin(deformName);\n if (skin == null) throw new Error(\"Skin not found: \" + deformName);\n for (let slotName in deformMap) {\n let slotMap = deformMap[slotName];\n let slotIndex = skeletonData.findSlotIndex(slotName);\n if (slotIndex == -1) throw new Error(\"Slot not found: \" + slotMap.name);\n for (let timelineName in slotMap) {\n let timelineMap = slotMap[timelineName];\n let attachment = skin.getAttachment(slotIndex, timelineName);\n if (attachment == null) throw new Error(\"Deform attachment not found: \" + timelineMap.name);\n let weighted = attachment.bones != null;\n let vertices = attachment.vertices;\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n\n let timeline = new DeformTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n timeline.attachment = attachment;\n\n let frameIndex = 0;\n for (let j = 0; j < timelineMap.length; j++) {\n let valueMap = timelineMap[j];\n let deform: ArrayLike;\n let verticesValue: Array = this.getValue(valueMap, \"vertices\", null);\n if (verticesValue == null)\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = Utils.newFloatArray(deformLength);\n let start = this.getValue(valueMap, \"offset\", 0);\n Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\n if (scale != 1) {\n for (let i = start, n = i + verticesValue.length; i < n; i++)\n deform[i] *= scale;\n }\n if (!weighted) {\n for (let i = 0; i < deformLength; i++)\n deform[i] += vertices[i];\n }\n }\n\n timeline.setFrame(frameIndex, valueMap.time, deform);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n }\n }\n }\n\n // Draw order timeline.\n let drawOrderNode = map.drawOrder;\n if (drawOrderNode == null) drawOrderNode = map.draworder;\n if (drawOrderNode != null) {\n let timeline = new DrawOrderTimeline(drawOrderNode.length);\n let slotCount = skeletonData.slots.length;\n let frameIndex = 0;\n for (let j = 0; j < drawOrderNode.length; j++) {\n let drawOrderMap = drawOrderNode[j];\n let drawOrder: Array = null;\n let offsets = this.getValue(drawOrderMap, \"offsets\", null);\n if (offsets != null) {\n drawOrder = Utils.newArray(slotCount, -1);\n let unchanged = Utils.newArray(slotCount - offsets.length, 0);\n let originalIndex = 0, unchangedIndex = 0;\n for (let i = 0; i < offsets.length; i++) {\n let offsetMap = offsets[i];\n let slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\n if (slotIndex == -1) throw new Error(\"Slot not found: \" + offsetMap.slot);\n // Collect unchanged items.\n while (originalIndex != slotIndex)\n unchanged[unchangedIndex++] = originalIndex++;\n // Set changed items.\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\n }\n // Collect remaining unchanged items.\n while (originalIndex < slotCount)\n unchanged[unchangedIndex++] = originalIndex++;\n // Fill in unchanged items.\n for (let i = slotCount - 1; i >= 0; i--)\n if (drawOrder[i] == -1) drawOrder[i] = unchanged[--unchangedIndex];\n }\n timeline.setFrame(frameIndex++, drawOrderMap.time, drawOrder);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n\n // Event timeline.\n if (map.events) {\n let timeline = new EventTimeline(map.events.length);\n let frameIndex = 0;\n for (let i = 0; i < map.events.length; i++) {\n let eventMap = map.events[i];\n let eventData = skeletonData.findEvent(eventMap.name);\n if (eventData == null) throw new Error(\"Event not found: \" + eventMap.name);\n let event = new Event(eventMap.time, eventData);\n event.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\n event.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\n event.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\n timeline.setFrame(frameIndex++, event);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n\n if (isNaN(duration)) {\n throw new Error(\"Error while parsing animation, duration is NaN\");\n }\n\n skeletonData.animations.push(new Animation(name, timelines, duration));\n }\n\n readCurve (map: any, timeline: CurveTimeline, frameIndex: number) {\n if (!map.curve) return;\n if (map.curve === \"stepped\")\n timeline.setStepped(frameIndex);\n else if (Object.prototype.toString.call(map.curve) === '[object Array]') {\n let curve: Array = map.curve;\n timeline.setCurve(frameIndex, curve[0], curve[1], curve[2], curve[3]);\n }\n }\n\n getValue (map: any, prop: string, defaultValue: any) {\n return map[prop] !== undefined ? map[prop] : defaultValue;\n }\n\n static blendModeFromString (str: string): number {\n if (str === 'multiply') return PIXI.BLEND_MODES.MULTIPLY;\n if (str === 'additive') return PIXI.BLEND_MODES.ADD;\n if (str === 'screen') return PIXI.BLEND_MODES.SCREEN;\n if (str === 'normal') return PIXI.BLEND_MODES.NORMAL;\n throw new Error(`Unknown blend mode: ${str}`);\n }\n\n static positionModeFromString (str: string) {\n str = str.toLowerCase();\n if (str == \"fixed\") return PositionMode.Fixed;\n if (str == \"percent\") return PositionMode.Percent;\n throw new Error(`Unknown position mode: ${str}`);\n }\n\n static spacingModeFromString (str: string) {\n str = str.toLowerCase();\n if (str == \"length\") return SpacingMode.Length;\n if (str == \"fixed\") return SpacingMode.Fixed;\n if (str == \"percent\") return SpacingMode.Percent;\n throw new Error(`Unknown position mode: ${str}`);\n }\n\n static rotateModeFromString (str: string) {\n str = str.toLowerCase();\n if (str == \"tangent\") return RotateMode.Tangent;\n if (str == \"chain\") return RotateMode.Chain;\n if (str == \"chainscale\") return RotateMode.ChainScale;\n throw new Error(`Unknown rotate mode: ${str}`);\n }\n\n static transformModeFromString(str: string) {\n str = str.toLowerCase();\n if (str == \"normal\") return TransformMode.Normal;\n if (str == \"onlytranslation\") return TransformMode.OnlyTranslation;\n if (str == \"norotationorreflection\") return TransformMode.NoRotationOrReflection;\n if (str == \"noscale\") return TransformMode.NoScale;\n if (str == \"noscaleorreflection\") return TransformMode.NoScaleOrReflection;\n throw new Error(`Unknown transform mode: ${str}`);\n }\n\n static transformModeLegacy(inheritRotation: boolean, inheritScale: boolean) {\n if (inheritRotation && inheritScale) {\n return TransformMode.Normal;\n } else if (inheritRotation) {\n return TransformMode.InheritRotation;\n } else if (inheritScale) {\n return TransformMode.InheritScale;\n } else {\n return TransformMode.OnlyTranslation;\n }\n }\n}\n\nclass LinkedMesh {\n parent: string; skin: string;\n slotIndex: number;\n mesh: MeshAttachment;\n\n constructor (mesh: MeshAttachment, skin: string, slotIndex: number, parent: string) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n }\n}\n","import {Attachment} from \"./attachments\";\nimport {Skeleton} from \"./Skeleton\";\nimport {Map} from \"./Utils\";\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\nexport class Skin {\n name: string;\n attachments = new Array>();\n\n constructor (name: string) {\n if (name == null) throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n\n addAttachment (slotIndex: number, name: string, attachment: Attachment) {\n if (attachment == null) throw new Error(\"attachment cannot be null.\");\n let attachments = this.attachments;\n if (slotIndex >= attachments.length) attachments.length = slotIndex + 1;\n if (!attachments[slotIndex]) attachments[slotIndex] = { };\n attachments[slotIndex][name] = attachment;\n }\n\n /** @return May be null. */\n getAttachment (slotIndex: number, name: string): Attachment {\n let dictionary = this.attachments[slotIndex];\n return dictionary ? dictionary[name] : null;\n }\n\n /** Attach each attachment in this skin if the corresponding attachment in the old skin is currently attached. */\n attachAll (skeleton: Skeleton, oldSkin: Skin) {\n let slotIndex = 0;\n for (let i = 0; i < skeleton.slots.length; i++) {\n let slot = skeleton.slots[i];\n let slotAttachment = slot.getAttachment();\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\n let dictionary = oldSkin.attachments[slotIndex];\n for (let key in dictionary) {\n let skinAttachment:Attachment = dictionary[key];\n if (slotAttachment == skinAttachment) {\n let attachment = this.getAttachment(slotIndex, name);\n if (attachment != null) slot.setAttachment(attachment);\n break;\n }\n }\n }\n slotIndex++;\n }\n }\n}\n","import {Attachment} from \"./attachments\";\r\nimport {SlotData} from \"./SlotData\";\r\nimport {Bone} from \"./Bone\";\r\nimport {Color} from \"./Utils\";\r\nimport {TextureRegion} from \"./Texture\";\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\nexport class Slot {\r\n //this is for PIXI\r\n currentMesh: any;\r\n currentSprite: any;\r\n meshes: any;\r\n currentMeshName: String;\r\n sprites: any;\r\n currentSpriteName: String;\r\n blendMode: number;\r\n //assign hack region a bit later\r\n tempRegion: TextureRegion;\r\n tempAttachment: Attachment;\r\n\r\n //canon\r\n data: SlotData;\r\n bone: Bone;\r\n color: Color;\r\n attachment: Attachment;\r\n private attachmentTime: number;\r\n attachmentVertices = 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.blendMode = data.blendMode;\r\n this.setToSetupPose();\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.attachmentVertices.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.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","import {BoneData} from \"./BoneData\";\r\nimport {Color} from \"./Utils\";\r\nimport {BlendMode} from \"./BlendMode\";\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\nexport 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 attachmentName: string;\r\n blendMode: number;\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","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\nexport 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\nexport 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\nexport 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.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.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._uvs.x0;\r\n }\r\n\r\n get v(): number {\r\n return this.texture._uvs.y0;\r\n }\r\n\r\n get u2(): number {\r\n return this.texture._uvs.x2;\r\n }\r\n\r\n get v2(): number {\r\n return this.texture._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 var 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 var 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.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.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","import {Disposable, Map} from \"./Utils\";\r\nimport {Texture, TextureWrap, TextureRegion, TextureFilter} from \"./Texture\";\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\nexport 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 (var i=0;i, stripExtension: boolean) {\r\n for (var 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 page.baseTexture = texture;\r\n if (!texture.hasLoaded) {\r\n texture.width = page.width;\r\n texture.height = 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 rotate: number = reader.readValue() == \"true\" ? 6 : 0;\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 let frame = new PIXI.Rectangle(x, y, rotate ? height : width, rotate ? 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] == '4') {\r\n // pixi v4.0.0\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 var frame2 = new PIXI.Rectangle(x, y, width, height);\r\n var 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\nclass 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\nexport 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 = true;\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\nexport class TextureAtlasRegion extends TextureRegion {\r\n page: TextureAtlasPage;\r\n name: string;\r\n index: number;\r\n}\r\n","import {TransformConstraintData} from \"./TransformConstraintData\";\nimport {Bone} from \"./Bone\";\nimport {Vector2, MathUtils} from \"./Utils\";\nimport {Skeleton} from \"./Skeleton\";\nimport {Constraint} from \"./Constraint\";\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\nexport class TransformConstraint implements Constraint {\n data: TransformConstraintData;\n bones: Array;\n target: Bone;\n rotateMix = 0; translateMix = 0; scaleMix = 0; shearMix = 0;\n temp = new Vector2();\n\n constructor (data: TransformConstraintData, skeleton: Skeleton) {\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.rotateMix = data.rotateMix;\n this.translateMix = data.translateMix;\n this.scaleMix = data.scaleMix;\n this.shearMix = data.shearMix;\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findBone(data.target.name);\n }\n\n apply () {\n this.update();\n }\n\n update () {\n let rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\n let target = this.target;\n let ta = target.matrix.a, tb = target.matrix.c, tc = target.matrix.b, td = target.matrix.d;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n let m = bone.matrix;\n let modified = false;\n\n if (rotateMix != 0) {\n let a = m.a, b = m.c, c = m.b, d = m.d;\n let r = Math.atan2(tc, ta) - Math.atan2(c, a) + this.data.offsetRotation * MathUtils.degRad;\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= rotateMix;\n let cos = Math.cos(r), sin = Math.sin(r);\n m.a = cos * a - sin * c;\n m.c = cos * b - sin * d;\n m.b = sin * a + cos * c;\n m.d = sin * b + cos * d;\n modified = true;\n }\n\n if (translateMix != 0) {\n let temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n m.tx += (temp.x - m.tx) * translateMix;\n m.ty += (temp.y - m.ty) * translateMix;\n modified = true;\n }\n\n if (scaleMix > 0) {\n let s = Math.sqrt(m.a * m.a + m.b * m.b);\n let ts = Math.sqrt(ta * ta + tc * tc);\n if (s > 0.00001) s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\n m.a *= s;\n m.b *= s;\n s = Math.sqrt(m.c * m.c + m.d * m.d);\n ts = Math.sqrt(tb * tb + td * td);\n if (s > 0.00001) s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\n m.c *= s;\n m.d *= s;\n modified = true;\n }\n\n if (shearMix > 0) {\n let b = m.c, d = m.d;\n let by = Math.atan2(d, b);\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(m.b, m.a));\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r = by + (r + this.data.offsetShearY * MathUtils.degRad) * shearMix;\n let s = Math.sqrt(b * b + d * d);\n m.c = Math.cos(r) * s;\n m.d = Math.sin(r) * s;\n modified = true;\n }\n\n if (modified) bone.appliedValid = false;\n }\n }\n\n getOrder () {\n return this.data.order;\n }\n}\n","import {BoneData} from \"./BoneData\";\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\nexport class TransformConstraintData {\n name: string;\n order = 0;\n bones = new Array();\n target: BoneData;\n rotateMix = 0; translateMix = 0; scaleMix = 0; shearMix = 0;\n offsetRotation = 0; offsetX = 0; offsetY = 0; offsetScaleX = 0; offsetScaleY = 0; offsetShearY = 0;\n\n constructor (name: string) {\n if (name == null) throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n}\n","import {Skeleton} from \"./Skeleton\";\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\nexport interface Map {\n [key: string]: T;\n}\n\nexport interface Disposable {\n dispose (): void;\n}\n\nexport class Color {\n public static WHITE = new Color(1, 1, 1, 1);\n public static RED = new Color(1, 0, 0, 1);\n public static GREEN = new Color(0, 1, 0, 1);\n public static BLUE = new Color(0, 0, 1, 1);\n public static MAGENTA = new Color(1, 0, 1, 1);\n\n constructor (public r: number = 0, public g: number = 0, public b: number = 0, public a: number = 0) {\n }\n\n set (r: number, g: number, b: number, a: number) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n this.clamp();\n return this;\n }\n\n setFromColor (c: Color) {\n this.r = c.r;\n this.g = c.g;\n this.b = c.b;\n this.a = c.a;\n return this;\n }\n\n setFromString (hex: string) {\n hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\n this.r = parseInt(hex.substr(0, 2), 16) / 255.0;\n this.g = parseInt(hex.substr(2, 2), 16) / 255.0;\n this.b = parseInt(hex.substr(4, 2), 16) / 255.0;\n this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\n return this;\n }\n\n add (r: number, g: number, b: number, a: number) {\n this.r += r;\n this.g += g;\n this.b += b;\n this.a += a;\n this.clamp();\n return this;\n }\n\n clamp () {\n if (this.r < 0) this.r = 0;\n else if (this.r > 1) this.r = 1;\n\n if (this.g < 0) this.g = 0;\n else if (this.g > 1) this.g = 1;\n\n if (this.b < 0) this.b = 0;\n else if (this.b > 1) this.b = 1;\n\n if (this.a < 0) this.a = 0;\n else if (this.a > 1) this.a = 1;\n return this;\n }\n}\n\nexport class MathUtils {\n static PI = 3.1415927;\n static PI2 = MathUtils.PI * 2;\n static radiansToDegrees = 180 / MathUtils.PI;\n static radDeg = MathUtils.radiansToDegrees;\n static degreesToRadians = MathUtils.PI / 180;\n static degRad = MathUtils.degreesToRadians;\n\n static clamp (value: number, min: number, max: number) {\n if (value < min) return min;\n if (value > max) return max;\n return value;\n }\n\n static cosDeg (degrees: number) {\n return Math.cos(degrees * MathUtils.degRad);\n }\n\n static sinDeg (degrees: number) {\n return Math.sin(degrees * MathUtils.degRad);\n }\n\n static signum (value: number): number {\n return value >= 0 ? 1 : -1;\n }\n\n static toInt (x: number) {\n return x > 0 ? Math.floor(x) : Math.ceil(x);\n }\n\n static cbrt (x: number) {\n var y = Math.pow(Math.abs(x), 1/3);\n return x < 0 ? -y : y;\n }\n}\n\nexport class Utils {\n static SUPPORTS_TYPED_ARRAYS = typeof(Float32Array) !== \"undefined\";\n\n static arrayCopy (source: ArrayLike, sourceStart: number, dest: ArrayLike, destStart: number, numElements: number) {\n for (let i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\n dest[j] = source[i];\n }\n }\n\n static setArraySize (array: Array, size: number, value: any = 0): Array {\n let oldSize = array.length;\n if (oldSize == size) return array;\n array.length = size;\n if (oldSize < size) {\n for (let i = oldSize; i < size; i++) array[i] = value;\n }\n return array;\n }\n\n static newArray (size: number, defaultValue: T): Array {\n let array = new Array(size);\n for (let i = 0; i < size; i++) array[i] = defaultValue;\n return array;\n }\n\n static newFloatArray (size: number): ArrayLike {\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\n return new Float32Array(size)\n } else {\n let array = new Array(size);\n for (let i = 0; i < array.length; i++) array[i] = 0;\n return array;\n }\n }\n\n static toFloatArray (array: Array) {\n return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\n }\n}\n\nexport class DebugUtils {\n static logBones(skeleton: Skeleton) {\n for (let i = 0; i < skeleton.bones.length; i++) {\n let bone = skeleton.bones[i];\n let m = bone.matrix;\n console.log(bone.data.name + \", \" + m.a + \", \" + m.b + \", \" + m.c + \", \" + m.d + \", \" + m.tx + \", \" + m.ty);\n }\n }\n}\n\nexport class Pool {\n private items = new Array();\n private instantiator: () => T;\n\n constructor (instantiator: () => T) {\n this.instantiator = instantiator;\n }\n\n obtain () {\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\n }\n\n free (item: T) {\n this.items.push(item);\n }\n\n freeAll (items: ArrayLike) {\n for (let i = 0; i < items.length; i++) this.items[i] = items[i];\n }\n\n clear () {\n this.items.length = 0;\n }\n}\n\nexport class Vector2 {\n constructor (public x = 0, public y = 0) {\n }\n\n set (x: number, y: number): Vector2 {\n this.x = x;\n this.y = y;\n return this;\n }\n\n length () {\n let x = this.x;\n let y = this.y;\n return Math.sqrt(x * x + y * y);\n }\n\n normalize () {\n let len = this.length();\n if (len != 0) {\n this.x /= len;\n this.y /= len;\n }\n return this;\n }\n}\n\nexport class TimeKeeper {\n maxDelta = 0.064;\n framesPerSecond = 0;\n delta = 0;\n totalTime = 0;\n\n private lastTime = Date.now() / 1000;\n private frameCount = 0;\n private frameTime = 0;\n\n update () {\n var now = Date.now() / 1000;\n this.delta = now - this.lastTime;\n this.frameTime += this.delta;\n this.totalTime += this.delta;\n if (this.delta > this.maxDelta) this.delta = this.maxDelta;\n this.lastTime = now;\n\n this.frameCount++;\n if (this.frameTime > 1) {\n this.framesPerSecond = this.frameCount / this.frameTime;\n this.frameTime = 0;\n this.frameCount = 0;\n }\n }\n}\n\nexport interface ArrayLike {\n length: number;\n [n: number]: T;\n}\n","import {Slot} from \"../Slot\";\nimport {ArrayLike} from \"../Utils\";\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\nexport abstract class Attachment {\n name: string;\n\n constructor (name: string) {\n if (name == null) throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n}\n\nexport abstract class VertexAttachment extends Attachment {\n bones: Array;\n vertices: ArrayLike;\n worldVerticesLength = 0;\n\n constructor (name: string) {\n super(name);\n }\n\n computeWorldVertices (slot: Slot, worldVertices: ArrayLike) {\n this.computeWorldVerticesWith(slot, 0, this.worldVerticesLength, worldVertices, 0);\n }\n\n /** Transforms local vertices to world coordinates.\n * @param start The index of the first local vertex value to transform. Each vertex has 2 values, x and y.\n * @param count The number of world vertex values to output. Must be <= {@link #getWorldVerticesLength()} - start.\n * @param worldVertices The output world vertices. Must have a length >= offset + count.\n * @param offset The worldVertices index to begin writing values. */\n computeWorldVerticesWith (slot: Slot, start: number, count: number, worldVertices: ArrayLike, offset: number) {\n count += offset;\n let skeleton = slot.bone.skeleton;\n let deformArray = slot.attachmentVertices;\n let vertices = this.vertices;\n let bones = this.bones;\n if (bones == null) {\n if (deformArray.length > 0) vertices = deformArray;\n let bone = slot.bone;\n let m = bone.matrix;\n let x = m.tx;\n let y = m.ty;\n let a = m.a, b = m.c, c = m.b, d = m.d;\n for (let v = start, w = offset; w < count; v += 2, w += 2) {\n let vx = vertices[v], vy = vertices[v + 1];\n worldVertices[w] = vx * a + vy * b + x;\n worldVertices[w + 1] = vx * c + vy * d + y;\n }\n return;\n }\n let v = 0, skip = 0;\n for (let i = 0; i < start; i += 2) {\n let n = bones[v];\n v += n + 1;\n skip += n;\n }\n let skeletonBones = skeleton.bones;\n if (deformArray.length == 0) {\n for (let w = offset, b = skip * 3; w < count; w += 2) {\n let wx = 0, wy = 0;\n let n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3) {\n let bone = skeletonBones[bones[v]];\n let m = bone.matrix;\n let vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\n wx += (vx * m.a + vy * m.c + m.tx) * weight;\n wy += (vx * m.b + vy * m.d + m.ty) * weight;\n }\n worldVertices[w] = wx;\n worldVertices[w + 1] = wy;\n }\n } else {\n let deform = deformArray;\n for (let w = offset, b = skip * 3, f = skip << 1; w < count; w += 2) {\n let wx = 0, wy = 0;\n let n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3, f += 2) {\n let bone = skeletonBones[bones[v]];\n let m = bone.matrix;\n let vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\n wx += (vx * m.a + vy * m.c + m.tx) * weight;\n wy += (vx * m.b + vy * m.d + m.ty) * weight;\n }\n worldVertices[w] = wx;\n worldVertices[w + 1] = wy;\n }\n }\n }\n\n /** Returns true if a deform originally applied to the specified attachment should be applied to this attachment. */\n applyDeform (sourceAttachment: VertexAttachment) {\n return this == sourceAttachment;\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\nexport enum AttachmentType {\r\n Region, BoundingBox, Mesh, LinkedMesh, Path\r\n}\r\n","import {VertexAttachment} from \"./Attachment\";\r\nimport {Color} from \"../Utils\";\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\nexport class BoundingBoxAttachment extends VertexAttachment {\r\n color = new Color(1, 1, 1, 1);\r\n\r\n constructor(name: string) {\r\n super(name);\r\n }\r\n}\r\n","import {VertexAttachment} from \"./Attachment\";\nimport {TextureRegion} from \"../Texture\";\nimport {Color, Utils, ArrayLike} from \"../Utils\";\nimport {Slot} from \"../Slot\";\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\nexport class MeshAttachment extends VertexAttachment {\n region: TextureRegion;\n path: string;\n regionUVs: ArrayLike;\n triangles: Array;\n color = new Color(1, 1, 1, 1);\n hullLength: number;\n private parentMesh: MeshAttachment;\n inheritDeform = false;\n tempColor = new Color(0, 0, 0, 0);\n\n constructor(name: string) {\n super(name);\n }\n\n updateWorldVertices(slot: Slot, premultipliedAlpha: boolean): ArrayLike {\n return [];\n //nothing\n }\n\n updateUVs(region: TextureRegion, uvs: ArrayLike): ArrayLike {\n let regionUVs = this.regionUVs;\n let n = regionUVs.length;\n if (!uvs || uvs.length != n) {\n uvs = Utils.newFloatArray(n);\n }\n\n if (region == null) {\n return;\n }\n\n let texture = region.texture;\n let r = texture._uvs;\n let w1 = region.width, h1 = region.height, w2 = region.originalWidth, h2 = region.originalHeight;\n let x = region.offsetX, y = region.pixiOffsetY;\n\n for (let i = 0; i < n; i += 2) {\n let u = this.regionUVs[i], v = this.regionUVs[i + 1];\n u = (u * w2 - x) / w1;\n v = (v * h2 - y) / h1;\n uvs[i] = (r.x0 * (1 - u) + r.x1 * u) * (1 - v) + (r.x3 * (1 - u) + r.x2 * u) * v;\n uvs[i + 1] = (r.y0 * (1 - u) + r.y1 * u) * (1 - v) + (r.y3 * (1 - u) + r.y2 * u) * v;\n }\n\n return uvs;\n }\n\n applyDeform(sourceAttachment: VertexAttachment): boolean {\n return this == sourceAttachment || (this.inheritDeform && this.parentMesh == sourceAttachment);\n }\n\n getParentMesh() {\n return this.parentMesh;\n }\n\n /** @param parentMesh May be null. */\n setParentMesh(parentMesh: MeshAttachment) {\n this.parentMesh = parentMesh;\n if (parentMesh != null) {\n this.bones = parentMesh.bones;\n this.vertices = parentMesh.vertices;\n this.regionUVs = parentMesh.regionUVs;\n this.triangles = parentMesh.triangles;\n this.hullLength = parentMesh.hullLength;\n }\n }\n}\n","import {VertexAttachment} from \"./Attachment\";\r\nimport {Color} from \"../Utils\";\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\nexport class PathAttachment extends VertexAttachment {\r\n lengths: Array;\r\n closed = false; constantSpeed = false;\r\n color = new Color(1, 1, 1, 1);\r\n\r\n constructor (name: string) {\r\n super(name);\r\n }\r\n}\r\n","import {Attachment} from \"./Attachment\";\r\nimport {Color, Utils} from \"../Utils\";\r\nimport {TextureRegion} from \"../Texture\";\r\nimport {Slot} from \"../Slot\";\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\nexport class RegionAttachment extends Attachment {\r\n x = 0; y = 0; scaleX = 1; scaleY = 1; rotation = 0; width = 0; height = 0;\r\n color = new Color(1, 1, 1, 1);\r\n\r\n path: string;\r\n region: TextureRegion;\r\n\r\n constructor (name:string) {\r\n super(name);\r\n }\r\n\r\n updateWorldVertices(slot: Slot, premultipliedAlpha: boolean): ArrayLike {\r\n return [];\r\n //nothing\r\n }\r\n}\r\n","export {Attachment, VertexAttachment} from \"./Attachment\";\r\nexport {AttachmentLoader} from \"./AttachmentLoader\";\r\nexport {AttachmentType} from \"./AttachmentType\";\r\nexport {BoundingBoxAttachment} from \"./BoundingBoxAttachment\";\r\nexport {MeshAttachment} from \"./MeshAttachment\";\r\nexport {PathAttachment} from \"./PathAttachment\";\r\nexport {RegionAttachment} from \"./RegionAttachment\";\r\n","export * from \"./attachments\";\n\nexport {\n Timeline, ColorTimeline, AttachmentTimeline, RotateTimeline, TranslateTimeline,\n ScaleTimeline, ShearTimeline, IkConstraintTimeline, TransformConstraintTimeline, PathConstraintPositionTimeline,\n PathConstraintSpacingTimeline, PathConstraintMixTimeline, DeformTimeline, DrawOrderTimeline, EventTimeline,\n Animation, CurveTimeline\n} from \"./Animation\";\nexport {AnimationState} from \"./AnimationState\";\nexport {AnimationStateData} from \"./AnimationStateData\";\nexport {BlendMode} from \"./BlendMode\";\nexport {Bone} from \"./Bone\";\nexport {BoneData, TransformMode} from \"./BoneData\";\nexport {Constraint} from \"./Constraint\";\nexport {Event} from \"./Event\";\nexport {EventData} from \"./EventData\";\nexport {IkConstraint} from \"./IkConstraint\";\nexport {IkConstraintData} from \"./IkConstraintData\";\nexport {PathConstraint} from \"./PathConstraint\";\nexport {PathConstraintData, SpacingMode, RotateMode, PositionMode} from \"./PathConstraintData\";\nexport {Skeleton} from \"./Skeleton\";\nexport {SkeletonBounds} from \"./SkeletonBounds\";\nexport {SkeletonData} from \"./SkeletonData\";\nexport {SkeletonJson} from \"./SkeletonJson\";\nexport {Skin} from \"./Skin\";\nexport {Slot} from \"./Slot\";\nexport {SlotData} from \"./SlotData\";\nexport {Texture, TextureWrap, TextureRegion, TextureFilter} from \"./Texture\";\nexport {TextureAtlas, TextureAtlasRegion} from \"./TextureAtlas\";\nexport {AtlasAttachmentLoader} from \"./AtlasAttachmentLoader\";\nexport {TransformConstraint} from \"./TransformConstraint\";\nexport {TransformConstraintData} from \"./TransformConstraintData\";\nexport {Updatable} from \"./Updatable\";\nexport {Disposable, Map, Utils, Pool, MathUtils, Color, Vector2} from \"./Utils\";\n","import * as spine from \"./core\";\n\nexport function atlasParser() {\n return function (resource: PIXI.loaders.Resource, next: () => any) {\n // skip if no data, its not json, or it isn't atlas data\n if (!resource.data || !resource.isJson || !resource.data.bones) {\n return next();\n }\n\n var metadataAtlas = resource.metadata ? resource.metadata.spineAtlas: null;\n if (metadataAtlas === false) {\n return next();\n }\n if (metadataAtlas && metadataAtlas.pages) {\n //its an atlas!\n var spineJsonParser = new spine.SkeletonJson(new spine.AtlasAttachmentLoader(metadataAtlas));\n var skeletonData = spineJsonParser.readSkeletonData(resource.data);\n\n resource.spineData = skeletonData;\n resource.spineAtlas = metadataAtlas;\n\n return next();\n }\n\n var metadataAtlasSuffix = '.atlas';\n if (resource.metadata && resource.metadata.spineAtlasSuffix) {\n metadataAtlasSuffix = resource.metadata.spineAtlasSuffix;\n }\n\n /**\n * use a bit of hackery to load the atlas file, here we assume that the .json, .atlas and .png files\n * that correspond to the spine file are in the same base URL and that the .json and .atlas files\n * have the same name\n */\n var atlasPath = resource.url.substr(0, resource.url.lastIndexOf('.')) + metadataAtlasSuffix;\n //remove the baseUrl\n atlasPath = atlasPath.replace(this.baseUrl, '');\n\n var atlasOptions = {\n crossOrigin: resource.crossOrigin,\n xhrType: PIXI.loaders.Resource.XHR_RESPONSE_TYPE.TEXT,\n metadata: resource.metadata ? resource.metadata.spineMetadata : null\n };\n var imageOptions = {\n crossOrigin: resource.crossOrigin,\n metadata: resource.metadata ? resource.metadata.imageMetadata: null\n };\n var baseUrl = resource.url.substr(0, resource.url.lastIndexOf('/') + 1);\n //remove the baseUrl\n baseUrl = baseUrl.replace(this.baseUrl, '');\n\n var adapter = imageLoaderAdapter(this, resource.name + '_atlas_page_', baseUrl, imageOptions);\n\n this.add(resource.name + '_atlas', atlasPath, atlasOptions, function () {\n new spine.TextureAtlas(this.xhr.responseText, adapter, function(spineAtlas) {\n var spineJsonParser = new spine.SkeletonJson(new spine.AtlasAttachmentLoader(spineAtlas));\n var skeletonData = spineJsonParser.readSkeletonData(resource.data);\n\n resource.spineData = skeletonData;\n resource.spineAtlas = spineAtlas;\n\n next();\n });\n });\n };\n}\n\nexport function imageLoaderAdapter(loader: any, namePrefix: any, baseUrl: any, imageOptions: any) {\n if (baseUrl && baseUrl.lastIndexOf('/') !== (baseUrl.length-1))\n {\n baseUrl += '/';\n }\n return function(line: String, callback: (baseTexture: PIXI.BaseTexture) => any) {\n var name = namePrefix + line;\n var url = baseUrl + line;\n loader.add(name, url, imageOptions, (resource: PIXI.loaders.Resource) => {\n callback(resource.texture.baseTexture);\n });\n }\n}\n\nexport function syncImageLoaderAdapter (baseUrl: any, crossOrigin: any) {\n if (baseUrl && baseUrl.lastIndexOf('/') !== (baseUrl.length-1))\n {\n baseUrl += '/';\n }\n return function(line: any, callback: any) {\n callback(PIXI.BaseTexture.fromImage(line, crossOrigin));\n }\n}\n\nPIXI.loaders.Loader.addPixiMiddleware(atlasParser);\nPIXI.loader.use(atlasParser());\n","import * as core from \"./core\";\r\nimport * as loaders from \"./loaders\";\r\n\r\nexport {core, loaders}\r\nexport {Spine, SpineMesh, SpineSprite} from \"./Spine\";\r\n"],"sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"sources":["../pixify/node_modules/browser-pack/_prelude.js","src/Spine.ts","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/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/SkeletonBounds.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/Utils.ts","src/core/attachments/Attachment.ts","src/core/attachments/AttachmentType.ts","src/core/attachments/BoundingBoxAttachment.ts","src/core/attachments/MeshAttachment.ts","src/core/attachments/PathAttachment.ts","src/core/attachments/RegionAttachment.ts","src/core/attachments/index.ts","src/core/index.ts","src/loaders.ts","src/index.ts"],"names":[],"mappings":";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AAGvB,YAAI;AAFZ,IAAY,OAAO,WAAM,WAAW,CAAC,CAAA;AAEvB,eAAO;AACrB,sBAA4C,SAAS,CAAC;AAA9C,8BAAK;AAAE,sCAAS;AAAE,0CAA4B","file":"pixi-spine.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o, uvs?: ArrayLike, indices?: ArrayLike, 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 * var spineAnimation = new PIXI.Spine(spineData);\n * ```\n *\n * @class\n * @extends Container\n * @memberof PIXI.spine\n * @param spineData {object} The spine data loaded from a spine atlas.\n */\nexport class Spine extends PIXI.Container {\n static globalAutoUpdate: boolean = true;\n\n tintRgb: ArrayLike;\n spineData: spine.SkeletonData;\n skeleton: spine.Skeleton;\n stateData: spine.AnimationStateData;\n state: spine.AnimationState;\n slotContainers: Array;\n\n constructor(spineData: spine.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 PIXI.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 spine.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 spine.AnimationStateData(spineData);\n\n /**\n * A spine AnimationState object created from the spine AnimationStateData object\n *\n * @member {object}\n */\n this.state = new spine.AnimationState(this.stateData);\n\n /**\n * An array of containers\n *\n * @member {Container[]}\n */\n this.slotContainers = [];\n\n for (var i = 0, n = this.skeleton.slots.length; i < n; i++) {\n var slot = this.skeleton.slots[i];\n var attachment : any = slot.attachment;\n var slotContainer = new PIXI.Container();\n this.slotContainers.push(slotContainer);\n this.addChild(slotContainer);\n\n if (attachment instanceof spine.RegionAttachment) {\n var spriteName = (attachment.region as TextureAtlasRegion).name;\n var sprite = this.createSprite(slot, attachment, spriteName);\n slot.currentSprite = sprite;\n slot.currentSpriteName = spriteName;\n slotContainer.addChild(sprite);\n }\n else if (attachment instanceof spine.MeshAttachment) {\n var mesh = this.createMesh(slot, attachment);\n slot.currentMesh = mesh;\n slot.currentMeshName = attachment.name;\n slotContainer.addChild(mesh);\n }\n else {\n continue;\n }\n\n }\n\n /**\n * Should the Spine object update its transforms\n *\n * @member {boolean}\n */\n this.autoUpdate = true;\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 PIXI.spine.Spine#\n */\n this.tintRgb = new Float32Array([1, 1, 1]);\n }\n\n /**\n * If this flag is set to true, the spine animation will be autoupdated every time\n * 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 PIXI.spine.Spine#\n * @default true\n */\n get autoUpdate(): boolean {\n return (this.updateTransform === Spine.prototype.autoUpdateTransform);\n }\n\n set autoUpdate(value: boolean) {\n this.updateTransform = value ? Spine.prototype.autoUpdateTransform : PIXI.Container.prototype.updateTransform;\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 PIXI.spine.Spine#\n * @default 0xFFFFFF\n */\n get tint(): number {\n return PIXI.utils.rgb2hex(this.tintRgb);\n }\n\n set tint(value: number) {\n this.tintRgb = PIXI.utils.hex2rgb(value, this.tintRgb);\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 this.state.update(dt);\n this.state.apply(this.skeleton);\n this.skeleton.updateWorldTransform();\n\n let drawOrder = this.skeleton.drawOrder;\n let slots = this.skeleton.slots;\n\n for (var i = 0, n = drawOrder.length; i < n; i++) {\n this.children[i] = this.slotContainers[drawOrder[i].data.index];\n }\n\n var r0 = this.tintRgb[0];\n var g0 = this.tintRgb[1];\n var b0 = this.tintRgb[2];\n\n for (i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n var attachment = slot.attachment;\n var slotContainer = this.slotContainers[i];\n\n if (!attachment) {\n slotContainer.visible = false;\n continue;\n }\n\n var attColor = (attachment as any).color;\n if (attachment instanceof spine.RegionAttachment) {\n let region = (attachment as spine.RegionAttachment).region;\n if (region) {\n let ar = region as TextureAtlasRegion;\n if (!slot.currentSpriteName || slot.currentSpriteName !== ar.name) {\n var 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 var sprite = this.createSprite(slot, attachment, spriteName);\n slotContainer.addChild(sprite);\n }\n slot.currentSprite = slot.sprites[spriteName];\n slot.currentSpriteName = spriteName;\n }\n }\n\n if (slotContainer.transform) {\n var transform = slotContainer.transform;\n let lt : PIXI.Matrix;\n if (slotContainer.transform.matrix2d) {\n //gameofbombs pixi fork\n lt = transform.matrix2d;\n transform._dirtyVersion++;\n transform.version = transform._dirtyVersion;\n transform.isStatic = true;\n transform.operMode = 0;\n } else {\n if (TransformBase) {\n //PIXI v4.0\n if (transform.position) {\n transform = new PIXI.TransformBase();\n slotContainer.transform = transform;\n }\n lt = transform.localTransform;\n } else {\n //PIXI v4.0rc\n if (!transform._dirtyLocal) {\n transform = new PIXI.TransformStatic();\n slotContainer.transform = transform;\n }\n lt = transform.localTransform;\n transform._dirtyParentVersion = -1;\n transform._dirtyLocal = 1;\n transform._versionLocal = 1;\n }\n }\n slot.bone.matrix.copy(lt);\n } else {\n //PIXI v3\n var lt = slotContainer.localTransform || new PIXI.Matrix();\n slot.bone.matrix.copy(lt);\n slotContainer.localTransform = lt;\n slotContainer.displayObjectUpdateTransform = SlotContainerUpdateTransformV3;\n }\n tempRgb[0] = r0 * slot.color.r * attColor.r;\n tempRgb[1] = g0 * slot.color.g * attColor.g;\n tempRgb[2] = b0 * slot.color.b * attColor.b;\n slot.currentSprite.tint = PIXI.utils.rgb2hex(tempRgb);\n slot.currentSprite.blendMode = slot.blendMode;\n }\n else if (attachment instanceof spine.MeshAttachment) {\n if (!slot.currentMeshName || slot.currentMeshName !== attachment.name) {\n var 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 var 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 VertexAttachment).computeWorldVertices(slot, slot.currentMesh.vertices);\n if (PIXI.VERSION[0] !== '3') {\n // PIXI version 4\n // slot.currentMesh.dirty++;\n //only for PIXI v4\n var tintRgb = slot.currentMesh.tintRgb;\n tintRgb[0] = r0 * slot.color.r * attColor.r;\n tintRgb[1] = g0 * slot.color.g * attColor.g;\n tintRgb[2] = b0 * slot.color.b * attColor.b;\n }\n slot.currentMesh.blendMode = slot.blendMode;\n }\n else {\n slotContainer.visible = false;\n continue;\n }\n slotContainer.visible = true;\n\n slotContainer.alpha = slot.color.a;\n }\n };\n\n private setSpriteRegion(attachment: spine.RegionAttachment, sprite: SpineSprite, region: spine.TextureRegion) {\n sprite.region = region;\n sprite.texture = region.texture;\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: spine.MeshAttachment, mesh: SpineMesh, region: spine.TextureRegion) {\n mesh.region = region;\n mesh.texture = region.texture;\n attachment.updateUVs(region, mesh.uvs);\n // if (PIXI.VERSION[0] !== '3') {\n // PIXI version 4\n // mesh.indexDirty++;\n // } else {\n // PIXI version 3\n mesh.dirty++;\n // }\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 var 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 spine.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: spine.Slot, attachment: spine.RegionAttachment, defName: string) {\n let region = attachment.region;\n if (slot.tempAttachment === attachment) {\n region = slot.tempRegion;\n slot.tempAttachment = null;\n slot.tempRegion = null;\n }\n var texture = region.texture;\n var sprite = new SpineSprite(texture);\n sprite.rotation = attachment.rotation * spine.MathUtils.degRad;\n sprite.anchor.x = 0.5;\n sprite.anchor.y = 0.5;\n sprite.position.x = attachment.x;\n sprite.position.y = attachment.y;\n sprite.alpha = attachment.color.a;\n\n sprite.region = attachment.region;\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: spine.Slot, attachment: spine.MeshAttachment) {\n let region = attachment.region;\n if (slot.tempAttachment === attachment) {\n region = slot.tempRegion;\n slot.tempAttachment = null;\n slot.tempRegion = null;\n }\n let strip = new SpineMesh(\n region.texture,\n new Float32Array(attachment.regionUVs.length),\n new Float32Array(attachment.regionUVs.length),\n new Uint16Array(attachment.triangles),\n PIXI.mesh.Mesh.DRAW_MODES.TRIANGLES);\n\n strip.canvasPadding = 1.5;\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 /**\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 var slot = this.skeleton.slots[slotIndex];\n if (!slot) {\n return false;\n }\n var attachment: any = slot.attachment;\n var region: spine.TextureRegion = attachment.region;\n if (texture) {\n region = new spine.TextureRegion();\n region.texture = texture;\n region.size = size;\n }\n if (slot.currentSprite && slot.currentSprite.region != region) {\n this.setSpriteRegion(attachment, slot.currentSprite, region);\n slot.currentSprite.region = region;\n } else\n if (slot.currentMesh && slot.currentMesh.region != region) {\n this.setMeshRegion(attachment, slot.currentMesh, region);\n } else {\n slot.tempRegion = region;\n slot.tempAttachment = attachment;\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 = function (slotName: String, texture: PIXI.Texture = null, size: PIXI.Rectangle = null) {\n var index = this.skeleton.findSlotIndex(slotName);\n if (index == -1) {\n return false;\n }\n return this.hackTextureBySlotIndex(index, texture, size);\n }\n}\n\nfunction SlotContainerUpdateTransformV3() {\n var pt = this.parent.worldTransform;\n var wt = this.worldTransform;\n var 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","import {Event} from \"./Event\";\nimport {Skeleton} from \"./Skeleton\";\nimport {PathConstraint} from \"./PathConstraint\";\nimport {Utils, MathUtils, Color, ArrayLike} from \"./Utils\";\nimport {TransformConstraint} from \"./TransformConstraint\";\nimport {IkConstraint} from \"./IkConstraint\";\nimport {VertexAttachment, Attachment} from \"./attachments\";\nimport {Slot} from \"./Slot\";\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\nexport class Animation {\n name: string;\n timelines: Array;\n duration: number;\n\n constructor (name: string, timelines: Array, duration: number) {\n if (name == null) throw new Error(\"name cannot be null.\");\n if (timelines == null) throw new Error(\"timelines cannot be null.\");\n this.name = name;\n this.timelines = timelines;\n this.duration = duration;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: Array) {\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\n\n if (loop && this.duration != 0) {\n time %= this.duration;\n if (lastTime > 0) lastTime %= this.duration;\n }\n\n let timelines = this.timelines;\n for (let i = 0, n = timelines.length; i < n; i++)\n timelines[i].apply(skeleton, lastTime, time, events, 1);\n }\n\n mix (skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: Array, alpha: number) {\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\n\n if (loop && this.duration != 0) {\n time %= this.duration;\n if (lastTime > 0) lastTime %= this.duration;\n }\n\n let timelines = this.timelines;\n for (let i = 0, n = timelines.length; i < n; i++)\n timelines[i].apply(skeleton, lastTime, time, events, alpha);\n }\n\n static binarySearch (values: ArrayLike, target: number, step: number = 1) {\n let low = 0;\n let high = values.length / step - 2;\n if (high == 0) return step;\n let current = high >>> 1;\n while (true) {\n if (values[(current + 1) * step] <= target)\n low = current + 1;\n else\n high = current;\n if (low == high) return (low + 1) * step;\n current = (low + high) >>> 1;\n }\n }\n\n static linearSearch (values: ArrayLike, target: number, step: number) {\n for (let i = 0, last = values.length - step; i <= last; i += step)\n if (values[i] > target) return i;\n return -1;\n }\n}\n\nexport interface Timeline {\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): void;\n}\n\nexport abstract class CurveTimeline implements Timeline {\n static LINEAR = 0; static STEPPED = 1; static BEZIER = 2;\n static BEZIER_SIZE = 10 * 2 - 1;\n\n private curves: ArrayLike; // type, x, y, ...\n\n constructor (frameCount: number) {\n if (frameCount <= 0) throw new Error(\"frameCount must be > 0: \" + frameCount);\n this.curves = Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\n }\n\n getFrameCount () {\n return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\n }\n\n setLinear (frameIndex: number) {\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\n }\n\n setStepped (frameIndex: number) {\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\n }\n\n getCurveType (frameIndex: number): number {\n let index = frameIndex * CurveTimeline.BEZIER_SIZE;\n if (index == this.curves.length) return CurveTimeline.LINEAR;\n let type = this.curves[index];\n if (type == CurveTimeline.LINEAR) return CurveTimeline.LINEAR;\n if (type == CurveTimeline.STEPPED) return CurveTimeline.STEPPED;\n return CurveTimeline.BEZIER;\n }\n\n /** Sets the control handle positions for an interpolation bezier curve used to transition from this keyframe to the next.\n * cx1 and cx2 are from 0 to 1, representing the percent of time between the two keyframes. cy1 and cy2 are the percent of\n * the difference between the keyframe's values. */\n setCurve (frameIndex: number, cx1: number, cy1: number, cx2: number, cy2: number) {\n let tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\n let dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\n let ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\n let dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\n\n let i = frameIndex * CurveTimeline.BEZIER_SIZE;\n let curves = this.curves;\n curves[i++] = CurveTimeline.BEZIER;\n\n let x = dfx, y = dfy;\n for (let n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n x += dfx;\n y += dfy;\n }\n }\n\n getCurvePercent (frameIndex: number, percent: number) {\n percent = MathUtils.clamp(percent, 0, 1);\n let curves = this.curves;\n let i = frameIndex * CurveTimeline.BEZIER_SIZE;\n let type = curves[i];\n if (type == CurveTimeline.LINEAR) return percent;\n if (type == CurveTimeline.STEPPED) return 0;\n i++;\n let x = 0;\n for (let start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\n x = curves[i];\n if (x >= percent) {\n let prevX: number, prevY: number;\n if (i == start) {\n prevX = 0;\n prevY = 0;\n } else {\n prevX = curves[i - 2];\n prevY = curves[i - 1];\n }\n return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\n }\n }\n let y = curves[i - 1];\n return y + (1 - y) * (percent - x) / (1 - x); // Last point is 1,1.\n }\n\n abstract apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): void;\n}\n\nexport class RotateTimeline extends CurveTimeline {\n static ENTRIES = 2;\n static PREV_TIME = -2; static PREV_ROTATION = -1;\n static ROTATION = 1;\n\n boneIndex: number;\n frames: ArrayLike; // time, degrees, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount << 1);\n }\n\n /** Sets the time and angle of the specified keyframe. */\n setFrame (frameIndex: number, time: number, degrees: number) {\n frameIndex <<= 1;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let bone = skeleton.bones[this.boneIndex];\n\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) { // Time is after last frame.\n let amount = bone.data.rotation + frames[frames.length + RotateTimeline.PREV_ROTATION] - bone.rotation;\n while (amount > 180)\n amount -= 360;\n while (amount < -180)\n amount += 360;\n bone.rotation += amount * alpha;\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\n let prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent((frame >> 1) - 1,\n 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\n\n let amount = frames[frame + RotateTimeline.ROTATION] - prevRotation;\n while (amount > 180)\n amount -= 360;\n while (amount < -180)\n amount += 360;\n amount = bone.data.rotation + (prevRotation + amount * percent) - bone.rotation;\n while (amount > 180)\n amount -= 360;\n while (amount < -180)\n amount += 360;\n bone.rotation += amount * alpha;\n }\n}\n\nexport class TranslateTimeline extends CurveTimeline {\n static ENTRIES = 3;\n static PREV_TIME = -3; static PREV_X = -2; static PREV_Y = -1;\n static X = 1; static Y = 2;\n\n boneIndex: number;\n frames: ArrayLike; // time, x, y, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\n }\n\n /** Sets the time and value of the specified keyframe. */\n setFrame (frameIndex: number, time: number, x: number, y: number) {\n frameIndex *= TranslateTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + TranslateTimeline.X] = x;\n this.frames[frameIndex + TranslateTimeline.Y] = y;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let bone = skeleton.bones[this.boneIndex];\n\n if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) { // Time is after last frame.\n bone.x += (bone.data.x + frames[frames.length + TranslateTimeline.PREV_X] - bone.x) * alpha;\n bone.y += (bone.data.y + frames[frames.length + TranslateTimeline.PREV_Y] - bone.y) * alpha;\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\n let prevX = frames[frame + TranslateTimeline.PREV_X];\n let prevY = frames[frame + TranslateTimeline.PREV_Y];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\n\n bone.x += (bone.data.x + prevX + (frames[frame + TranslateTimeline.X] - prevX) * percent - bone.x) * alpha;\n bone.y += (bone.data.y + prevY + (frames[frame + TranslateTimeline.Y] - prevY) * percent - bone.y) * alpha;\n }\n}\n\nexport class ScaleTimeline extends TranslateTimeline {\n constructor (frameCount: number) {\n super(frameCount);\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let bone = skeleton.bones[this.boneIndex];\n if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) { // Time is after last frame.\n bone.scaleX += (bone.data.scaleX * frames[frames.length + ScaleTimeline.PREV_X] - bone.scaleX) * alpha;\n bone.scaleY += (bone.data.scaleY * frames[frames.length + ScaleTimeline.PREV_Y] - bone.scaleY) * alpha;\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\n let prevX = frames[frame + ScaleTimeline.PREV_X];\n let prevY = frames[frame + ScaleTimeline.PREV_Y];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\n\n bone.scaleX += (bone.data.scaleX * (prevX + (frames[frame + ScaleTimeline.X] - prevX) * percent) - bone.scaleX) * alpha;\n bone.scaleY += (bone.data.scaleY * (prevY + (frames[frame + ScaleTimeline.Y] - prevY) * percent) - bone.scaleY) * alpha;\n }\n}\n\nexport class ShearTimeline extends TranslateTimeline {\n constructor (frameCount: number) {\n super(frameCount);\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let bone = skeleton.bones[this.boneIndex];\n if (time >= frames[frames.length - ShearTimeline.ENTRIES]) { // Time is after last frame.\n bone.shearX += (bone.data.shearX + frames[frames.length + ShearTimeline.PREV_X] - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY + frames[frames.length + ShearTimeline.PREV_Y] - bone.shearY) * alpha;\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\n let prevX = frames[frame + ShearTimeline.PREV_X];\n let prevY = frames[frame + ShearTimeline.PREV_Y];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\n\n bone.shearX += (bone.data.shearX + (prevX + (frames[frame + ShearTimeline.X] - prevX) * percent) - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY + (prevY + (frames[frame + ShearTimeline.Y] - prevY) * percent) - bone.shearY) * alpha;\n }\n}\n\nexport class ColorTimeline extends CurveTimeline {\n static ENTRIES = 5;\n static PREV_TIME = -5; static PREV_R = -4; static PREV_G = -3; static PREV_B = -2; static PREV_A = -1;\n static R = 1; static G = 2; static B = 3; static A = 4;\n\n slotIndex: number;\n frames: ArrayLike; // time, r, g, b, a, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\n }\n\n /** Sets the time and value of the specified keyframe. */\n setFrame (frameIndex: number, time: number, r: number, g: number, b: number, a: number) {\n frameIndex *= ColorTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + ColorTimeline.R] = r;\n this.frames[frameIndex + ColorTimeline.G] = g;\n this.frames[frameIndex + ColorTimeline.B] = b;\n this.frames[frameIndex + ColorTimeline.A] = a;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let r = 0, g = 0, b = 0, a = 0;\n if (time >= frames[frames.length - ColorTimeline.ENTRIES]) { // Time is after last frame.\n let i = frames.length;\n r = frames[i + ColorTimeline.PREV_R];\n g = frames[i + ColorTimeline.PREV_G];\n b = frames[i + ColorTimeline.PREV_B];\n a = frames[i + ColorTimeline.PREV_A];\n } else {\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\n r = frames[frame + ColorTimeline.PREV_R];\n g = frames[frame + ColorTimeline.PREV_G];\n b = frames[frame + ColorTimeline.PREV_B];\n a = frames[frame + ColorTimeline.PREV_A];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\n\n r += (frames[frame + ColorTimeline.R] - r) * percent;\n g += (frames[frame + ColorTimeline.G] - g) * percent;\n b += (frames[frame + ColorTimeline.B] - b) * percent;\n a += (frames[frame + ColorTimeline.A] - a) * percent;\n }\n let color: Color = skeleton.slots[this.slotIndex].color;\n if (alpha < 1)\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\n else\n color.set(r, g, b, a);\n }\n}\n\nexport class AttachmentTimeline implements Timeline {\n slotIndex: number;\n frames: ArrayLike // time, ...\n attachmentNames: Array;\n\n constructor (frameCount: number) {\n this.frames = Utils.newFloatArray(frameCount);\n this.attachmentNames = new Array(frameCount);\n }\n\n getFrameCount () {\n return this.frames.length;\n }\n\n /** Sets the time and value of the specified keyframe. */\n setFrame (frameIndex: number, time: number, attachmentName: string) {\n this.frames[frameIndex] = time;\n this.attachmentNames[frameIndex] = attachmentName;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let frameIndex = 0;\n if (time >= frames[frames.length - 1]) // Time is after last frame.\n frameIndex = frames.length - 1;\n else\n frameIndex = Animation.binarySearch(frames, time, 1) - 1;\n\n let attachmentName = this.attachmentNames[frameIndex];\n skeleton.slots[this.slotIndex]\n .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\n }\n}\n\nexport class EventTimeline implements Timeline {\n frames: ArrayLike; // time, ...\n events: Array;\n\n constructor (frameCount: number) {\n this.frames = Utils.newFloatArray(frameCount);\n this.events = new Array(frameCount);\n }\n\n getFrameCount () {\n return this.frames.length;\n }\n\n /** Sets the time of the specified keyframe. */\n setFrame (frameIndex: number, event: Event) {\n this.frames[frameIndex] = event.time;\n this.events[frameIndex] = event;\n }\n\n /** Fires events for frames > lastTime and <= time. */\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) {\n if (firedEvents == null) return;\n let frames = this.frames;\n let frameCount = this.frames.length;\n\n if (lastTime > time) { // Fire events after last time for looped animations.\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha);\n lastTime = -1;\n } else if (lastTime >= frames[frameCount - 1]) // Last time is after last frame.\n return;\n if (time < frames[0]) return; // Time is before first frame.\n\n let frame = 0;\n if (lastTime < frames[0])\n frame = 0;\n else {\n frame = Animation.binarySearch(frames, lastTime);\n let frameTime = frames[frame];\n while (frame > 0) { // Fire multiple events with the same frame.\n if (frames[frame - 1] != frameTime) break;\n frame--;\n }\n }\n for (; frame < frameCount && time >= frames[frame]; frame++)\n firedEvents.push(this.events[frame]);\n }\n}\n\nexport class DrawOrderTimeline implements Timeline {\n frames: ArrayLike; // time, ...\n drawOrders: Array>;\n\n constructor (frameCount: number) {\n this.frames = Utils.newFloatArray(frameCount);\n this.drawOrders = new Array>(frameCount);\n }\n\n getFrameCount () {\n return this.frames.length;\n }\n\n /** Sets the time of the specified keyframe.\n * @param drawOrder May be null to use bind pose draw order. */\n setFrame (frameIndex: number, time: number, drawOrder: Array) {\n this.frames[frameIndex] = time;\n this.drawOrders[frameIndex] = drawOrder;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let frame = 0;\n if (time >= frames[frames.length - 1]) // Time is after last frame.\n frame = frames.length - 1;\n else\n frame = Animation.binarySearch(frames, time) - 1;\n\n let drawOrder: Array = skeleton.drawOrder;\n let slots: Array = skeleton.slots;\n let drawOrderToSetupIndex = this.drawOrders[frame];\n if (drawOrderToSetupIndex == null)\n Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\n else {\n for (let i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\n }\n }\n}\n\nexport class DeformTimeline extends CurveTimeline {\n frames: ArrayLike; // time, ...\n frameVertices: Array>;\n slotIndex: number;\n attachment: VertexAttachment;\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount);\n this.frameVertices = new Array>(frameCount);\n }\n\n /** Sets the time of the specified keyframe. */\n setFrame (frameIndex: number, time: number, vertices: ArrayLike) {\n this.frames[frameIndex] = time;\n this.frameVertices[frameIndex] = vertices;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) {\n let slot: Slot = skeleton.slots[this.slotIndex];\n let slotAttachment: Attachment = slot.getAttachment();\n if (!(slotAttachment instanceof VertexAttachment) || !(slotAttachment).applyDeform(this.attachment)) return;\n\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let frameVertices = this.frameVertices;\n let vertexCount = frameVertices[0].length;\n\n let verticesArray: Array = slot.attachmentVertices;\n if (verticesArray.length != vertexCount) alpha = 1; // Don't mix from uninitialized slot vertices.\n let vertices: Array = Utils.setArraySize(verticesArray, vertexCount);\n\n if (time >= frames[frames.length - 1]) { // Time is after last frame.\n let lastVertices = frameVertices[frames.length - 1];\n if (alpha < 1) {\n for (let i = 0; i < vertexCount; i++)\n vertices[i] += (lastVertices[i] - vertices[i]) * alpha;\n } else\n Utils.arrayCopy(lastVertices, 0, vertices, 0, vertexCount);\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time);\n let prevVertices = frameVertices[frame - 1];\n let nextVertices = frameVertices[frame];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\n\n if (alpha < 1) {\n for (let i = 0; i < vertexCount; i++) {\n let prev = prevVertices[i];\n vertices[i] += (prev + (nextVertices[i] - prev) * percent - vertices[i]) * alpha;\n }\n } else {\n for (let i = 0; i < vertexCount; i++) {\n let prev = prevVertices[i];\n vertices[i] = prev + (nextVertices[i] - prev) * percent;\n }\n }\n }\n}\n\nexport class IkConstraintTimeline extends CurveTimeline {\n static ENTRIES = 3;\n static PREV_TIME = -3; static PREV_MIX = -2; static PREV_BEND_DIRECTION = -1;\n static MIX = 1; static BEND_DIRECTION = 2;\n\n ikConstraintIndex: number;\n frames: ArrayLike; // time, mix, bendDirection, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\n }\n\n /** Sets the time, mix and bend direction of the specified keyframe. */\n setFrame (frameIndex: number, time: number, mix: number, bendDirection: number) {\n frameIndex *= IkConstraintTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\n this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let constraint: IkConstraint = skeleton.ikConstraints[this.ikConstraintIndex];\n\n if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) { // Time is after last frame.\n constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\n constraint.bendDirection = Math.floor(frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION]);\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\n let mix = frames[frame + IkConstraintTimeline.PREV_MIX];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\n\n constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\n constraint.bendDirection = Math.floor(frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION]);\n }\n}\n\nexport class TransformConstraintTimeline extends CurveTimeline {\n static ENTRIES = 5;\n static PREV_TIME = -5; static PREV_ROTATE = -4; static PREV_TRANSLATE = -3; static PREV_SCALE = -2; static PREV_SHEAR = -1;\n static ROTATE = 1; static TRANSLATE = 2; static SCALE = 3; static SHEAR = 4;\n\n transformConstraintIndex: number;\n frames: ArrayLike; // time, rotate mix, translate mix, scale mix, shear mix, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\n }\n\n /** Sets the time and mixes of the specified keyframe. */\n setFrame (frameIndex: number, time: number, rotateMix: number, translateMix: number, scaleMix: number, shearMix: number) {\n frameIndex *= TransformConstraintTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\n this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\n this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\n this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let constraint: TransformConstraint = skeleton.transformConstraints[this.transformConstraintIndex];\n\n if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) { // Time is after last frame.\n let i = frames.length;\n constraint.rotateMix += (frames[i + TransformConstraintTimeline.PREV_ROTATE] - constraint.rotateMix) * alpha;\n constraint.translateMix += (frames[i + TransformConstraintTimeline.PREV_TRANSLATE] - constraint.translateMix) * alpha;\n constraint.scaleMix += (frames[i + TransformConstraintTimeline.PREV_SCALE] - constraint.scaleMix) * alpha;\n constraint.shearMix += (frames[i + TransformConstraintTimeline.PREV_SHEAR] - constraint.shearMix) * alpha;\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\n\n let rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\n let translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\n let scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\n let shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\n constraint.rotateMix += (rotate + (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent - constraint.rotateMix) * alpha;\n constraint.translateMix += (translate + (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent - constraint.translateMix)\n * alpha;\n constraint.scaleMix += (scale + (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent - constraint.scaleMix) * alpha;\n constraint.shearMix += (shear + (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent - constraint.shearMix) * alpha;\n }\n}\n\nexport class PathConstraintPositionTimeline extends CurveTimeline {\n static ENTRIES = 2;\n static PREV_TIME = -2; static PREV_VALUE = -1;\n static VALUE = 1;\n\n pathConstraintIndex: number;\n\n frames: ArrayLike; // time, position, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\n }\n\n /** Sets the time and value of the specified keyframe. */\n setFrame (frameIndex: number, time: number, value: number) {\n frameIndex *= PathConstraintPositionTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let constraint: PathConstraint = skeleton.pathConstraints[this.pathConstraintIndex];\n\n if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES]) { // Time is after last frame.\n let i = frames.length;\n constraint.position += (frames[i + PathConstraintPositionTimeline.PREV_VALUE] - constraint.position) * alpha;\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\n let position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\n\n constraint.position += (position + (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent - constraint.position) * alpha;\n }\n}\n\nexport class PathConstraintSpacingTimeline extends PathConstraintPositionTimeline {\n constructor (frameCount: number) {\n super(frameCount);\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let constraint: PathConstraint = skeleton.pathConstraints[this.pathConstraintIndex];\n\n if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES]) { // Time is after last frame.\n let i = frames.length;\n constraint.spacing += (frames[i + PathConstraintSpacingTimeline.PREV_VALUE] - constraint.spacing) * alpha;\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\n let spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\n\n constraint.spacing += (spacing + (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent - constraint.spacing) * alpha;\n }\n}\n\nexport class PathConstraintMixTimeline extends CurveTimeline {\n static ENTRIES = 3;\n static PREV_TIME = -3; static PREV_ROTATE = -2; static PREV_TRANSLATE = -1;\n static ROTATE = 1; static TRANSLATE = 2;\n\n pathConstraintIndex: number;\n\n frames: ArrayLike; // time, rotate mix, translate mix, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\n }\n\n /** Sets the time and mixes of the specified keyframe. */\n setFrame (frameIndex: number, time: number, rotateMix: number, translateMix: number) {\n frameIndex *= PathConstraintMixTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\n this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let constraint: PathConstraint = skeleton.pathConstraints[this.pathConstraintIndex];\n\n if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) { // Time is after last frame.\n let i = frames.length;\n constraint.rotateMix += (frames[i + PathConstraintMixTimeline.PREV_ROTATE] - constraint.rotateMix) * alpha;\n constraint.translateMix += (frames[i + PathConstraintMixTimeline.PREV_TRANSLATE] - constraint.translateMix) * alpha;\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\n let rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\n let translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\n\n constraint.rotateMix += (rotate + (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent - constraint.rotateMix) * alpha;\n constraint.translateMix += (translate + (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent - constraint.translateMix)\n * alpha;\n }\n}\n","import {Skeleton} from \"./Skeleton\";\r\nimport {MathUtils, Utils} from \"./Utils\";\r\nimport {Animation} from \"./Animation\";\r\nimport {AnimationStateData} from \"./AnimationStateData\";\r\nimport {Event} from \"./Event\";\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\nexport class AnimationState {\r\n data: AnimationStateData;\r\n tracks = new Array();\r\n events = new Array();\r\n timeScale = 1;\r\n\r\n constructor (data: AnimationStateData = null) {\r\n if (data == null) throw new Error(\"data cannot be null.\");\r\n this.data = data;\r\n }\r\n\r\n update (delta: number) {\r\n delta *= this.timeScale;\r\n for (let i = 0; i < this.tracks.length; i++) {\r\n let current = this.tracks[i];\r\n if (current == null) continue;\r\n\r\n let next = current.next;\r\n if (next != null) {\r\n let nextTime = current.lastTime - next.delay;\r\n if (nextTime >= 0) {\r\n let nextDelta = delta * next.timeScale;\r\n next.time = nextTime + nextDelta; // For start event to see correct time.\r\n current.time += delta * current.timeScale; // For end event to see correct time.\r\n this.setCurrent(i, next);\r\n next.time -= nextDelta; // Prevent increasing time twice, below.\r\n current = next;\r\n }\r\n } else if (!current.loop && current.lastTime >= current.endTime) {\r\n // End non-looping animation when it reaches its end time and there is no next entry.\r\n this.clearTrack(i);\r\n continue;\r\n }\r\n\r\n current.time += delta * current.timeScale;\r\n if (current.previous != null) {\r\n let previousDelta = delta * current.previous.timeScale;\r\n current.previous.time += previousDelta;\r\n current.mixTime += previousDelta;\r\n }\r\n }\r\n }\r\n\r\n apply (skeleton: Skeleton) {\r\n let events = this.events;\r\n\r\n for (let i = 0; i < this.tracks.length; i++) {\r\n let current = this.tracks[i];\r\n if (current == null) continue;\r\n\r\n events.length = 0;\r\n\r\n let time = current.time;\r\n let lastTime = current.lastTime;\r\n let endTime = current.endTime;\r\n let loop = current.loop;\r\n if (!loop && time > endTime) time = endTime;\r\n\r\n let previous = current.previous;\r\n if (previous == null)\r\n current.animation.mix(skeleton, lastTime, time, loop, events, current.mix);\r\n else {\r\n let previousTime = previous.time;\r\n if (!previous.loop && previousTime > previous.endTime) previousTime = previous.endTime;\r\n previous.animation.apply(skeleton, previousTime, previousTime, previous.loop, null);\r\n\r\n let alpha = current.mixTime / current.mixDuration * current.mix;\r\n if (alpha >= 1) {\r\n alpha = 1;\r\n current.previous = null;\r\n }\r\n current.animation.mix(skeleton, lastTime, time, loop, events, alpha);\r\n }\r\n\r\n for (let ii = 0, nn = events.length; ii < nn; ii++) {\r\n let event = events[ii];\r\n if (current.onEvent) current.onEvent(i, event);\r\n if (this.onEvent) this.onEvent(i, event);\r\n }\r\n\r\n // Check if completed the animation or a loop iteration.\r\n if (loop ? (lastTime % endTime > time % endTime) : (lastTime < endTime && time >= endTime)) {\r\n let count = MathUtils.toInt(time / endTime);\r\n if (current.onComplete) current.onComplete(i, count);\r\n if (this.onComplete) this.onComplete(i, count);\r\n }\r\n\r\n current.lastTime = current.time;\r\n }\r\n }\r\n\r\n clearTracks () {\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 }\r\n\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 if (current.onEnd) current.onEnd(trackIndex);\r\n if (this.onEnd) this.onEnd(trackIndex);\r\n\r\n this.tracks[trackIndex] = null;\r\n\r\n this.freeAll(current);\r\n }\r\n\r\n freeAll (entry: TrackEntry) {\r\n while (entry != null) {\r\n let next = entry.next;\r\n entry = next;\r\n }\r\n }\r\n\r\n expandToIndex (index: number) {\r\n if (index < this.tracks.length) return this.tracks[index];\r\n Utils.setArraySize(this.tracks, index - this.tracks.length + 1, null);\r\n this.tracks.length = index + 1;\r\n return null;\r\n }\r\n\r\n setCurrent (index: number, entry: TrackEntry) {\r\n let current = this.expandToIndex(index);\r\n if (current != null) {\r\n let previous = current.previous;\r\n current.previous = null;\r\n\r\n if (entry.onEnd) entry.onEnd(index);\r\n if (this.onEnd) this.onEnd(index);\r\n\r\n entry.mixDuration = this.data.getMix(current.animation, entry.animation);\r\n if (entry.mixDuration > 0) {\r\n entry.mixTime = 0;\r\n // If a mix is in progress, mix from the closest animation.\r\n if (previous != null && current.mixTime / current.mixDuration < 0.5) {\r\n entry.previous = previous;\r\n previous = current;\r\n } else\r\n entry.previous = current;\r\n }\r\n }\r\n\r\n this.tracks[index] = entry;\r\n\r\n if (entry.onStart) entry.onStart(index);\r\n if (this.onStart) this.onStart(index);\r\n }\r\n\r\n /** @see #setAnimation(int, Animation, boolean) */\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 /** Set the current animation. Any queued animations are cleared. */\r\n setAnimationWith (trackIndex: number, animation: Animation, loop: boolean) {\r\n let current = this.expandToIndex(trackIndex);\r\n if (current != null) this.freeAll(current.next);\r\n\r\n let entry = new TrackEntry();\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.endTime = animation.duration;\r\n this.setCurrent(trackIndex, entry);\r\n return entry;\r\n }\r\n\r\n /** {@link #addAnimation(int, Animation, boolean, float)} */\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 hasAnimation(animationName: string): boolean\r\n {\r\n let animation = this.data.skeletonData.findAnimation(animationName);\r\n return animation !== null;\r\n }\r\n\r\n /** Adds an animation to be played delay seconds after the current or last queued animation.\r\n * @param delay May be <= 0 to use duration of previous animation minus any mix duration plus the negative delay. */\r\n addAnimationWith (trackIndex: number, animation: Animation, loop: boolean, delay: number) {\r\n let entry = new TrackEntry();\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.endTime = animation.duration;\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 last.next = entry;\r\n } else\r\n this.tracks[trackIndex] = entry;\r\n\r\n if (delay <= 0) {\r\n if (last != null)\r\n delay += last.endTime - this.data.getMix(last.animation, animation);\r\n else\r\n delay = 0;\r\n }\r\n entry.delay = delay;\r\n\r\n return entry;\r\n }\r\n\r\n /** @return May be null. */\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 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 setAnimationByName (trackIndex: number, animationName: string, loop: boolean) {\r\n if (!AnimationState.deprecatedWarning1) {\r\n AnimationState.deprecatedWarning1 = true;\r\n console.warn(\"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 addAnimationByName (trackIndex: number, animationName: string, loop: boolean, delay: number) {\r\n if (!AnimationState.deprecatedWarning2) {\r\n AnimationState.deprecatedWarning2 = true;\r\n console.warn(\"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 hasAnimationByName (animationName: string): boolean\r\n {\r\n if (!AnimationState.deprecatedWarning3) {\r\n AnimationState.deprecatedWarning3 = true;\r\n console.warn(\"Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.\");\r\n }\r\n let animation = this.data.skeletonData.findAnimation(animationName);\r\n return animation !== null;\r\n }\r\n}\r\n\r\nexport class TrackEntry {\r\n next: TrackEntry; previous: TrackEntry;\r\n animation: Animation;\r\n loop = false;\r\n delay = 0; time = 0; lastTime = -1; endTime = 0; timeScale = 1;\r\n mixTime = 0; mixDuration = 0;\r\n mix = 1;\r\n\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 reset () {\r\n this.next = null;\r\n this.previous = null;\r\n this.animation = null;\r\n this.timeScale = 1;\r\n this.lastTime = -1; // Trigger events on frame zero.\r\n this.time = 0;\r\n }\r\n\r\n /** Returns true if the current time is greater than the end time, regardless of looping. */\r\n isComplete () : boolean {\r\n return this.time >= this.endTime;\r\n }\r\n}\r\n","import {Animation} from \"./Animation\";\nimport {SkeletonData} from \"./SkeletonData\";\nimport {Map} from \"./Utils\";\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\nexport class AnimationStateData {\n skeletonData: SkeletonData;\n animationToMixTime: Map = { };\n defaultMix = 0;\n\n constructor (skeletonData: SkeletonData) {\n if (skeletonData == null) throw new Error(\"skeletonData cannot be null.\");\n this.skeletonData = skeletonData;\n }\n\n setMix (fromName: string, toName: string, duration: number) {\n let from = this.skeletonData.findAnimation(fromName);\n if (from == null) throw new Error(\"Animation not found: \" + fromName);\n let to = this.skeletonData.findAnimation(toName);\n if (to == null) throw new Error(\"Animation not found: \" + toName);\n this.setMixWith(from, to, duration);\n }\n\n private static deprecatedWarning1: boolean = false;\n setMixByName(fromName: string, toName: string, duration: number) {\n if (!AnimationStateData.deprecatedWarning1) {\n AnimationStateData.deprecatedWarning1 = true;\n console.warn(\"Deprecation Warning: AnimationStateData.setMixByName is deprecated, please use setMix from now on.\");\n }\n this.setMix(fromName, toName, duration);\n }\n\n setMixWith (from: Animation, to: Animation, duration: number) {\n if (from == null) throw new Error(\"from cannot be null.\");\n if (to == null) throw new Error(\"to cannot be null.\");\n let key = from.name + to.name;\n this.animationToMixTime[key] = duration;\n }\n\n getMix (from: Animation, to: Animation) {\n let key = from.name + to.name;\n let value = this.animationToMixTime[key];\n return value === undefined ? this.defaultMix : value;\n }\n}\n","import {Skin} from \"./Skin\";\nimport {AttachmentLoader, BoundingBoxAttachment, MeshAttachment, PathAttachment, RegionAttachment} from \"./attachments\";\nimport {TextureAtlas} from \"./TextureAtlas\";\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\nexport class AtlasAttachmentLoader implements AttachmentLoader {\n atlas: TextureAtlas;\n\n constructor (atlas: TextureAtlas) {\n this.atlas = atlas;\n }\n\n /** @return May be null to not load an attachment. */\n newRegionAttachment (skin: Skin, name: string, path: string): RegionAttachment {\n let region = this.atlas.findRegion(path);\n if (region == null) throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\n let attachment = new RegionAttachment(name);\n attachment.region = region;\n return attachment;\n }\n\n /** @return May be null to not load an attachment. */\n newMeshAttachment (skin: Skin, name: string, path: string) : MeshAttachment {\n let region = this.atlas.findRegion(path);\n if (region == null) throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\n let attachment = new MeshAttachment(name);\n attachment.region = region;\n return attachment;\n }\n\n /** @return May be null to not load an attachment. */\n newBoundingBoxAttachment (skin: Skin, name: string) : BoundingBoxAttachment {\n return new BoundingBoxAttachment(name);\n }\n\n /** @return May be null to not load an attachment */\n newPathAttachment (skin: Skin, name: string): PathAttachment {\n return new PathAttachment(name);\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\nexport enum BlendMode {\r\n Normal,\r\n Additive,\r\n Multiply,\r\n Screen\r\n}\r\n","import {Updatable} from \"./Updatable\";\nimport {BoneData, TransformMode} from \"./BoneData\";\nimport {Skeleton} from \"./Skeleton\";\nimport {MathUtils, Vector2} from \"./Utils\";\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\nexport 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; y = 0; rotation = 0; scaleX = 0; scaleY = 0; shearX = 0; shearY = 0;\n ax = 0; ay = 0; arotation = 0; ascaleX = 0; ascaleY = 0; ashearX = 0; ashearY = 0;\n appliedValid = false;\n\n sorted = 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 /** 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 if (parent == null) { // Root bone.\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 let skeleton = this.skeleton;\n if (skeleton.flipX) {\n x = -x;\n la = -la;\n lb = -lb;\n }\n if (skeleton.flipY !== Bone.yDown) {\n y = -y;\n lc = -lc;\n ld = -ld;\n }\n m.a = la;\n m.c = lb;\n m.b = lc;\n m.d = ld;\n m.tx = x + skeleton.x;\n m.ty = y + 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 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;\n let zc = pc * cos + pd * sin;\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 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 if (this.data.transformMode != TransformMode.NoScaleOrReflection ? pa * pd - pb * pc < 0 : (this.skeleton.flipX != this.skeleton.flipY) != Bone.yDown) {\n m.b = -m.b;\n m.d = -m.d;\n }\n return;\n }\n }\n if (this.skeleton.flipX) {\n m.a = -m.a;\n m.c = -m.c;\n }\n if (this.skeleton.flipY != Bone.yDown) {\n m.b = -m.b;\n m.d = -m.d;\n }\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 worldToLocalRotationX () {\n let parent = this.parent;\n if (parent == null) return this.arotation;\n let pm = parent.matrix, m = this.matrix;\n return Math.atan2(pm.a * m.b - pm.b * m.a, pm.d * m.a - pm.c * m.b) * MathUtils.radDeg;\n }\n\n worldToLocalRotationY () {\n let parent = this.parent;\n if (parent == null) return this.arotation;\n let pm = parent.matrix, m = this.matrix;\n return Math.atan2(pm.a * m.d - pm.b * m.c, pm.d * m.c - pm.c * m.d) * MathUtils.radDeg;\n }\n\n rotateWorld (degrees: number) {\n let m = this.matrix;\n let a = this.matrix.a, b = m.c, c = m.b, d = m.d;\n let cos = MathUtils.cosDeg(degrees), sin = MathUtils.sinDeg(degrees);\n m.a = cos * a - sin * c;\n m.c = cos * b - sin * d;\n m.b = sin * a + cos * c;\n m.d = sin * b + cos * d;\n this.appliedValid = false;\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","/******************************************************************************\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\nexport class BoneData {\n index: number;\n name: string;\n parent: BoneData;\n length: number;\n x = 0; y = 0; rotation = 0; scaleX = 1; scaleY = 1; shearX = 0; shearY = 0;\n transformMode = TransformMode.Normal;\n\n constructor (index: number, name: string, parent: BoneData) {\n if (index < 0) throw new Error(\"index must be >= 0.\");\n if (name == null) throw new Error(\"name cannot be null.\");\n this.index = index;\n this.name = name;\n this.parent = parent;\n }\n}\n\nexport enum TransformMode {\n Normal, OnlyTranslation, NoRotationOrReflection, NoScale, NoScaleOrReflection\n}\n","import {EventData} from \"./EventData\";\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\nexport class Event {\r\n data: EventData;\r\n intValue: number;\r\n floatValue: number;\r\n stringValue: string;\r\n time: number;\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 * 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\nexport class EventData {\r\n name: string;\r\n intValue: number;\r\n floatValue: number;\r\n stringValue: string;\r\n\r\n constructor (name: string) {\r\n this.name = name;\r\n }\r\n}\r\n","import {IkConstraintData} from \"./IkConstraintData\";\nimport {Bone} from \"./Bone\";\nimport {Skeleton} from \"./Skeleton\";\nimport {MathUtils} from \"./Utils\";\nimport {Constraint} from \"./Constraint\";\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\nexport class IkConstraint implements Constraint {\n data: IkConstraintData;\n bones: Array;\n target: Bone;\n mix = 1;\n bendDirection = 0;\n\n level = 0;\n\n constructor (data: IkConstraintData, skeleton: Skeleton) {\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.mix = data.mix;\n this.bendDirection = data.bendDirection;\n\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findBone(data.target.name);\n }\n\n getOrder () {\n return this.data.order;\n }\n\n apply () {\n this.update();\n }\n\n update () {\n let target = this.target;\n let bones = this.bones;\n switch (bones.length) {\n case 1:\n this.apply1(bones[0], target.worldX, target.worldY, this.mix);\n break;\n case 2:\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.mix);\n break;\n }\n }\n\n /** Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified in the world\n * coordinate system. */\n apply1 (bone: Bone, targetX: number, targetY: number, alpha: number) {\n if (!bone.appliedValid) bone.updateAppliedTransform();\n let pp = bone.parent.matrix;\n let id = 1 / (pp.a * pp.d - pp.b * pp.c);\n let x = targetX - pp.tx, y = targetY - pp.ty;\n let tx = (x * pp.d - y * pp.c) * id - bone.ax, ty = (y * pp.a - x * pp.b) * id - bone.ay;\n let rotationIK = Math.atan2(ty, tx) * MathUtils.radDeg - bone.ashearX - bone.arotation;\n if (bone.ascaleX < 0) rotationIK += 180;\n if (rotationIK > 180)\n rotationIK -= 360;\n else if (rotationIK < -180) rotationIK += 360;\n bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, bone.ascaleX, bone.ascaleY, bone.ashearX,\n bone.ashearY);\n }\n\n /** Adjusts the parent and child bone rotations so the tip of the child is as close to the target position as possible. The\n * target is specified in the world coordinate system.\n * @param child A direct descendant of the parent bone. */\n apply2 (parent: Bone, child: Bone, targetX: number, targetY: number, bendDir: number, alpha: number) {\n if (alpha == 0) {\n child.updateWorldTransform();\n return;\n }\n if (!parent.appliedValid) parent.updateAppliedTransform();\n if (!child.appliedValid) child.updateAppliedTransform();\n let px = parent.ax, py = parent.ay, psx = parent.ascaleX, psy = parent.ascaleY, csx = child.ascaleX;\n\n let os1 = 0, os2 = 0, s2 = 0;\n if (psx < 0) {\n psx = -psx;\n os1 = 180;\n s2 = -1;\n } else {\n os1 = 0;\n s2 = 1;\n }\n if (psy < 0) {\n psy = -psy;\n s2 = -s2;\n }\n if (csx < 0) {\n csx = -csx;\n os2 = 180;\n } else\n os2 = 0;\n let pm = parent.matrix;\n let cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = pm.a, b = pm.c, c = pm.b, d = pm.d;\n let u = Math.abs(psx - psy) <= 0.0001;\n if (!u) {\n cy = 0;\n cwx = a * cx + pm.tx;\n cwy = c * cx + pm.ty;\n } else {\n cy = child.ay;\n cwx = a * cx + b * cy + pm.tx;\n cwy = c * cx + d * cy + pm.ty;\n }\n let pp = parent.parent;\n let ppm = parent.parent.matrix;\n a = ppm.a;\n b = ppm.c;\n c = ppm.b;\n d = ppm.d;\n let id = 1 / (a * d - b * c), x = targetX - ppm.tx, y = targetY - ppm.ty;\n let tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\n x = cwx - ppm.tx;\n y = cwy - ppm.ty;\n let dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\n let l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1 = 0, a2 = 0;\n outer:\n if (u) {\n l2 *= psx;\n let cos = (tx * tx + ty * ty - l1 * l1 - l2 * l2) / (2 * l1 * l2);\n if (cos < -1)\n cos = -1;\n else if (cos > 1) cos = 1;\n a2 = Math.acos(cos) * bendDir;\n a = l1 + l2 * cos;\n b = l2 * Math.sin(a2);\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\n } else {\n a = psx * l2;\n b = psy * l2;\n let aa = a * a, bb = b * b, dd = tx * tx + ty * ty, ta = Math.atan2(ty, tx);\n c = bb * l1 * l1 + aa * dd - aa * bb;\n let c1 = -2 * bb * l1, c2 = bb - aa;\n d = c1 * c1 - 4 * c2 * c;\n if (d >= 0) {\n let q = Math.sqrt(d);\n if (c1 < 0) q = -q;\n q = -(c1 + q) / 2;\n let r0 = q / c2, r1 = c / q;\n let r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\n if (r * r <= dd) {\n y = Math.sqrt(dd - r * r) * bendDir;\n a1 = ta - Math.atan2(y, r);\n a2 = Math.atan2(y / psy, (r - l1) / psx);\n break outer;\n }\n }\n let minAngle = 0, minDist = Number.MAX_VALUE, minX = 0, minY = 0;\n let maxAngle = 0, maxDist = 0, maxX = 0, maxY = 0;\n x = l1 + a;\n d = x * x;\n if (d > maxDist) {\n maxAngle = 0;\n maxDist = d;\n maxX = x;\n }\n x = l1 - a;\n d = x * x;\n if (d < minDist) {\n minAngle = MathUtils.PI;\n minDist = d;\n minX = x;\n }\n let angle = Math.acos(-a * l1 / (aa - bb));\n x = a * Math.cos(angle) + l1;\n y = b * Math.sin(angle);\n d = x * x + y * y;\n if (d < minDist) {\n minAngle = angle;\n minDist = d;\n minX = x;\n minY = y;\n }\n if (d > maxDist) {\n maxAngle = angle;\n maxDist = d;\n maxX = x;\n maxY = y;\n }\n if (dd <= (minDist + maxDist) / 2) {\n a1 = ta - Math.atan2(minY * bendDir, minX);\n a2 = minAngle * bendDir;\n } else {\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\n a2 = maxAngle * bendDir;\n }\n }\n let os = Math.atan2(cy, cx) * s2;\n let rotation = parent.arotation;\n a1 = (a1 - os) * MathUtils.radDeg + os1 - rotation;\n if (a1 > 180)\n a1 -= 360;\n else if (a1 < -180) a1 += 360;\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, parent.ascaleX, parent.ascaleY, 0, 0);\n rotation = child.arotation;\n a2 = ((a2 + os) * MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\n if (a2 > 180)\n a2 -= 360;\n else if (a2 < -180) a2 += 360;\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\n }\n}\n","import {BoneData} from \"./BoneData\";\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\nexport class IkConstraintData {\n name: string;\n order = 0;\n bones = new Array();\n target: BoneData;\n bendDirection = 1;\n mix = 1;\n\n constructor (name: string) {\n this.name = name;\n }\n}\n","import {PathConstraintData, SpacingMode, RotateMode, PositionMode} from \"./PathConstraintData\";\nimport {Bone} from \"./Bone\";\nimport {Slot} from \"./Slot\";\nimport {Skeleton} from \"./Skeleton\";\nimport {PathAttachment} from \"./attachments\";\nimport {Utils, MathUtils} from \"./Utils\";\nimport {Constraint} from \"./Constraint\";\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\nexport class PathConstraint implements Constraint {\n static NONE = -1; static BEFORE = -2; static AFTER = -3;\n\n data: PathConstraintData;\n bones: Array;\n target: Slot;\n position = 0; spacing = 0; rotateMix = 0; translateMix = 0;\n\n spaces = new Array(); positions = new Array();\n world = new Array(); curves = new Array(); lengths = new Array();\n segments = new Array();\n\n constructor (data: PathConstraintData, skeleton: Skeleton) {\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.bones = new Array();\n for (let i = 0, n = data.bones.length; i < n; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findSlot(data.target.name);\n this.position = data.position;\n this.spacing = data.spacing;\n this.rotateMix = data.rotateMix;\n this.translateMix = data.translateMix;\n }\n\n apply () {\n this.update();\n }\n\n update () {\n let attachment = this.target.getAttachment();\n if (!(attachment instanceof PathAttachment)) return;\n\n let rotateMix = this.rotateMix, translateMix = this.translateMix;\n let translate = translateMix > 0, rotate = rotateMix > 0;\n if (!translate && !rotate) return;\n\n let data = this.data;\n let spacingMode = data.spacingMode;\n let lengthSpacing = spacingMode == SpacingMode.Length;\n let rotateMode = data.rotateMode;\n let tangents = rotateMode == RotateMode.Tangent, scale = rotateMode == RotateMode.ChainScale;\n let boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\n let bones = this.bones;\n let spaces = Utils.setArraySize(this.spaces, spacesCount), lengths: Array = null;\n let spacing = this.spacing;\n if (scale || lengthSpacing) {\n if (scale) lengths = Utils.setArraySize(this.lengths, boneCount);\n for (let i = 0, n = spacesCount - 1; i < n;) {\n let bone = bones[i];\n let m = bone.matrix;\n let length = bone.data.length, x = length * m.a, y = length * m.b;\n length = Math.sqrt(x * x + y * y);\n if (scale) lengths[i] = length;\n spaces[++i] = lengthSpacing ? Math.max(0, length + spacing) : spacing;\n }\n } else {\n for (let i = 1; i < spacesCount; i++)\n spaces[i] = spacing;\n }\n\n let positions = this.computeWorldPositions(attachment, spacesCount, tangents,\n data.positionMode == PositionMode.Percent, spacingMode == SpacingMode.Percent);\n let boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\n let tip = rotateMode == RotateMode.Chain && offsetRotation == 0;\n for (let i = 0, p = 3; i < boneCount; i++, p += 3) {\n let bone = bones[i];\n let m = bone.matrix;\n m.tx += (boneX - m.tx) * translateMix;\n m.ty += (boneY - m.ty) * translateMix;\n let x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\n if (scale) {\n let length = lengths[i];\n if (length != 0) {\n let s = (Math.sqrt(dx * dx + dy * dy) / length - 1) * rotateMix + 1;\n m.a *= s;\n m.b *= s;\n }\n }\n boneX = x;\n boneY = y;\n if (rotate) {\n let a = m.a, b = m.c, c = m.b, d = m.d, r = 0, cos = 0, sin = 0;\n if (tangents)\n r = positions[p - 1];\n else if (spaces[i + 1] == 0)\n r = positions[p + 2];\n else\n r = Math.atan2(dy, dx);\n r -= Math.atan2(c, a) - offsetRotation * MathUtils.degRad;\n if (tip) {\n cos = Math.cos(r);\n sin = Math.sin(r);\n let length = bone.data.length;\n boneX += (length * (cos * a - sin * c) - dx) * rotateMix;\n boneY += (length * (sin * a + cos * c) - dy) * rotateMix;\n }\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI) //\n r += MathUtils.PI2;\n r *= rotateMix;\n cos = Math.cos(r);\n sin = Math.sin(r);\n m.a = cos * a - sin * c;\n m.c = cos * b - sin * d;\n m.b = sin * a + cos * c;\n m.d = sin * b + cos * d;\n }\n bone.appliedValid = false;\n }\n }\n\n computeWorldPositions (path: PathAttachment, spacesCount: number, tangents: boolean, percentPosition: boolean,\n percentSpacing: boolean) {\n let target = this.target;\n let position = this.position;\n let spaces = this.spaces, out = Utils.setArraySize(this.positions, spacesCount * 3 + 2), world: Array = null;\n let closed = path.closed;\n let verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\n\n if (!path.constantSpeed) {\n let lengths = path.lengths;\n curveCount -= closed ? 1 : 2;\n let pathLength = lengths[curveCount];\n if (percentPosition) position *= pathLength;\n if (percentSpacing) {\n for (let i = 0; i < spacesCount; i++)\n spaces[i] *= pathLength;\n }\n world = Utils.setArraySize(this.world, 8);\n for (let i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\n let space = spaces[i];\n position += space;\n let p = position;\n\n if (closed) {\n p %= pathLength;\n if (p < 0) p += pathLength;\n curve = 0;\n } else if (p < 0) {\n if (prevCurve != PathConstraint.BEFORE) {\n prevCurve = PathConstraint.BEFORE;\n path.computeWorldVerticesWith(target, 2, 4, world, 0);\n }\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n } else if (p > pathLength) {\n if (prevCurve != PathConstraint.AFTER) {\n prevCurve = PathConstraint.AFTER;\n path.computeWorldVerticesWith(target, verticesLength - 6, 4, world, 0);\n }\n this.addAfterPosition(p - pathLength, world, 0, out, o);\n continue;\n }\n\n // Determine curve containing position.\n for (;; curve++) {\n let length = lengths[curve];\n if (p > length) continue;\n if (curve == 0)\n p /= length;\n else {\n let prev = lengths[curve - 1];\n p = (p - prev) / (length - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n if (closed && curve == curveCount) {\n path.computeWorldVerticesWith(target, verticesLength - 4, 4, world, 0);\n path.computeWorldVerticesWith(target, 0, 4, world, 4);\n } else\n path.computeWorldVerticesWith(target, curve * 6 + 2, 8, world, 0);\n }\n this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o,\n tangents || (i > 0 && space == 0));\n }\n return out;\n }\n\n // World vertices.\n if (closed) {\n verticesLength += 2;\n world = Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVerticesWith(target, 2, verticesLength - 4, world, 0);\n path.computeWorldVerticesWith(target, 0, 2, world, verticesLength - 4);\n world[verticesLength - 2] = world[0];\n world[verticesLength - 1] = world[1];\n } else {\n curveCount--;\n verticesLength -= 4;\n world = Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVerticesWith(target, 2, verticesLength, world, 0);\n }\n\n // Curve lengths.\n let curves = Utils.setArraySize(this.curves, curveCount);\n let pathLength = 0;\n let x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\n let tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\n for (let i = 0, w = 2; i < curveCount; i++, w += 6) {\n cx1 = world[w];\n cy1 = world[w + 1];\n cx2 = world[w + 2];\n cy2 = world[w + 3];\n x2 = world[w + 4];\n y2 = world[w + 5];\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\n ddfx = tmpx * 2 + dddfx;\n ddfy = tmpy * 2 + dddfy;\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx;\n dfy += ddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx + dddfx;\n dfy += ddfy + dddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n curves[i] = pathLength;\n x1 = x2;\n y1 = y2;\n }\n if (percentPosition) position *= pathLength;\n if (percentSpacing) {\n for (let i = 0; i < spacesCount; i++)\n spaces[i] *= pathLength;\n }\n\n let segments = this.segments;\n let curveLength = 0;\n for (let i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\n let space = spaces[i];\n position += space;\n let p = position;\n\n if (closed) {\n p %= pathLength;\n if (p < 0) p += pathLength;\n curve = 0;\n } else if (p < 0) {\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n } else if (p > pathLength) {\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\n continue;\n }\n\n // Determine curve containing position.\n for (;; curve++) {\n let length = curves[curve];\n if (p > length) continue;\n if (curve == 0)\n p /= length;\n else {\n let prev = curves[curve - 1];\n p = (p - prev) / (length - prev);\n }\n break;\n }\n\n // Curve segment lengths.\n if (curve != prevCurve) {\n prevCurve = curve;\n let ii = curve * 6;\n x1 = world[ii];\n y1 = world[ii + 1];\n cx1 = world[ii + 2];\n cy1 = world[ii + 3];\n cx2 = world[ii + 4];\n cy2 = world[ii + 5];\n x2 = world[ii + 6];\n y2 = world[ii + 7];\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\n ddfx = tmpx * 2 + dddfx;\n ddfy = tmpy * 2 + dddfy;\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\n segments[0] = curveLength;\n for (ii = 1; ii < 8; ii++) {\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[ii] = curveLength;\n }\n dfx += ddfx;\n dfy += ddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[8] = curveLength;\n dfx += ddfx + dddfx;\n dfy += ddfy + dddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[9] = curveLength;\n segment = 0;\n }\n\n // Weight by segment length.\n p *= curveLength;\n for (;; segment++) {\n let length = segments[segment];\n if (p > length) continue;\n if (segment == 0)\n p /= length;\n else {\n let prev = segments[segment - 1];\n p = segment + (p - prev) / (length - prev);\n }\n break;\n }\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\n }\n return out;\n }\n\n addBeforePosition (p: number, temp: Array, i: number, out: Array, o: number) {\n let x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\n out[o] = x1 + p * Math.cos(r);\n out[o + 1] = y1 + p * Math.sin(r);\n out[o + 2] = r;\n }\n\n addAfterPosition (p: number, temp: Array, i: number, out: Array, o: number) {\n let x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\n out[o] = x1 + p * Math.cos(r);\n out[o + 1] = y1 + p * Math.sin(r);\n out[o + 2] = r;\n }\n\n addCurvePosition (p: number, x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number,\n out: Array, o: number, tangents: boolean) {\n if (p == 0 || isNaN(p)) p = 0.0001;\n let tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\n let ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\n let x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\n out[o] = x;\n out[o + 1] = y;\n if (tangents) out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\n }\n\n getOrder () {\n return this.data.order;\n }\n}\n","import {BoneData} from \"./BoneData\";\nimport {SlotData} from \"./SlotData\";\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\nexport class PathConstraintData {\n name: string;\n order = 0;\n bones = new Array();\n target: SlotData;\n positionMode: PositionMode;\n spacingMode: SpacingMode;\n rotateMode: RotateMode;\n offsetRotation: number;\n position: number; spacing: number; rotateMix: number; translateMix: number;\n\n constructor (name: string) {\n this.name = name;\n }\n}\n\nexport enum PositionMode {\n Fixed, Percent\n}\n\nexport enum SpacingMode {\n Length, Fixed, Percent\n}\n\nexport enum RotateMode {\n Tangent, Chain, ChainScale\n}\n","import {Slot} from \"./Slot\";\nimport {Bone} from \"./Bone\";\nimport {IkConstraint} from \"./IkConstraint\";\nimport {TransformConstraint} from \"./TransformConstraint\";\nimport {PathConstraint} from \"./PathConstraint\";\nimport {Color, Utils, Vector2} from \"./Utils\";\nimport {Skin} from \"./Skin\";\nimport {SkeletonData} from \"./SkeletonData\";\nimport {Updatable} from \"./Updatable\";\nimport {Attachment, PathAttachment, RegionAttachment, MeshAttachment} from \"./attachments\";\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\nexport class Skeleton {\n data: SkeletonData;\n bones: Array;\n slots: Array;\n drawOrder: Array;\n ikConstraints: Array;\n transformConstraints: Array;\n pathConstraints: Array;\n _updateCache = new Array();\n updateCacheReset = new Array();\n skin: Skin;\n color: Color;\n time = 0;\n flipX = false; flipY = false;\n x = 0; y = 0;\n\n constructor (data: SkeletonData) {\n if (data == null) throw new Error(\"data cannot be null.\");\n this.data = data;\n\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++) {\n let boneData = data.bones[i];\n let bone: Bone;\n if (boneData.parent == null)\n bone = new Bone(boneData, this, null);\n else {\n let parent = this.bones[boneData.parent.index];\n bone = new Bone(boneData, this, parent);\n parent.children.push(bone);\n }\n this.bones.push(bone);\n }\n\n this.slots = new Array();\n this.drawOrder = new Array();\n for (let i = 0; i < data.slots.length; i++) {\n let slotData = data.slots[i];\n let bone = this.bones[slotData.boneData.index];\n let slot = new Slot(slotData, bone);\n this.slots.push(slot);\n this.drawOrder.push(slot);\n }\n\n this.ikConstraints = new Array();\n for (let i = 0; i < data.ikConstraints.length; i++) {\n let ikConstraintData = data.ikConstraints[i];\n this.ikConstraints.push(new IkConstraint(ikConstraintData, this));\n }\n\n this.transformConstraints = new Array();\n for (let i = 0; i < data.transformConstraints.length; i++) {\n let transformConstraintData = data.transformConstraints[i];\n this.transformConstraints.push(new TransformConstraint(transformConstraintData, this));\n }\n\n this.pathConstraints = new Array();\n for (let i = 0; i < data.pathConstraints.length; i++) {\n let pathConstraintData = data.pathConstraints[i];\n this.pathConstraints.push(new PathConstraint(pathConstraintData, this));\n }\n\n this.color = new Color(1, 1, 1, 1);\n this.updateCache();\n }\n\n updateCache () {\n let updateCache = this._updateCache;\n updateCache.length = 0;\n\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++)\n bones[i].sorted = false;\n\n let ikConstraints = this.ikConstraints;\n let transformConstraints = this.transformConstraints;\n let pathConstraints = this.pathConstraints;\n let ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\n let constraintCount = ikCount + transformCount + pathCount;\n\n outer:\n for (let i = 0; i < constraintCount; i++) {\n for (let ii = 0; ii < ikCount; ii++) {\n let constraint = ikConstraints[ii];\n if (constraint.data.order == i) {\n this.sortIkConstraint(constraint);\n continue outer;\n }\n }\n for (let ii = 0; ii < transformCount; ii++) {\n let constraint = transformConstraints[ii];\n if (constraint.data.order == i) {\n this.sortTransformConstraint(constraint);\n continue outer;\n }\n }\n for (let ii = 0; ii < pathCount; ii++) {\n let constraint = pathConstraints[ii];\n if (constraint.data.order == i) {\n this.sortPathConstraint(constraint);\n continue outer;\n }\n }\n }\n\n for (let i = 0, n = bones.length; i < n; i++)\n this.sortBone(bones[i]);\n }\n\n sortIkConstraint (constraint: IkConstraint) {\n let target = constraint.target;\n this.sortBone(target);\n\n let constrained = constraint.bones;\n let parent = constrained[0];\n this.sortBone(parent);\n\n if (constrained.length > 1) {\n let child = constrained[constrained.length - 1];\n if (!(this._updateCache.indexOf(child) > -1)) this.updateCacheReset.push(child);\n }\n\n this._updateCache.push(constraint);\n\n this.sortReset(parent.children);\n constrained[constrained.length - 1].sorted = true;\n }\n\n sortPathConstraint (constraint: PathConstraint) {\n let slot = constraint.target;\n let slotIndex = slot.data.index;\n let slotBone = slot.bone;\n if (this.skin != null) this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\n if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\n for (let ii = 0, nn = this.data.skins.length; ii < nn; ii++)\n this.sortPathConstraintAttachment(this.data.skins[ii], slotIndex, slotBone);\n\n let attachment = slot.getAttachment();\n if (attachment instanceof PathAttachment) this.sortPathConstraintAttachmentWith(attachment, slotBone);\n\n let constrained = constraint.bones;\n let boneCount = constrained.length;\n for (let ii = 0; ii < boneCount; ii++)\n this.sortBone(constrained[ii]);\n\n this._updateCache.push(constraint);\n\n for (let ii = 0; ii < boneCount; ii++)\n this.sortReset(constrained[ii].children);\n for (let ii = 0; ii < boneCount; ii++)\n constrained[ii].sorted = true;\n }\n\n sortTransformConstraint (constraint: TransformConstraint) {\n this.sortBone(constraint.target);\n\n let constrained = constraint.bones;\n let boneCount = constrained.length;\n for (let ii = 0; ii < boneCount; ii++)\n this.sortBone(constrained[ii]);\n\n this._updateCache.push(constraint);\n\n for (let ii = 0; ii < boneCount; ii++)\n this.sortReset(constrained[ii].children);\n for (let ii = 0; ii < boneCount; ii++)\n constrained[ii].sorted = true;\n }\n\n sortPathConstraintAttachment (skin: Skin, slotIndex: number, slotBone: Bone) {\n let attachments = skin.attachments[slotIndex];\n if (!attachments) return;\n for (let key in attachments) {\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\n }\n }\n\n sortPathConstraintAttachmentWith (attachment: Attachment, slotBone: Bone) {\n if (!(attachment instanceof PathAttachment)) return;\n let pathBones = (attachment).bones;\n if (pathBones == null)\n this.sortBone(slotBone);\n else {\n let bones = this.bones;\n let i = 0;\n while (i < pathBones.length) {\n let boneCount = pathBones[i++];\n for (let n = i + boneCount; i < n; i++) {\n let boneIndex = pathBones[i];\n this.sortBone(bones[boneIndex]);\n }\n }\n }\n }\n\n sortBone (bone: Bone) {\n if (bone.sorted) return;\n let parent = bone.parent;\n if (parent != null) this.sortBone(parent);\n bone.sorted = true;\n this._updateCache.push(bone);\n }\n\n sortReset (bones: Array) {\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.sorted) this.sortReset(bone.children);\n bone.sorted = false;\n }\n }\n\n /** Updates the world transform for each bone and applies constraints. */\n updateWorldTransform () {\n let updateCacheReset = this.updateCacheReset;\n for (let i = 0, n = updateCacheReset.length; i < n; i++) {\n let bone = updateCacheReset[i] as Bone;\n bone.ax = bone.x;\n bone.ay = bone.y;\n bone.arotation = bone.rotation;\n bone.ascaleX = bone.scaleX;\n bone.ascaleY = bone.scaleY;\n bone.ashearX = bone.shearX;\n bone.ashearY = bone.shearY;\n bone.appliedValid = true;\n }\n let updateCache = this._updateCache;\n for (let i = 0, n = updateCache.length; i < n; i++)\n updateCache[i].update();\n }\n\n /** Sets the bones, constraints, and slots to their setup pose values. */\n setToSetupPose () {\n this.setBonesToSetupPose();\n this.setSlotsToSetupPose();\n }\n\n /** Sets the bones and constraints to their setup pose values. */\n setBonesToSetupPose () {\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++)\n bones[i].setToSetupPose();\n\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let constraint = ikConstraints[i];\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.mix = constraint.data.mix;\n }\n\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n let data = constraint.data;\n constraint.rotateMix = data.rotateMix;\n constraint.translateMix = data.translateMix;\n constraint.scaleMix = data.scaleMix;\n constraint.shearMix = data.shearMix;\n }\n\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n let data = constraint.data;\n constraint.position = data.position;\n constraint.spacing = data.spacing;\n constraint.rotateMix = data.rotateMix;\n constraint.translateMix = data.translateMix;\n }\n }\n\n setSlotsToSetupPose () {\n let slots = this.slots;\n Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\n for (let i = 0, n = slots.length; i < n; i++)\n slots[i].setToSetupPose();\n }\n\n /** @return May return null. */\n getRootBone () {\n if (this.bones.length == 0) return null;\n return this.bones[0];\n }\n\n /** @return May be null. */\n findBone (boneName: string) {\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.data.name == boneName) return bone;\n }\n return null;\n }\n\n /** @return -1 if the bone was not found. */\n findBoneIndex (boneName: string) {\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++)\n if (bones[i].data.name == boneName) return i;\n return -1;\n }\n\n /** @return May be null. */\n findSlot (slotName: string) {\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.data.name == slotName) return slot;\n }\n return null;\n }\n\n /** @return -1 if the bone was not found. */\n findSlotIndex (slotName: string) {\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++)\n if (slots[i].data.name == slotName) return i;\n return -1;\n }\n\n /** Sets a skin by name.\n * @see #setSkin(Skin) */\n setSkinByName (skinName: string) {\n let skin = this.data.findSkin(skinName);\n if (skin == null) throw new Error(\"Skin not found: \" + skinName);\n this.setSkin(skin);\n }\n\n /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default skin}.\n * Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no\n * old skin, each slot's setup mode attachment is attached from the new skin.\n * @param newSkin May be null. */\n setSkin (newSkin: Skin) {\n if (newSkin != null) {\n if (this.skin != null)\n newSkin.attachAll(this, this.skin);\n else {\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n let name = slot.data.attachmentName;\n if (name != null) {\n let attachment: Attachment = newSkin.getAttachment(i, name);\n if (attachment != null) slot.setAttachment(attachment);\n }\n }\n }\n }\n this.skin = newSkin;\n }\n\n /** @return May be null. */\n getAttachmentByName (slotName: string, attachmentName: string): Attachment {\n return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\n }\n\n /** @return May be null. */\n getAttachment (slotIndex: number, attachmentName: string): Attachment {\n if (attachmentName == null) throw new Error(\"attachmentName cannot be null.\");\n if (this.skin != null) {\n let attachment: Attachment = this.skin.getAttachment(slotIndex, attachmentName);\n if (attachment != null) return attachment;\n }\n if (this.data.defaultSkin != null) return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\n return null;\n }\n\n /** @param attachmentName May be null. */\n setAttachment (slotName: string, attachmentName: string) {\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.data.name == slotName) {\n let attachment: Attachment = null;\n if (attachmentName != null) {\n attachment = this.getAttachment(i, attachmentName);\n if (attachment == null)\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\n }\n slot.setAttachment(attachment);\n return;\n }\n }\n throw new Error(\"Slot not found: \" + slotName);\n }\n\n /** @return May be null. */\n findIkConstraint (constraintName: string) {\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let ikConstraint = ikConstraints[i];\n if (ikConstraint.data.name == constraintName) return ikConstraint;\n }\n return null;\n }\n\n /** @return May be null. */\n findTransformConstraint (constraintName: string) {\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n if (constraint.data.name == constraintName) return constraint;\n }\n return null;\n }\n\n /** @return May be null. */\n findPathConstraint (constraintName: string) {\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n if (constraint.data.name == constraintName) return constraint;\n }\n return null;\n }\n\n /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\n * @param offset The distance from the skeleton origin to the bottom left corner of the AABB.\n * @param size The width and height of the AABB. */\n getBounds (offset: Vector2, size: Vector2) {\n if (offset == null) throw new Error(\"offset cannot be null.\");\n if (size == null) throw new Error(\"size cannot be null.\");\n let drawOrder = this.drawOrder;\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let slot = drawOrder[i];\n let vertices: ArrayLike = null;\n let attachment = slot.getAttachment();\n if (attachment instanceof RegionAttachment)\n vertices = (attachment).updateWorldVertices(slot, false);\n else if (attachment instanceof MeshAttachment) //\n vertices = (attachment).updateWorldVertices(slot, true);\n if (vertices != null) {\n for (let ii = 0, nn = vertices.length; ii < nn; ii += 8) {\n let x = vertices[ii], y = vertices[ii + 1];\n minX = Math.min(minX, x);\n minY = Math.min(minY, y);\n maxX = Math.max(maxX, x);\n maxY = Math.max(maxY, y);\n }\n }\n }\n offset.set(minX, minY);\n size.set(maxX - minX, maxY - minY);\n }\n\n update (delta: number) {\n this.time += delta;\n }\n}\n","import {Utils, Pool} from \"./Utils\";\r\nimport {Skeleton} from \"./Skeleton\";\r\nimport {BoundingBoxAttachment} from \"./attachments\";\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\nexport 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 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, polygon);\r\n }\r\n }\r\n\r\n if (updateAabb) this.aabbCompute();\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","import {BoneData} from \"./BoneData\";\nimport {SlotData} from \"./SlotData\";\nimport {Skin} from \"./Skin\";\nimport {EventData} from \"./EventData\";\nimport {Animation} from \"./Animation\";\nimport {IkConstraintData} from \"./IkConstraintData\";\nimport {TransformConstraintData} from \"./TransformConstraintData\";\nimport {PathConstraintData} from \"./PathConstraintData\";\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\nexport class SkeletonData {\n name: string;\n bones = new Array(); // Ordered parents first.\n slots = new Array(); // Setup pose draw order.\n skins = new Array();\n defaultSkin: Skin;\n events = new Array();\n animations = new Array();\n ikConstraints = new Array();\n transformConstraints = new Array();\n pathConstraints = new Array();\n width: number; height: number;\n version: string; hash: string;\n\n // Nonessential\n fps = 0;\n imagesPath: string;\n\n findBone (boneName: string) {\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.name == boneName) return bone;\n }\n return null;\n }\n\n findBoneIndex (boneName: string) {\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++)\n if (bones[i].name == boneName) return i;\n return -1;\n }\n\n findSlot (slotName: string) {\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.name == slotName) return slot;\n }\n return null;\n }\n\n findSlotIndex (slotName: string) {\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++)\n if (slots[i].name == slotName) return i;\n return -1;\n }\n\n findSkin (skinName: string) {\n if (skinName == null) throw new Error(\"skinName cannot be null.\");\n let skins = this.skins;\n for (let i = 0, n = skins.length; i < n; i++) {\n let skin = skins[i];\n if (skin.name == skinName) return skin;\n }\n return null;\n }\n\n findEvent (eventDataName: string) {\n if (eventDataName == null) throw new Error(\"eventDataName cannot be null.\");\n let events = this.events;\n for (let i = 0, n = events.length; i < n; i++) {\n let event = events[i];\n if (event.name == eventDataName) return event;\n }\n return null;\n }\n\n findAnimation (animationName: string) {\n if (animationName == null) throw new Error(\"animationName cannot be null.\");\n let animations = this.animations;\n for (let i = 0, n = animations.length; i < n; i++) {\n let animation = animations[i];\n if (animation.name == animationName) return animation;\n }\n return null;\n }\n\n findIkConstraint (constraintName: string) {\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let constraint = ikConstraints[i];\n if (constraint.name == constraintName) return constraint;\n }\n return null;\n }\n\n findTransformConstraint (constraintName: string) {\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n if (constraint.name == constraintName) return constraint;\n }\n return null;\n }\n\n findPathConstraint (constraintName: string) {\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n if (constraint.name == constraintName) return constraint;\n }\n return null;\n }\n\n findPathConstraintIndex (pathConstraintName: string) {\n if (pathConstraintName == null) throw new Error(\"pathConstraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++)\n if (pathConstraints[i].name == pathConstraintName) return i;\n return -1;\n }\n}\n","import {SkeletonData} from \"./SkeletonData\";\nimport {BoneData, TransformMode} from \"./BoneData\";\nimport {SlotData} from \"./SlotData\";\nimport {Event} from \"./Event\";\nimport {IkConstraintData} from \"./IkConstraintData\";\nimport {TransformConstraintData} from \"./TransformConstraintData\";\nimport {PathConstraintData, PositionMode, SpacingMode, RotateMode} from \"./PathConstraintData\";\nimport {Skin} from \"./Skin\";\nimport {EventData} from \"./EventData\";\nimport {Attachment, AttachmentLoader, MeshAttachment, VertexAttachment} from \"./attachments\";\nimport {Utils, Color, ArrayLike} from \"./Utils\";\nimport {\n Timeline, ColorTimeline, AttachmentTimeline, RotateTimeline, TranslateTimeline,\n ScaleTimeline, ShearTimeline, IkConstraintTimeline, TransformConstraintTimeline, PathConstraintPositionTimeline,\n PathConstraintSpacingTimeline, PathConstraintMixTimeline, DeformTimeline, DrawOrderTimeline, EventTimeline,\n Animation, CurveTimeline\n} from \"./Animation\";\nimport {BlendMode} from \"./BlendMode\";\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\nexport class SkeletonJson {\n attachmentLoader: AttachmentLoader;\n scale = 1;\n private linkedMeshes = new Array();\n\n constructor (attachmentLoader: AttachmentLoader) {\n this.attachmentLoader = attachmentLoader;\n }\n\n readSkeletonData (json: string | any ): SkeletonData {\n let scale = this.scale;\n let skeletonData = new SkeletonData();\n let root = typeof(json) === \"string\" ? JSON.parse(json) : json;\n\n // Skeleton\n let skeletonMap = root.skeleton;\n if (skeletonMap != null) {\n skeletonData.hash = skeletonMap.hash;\n skeletonData.version = skeletonMap.spine;\n skeletonData.width = skeletonMap.width;\n skeletonData.height = skeletonMap.height;\n skeletonData.fps = skeletonMap.fps;\n skeletonData.imagesPath = skeletonMap.images;\n }\n\n // Bones\n if (root.bones) {\n for (let i = 0; i < root.bones.length; i++) {\n let boneMap = root.bones[i];\n\n let parent: BoneData = null;\n let parentName: string = this.getValue(boneMap, \"parent\", null);\n if (parentName != null) {\n parent = skeletonData.findBone(parentName);\n if (parent == null) throw new Error(\"Parent bone not found: \" + parentName);\n }\n let data = new BoneData(skeletonData.bones.length, boneMap.name, parent);\n data.length = this.getValue(boneMap, \"length\", 0) * scale;\n data.x = this.getValue(boneMap, \"x\", 0) * scale;\n data.y = this.getValue(boneMap, \"y\", 0) * scale;\n data.rotation = this.getValue(boneMap, \"rotation\", 0);\n data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\n data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\n data.shearX = this.getValue(boneMap, \"shearX\", 0);\n data.shearY = this.getValue(boneMap, \"shearY\", 0);\n\n //this is legacy\n if (boneMap.hasOwnProperty(\"inheritScale\") || boneMap.hasOwnProperty(\"inheritRotation\")) {\n //before 3.5\n data.transformMode = SkeletonJson.transformModeLegacy(\n this.getValue(boneMap, \"inheritRotation\", true),\n this.getValue(boneMap, \"inheritScale\", true));\n } else {\n //after 3.5\n data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\n }\n\n skeletonData.bones.push(data);\n }\n }\n\n // Slots.\n if (root.slots) {\n for (let i = 0; i < root.slots.length; i++) {\n let slotMap = root.slots[i];\n let slotName: string = slotMap.name;\n let boneName: string = slotMap.bone;\n let boneData = skeletonData.findBone(boneName);\n if (boneData == null) throw new Error(\"Slot bone not found: \" + boneName);\n let data = new SlotData(skeletonData.slots.length, slotName, boneData);\n\n let color: string = this.getValue(slotMap, \"color\", null);\n if (color != null) data.color.setFromString(color);\n\n data.attachmentName = this.getValue(slotMap, \"attachment\", null);\n data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\n skeletonData.slots.push(data);\n }\n }\n\n // IK constraints\n if (root.ik) {\n for (let i = 0; i < root.ik.length; i++) {\n let constraintMap = root.ik[i];\n let data = new IkConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n\n for (let j = 0; j < constraintMap.bones.length; j++) {\n let boneName = constraintMap.bones[j];\n let bone = skeletonData.findBone(boneName);\n if (bone == null) throw new Error(\"IK bone not found: \" + boneName);\n data.bones.push(bone);\n }\n\n let targetName: string = constraintMap.target;\n data.target = skeletonData.findBone(targetName);\n if (data.target == null) throw new Error(\"IK target bone not found: \" + targetName);\n\n data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\n data.mix = this.getValue(constraintMap, \"mix\", 1);\n\n skeletonData.ikConstraints.push(data);\n }\n }\n\n // Transform constraints.\n if (root.transform) {\n for (let i = 0; i < root.transform.length; i++) {\n let constraintMap = root.transform[i];\n let data = new TransformConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n\n for (let j = 0; j < constraintMap.bones.length; j++) {\n let boneName = constraintMap.bones[j];\n let bone = skeletonData.findBone(boneName);\n if (bone == null) throw new Error(\"Transform constraint bone not found: \" + boneName);\n data.bones.push(bone);\n }\n\n let targetName: string = constraintMap.target;\n data.target = skeletonData.findBone(targetName);\n if (data.target == null) throw new Error(\"Transform constraint target bone not found: \" + targetName);\n\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\n data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\n data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\n data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\n data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\n data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\n\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\n data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\n data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\n\n skeletonData.transformConstraints.push(data);\n }\n }\n\n // Path constraints.\n if (root.path) {\n for (let i = 0; i < root.path.length; i++) {\n let constraintMap = root.path[i];\n let data = new PathConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n\n for (let j = 0; j < constraintMap.bones.length; j++) {\n let boneName = constraintMap.bones[j];\n let bone = skeletonData.findBone(boneName);\n if (bone == null) throw new Error(\"Transform constraint bone not found: \" + boneName);\n data.bones.push(bone);\n }\n\n let targetName: string = constraintMap.target;\n data.target = skeletonData.findSlot(targetName);\n if (data.target == null) throw new Error(\"Path target slot not found: \" + targetName);\n\n data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\n data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\n data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\n data.position = this.getValue(constraintMap, \"position\", 0);\n if (data.positionMode == PositionMode.Fixed) data.position *= scale;\n data.spacing = this.getValue(constraintMap, \"spacing\", 0);\n if (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) data.spacing *= scale;\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\n\n skeletonData.pathConstraints.push(data);\n }\n }\n\n // Skins.\n if (root.skins) {\n for (let skinName in root.skins) {\n let skinMap = root.skins[skinName]\n let skin = new Skin(skinName);\n for (let slotName in skinMap) {\n let slotIndex = skeletonData.findSlotIndex(slotName);\n if (slotIndex == -1) throw new Error(\"Slot not found: \" + slotName);\n let slotMap = skinMap[slotName];\n for (let entryName in slotMap) {\n let attachment = this.readAttachment(slotMap[entryName], skin, slotIndex, entryName);\n if (attachment != null) skin.addAttachment(slotIndex, entryName, attachment);\n }\n }\n skeletonData.skins.push(skin);\n if (skin.name == \"default\") skeletonData.defaultSkin = skin;\n }\n }\n\n // Linked meshes.\n for (let i = 0, n = this.linkedMeshes.length; i < n; i++) {\n let linkedMesh = this.linkedMeshes[i];\n let skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (skin == null) throw new Error(\"Skin not found: \" + linkedMesh.skin);\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (parent == null) throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\n linkedMesh.mesh.setParentMesh( parent);\n // linkedMesh.mesh.updateUVs();\n }\n this.linkedMeshes.length = 0;\n\n // Events.\n if (root.events) {\n for (let eventName in root.events) {\n let eventMap = root.events[eventName];\n let data = new EventData(eventName);\n data.intValue = this.getValue(eventMap, \"int\", 0);\n data.floatValue = this.getValue(eventMap, \"float\", 0);\n data.stringValue = this.getValue(eventMap, \"string\", null);\n skeletonData.events.push(data);\n }\n }\n\n // Animations.\n if (root.animations) {\n for (let animationName in root.animations) {\n let animationMap = root.animations[animationName];\n this.readAnimation(animationMap, animationName, skeletonData);\n }\n }\n\n return skeletonData;\n }\n\n readAttachment (map: any, skin: Skin, slotIndex: number, name: string): Attachment {\n let scale = this.scale;\n name = this.getValue(map, \"name\", name);\n\n let type = this.getValue(map, \"type\", \"region\");\n\n switch (type) {\n case \"region\": {\n let path = this.getValue(map, \"path\", name);\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path);\n if (region == null) return null;\n region.path = path;\n region.x = this.getValue(map, \"x\", 0) * scale;\n region.y = this.getValue(map, \"y\", 0) * scale;\n region.scaleX = this.getValue(map, \"scaleX\", 1);\n region.scaleY = this.getValue(map, \"scaleY\", 1);\n region.rotation = this.getValue(map, \"rotation\", 0);\n region.width = map.width * scale;\n region.height = map.height * scale;\n\n let color: string = this.getValue(map, \"color\", null);\n if (color != null) region.color.setFromString(color);\n\n return region;\n }\n case \"boundingbox\": {\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (box == null) return null;\n this.readVertices(map, box, map.vertexCount << 1);\n let color: string = this.getValue(map, \"color\", null);\n if (color != null) box.color.setFromString(color);\n return box;\n }\n //weightedmesh is deprecated but who cares\n case \"weightedmesh\":\n case \"skinnedmesh\":\n case \"mesh\":\n case \"linkedmesh\": {\n let path = this.getValue(map, \"path\", name);\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\n if (mesh == null) return null;\n mesh.path = path;\n\n let color = this.getValue(map, \"color\", null);\n if (color != null) mesh.color.setFromString(color);\n\n let parent: string = this.getValue(map, \"parent\", null);\n if (parent != null) {\n mesh.inheritDeform = this.getValue(map, \"deform\", true);\n this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent));\n return mesh;\n }\n\n let uvs: Array = map.uvs;\n this.readVertices(map, mesh, uvs.length);\n mesh.triangles = map.triangles;\n mesh.regionUVs = uvs;\n // mesh.updateUVs();\n\n mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\n return mesh;\n }\n case \"path\": {\n let path = this.attachmentLoader.newPathAttachment(skin, name);\n if (path == null) return null;\n path.closed = this.getValue(map, \"closed\", false);\n path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\n\n let vertexCount = map.vertexCount;\n this.readVertices(map, path, vertexCount << 1);\n\n let lengths: Array = Utils.newArray(vertexCount / 3, 0);\n for (let i = 0; i < map.lengths.length; i++)\n lengths[i++] = map.lengths[i] * scale;\n path.lengths = lengths;\n\n let color: string = this.getValue(map, \"color\", null);\n if (color != null) path.color.setFromString(color);\n return path;\n }\n }\n return null;\n }\n\n readVertices (map: any, attachment: VertexAttachment, verticesLength: number) {\n let scale = this.scale;\n attachment.worldVerticesLength = verticesLength;\n let vertices: Array = map.vertices;\n if (verticesLength == vertices.length) {\n if (scale != 1) {\n for (let i = 0, n = vertices.length; i < n; i++)\n vertices[i] *= scale;\n }\n attachment.vertices = Utils.toFloatArray(vertices);\n return;\n }\n let weights = new Array();\n let bones = new Array();\n for (let i = 0, n = vertices.length; i < n;) {\n let boneCount = vertices[i++];\n bones.push(boneCount);\n for (let nn = i + boneCount * 4; i < nn; i += 4) {\n bones.push(vertices[i]);\n weights.push(vertices[i + 1] * scale);\n weights.push(vertices[i + 2] * scale);\n weights.push(vertices[i + 3]);\n }\n }\n attachment.bones = bones;\n attachment.vertices = Utils.toFloatArray(weights);\n }\n\n readAnimation (map: any, name: string, skeletonData: SkeletonData) {\n let scale = this.scale;\n let timelines = new Array();\n let duration = 0;\n\n // Slot timelines.\n if (map.slots) {\n for (let slotName in map.slots) {\n let slotMap = map.slots[slotName];\n let slotIndex = skeletonData.findSlotIndex(slotName);\n if (slotIndex == -1) throw new Error(\"Slot not found: \" + slotName);\n for (let timelineName in slotMap) {\n let timelineMap = slotMap[timelineName];\n if (timelineName == \"color\") {\n let timeline = new ColorTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n let color = new Color();\n color.setFromString(valueMap.color);\n timeline.setFrame(frameIndex, valueMap.time, color.r, color.g, color.b, color.a);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * ColorTimeline.ENTRIES]);\n\n } else if (timelineName = \"attachment\") {\n let timeline = new AttachmentTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n timeline.setFrame(frameIndex++, valueMap.time, valueMap.name);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n } else\n throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\n }\n }\n }\n\n // Bone timelines.\n if (map.bones) {\n for (let boneName in map.bones) {\n let boneMap = map.bones[boneName];\n let boneIndex = skeletonData.findBoneIndex(boneName);\n if (boneIndex == -1) throw new Error(\"Bone not found: \" + boneName);\n for (let timelineName in boneMap) {\n let timelineMap = boneMap[timelineName];\n if (timelineName === \"rotate\") {\n let timeline = new RotateTimeline(timelineMap.length);\n timeline.boneIndex = boneIndex;\n\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, valueMap.time, valueMap.angle);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * RotateTimeline.ENTRIES]);\n\n } else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\n let timeline: TranslateTimeline = null;\n let timelineScale = 1;\n if (timelineName === \"scale\")\n timeline = new ScaleTimeline(timelineMap.length);\n else if (timelineName === \"shear\")\n timeline = new ShearTimeline(timelineMap.length);\n else {\n timeline = new TranslateTimeline(timelineMap.length);\n timelineScale = scale;\n }\n timeline.boneIndex = boneIndex;\n\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n let x = this.getValue(valueMap, \"x\", 0), y = this.getValue(valueMap, \"y\", 0);\n timeline.setFrame(frameIndex, valueMap.time, x * timelineScale, y * timelineScale);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * TranslateTimeline.ENTRIES]);\n\n } else\n throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\n }\n }\n }\n\n // IK constraint timelines.\n if (map.ik) {\n for (let constraintName in map.ik) {\n let constraintMap = map.ik[constraintName];\n let constraint = skeletonData.findIkConstraint(constraintName);\n let timeline = new IkConstraintTimeline(constraintMap.length);\n timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\n let frameIndex = 0;\n for (let i = 0; i < constraintMap.length; i++) {\n let valueMap = constraintMap[i];\n timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, \"mix\", 1),\n this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * IkConstraintTimeline.ENTRIES]);\n }\n }\n\n // Transform constraint timelines.\n if (map.transform) {\n for (let constraintName in map.transform) {\n let constraintMap = map.transform[constraintName];\n let constraint = skeletonData.findTransformConstraint(constraintName);\n let timeline = new TransformConstraintTimeline(constraintMap.length);\n timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\n let frameIndex = 0;\n for (let i = 0; i < constraintMap.length; i++) {\n let valueMap = constraintMap[i];\n timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, \"rotateMix\", 1),\n this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration,\n timeline.frames[(timeline.getFrameCount() - 1) * TransformConstraintTimeline.ENTRIES]);\n }\n }\n\n // Path constraint timelines.\n if (map.paths) {\n for (let constraintName in map.paths) {\n let constraintMap = map.paths[constraintName];\n let index = skeletonData.findPathConstraintIndex(constraintName);\n if (index == -1) throw new Error(\"Path constraint not found: \" + constraintName);\n let data = skeletonData.pathConstraints[index];\n for (let timelineName in constraintMap) {\n let timelineMap = constraintMap[timelineName];\n if (timelineName === \"position\" || timelineName === \"spacing\") {\n let timeline: PathConstraintPositionTimeline = null;\n let timelineScale = 1;\n if (timelineName === \"spacing\") {\n timeline = new PathConstraintSpacingTimeline(timelineMap.length);\n if (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) timelineScale = scale;\n } else {\n timeline = new PathConstraintPositionTimeline(timelineMap.length);\n if (data.positionMode == PositionMode.Fixed) timelineScale = scale;\n }\n timeline.pathConstraintIndex = index;\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, timelineName, 0) * timelineScale);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration,\n timeline.frames[(timeline.getFrameCount() - 1) * PathConstraintPositionTimeline.ENTRIES]);\n } else if (timelineName === \"mix\") {\n let timeline = new PathConstraintMixTimeline(timelineMap.length);\n timeline.pathConstraintIndex = index;\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, \"rotateMix\", 1),\n this.getValue(valueMap, \"translateMix\", 1));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration,\n timeline.frames[(timeline.getFrameCount() - 1) * PathConstraintMixTimeline.ENTRIES]);\n }\n }\n }\n }\n\n // Deform timelines.\n if (map.deform) {\n for (let deformName in map.deform) {\n let deformMap = map.deform[deformName];\n let skin = skeletonData.findSkin(deformName);\n if (skin == null) throw new Error(\"Skin not found: \" + deformName);\n for (let slotName in deformMap) {\n let slotMap = deformMap[slotName];\n let slotIndex = skeletonData.findSlotIndex(slotName);\n if (slotIndex == -1) throw new Error(\"Slot not found: \" + slotMap.name);\n for (let timelineName in slotMap) {\n let timelineMap = slotMap[timelineName];\n let attachment = skin.getAttachment(slotIndex, timelineName);\n if (attachment == null) throw new Error(\"Deform attachment not found: \" + timelineMap.name);\n let weighted = attachment.bones != null;\n let vertices = attachment.vertices;\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n\n let timeline = new DeformTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n timeline.attachment = attachment;\n\n let frameIndex = 0;\n for (let j = 0; j < timelineMap.length; j++) {\n let valueMap = timelineMap[j];\n let deform: ArrayLike;\n let verticesValue: Array = this.getValue(valueMap, \"vertices\", null);\n if (verticesValue == null)\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = Utils.newFloatArray(deformLength);\n let start = this.getValue(valueMap, \"offset\", 0);\n Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\n if (scale != 1) {\n for (let i = start, n = i + verticesValue.length; i < n; i++)\n deform[i] *= scale;\n }\n if (!weighted) {\n for (let i = 0; i < deformLength; i++)\n deform[i] += vertices[i];\n }\n }\n\n timeline.setFrame(frameIndex, valueMap.time, deform);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n }\n }\n }\n\n // Draw order timeline.\n let drawOrderNode = map.drawOrder;\n if (drawOrderNode == null) drawOrderNode = map.draworder;\n if (drawOrderNode != null) {\n let timeline = new DrawOrderTimeline(drawOrderNode.length);\n let slotCount = skeletonData.slots.length;\n let frameIndex = 0;\n for (let j = 0; j < drawOrderNode.length; j++) {\n let drawOrderMap = drawOrderNode[j];\n let drawOrder: Array = null;\n let offsets = this.getValue(drawOrderMap, \"offsets\", null);\n if (offsets != null) {\n drawOrder = Utils.newArray(slotCount, -1);\n let unchanged = Utils.newArray(slotCount - offsets.length, 0);\n let originalIndex = 0, unchangedIndex = 0;\n for (let i = 0; i < offsets.length; i++) {\n let offsetMap = offsets[i];\n let slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\n if (slotIndex == -1) throw new Error(\"Slot not found: \" + offsetMap.slot);\n // Collect unchanged items.\n while (originalIndex != slotIndex)\n unchanged[unchangedIndex++] = originalIndex++;\n // Set changed items.\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\n }\n // Collect remaining unchanged items.\n while (originalIndex < slotCount)\n unchanged[unchangedIndex++] = originalIndex++;\n // Fill in unchanged items.\n for (let i = slotCount - 1; i >= 0; i--)\n if (drawOrder[i] == -1) drawOrder[i] = unchanged[--unchangedIndex];\n }\n timeline.setFrame(frameIndex++, drawOrderMap.time, drawOrder);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n\n // Event timeline.\n if (map.events) {\n let timeline = new EventTimeline(map.events.length);\n let frameIndex = 0;\n for (let i = 0; i < map.events.length; i++) {\n let eventMap = map.events[i];\n let eventData = skeletonData.findEvent(eventMap.name);\n if (eventData == null) throw new Error(\"Event not found: \" + eventMap.name);\n let event = new Event(eventMap.time, eventData);\n event.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\n event.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\n event.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\n timeline.setFrame(frameIndex++, event);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n\n if (isNaN(duration)) {\n throw new Error(\"Error while parsing animation, duration is NaN\");\n }\n\n skeletonData.animations.push(new Animation(name, timelines, duration));\n }\n\n readCurve (map: any, timeline: CurveTimeline, frameIndex: number) {\n if (!map.curve) return;\n if (map.curve === \"stepped\")\n timeline.setStepped(frameIndex);\n else if (Object.prototype.toString.call(map.curve) === '[object Array]') {\n let curve: Array = map.curve;\n timeline.setCurve(frameIndex, curve[0], curve[1], curve[2], curve[3]);\n }\n }\n\n getValue (map: any, prop: string, defaultValue: any) {\n return map[prop] !== undefined ? map[prop] : defaultValue;\n }\n\n static blendModeFromString (str: string): number {\n if (str === 'multiply') return PIXI.BLEND_MODES.MULTIPLY;\n if (str === 'additive') return PIXI.BLEND_MODES.ADD;\n if (str === 'screen') return PIXI.BLEND_MODES.SCREEN;\n if (str === 'normal') return PIXI.BLEND_MODES.NORMAL;\n throw new Error(`Unknown blend mode: ${str}`);\n }\n\n static positionModeFromString (str: string) {\n str = str.toLowerCase();\n if (str == \"fixed\") return PositionMode.Fixed;\n if (str == \"percent\") return PositionMode.Percent;\n throw new Error(`Unknown position mode: ${str}`);\n }\n\n static spacingModeFromString (str: string) {\n str = str.toLowerCase();\n if (str == \"length\") return SpacingMode.Length;\n if (str == \"fixed\") return SpacingMode.Fixed;\n if (str == \"percent\") return SpacingMode.Percent;\n throw new Error(`Unknown position mode: ${str}`);\n }\n\n static rotateModeFromString (str: string) {\n str = str.toLowerCase();\n if (str == \"tangent\") return RotateMode.Tangent;\n if (str == \"chain\") return RotateMode.Chain;\n if (str == \"chainscale\") return RotateMode.ChainScale;\n throw new Error(`Unknown rotate mode: ${str}`);\n }\n\n static transformModeFromString(str: string) {\n str = str.toLowerCase();\n if (str == \"normal\") return TransformMode.Normal;\n if (str == \"onlytranslation\") return TransformMode.OnlyTranslation;\n if (str == \"norotationorreflection\") return TransformMode.NoRotationOrReflection;\n if (str == \"noscale\") return TransformMode.NoScale;\n if (str == \"noscaleorreflection\") return TransformMode.NoScaleOrReflection;\n throw new Error(`Unknown transform mode: ${str}`);\n }\n\n static transformModeLegacy(inheritRotation: boolean, inheritScale: boolean) {\n console.log(\"Deprecation Warning: re-export your model with spine 3.5, or downgrade to pixi-spine 1.1 branch. There were many breaking changes, place breakpoint here if you want to know which model is broken\");\n if (inheritRotation && inheritScale) {\n return TransformMode.Normal;\n } else if (inheritRotation) {\n return TransformMode.NoScaleOrReflection;\n } else if (inheritScale) {\n return TransformMode.NoRotationOrReflection;\n } else {\n return TransformMode.OnlyTranslation;\n }\n }\n}\n\nclass LinkedMesh {\n parent: string; skin: string;\n slotIndex: number;\n mesh: MeshAttachment;\n\n constructor (mesh: MeshAttachment, skin: string, slotIndex: number, parent: string) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n }\n}\n","import {Attachment} from \"./attachments\";\nimport {Skeleton} from \"./Skeleton\";\nimport {Map} from \"./Utils\";\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\nexport class Skin {\n name: string;\n attachments = new Array>();\n\n constructor (name: string) {\n if (name == null) throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n\n addAttachment (slotIndex: number, name: string, attachment: Attachment) {\n if (attachment == null) throw new Error(\"attachment cannot be null.\");\n let attachments = this.attachments;\n if (slotIndex >= attachments.length) attachments.length = slotIndex + 1;\n if (!attachments[slotIndex]) attachments[slotIndex] = { };\n attachments[slotIndex][name] = attachment;\n }\n\n /** @return May be null. */\n getAttachment (slotIndex: number, name: string): Attachment {\n let dictionary = this.attachments[slotIndex];\n return dictionary ? dictionary[name] : null;\n }\n\n /** Attach each attachment in this skin if the corresponding attachment in the old skin is currently attached. */\n attachAll (skeleton: Skeleton, oldSkin: Skin) {\n let slotIndex = 0;\n for (let i = 0; i < skeleton.slots.length; i++) {\n let slot = skeleton.slots[i];\n let slotAttachment = slot.getAttachment();\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\n let dictionary = oldSkin.attachments[slotIndex];\n for (let key in dictionary) {\n let skinAttachment:Attachment = dictionary[key];\n if (slotAttachment == skinAttachment) {\n let attachment = this.getAttachment(slotIndex, name);\n if (attachment != null) slot.setAttachment(attachment);\n break;\n }\n }\n }\n slotIndex++;\n }\n }\n}\n","import {Attachment} from \"./attachments\";\r\nimport {SlotData} from \"./SlotData\";\r\nimport {Bone} from \"./Bone\";\r\nimport {Color} from \"./Utils\";\r\nimport {TextureRegion} from \"./Texture\";\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\nexport class Slot {\r\n //this is for PIXI\r\n currentMesh: any;\r\n currentSprite: any;\r\n meshes: any;\r\n currentMeshName: String;\r\n sprites: any;\r\n currentSpriteName: String;\r\n blendMode: number;\r\n //assign hack region a bit later\r\n tempRegion: TextureRegion;\r\n tempAttachment: Attachment;\r\n\r\n //canon\r\n data: SlotData;\r\n bone: Bone;\r\n color: Color;\r\n attachment: Attachment;\r\n private attachmentTime: number;\r\n attachmentVertices = 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.blendMode = data.blendMode;\r\n this.setToSetupPose();\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.attachmentVertices.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.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","import {BoneData} from \"./BoneData\";\r\nimport {Color} from \"./Utils\";\r\nimport {BlendMode} from \"./BlendMode\";\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\nexport 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 attachmentName: string;\r\n blendMode: number;\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","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\nexport 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\nexport 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\nexport 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.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.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._uvs.x0;\r\n }\r\n\r\n get v(): number {\r\n return this.texture._uvs.y0;\r\n }\r\n\r\n get u2(): number {\r\n return this.texture._uvs.x2;\r\n }\r\n\r\n get v2(): number {\r\n return this.texture._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 var 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 var 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.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.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","import {Disposable, Map} from \"./Utils\";\r\nimport {Texture, TextureWrap, TextureRegion, TextureFilter} from \"./Texture\";\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\nexport 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 (var i=0;i, stripExtension: boolean) {\r\n for (var 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 page.baseTexture = texture;\r\n if (!texture.hasLoaded) {\r\n texture.width = page.width;\r\n texture.height = 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 rotate: number = reader.readValue() == \"true\" ? 6 : 0;\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 let frame = new PIXI.Rectangle(x, y, rotate ? height : width, rotate ? 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] == '4') {\r\n // pixi v4.0.0\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 var frame2 = new PIXI.Rectangle(x, y, width, height);\r\n var 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\nclass 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\nexport 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 = true;\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\nexport class TextureAtlasRegion extends TextureRegion {\r\n page: TextureAtlasPage;\r\n name: string;\r\n index: number;\r\n}\r\n","import {TransformConstraintData} from \"./TransformConstraintData\";\nimport {Bone} from \"./Bone\";\nimport {Vector2, MathUtils} from \"./Utils\";\nimport {Skeleton} from \"./Skeleton\";\nimport {Constraint} from \"./Constraint\";\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\nexport class TransformConstraint implements Constraint {\n data: TransformConstraintData;\n bones: Array;\n target: Bone;\n rotateMix = 0; translateMix = 0; scaleMix = 0; shearMix = 0;\n temp = new Vector2();\n\n constructor (data: TransformConstraintData, skeleton: Skeleton) {\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.rotateMix = data.rotateMix;\n this.translateMix = data.translateMix;\n this.scaleMix = data.scaleMix;\n this.shearMix = data.shearMix;\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findBone(data.target.name);\n }\n\n apply () {\n this.update();\n }\n\n update () {\n let rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\n let target = this.target;\n let ta = target.matrix.a, tb = target.matrix.c, tc = target.matrix.b, td = target.matrix.d;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n let m = bone.matrix;\n let modified = false;\n\n if (rotateMix != 0) {\n let a = m.a, b = m.c, c = m.b, d = m.d;\n let r = Math.atan2(tc, ta) - Math.atan2(c, a) + this.data.offsetRotation * MathUtils.degRad;\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= rotateMix;\n let cos = Math.cos(r), sin = Math.sin(r);\n m.a = cos * a - sin * c;\n m.c = cos * b - sin * d;\n m.b = sin * a + cos * c;\n m.d = sin * b + cos * d;\n modified = true;\n }\n\n if (translateMix != 0) {\n let temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n m.tx += (temp.x - m.tx) * translateMix;\n m.ty += (temp.y - m.ty) * translateMix;\n modified = true;\n }\n\n if (scaleMix > 0) {\n let s = Math.sqrt(m.a * m.a + m.b * m.b);\n let ts = Math.sqrt(ta * ta + tc * tc);\n if (s > 0.00001) s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\n m.a *= s;\n m.b *= s;\n s = Math.sqrt(m.c * m.c + m.d * m.d);\n ts = Math.sqrt(tb * tb + td * td);\n if (s > 0.00001) s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\n m.c *= s;\n m.d *= s;\n modified = true;\n }\n\n if (shearMix > 0) {\n let b = m.c, d = m.d;\n let by = Math.atan2(d, b);\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(m.b, m.a));\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r = by + (r + this.data.offsetShearY * MathUtils.degRad) * shearMix;\n let s = Math.sqrt(b * b + d * d);\n m.c = Math.cos(r) * s;\n m.d = Math.sin(r) * s;\n modified = true;\n }\n\n if (modified) bone.appliedValid = false;\n }\n }\n\n getOrder () {\n return this.data.order;\n }\n}\n","import {BoneData} from \"./BoneData\";\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\nexport class TransformConstraintData {\n name: string;\n order = 0;\n bones = new Array();\n target: BoneData;\n rotateMix = 0; translateMix = 0; scaleMix = 0; shearMix = 0;\n offsetRotation = 0; offsetX = 0; offsetY = 0; offsetScaleX = 0; offsetScaleY = 0; offsetShearY = 0;\n\n constructor (name: string) {\n if (name == null) throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n}\n","import {Skeleton} from \"./Skeleton\";\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\nexport interface Map {\n [key: string]: T;\n}\n\nexport interface Disposable {\n dispose (): void;\n}\n\nexport class Color {\n public static WHITE = new Color(1, 1, 1, 1);\n public static RED = new Color(1, 0, 0, 1);\n public static GREEN = new Color(0, 1, 0, 1);\n public static BLUE = new Color(0, 0, 1, 1);\n public static MAGENTA = new Color(1, 0, 1, 1);\n\n constructor (public r: number = 0, public g: number = 0, public b: number = 0, public a: number = 0) {\n }\n\n set (r: number, g: number, b: number, a: number) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n this.clamp();\n return this;\n }\n\n setFromColor (c: Color) {\n this.r = c.r;\n this.g = c.g;\n this.b = c.b;\n this.a = c.a;\n return this;\n }\n\n setFromString (hex: string) {\n hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\n this.r = parseInt(hex.substr(0, 2), 16) / 255.0;\n this.g = parseInt(hex.substr(2, 2), 16) / 255.0;\n this.b = parseInt(hex.substr(4, 2), 16) / 255.0;\n this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\n return this;\n }\n\n add (r: number, g: number, b: number, a: number) {\n this.r += r;\n this.g += g;\n this.b += b;\n this.a += a;\n this.clamp();\n return this;\n }\n\n clamp () {\n if (this.r < 0) this.r = 0;\n else if (this.r > 1) this.r = 1;\n\n if (this.g < 0) this.g = 0;\n else if (this.g > 1) this.g = 1;\n\n if (this.b < 0) this.b = 0;\n else if (this.b > 1) this.b = 1;\n\n if (this.a < 0) this.a = 0;\n else if (this.a > 1) this.a = 1;\n return this;\n }\n}\n\nexport class MathUtils {\n static PI = 3.1415927;\n static PI2 = MathUtils.PI * 2;\n static radiansToDegrees = 180 / MathUtils.PI;\n static radDeg = MathUtils.radiansToDegrees;\n static degreesToRadians = MathUtils.PI / 180;\n static degRad = MathUtils.degreesToRadians;\n\n static clamp (value: number, min: number, max: number) {\n if (value < min) return min;\n if (value > max) return max;\n return value;\n }\n\n static cosDeg (degrees: number) {\n return Math.cos(degrees * MathUtils.degRad);\n }\n\n static sinDeg (degrees: number) {\n return Math.sin(degrees * MathUtils.degRad);\n }\n\n static signum (value: number): number {\n return value >= 0 ? 1 : -1;\n }\n\n static toInt (x: number) {\n return x > 0 ? Math.floor(x) : Math.ceil(x);\n }\n\n static cbrt (x: number) {\n var y = Math.pow(Math.abs(x), 1/3);\n return x < 0 ? -y : y;\n }\n}\n\nexport class Utils {\n static SUPPORTS_TYPED_ARRAYS = typeof(Float32Array) !== \"undefined\";\n\n static arrayCopy (source: ArrayLike, sourceStart: number, dest: ArrayLike, destStart: number, numElements: number) {\n for (let i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\n dest[j] = source[i];\n }\n }\n\n static setArraySize (array: Array, size: number, value: any = 0): Array {\n let oldSize = array.length;\n if (oldSize == size) return array;\n array.length = size;\n if (oldSize < size) {\n for (let i = oldSize; i < size; i++) array[i] = value;\n }\n return array;\n }\n\n static newArray (size: number, defaultValue: T): Array {\n let array = new Array(size);\n for (let i = 0; i < size; i++) array[i] = defaultValue;\n return array;\n }\n\n static newFloatArray (size: number): ArrayLike {\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\n return new Float32Array(size)\n } else {\n let array = new Array(size);\n for (let i = 0; i < array.length; i++) array[i] = 0;\n return array;\n }\n }\n\n static toFloatArray (array: Array) {\n return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\n }\n}\n\nexport class DebugUtils {\n static logBones(skeleton: Skeleton) {\n for (let i = 0; i < skeleton.bones.length; i++) {\n let bone = skeleton.bones[i];\n let m = bone.matrix;\n console.log(bone.data.name + \", \" + m.a + \", \" + m.b + \", \" + m.c + \", \" + m.d + \", \" + m.tx + \", \" + m.ty);\n }\n }\n}\n\nexport class Pool {\n private items = new Array();\n private instantiator: () => T;\n\n constructor (instantiator: () => T) {\n this.instantiator = instantiator;\n }\n\n obtain () {\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\n }\n\n free (item: T) {\n this.items.push(item);\n }\n\n freeAll (items: ArrayLike) {\n for (let i = 0; i < items.length; i++) this.items[i] = items[i];\n }\n\n clear () {\n this.items.length = 0;\n }\n}\n\nexport class Vector2 {\n constructor (public x = 0, public y = 0) {\n }\n\n set (x: number, y: number): Vector2 {\n this.x = x;\n this.y = y;\n return this;\n }\n\n length () {\n let x = this.x;\n let y = this.y;\n return Math.sqrt(x * x + y * y);\n }\n\n normalize () {\n let len = this.length();\n if (len != 0) {\n this.x /= len;\n this.y /= len;\n }\n return this;\n }\n}\n\nexport class TimeKeeper {\n maxDelta = 0.064;\n framesPerSecond = 0;\n delta = 0;\n totalTime = 0;\n\n private lastTime = Date.now() / 1000;\n private frameCount = 0;\n private frameTime = 0;\n\n update () {\n var now = Date.now() / 1000;\n this.delta = now - this.lastTime;\n this.frameTime += this.delta;\n this.totalTime += this.delta;\n if (this.delta > this.maxDelta) this.delta = this.maxDelta;\n this.lastTime = now;\n\n this.frameCount++;\n if (this.frameTime > 1) {\n this.framesPerSecond = this.frameCount / this.frameTime;\n this.frameTime = 0;\n this.frameCount = 0;\n }\n }\n}\n\nexport interface ArrayLike {\n length: number;\n [n: number]: T;\n}\n","import {Slot} from \"../Slot\";\nimport {ArrayLike} from \"../Utils\";\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\nexport abstract class Attachment {\n name: string;\n\n constructor (name: string) {\n if (name == null) throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n}\n\nexport abstract class VertexAttachment extends Attachment {\n bones: Array;\n vertices: ArrayLike;\n worldVerticesLength = 0;\n\n constructor (name: string) {\n super(name);\n }\n\n computeWorldVertices (slot: Slot, worldVertices: ArrayLike) {\n this.computeWorldVerticesWith(slot, 0, this.worldVerticesLength, worldVertices, 0);\n }\n\n /** Transforms local vertices to world coordinates.\n * @param start The index of the first local vertex value to transform. Each vertex has 2 values, x and y.\n * @param count The number of world vertex values to output. Must be <= {@link #getWorldVerticesLength()} - start.\n * @param worldVertices The output world vertices. Must have a length >= offset + count.\n * @param offset The worldVertices index to begin writing values. */\n computeWorldVerticesWith (slot: Slot, start: number, count: number, worldVertices: ArrayLike, offset: number) {\n count += offset;\n let skeleton = slot.bone.skeleton;\n let deformArray = slot.attachmentVertices;\n let vertices = this.vertices;\n let bones = this.bones;\n if (bones == null) {\n if (deformArray.length > 0) vertices = deformArray;\n let bone = slot.bone;\n let m = bone.matrix;\n let x = m.tx;\n let y = m.ty;\n let a = m.a, b = m.c, c = m.b, d = m.d;\n for (let v = start, w = offset; w < count; v += 2, w += 2) {\n let vx = vertices[v], vy = vertices[v + 1];\n worldVertices[w] = vx * a + vy * b + x;\n worldVertices[w + 1] = vx * c + vy * d + y;\n }\n return;\n }\n let v = 0, skip = 0;\n for (let i = 0; i < start; i += 2) {\n let n = bones[v];\n v += n + 1;\n skip += n;\n }\n let skeletonBones = skeleton.bones;\n if (deformArray.length == 0) {\n for (let w = offset, b = skip * 3; w < count; w += 2) {\n let wx = 0, wy = 0;\n let n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3) {\n let bone = skeletonBones[bones[v]];\n let m = bone.matrix;\n let vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\n wx += (vx * m.a + vy * m.c + m.tx) * weight;\n wy += (vx * m.b + vy * m.d + m.ty) * weight;\n }\n worldVertices[w] = wx;\n worldVertices[w + 1] = wy;\n }\n } else {\n let deform = deformArray;\n for (let w = offset, b = skip * 3, f = skip << 1; w < count; w += 2) {\n let wx = 0, wy = 0;\n let n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3, f += 2) {\n let bone = skeletonBones[bones[v]];\n let m = bone.matrix;\n let vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\n wx += (vx * m.a + vy * m.c + m.tx) * weight;\n wy += (vx * m.b + vy * m.d + m.ty) * weight;\n }\n worldVertices[w] = wx;\n worldVertices[w + 1] = wy;\n }\n }\n }\n\n /** Returns true if a deform originally applied to the specified attachment should be applied to this attachment. */\n applyDeform (sourceAttachment: VertexAttachment) {\n return this == sourceAttachment;\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\nexport enum AttachmentType {\r\n Region, BoundingBox, Mesh, LinkedMesh, Path\r\n}\r\n","import {VertexAttachment} from \"./Attachment\";\r\nimport {Color} from \"../Utils\";\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\nexport class BoundingBoxAttachment extends VertexAttachment {\r\n color = new Color(1, 1, 1, 1);\r\n\r\n constructor(name: string) {\r\n super(name);\r\n }\r\n}\r\n","import {VertexAttachment} from \"./Attachment\";\nimport {TextureRegion} from \"../Texture\";\nimport {Color, Utils, ArrayLike} from \"../Utils\";\nimport {Slot} from \"../Slot\";\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\nexport class MeshAttachment extends VertexAttachment {\n region: TextureRegion;\n path: string;\n regionUVs: ArrayLike;\n triangles: Array;\n color = new Color(1, 1, 1, 1);\n hullLength: number;\n private parentMesh: MeshAttachment;\n inheritDeform = false;\n tempColor = new Color(0, 0, 0, 0);\n\n constructor(name: string) {\n super(name);\n }\n\n updateWorldVertices(slot: Slot, premultipliedAlpha: boolean): ArrayLike {\n return [];\n //nothing\n }\n\n updateUVs(region: TextureRegion, uvs: ArrayLike): ArrayLike {\n let regionUVs = this.regionUVs;\n let n = regionUVs.length;\n if (!uvs || uvs.length != n) {\n uvs = Utils.newFloatArray(n);\n }\n\n if (region == null) {\n return;\n }\n\n let texture = region.texture;\n let r = texture._uvs;\n let w1 = region.width, h1 = region.height, w2 = region.originalWidth, h2 = region.originalHeight;\n let x = region.offsetX, y = region.pixiOffsetY;\n\n for (let i = 0; i < n; i += 2) {\n let u = this.regionUVs[i], v = this.regionUVs[i + 1];\n u = (u * w2 - x) / w1;\n v = (v * h2 - y) / h1;\n uvs[i] = (r.x0 * (1 - u) + r.x1 * u) * (1 - v) + (r.x3 * (1 - u) + r.x2 * u) * v;\n uvs[i + 1] = (r.y0 * (1 - u) + r.y1 * u) * (1 - v) + (r.y3 * (1 - u) + r.y2 * u) * v;\n }\n\n return uvs;\n }\n\n applyDeform(sourceAttachment: VertexAttachment): boolean {\n return this == sourceAttachment || (this.inheritDeform && this.parentMesh == sourceAttachment);\n }\n\n getParentMesh() {\n return this.parentMesh;\n }\n\n /** @param parentMesh May be null. */\n setParentMesh(parentMesh: MeshAttachment) {\n this.parentMesh = parentMesh;\n if (parentMesh != null) {\n this.bones = parentMesh.bones;\n this.vertices = parentMesh.vertices;\n this.regionUVs = parentMesh.regionUVs;\n this.triangles = parentMesh.triangles;\n this.hullLength = parentMesh.hullLength;\n }\n }\n}\n","import {VertexAttachment} from \"./Attachment\";\r\nimport {Color} from \"../Utils\";\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\nexport class PathAttachment extends VertexAttachment {\r\n lengths: Array;\r\n closed = false; constantSpeed = false;\r\n color = new Color(1, 1, 1, 1);\r\n\r\n constructor (name: string) {\r\n super(name);\r\n }\r\n}\r\n","import {Attachment} from \"./Attachment\";\r\nimport {Color, Utils} from \"../Utils\";\r\nimport {TextureRegion} from \"../Texture\";\r\nimport {Slot} from \"../Slot\";\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\nexport class RegionAttachment extends Attachment {\r\n x = 0; y = 0; scaleX = 1; scaleY = 1; rotation = 0; width = 0; height = 0;\r\n color = new Color(1, 1, 1, 1);\r\n\r\n path: string;\r\n region: TextureRegion;\r\n\r\n constructor (name:string) {\r\n super(name);\r\n }\r\n\r\n updateWorldVertices(slot: Slot, premultipliedAlpha: boolean): ArrayLike {\r\n return [];\r\n //nothing\r\n }\r\n}\r\n","export {Attachment, VertexAttachment} from \"./Attachment\";\r\nexport {AttachmentLoader} from \"./AttachmentLoader\";\r\nexport {AttachmentType} from \"./AttachmentType\";\r\nexport {BoundingBoxAttachment} from \"./BoundingBoxAttachment\";\r\nexport {MeshAttachment} from \"./MeshAttachment\";\r\nexport {PathAttachment} from \"./PathAttachment\";\r\nexport {RegionAttachment} from \"./RegionAttachment\";\r\n","export * from \"./attachments\";\n\nexport {\n Timeline, ColorTimeline, AttachmentTimeline, RotateTimeline, TranslateTimeline,\n ScaleTimeline, ShearTimeline, IkConstraintTimeline, TransformConstraintTimeline, PathConstraintPositionTimeline,\n PathConstraintSpacingTimeline, PathConstraintMixTimeline, DeformTimeline, DrawOrderTimeline, EventTimeline,\n Animation, CurveTimeline\n} from \"./Animation\";\nexport {AnimationState} from \"./AnimationState\";\nexport {AnimationStateData} from \"./AnimationStateData\";\nexport {BlendMode} from \"./BlendMode\";\nexport {Bone} from \"./Bone\";\nexport {BoneData, TransformMode} from \"./BoneData\";\nexport {Constraint} from \"./Constraint\";\nexport {Event} from \"./Event\";\nexport {EventData} from \"./EventData\";\nexport {IkConstraint} from \"./IkConstraint\";\nexport {IkConstraintData} from \"./IkConstraintData\";\nexport {PathConstraint} from \"./PathConstraint\";\nexport {PathConstraintData, SpacingMode, RotateMode, PositionMode} from \"./PathConstraintData\";\nexport {Skeleton} from \"./Skeleton\";\nexport {SkeletonBounds} from \"./SkeletonBounds\";\nexport {SkeletonData} from \"./SkeletonData\";\nexport {SkeletonJson} from \"./SkeletonJson\";\nexport {Skin} from \"./Skin\";\nexport {Slot} from \"./Slot\";\nexport {SlotData} from \"./SlotData\";\nexport {Texture, TextureWrap, TextureRegion, TextureFilter} from \"./Texture\";\nexport {TextureAtlas, TextureAtlasRegion} from \"./TextureAtlas\";\nexport {AtlasAttachmentLoader} from \"./AtlasAttachmentLoader\";\nexport {TransformConstraint} from \"./TransformConstraint\";\nexport {TransformConstraintData} from \"./TransformConstraintData\";\nexport {Updatable} from \"./Updatable\";\nexport {Disposable, Map, Utils, Pool, MathUtils, Color, Vector2} from \"./Utils\";\n","import * as spine from \"./core\";\n\nexport function atlasParser() {\n return function (resource: PIXI.loaders.Resource, next: () => any) {\n // skip if no data, its not json, or it isn't atlas data\n if (!resource.data || !resource.isJson || !resource.data.bones) {\n return next();\n }\n\n var metadataAtlas = resource.metadata ? resource.metadata.spineAtlas: null;\n if (metadataAtlas === false) {\n return next();\n }\n if (metadataAtlas && metadataAtlas.pages) {\n //its an atlas!\n var spineJsonParser = new spine.SkeletonJson(new spine.AtlasAttachmentLoader(metadataAtlas));\n var skeletonData = spineJsonParser.readSkeletonData(resource.data);\n\n resource.spineData = skeletonData;\n resource.spineAtlas = metadataAtlas;\n\n return next();\n }\n\n var metadataAtlasSuffix = '.atlas';\n if (resource.metadata && resource.metadata.spineAtlasSuffix) {\n metadataAtlasSuffix = resource.metadata.spineAtlasSuffix;\n }\n\n /**\n * use a bit of hackery to load the atlas file, here we assume that the .json, .atlas and .png files\n * that correspond to the spine file are in the same base URL and that the .json and .atlas files\n * have the same name\n */\n var atlasPath = resource.url.substr(0, resource.url.lastIndexOf('.')) + metadataAtlasSuffix;\n //remove the baseUrl\n atlasPath = atlasPath.replace(this.baseUrl, '');\n\n var atlasOptions = {\n crossOrigin: resource.crossOrigin,\n xhrType: PIXI.loaders.Resource.XHR_RESPONSE_TYPE.TEXT,\n metadata: resource.metadata ? resource.metadata.spineMetadata : null\n };\n var imageOptions = {\n crossOrigin: resource.crossOrigin,\n metadata: resource.metadata ? resource.metadata.imageMetadata: null\n };\n var baseUrl = resource.url.substr(0, resource.url.lastIndexOf('/') + 1);\n //remove the baseUrl\n baseUrl = baseUrl.replace(this.baseUrl, '');\n\n var adapter = imageLoaderAdapter(this, resource.name + '_atlas_page_', baseUrl, imageOptions);\n\n this.add(resource.name + '_atlas', atlasPath, atlasOptions, function () {\n new spine.TextureAtlas(this.xhr.responseText, adapter, function(spineAtlas) {\n var spineJsonParser = new spine.SkeletonJson(new spine.AtlasAttachmentLoader(spineAtlas));\n var skeletonData = spineJsonParser.readSkeletonData(resource.data);\n\n resource.spineData = skeletonData;\n resource.spineAtlas = spineAtlas;\n\n next();\n });\n });\n };\n}\n\nexport function imageLoaderAdapter(loader: any, namePrefix: any, baseUrl: any, imageOptions: any) {\n if (baseUrl && baseUrl.lastIndexOf('/') !== (baseUrl.length-1))\n {\n baseUrl += '/';\n }\n return function(line: String, callback: (baseTexture: PIXI.BaseTexture) => any) {\n var name = namePrefix + line;\n var url = baseUrl + line;\n loader.add(name, url, imageOptions, (resource: PIXI.loaders.Resource) => {\n callback(resource.texture.baseTexture);\n });\n }\n}\n\nexport function syncImageLoaderAdapter (baseUrl: any, crossOrigin: any) {\n if (baseUrl && baseUrl.lastIndexOf('/') !== (baseUrl.length-1))\n {\n baseUrl += '/';\n }\n return function(line: any, callback: any) {\n callback(PIXI.BaseTexture.fromImage(line, crossOrigin));\n }\n}\n\nPIXI.loaders.Loader.addPixiMiddleware(atlasParser);\nPIXI.loader.use(atlasParser());\n","import * as core from \"./core\";\r\nimport * as loaders from \"./loaders\";\r\n\r\nexport {core, loaders}\r\nexport {Spine, SpineMesh, SpineSprite} from \"./Spine\";\r\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/bin/pixi-spine.min.js b/bin/pixi-spine.min.js deleted file mode 100644 index 3cda40cb..00000000 --- a/bin/pixi-spine.min.js +++ /dev/null @@ -1,12 +0,0 @@ -/*! - * pixi-spine - v1.2.0 - * Compiled Wed Oct 19 2016 21:50:03 GMT+0300 (RTZ 2 (зима)) - * - * pixi-spine is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,(e.PIXI||(e.PIXI={})).spine=t()}}(function(){return function t(e,n,r){function a(o,s){if(!n[o]){if(!e[o]){var h="function"==typeof require&&require;if(!s&&h)return h(o,!0);if(i)return i(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[o]={exports:{}};e[o][0].call(u.exports,function(t){var n=e[o][1][t];return a(n?n:t)},u,u.exports,t,e,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o0&&(e%=this.duration));for(var i=this.timelines,o=0,s=i.length;o0&&(e%=this.duration));for(var o=this.timelines,s=0,h=o.length;s>>1;;){if(t[(i+1)*n]<=e?r=i+1:a=i,r==a)return(r+1)*n;i=r+a>>>1}},t.linearSearch=function(t,e,n){for(var r=0,a=t.length-n;r<=a;r+=n)if(t[r]>e)return r;return-1},t}();n.Animation=o;var s=function(){function t(e){if(e<=0)throw new Error("frameCount must be > 0: "+e);this.curves=a.Utils.newFloatArray((e-1)*t.BEZIER_SIZE)}return t.prototype.getFrameCount=function(){return this.curves.length/t.BEZIER_SIZE+1},t.prototype.setLinear=function(e){this.curves[e*t.BEZIER_SIZE]=t.LINEAR},t.prototype.setStepped=function(e){this.curves[e*t.BEZIER_SIZE]=t.STEPPED},t.prototype.getCurveType=function(e){var n=e*t.BEZIER_SIZE;if(n==this.curves.length)return t.LINEAR;var r=this.curves[n];return r==t.LINEAR?t.LINEAR:r==t.STEPPED?t.STEPPED:t.BEZIER},t.prototype.setCurve=function(e,n,r,a,i){var o=.03*(2*-n+a),s=.03*(2*-r+i),h=.006*(3*(n-a)+1),l=.006*(3*(r-i)+1),u=2*o+h,c=2*s+l,f=.3*n+o+.16666667*h,p=.3*r+s+.16666667*l,d=e*t.BEZIER_SIZE,m=this.curves;m[d++]=t.BEZIER;for(var g=f,v=p,y=d+t.BEZIER_SIZE-1;d=n){var u=void 0,c=void 0;return i==h?(u=0,c=0):(u=r[i-2],c=r[i-1]),c+(r[i+1]-c)*(n-u)/(s-u)}var f=r[i-1];return f+(1-f)*(n-s)/(1-s)},t.LINEAR=0,t.STEPPED=1,t.BEZIER=2,t.BEZIER_SIZE=19,t}();n.CurveTimeline=s;var h=function(t){function e(e){t.call(this,e),this.frames=a.Utils.newFloatArray(e<<1)}return r(e,t),e.prototype.setFrame=function(t,n,r){t<<=1,this.frames[t]=n,this.frames[t+e.ROTATION]=r},e.prototype.apply=function(t,n,r,a,i){var s=this.frames;if(!(r=s[s.length-e.ENTRIES]){for(var l=h.data.rotation+s[s.length+e.PREV_ROTATION]-h.rotation;l>180;)l-=360;for(;l<-180;)l+=360;return void(h.rotation+=l*i)}for(var u=o.binarySearch(s,r,e.ENTRIES),c=s[u+e.PREV_ROTATION],f=s[u],p=this.getCurvePercent((u>>1)-1,1-(r-f)/(s[u+e.PREV_TIME]-f)),d=s[u+e.ROTATION]-c;d>180;)d-=360;for(;d<-180;)d+=360;for(d=h.data.rotation+(c+d*p)-h.rotation;d>180;)d-=360;for(;d<-180;)d+=360;h.rotation+=d*i}},e.ENTRIES=2,e.PREV_TIME=-2,e.PREV_ROTATION=-1,e.ROTATION=1,e}(s);n.RotateTimeline=h;var l=function(t){function e(n){t.call(this,n),this.frames=a.Utils.newFloatArray(n*e.ENTRIES)}return r(e,t),e.prototype.setFrame=function(t,n,r,a){t*=e.ENTRIES,this.frames[t]=n,this.frames[t+e.X]=r,this.frames[t+e.Y]=a},e.prototype.apply=function(t,n,r,a,i){var s=this.frames;if(!(r=s[s.length-e.ENTRIES])return h.x+=(h.data.x+s[s.length+e.PREV_X]-h.x)*i,void(h.y+=(h.data.y+s[s.length+e.PREV_Y]-h.y)*i);var l=o.binarySearch(s,r,e.ENTRIES),u=s[l+e.PREV_X],c=s[l+e.PREV_Y],f=s[l],p=this.getCurvePercent(l/e.ENTRIES-1,1-(r-f)/(s[l+e.PREV_TIME]-f));h.x+=(h.data.x+u+(s[l+e.X]-u)*p-h.x)*i,h.y+=(h.data.y+c+(s[l+e.Y]-c)*p-h.y)*i}},e.ENTRIES=3,e.PREV_TIME=-3,e.PREV_X=-2,e.PREV_Y=-1,e.X=1,e.Y=2,e}(s);n.TranslateTimeline=l;var u=function(t){function e(e){t.call(this,e)}return r(e,t),e.prototype.apply=function(t,n,r,a,i){var s=this.frames;if(!(r=s[s.length-e.ENTRIES])return h.scaleX+=(h.data.scaleX*s[s.length+e.PREV_X]-h.scaleX)*i,void(h.scaleY+=(h.data.scaleY*s[s.length+e.PREV_Y]-h.scaleY)*i);var l=o.binarySearch(s,r,e.ENTRIES),u=s[l+e.PREV_X],c=s[l+e.PREV_Y],f=s[l],p=this.getCurvePercent(l/e.ENTRIES-1,1-(r-f)/(s[l+e.PREV_TIME]-f));h.scaleX+=(h.data.scaleX*(u+(s[l+e.X]-u)*p)-h.scaleX)*i,h.scaleY+=(h.data.scaleY*(c+(s[l+e.Y]-c)*p)-h.scaleY)*i}},e}(l);n.ScaleTimeline=u;var c=function(t){function e(e){t.call(this,e)}return r(e,t),e.prototype.apply=function(t,n,r,a,i){var s=this.frames;if(!(r=s[s.length-e.ENTRIES])return h.shearX+=(h.data.shearX+s[s.length+e.PREV_X]-h.shearX)*i,void(h.shearY+=(h.data.shearY+s[s.length+e.PREV_Y]-h.shearY)*i);var l=o.binarySearch(s,r,e.ENTRIES),u=s[l+e.PREV_X],c=s[l+e.PREV_Y],f=s[l],p=this.getCurvePercent(l/e.ENTRIES-1,1-(r-f)/(s[l+e.PREV_TIME]-f));h.shearX+=(h.data.shearX+(u+(s[l+e.X]-u)*p)-h.shearX)*i,h.shearY+=(h.data.shearY+(c+(s[l+e.Y]-c)*p)-h.shearY)*i}},e}(l);n.ShearTimeline=c;var f=function(t){function e(n){t.call(this,n),this.frames=a.Utils.newFloatArray(n*e.ENTRIES)}return r(e,t),e.prototype.setFrame=function(t,n,r,a,i,o){t*=e.ENTRIES,this.frames[t]=n,this.frames[t+e.R]=r,this.frames[t+e.G]=a,this.frames[t+e.B]=i,this.frames[t+e.A]=o},e.prototype.apply=function(t,n,r,a,i){var s=this.frames;if(!(r=s[s.length-e.ENTRIES]){var f=s.length;h=s[f+e.PREV_R],l=s[f+e.PREV_G],u=s[f+e.PREV_B],c=s[f+e.PREV_A]}else{var p=o.binarySearch(s,r,e.ENTRIES);h=s[p+e.PREV_R],l=s[p+e.PREV_G],u=s[p+e.PREV_B],c=s[p+e.PREV_A];var d=s[p],m=this.getCurvePercent(p/e.ENTRIES-1,1-(r-d)/(s[p+e.PREV_TIME]-d));h+=(s[p+e.R]-h)*m,l+=(s[p+e.G]-l)*m,u+=(s[p+e.B]-u)*m,c+=(s[p+e.A]-c)*m}var g=t.slots[this.slotIndex].color;i<1?g.add((h-g.r)*i,(l-g.g)*i,(u-g.b)*i,(c-g.a)*i):g.set(h,l,u,c)}},e.ENTRIES=5,e.PREV_TIME=-5,e.PREV_R=-4,e.PREV_G=-3,e.PREV_B=-2,e.PREV_A=-1,e.R=1,e.G=2,e.B=3,e.A=4,e}(s);n.ColorTimeline=f;var p=function(){function t(t){this.frames=a.Utils.newFloatArray(t),this.attachmentNames=new Array(t)}return t.prototype.getFrameCount=function(){return this.frames.length},t.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},t.prototype.apply=function(t,e,n,r,a){var i=this.frames;if(!(n=i[i.length-1]?i.length-1:o.binarySearch(i,n,1)-1;var h=this.attachmentNames[s];t.slots[this.slotIndex].setAttachment(null==h?null:t.getAttachment(this.slotIndex,h))}},t}();n.AttachmentTimeline=p;var d=function(){function t(t){this.frames=a.Utils.newFloatArray(t),this.events=new Array(t)}return t.prototype.getFrameCount=function(){return this.frames.length},t.prototype.setFrame=function(t,e){this.frames[t]=e.time,this.events[t]=e},t.prototype.apply=function(t,e,n,r,a){if(null!=r){var i=this.frames,s=this.frames.length;if(e>n)this.apply(t,e,Number.MAX_VALUE,r,a),e=-1;else if(e>=i[s-1])return;if(!(n0&&i[h-1]==l;)h--}for(;h=i[h];h++)r.push(this.events[h])}}},t}();n.EventTimeline=d;var m=function(){function t(t){this.frames=a.Utils.newFloatArray(t),this.drawOrders=new Array(t)}return t.prototype.getFrameCount=function(){return this.frames.length},t.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},t.prototype.apply=function(t,e,n,r,i){var s=this.frames;if(!(n=s[s.length-1]?s.length-1:o.binarySearch(s,n)-1;var l=t.drawOrder,u=t.slots,c=this.drawOrders[h];if(null==c)a.Utils.arrayCopy(u,0,l,0,u.length);else for(var f=0,p=c.length;f=u[u.length-1]){var m=c[u.length-1];if(s<1)for(var g=0;g=s[s.length-e.ENTRIES])return h.mix+=(s[s.length+e.PREV_MIX]-h.mix)*i,void(h.bendDirection=Math.floor(s[s.length+e.PREV_BEND_DIRECTION]));var l=o.binarySearch(s,r,e.ENTRIES),u=s[l+e.PREV_MIX],c=s[l],f=this.getCurvePercent(l/e.ENTRIES-1,1-(r-c)/(s[l+e.PREV_TIME]-c));h.mix+=(u+(s[l+e.MIX]-u)*f-h.mix)*i,h.bendDirection=Math.floor(s[l+e.PREV_BEND_DIRECTION])}},e.ENTRIES=3,e.PREV_TIME=-3,e.PREV_MIX=-2,e.PREV_BEND_DIRECTION=-1,e.MIX=1,e.BEND_DIRECTION=2,e}(s);n.IkConstraintTimeline=v;var y=function(t){function e(n){t.call(this,n),this.frames=a.Utils.newFloatArray(n*e.ENTRIES)}return r(e,t),e.prototype.setFrame=function(t,n,r,a,i,o){t*=e.ENTRIES,this.frames[t]=n,this.frames[t+e.ROTATE]=r,this.frames[t+e.TRANSLATE]=a,this.frames[t+e.SCALE]=i,this.frames[t+e.SHEAR]=o},e.prototype.apply=function(t,n,r,a,i){var s=this.frames;if(!(r=s[s.length-e.ENTRIES]){var l=s.length;return h.rotateMix+=(s[l+e.PREV_ROTATE]-h.rotateMix)*i,h.translateMix+=(s[l+e.PREV_TRANSLATE]-h.translateMix)*i,h.scaleMix+=(s[l+e.PREV_SCALE]-h.scaleMix)*i,void(h.shearMix+=(s[l+e.PREV_SHEAR]-h.shearMix)*i)}var u=o.binarySearch(s,r,e.ENTRIES),c=s[u],f=this.getCurvePercent(u/e.ENTRIES-1,1-(r-c)/(s[u+e.PREV_TIME]-c)),p=s[u+e.PREV_ROTATE],d=s[u+e.PREV_TRANSLATE],m=s[u+e.PREV_SCALE],g=s[u+e.PREV_SHEAR];h.rotateMix+=(p+(s[u+e.ROTATE]-p)*f-h.rotateMix)*i,h.translateMix+=(d+(s[u+e.TRANSLATE]-d)*f-h.translateMix)*i,h.scaleMix+=(m+(s[u+e.SCALE]-m)*f-h.scaleMix)*i,h.shearMix+=(g+(s[u+e.SHEAR]-g)*f-h.shearMix)*i}},e.ENTRIES=5,e.PREV_TIME=-5,e.PREV_ROTATE=-4,e.PREV_TRANSLATE=-3,e.PREV_SCALE=-2,e.PREV_SHEAR=-1,e.ROTATE=1,e.TRANSLATE=2,e.SCALE=3,e.SHEAR=4,e}(s);n.TransformConstraintTimeline=y;var x=function(t){function e(n){t.call(this,n),this.frames=a.Utils.newFloatArray(n*e.ENTRIES)}return r(e,t),e.prototype.setFrame=function(t,n,r){t*=e.ENTRIES,this.frames[t]=n,this.frames[t+e.VALUE]=r},e.prototype.apply=function(t,n,r,a,i){var s=this.frames;if(!(r=s[s.length-e.ENTRIES]){var l=s.length;return void(h.position+=(s[l+e.PREV_VALUE]-h.position)*i)}var u=o.binarySearch(s,r,e.ENTRIES),c=s[u+e.PREV_VALUE],f=s[u],p=this.getCurvePercent(u/e.ENTRIES-1,1-(r-f)/(s[u+e.PREV_TIME]-f));h.position+=(c+(s[u+e.VALUE]-c)*p-h.position)*i}},e.ENTRIES=2,e.PREV_TIME=-2,e.PREV_VALUE=-1,e.VALUE=1,e}(s);n.PathConstraintPositionTimeline=x;var M=function(t){function e(e){t.call(this,e)}return r(e,t),e.prototype.apply=function(t,n,r,a,i){var s=this.frames;if(!(r=s[s.length-e.ENTRIES]){var l=s.length;return void(h.spacing+=(s[l+e.PREV_VALUE]-h.spacing)*i)}var u=o.binarySearch(s,r,e.ENTRIES),c=s[u+e.PREV_VALUE],f=s[u],p=this.getCurvePercent(u/e.ENTRIES-1,1-(r-f)/(s[u+e.PREV_TIME]-f));h.spacing+=(c+(s[u+e.VALUE]-c)*p-h.spacing)*i}},e}(x);n.PathConstraintSpacingTimeline=M;var E=function(t){function e(n){t.call(this,n),this.frames=a.Utils.newFloatArray(n*e.ENTRIES)}return r(e,t),e.prototype.setFrame=function(t,n,r,a){t*=e.ENTRIES,this.frames[t]=n,this.frames[t+e.ROTATE]=r,this.frames[t+e.TRANSLATE]=a},e.prototype.apply=function(t,n,r,a,i){var s=this.frames;if(!(r=s[s.length-e.ENTRIES]){var l=s.length;return h.rotateMix+=(s[l+e.PREV_ROTATE]-h.rotateMix)*i,void(h.translateMix+=(s[l+e.PREV_TRANSLATE]-h.translateMix)*i)}var u=o.binarySearch(s,r,e.ENTRIES),c=s[u+e.PREV_ROTATE],f=s[u+e.PREV_TRANSLATE],p=s[u],d=this.getCurvePercent(u/e.ENTRIES-1,1-(r-p)/(s[u+e.PREV_TIME]-p));h.rotateMix+=(c+(s[u+e.ROTATE]-c)*d-h.rotateMix)*i,h.translateMix+=(f+(s[u+e.TRANSLATE]-f)*d-h.translateMix)*i}},e.ENTRIES=3,e.PREV_TIME=-3,e.PREV_ROTATE=-2,e.PREV_TRANSLATE=-1,e.ROTATE=1,e.TRANSLATE=2,e}(s);n.PathConstraintMixTimeline=E},{"./Utils":26,"./attachments":33}],3:[function(t,e,n){"use strict";var r=t("./Utils"),a=function(){function t(t){if(void 0===t&&(t=null),this.tracks=new Array,this.events=new Array,this.timeScale=1,null==t)throw new Error("data cannot be null.");this.data=t}return t.prototype.update=function(t){t*=this.timeScale;for(var e=0;e=0){var i=t*r.timeScale;r.time=a+i,n.time+=t*n.timeScale,this.setCurrent(e,r),r.time-=i,n=r}}else if(!n.loop&&n.lastTime>=n.endTime){this.clearTrack(e);continue}if(n.time+=t*n.timeScale,null!=n.previous){var o=t*n.previous.timeScale;n.previous.time+=o,n.mixTime+=o}}}},t.prototype.apply=function(t){for(var e=this.events,n=0;ns&&(i=s);var l=a.previous;if(null==l)a.animation.mix(t,o,i,h,e,a.mix);else{var u=l.time;!l.loop&&u>l.endTime&&(u=l.endTime),l.animation.apply(t,u,u,l.loop,null);var c=a.mixTime/a.mixDuration*a.mix;c>=1&&(c=1,a.previous=null),a.animation.mix(t,o,i,h,e,c)}for(var f=0,p=e.length;fi%s:o=s){var m=r.MathUtils.toInt(i/s);a.onComplete&&a.onComplete(n,m),this.onComplete&&this.onComplete(n,m)}a.lastTime=a.time}}},t.prototype.clearTracks=function(){for(var t=0,e=this.tracks.length;t=this.tracks.length)){var e=this.tracks[t];null!=e&&(e.onEnd&&e.onEnd(t),this.onEnd&&this.onEnd(t),this.tracks[t]=null,this.freeAll(e))}},t.prototype.freeAll=function(t){for(;null!=t;){var e=t.next;t=e}},t.prototype.expandToIndex=function(t){return t0&&(e.mixTime=0,null!=r&&n.mixTime/n.mixDuration<.5?(e.previous=r,r=n):e.previous=n)}this.tracks[t]=e,e.onStart&&e.onStart(t),this.onStart&&this.onStart(t)},t.prototype.setAnimation=function(t,e,n){var r=this.data.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,r,n)},t.prototype.setAnimationWith=function(t,e,n){var r=this.expandToIndex(t);null!=r&&this.freeAll(r.next);var a=new i;return a.animation=e,a.loop=n,a.endTime=e.duration,this.setCurrent(t,a),a},t.prototype.addAnimation=function(t,e,n,r){var a=this.data.skeletonData.findAnimation(e);if(null==a)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,a,n,r)},t.prototype.hasAnimation=function(t){var e=this.data.skeletonData.findAnimation(t);return null!==e},t.prototype.addAnimationWith=function(t,e,n,r){var a=new i;a.animation=e,a.loop=n,a.endTime=e.duration;var o=this.expandToIndex(t);if(null!=o){for(;null!=o.next;)o=o.next;o.next=a}else this.tracks[t]=a;return r<=0&&(null!=o?r+=o.endTime-this.data.getMix(o.animation,e):r=0),a.delay=r,a},t.prototype.getCurrent=function(t){return t>=this.tracks.length?null:this.tracks[t]},t.prototype.setAnimationByName=function(e,n,r){t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.")),this.setAnimation(e,n,r)},t.prototype.addAnimationByName=function(e,n,r,a){t.deprecatedWarning2||(t.deprecatedWarning2=!0,console.warn("Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.")),this.addAnimation(e,n,r,a)},t.prototype.hasAnimationByName=function(e){t.deprecatedWarning3||(t.deprecatedWarning3=!0,console.warn("Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on."));var n=this.data.skeletonData.findAnimation(e);return null!==n},t.deprecatedWarning1=!1,t.deprecatedWarning2=!1,t.deprecatedWarning3=!1,t}();n.AnimationState=a;var i=function(){function t(){this.loop=!1,this.delay=0,this.time=0,this.lastTime=-1,this.endTime=0,this.timeScale=1,this.mixTime=0,this.mixDuration=0,this.mix=1}return t.prototype.reset=function(){this.next=null,this.previous=null,this.animation=null,this.timeScale=1,this.lastTime=-1,this.time=0},t.prototype.isComplete=function(){return this.time>=this.endTime},t}();n.TrackEntry=i},{"./Utils":26}],4:[function(t,e,n){"use strict";var r=function(){function t(t){if(this.animationToMixTime={},this.defaultMix=0,null==t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}return t.prototype.setMix=function(t,e,n){var r=this.skeletonData.findAnimation(t);if(null==r)throw new Error("Animation not found: "+t);var a=this.skeletonData.findAnimation(e);if(null==a)throw new Error("Animation not found: "+e);this.setMixWith(r,a,n)},t.prototype.setMixByName=function(e,n,r){t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Deprecation Warning: AnimationStateData.setMixByName is deprecated, please use setMix from now on.")),this.setMix(e,n,r)},t.prototype.setMixWith=function(t,e,n){if(null==t)throw new Error("from cannot be null.");if(null==e)throw new Error("to cannot be null.");var r=t.name+e.name;this.animationToMixTime[r]=n},t.prototype.getMix=function(t,e){var n=t.name+e.name,r=this.animationToMixTime[n];return void 0===r?this.defaultMix:r},t.deprecatedWarning1=!1,t}();n.AnimationStateData=r},{}],5:[function(t,e,n){"use strict";var r=t("./attachments"),a=function(){function t(t){this.atlas=t}return t.prototype.newRegionAttachment=function(t,e,n){var a=this.atlas.findRegion(n);if(null==a)throw new Error("Region not found in atlas: "+n+" (region attachment: "+e+")");var i=new r.RegionAttachment(e);return i.region=a,i},t.prototype.newMeshAttachment=function(t,e,n){var a=this.atlas.findRegion(n);if(null==a)throw new Error("Region not found in atlas: "+n+" (mesh attachment: "+e+")");var i=new r.MeshAttachment(e);return i.region=a,i},t.prototype.newBoundingBoxAttachment=function(t,e){return new r.BoundingBoxAttachment(e)},t.prototype.newPathAttachment=function(t,e){return new r.PathAttachment(e)},t}();n.AtlasAttachmentLoader=a},{"./attachments":33}],6:[function(t,e,n){"use strict";!function(t){t[t.Normal=0]="Normal",t[t.Additive=1]="Additive",t[t.Multiply=2]="Multiply",t[t.Screen=3]="Screen"}(n.BlendMode||(n.BlendMode={}));n.BlendMode},{}],7:[function(t,e,n){"use strict";var r=t("./BoneData"),a=t("./Utils"),i=function(){function t(t,e,n){if(this.matrix=new PIXI.Matrix,this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.appliedValid=!1,this.sorted=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=n,this.setToSetupPose()}return Object.defineProperty(t.prototype,"worldX",{get:function(){return this.matrix.tx},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"worldY",{get:function(){return this.matrix.ty},enumerable:!0,configurable:!0}),t.prototype.update=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},t.prototype.updateWorldTransform=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},t.prototype.updateWorldTransformWith=function(e,n,i,o,s,h,l){this.ax=e,this.ay=n,this.arotation=i,this.ascaleX=o,this.ascaleY=s,this.ashearX=h,this.ashearY=l,this.appliedValid=!0;var u=this.parent,c=this.matrix;if(null==u){var f=i+90+l,p=a.MathUtils.cosDeg(i+h)*o,d=a.MathUtils.cosDeg(f)*s,m=a.MathUtils.sinDeg(i+h)*o,g=a.MathUtils.sinDeg(f)*s,v=this.skeleton;return v.flipX&&(e=-e,p=-p,d=-d),v.flipY!==t.yDown&&(n=-n,m=-m,g=-g),c.a=p,c.c=d,c.b=m,c.d=g,c.tx=e+v.x,void(c.ty=n+v.y)}var y=u.matrix.a,x=u.matrix.c,M=u.matrix.b,E=u.matrix.d;switch(c.tx=y*e+x*n+u.matrix.tx,c.ty=M*e+E*n+u.matrix.ty,this.data.transformMode){case r.TransformMode.Normal:var f=i+90+l,p=a.MathUtils.cosDeg(i+h)*o,d=a.MathUtils.cosDeg(f)*s,m=a.MathUtils.sinDeg(i+h)*o,g=a.MathUtils.sinDeg(f)*s;return c.a=y*p+x*m,c.c=y*d+x*g,c.b=M*p+E*m,void(c.d=M*d+E*g);case r.TransformMode.OnlyTranslation:var f=i+90+l;c.a=a.MathUtils.cosDeg(i+h)*o,c.c=a.MathUtils.cosDeg(f)*s,c.b=a.MathUtils.sinDeg(i+h)*o,c.d=a.MathUtils.sinDeg(f)*s;break;case r.TransformMode.NoRotationOrReflection:var T=y*y+M*M,w=0;T>1e-4?(T=Math.abs(y*E-x*M)/T,x=M*T,E=y*T,w=Math.atan2(M,y)*a.MathUtils.radDeg):(y=0,M=0,w=90-Math.atan2(E,x)*a.MathUtils.radDeg);var b=i+h-w,A=i+l-w+90,p=a.MathUtils.cosDeg(b)*o,d=a.MathUtils.cosDeg(A)*s,m=a.MathUtils.sinDeg(b)*o,g=a.MathUtils.sinDeg(A)*s;c.a=y*p-x*m,c.c=y*d-x*g,c.b=M*p+E*m,c.d=M*d+E*g;break;case r.TransformMode.NoScale:case r.TransformMode.NoScaleOrReflection:var S=a.MathUtils.cosDeg(i),I=a.MathUtils.sinDeg(i),R=y*S+x*I,P=M*S+E*I,T=Math.sqrt(R*R+P*P);T>1e-5&&(T=1/T),R*=T,P*=T,T=Math.sqrt(R*R+P*P);var C=Math.PI/2+Math.atan2(P,R),V=Math.cos(C)*T,N=Math.sin(C)*T,p=a.MathUtils.cosDeg(h)*o,d=a.MathUtils.cosDeg(90+l)*s,m=a.MathUtils.sinDeg(h)*o,g=a.MathUtils.sinDeg(90+l)*s;return c.a=R*p+V*m,c.c=R*d+V*g,c.b=P*p+N*m,c.d=P*d+N*g,void((this.data.transformMode!=r.TransformMode.NoScaleOrReflection?y*E-x*M<0:this.skeleton.flipX!=this.skeleton.flipY!=t.yDown)&&(c.b=-c.b,c.d=-c.d));case r.TransformMode.InheritRotation:var f=i+90+l,p=a.MathUtils.cosDeg(i+h)*o,d=a.MathUtils.cosDeg(f)*s,m=a.MathUtils.sinDeg(i+h)*o,g=a.MathUtils.sinDeg(f)*s;y=1,x=0,M=0,E=1;do{var S=a.MathUtils.cosDeg(u.arotation),I=a.MathUtils.sinDeg(u.arotation),D=y*S+x*I;if(x=x*S-y*I,y=D,D=M*S+E*I,E=E*S-M*I,M=D,u.data.transformMode===r.TransformMode.InheritScale||u.data.transformMode===r.TransformMode.OnlyTranslation)break;u=u.parent}while(null!=u);c.a=y*p+x*m,c.c=y*d+x*g,c.b=M*p+E*m,c.d=M*d+E*g;break;case r.TransformMode.InheritScale:var f=i+90+l,p=a.MathUtils.cosDeg(i+h)*o,d=a.MathUtils.cosDeg(f)*s,m=a.MathUtils.sinDeg(i+h)*o,g=a.MathUtils.sinDeg(f)*s;y=1,x=0,M=0,E=1;do{var S=a.MathUtils.cosDeg(u.arotation),I=a.MathUtils.sinDeg(u.arotation),k=u.scaleX,U=u.scaleY,R=S*k,V=I*U,P=I*k,N=S*U,D=y*R+x*P;if(x=x*N-y*V,y=D,D=M*R+E*P,E=E*N-M*V,M=D,k>=0&&(I=-I),D=y*S+x*I,x=x*S-y*I,y=D,D=M*S+E*I,E=E*S-M*I,M=D,u.data.transformMode===r.TransformMode.InheritRotation||u.data.transformMode===r.TransformMode.OnlyTranslation)break;u=u.parent}while(null!=u);c.a=y*p+x*m,c.c=y*d+x*g,c.b=M*p+E*m,c.d=M*d+E*g}this.skeleton.flipX&&(c.a=-c.a,c.c=-c.c),this.skeleton.flipY!=t.yDown&&(c.b=-c.b,c.d=-c.d)},t.prototype.setToSetupPose=function(){var t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY},t.prototype.getWorldRotationX=function(){return Math.atan2(this.matrix.b,this.matrix.a)*a.MathUtils.radDeg},t.prototype.getWorldRotationY=function(){return Math.atan2(this.matrix.d,this.matrix.c)*a.MathUtils.radDeg},t.prototype.getWorldScaleX=function(){var t=this.matrix;return Math.sqrt(t.a*t.a+t.c*t.c)},t.prototype.getWorldScaleY=function(){var t=this.matrix;return Math.sqrt(t.b*t.b+t.d*t.d)},t.prototype.worldToLocalRotationX=function(){var t=this.parent;if(null==t)return this.arotation;var e=t.matrix,n=this.matrix;return Math.atan2(e.a*n.b-e.b*n.a,e.d*n.a-e.c*n.b)*a.MathUtils.radDeg},t.prototype.worldToLocalRotationY=function(){var t=this.parent;if(null==t)return this.arotation;var e=t.matrix,n=this.matrix;return Math.atan2(e.a*n.d-e.b*n.c,e.d*n.c-e.c*n.d)*a.MathUtils.radDeg},t.prototype.rotateWorld=function(t){var e=this.matrix,n=this.matrix.a,r=e.c,i=e.b,o=e.d,s=a.MathUtils.cosDeg(t),h=a.MathUtils.sinDeg(t);e.a=s*n-h*i,e.c=s*r-h*o,e.b=h*n+s*i,e.d=h*r+s*o,this.appliedValid=!1},t.prototype.updateAppliedTransform=function(){ -this.appliedValid=!0;var t=this.parent,e=this.matrix;if(null==t)return this.ax=e.tx,this.ay=e.ty,this.arotation=Math.atan2(e.b,e.a)*a.MathUtils.radDeg,this.ascaleX=Math.sqrt(e.a*e.a+e.b*e.b),this.ascaleY=Math.sqrt(e.c*e.c+e.d*e.d),this.ashearX=0,void(this.ashearY=Math.atan2(e.a*e.c+e.b*e.d,e.a*e.d-e.b*e.c)*a.MathUtils.radDeg);var n=t.matrix,r=1/(n.a*n.d-n.b*n.c),i=e.tx-n.tx,o=e.ty-n.ty;this.ax=i*n.d*r-o*n.c*r,this.ay=o*n.a*r-i*n.b*r;var s=r*n.d,h=r*n.a,l=r*n.c,u=r*n.b,c=s*e.a-l*e.b,f=s*e.c-l*e.d,p=h*e.b-u*e.a,d=h*e.d-u*e.c;if(this.ashearX=0,this.ascaleX=Math.sqrt(c*c+p*p),this.ascaleX>1e-4){var m=c*d-f*p;this.ascaleY=m/this.ascaleX,this.ashearY=Math.atan2(c*f+p*d,m)*a.MathUtils.radDeg,this.arotation=Math.atan2(p,c)*a.MathUtils.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(f*f+d*d),this.ashearY=0,this.arotation=90-Math.atan2(d,f)*a.MathUtils.radDeg},t.prototype.worldToLocal=function(t){var e=this.matrix,n=e.a,r=e.c,a=e.b,i=e.d,o=1/(n*i-r*a),s=t.x-e.tx,h=t.y-e.ty;return t.x=s*i*o-h*r*o,t.y=h*n*o-s*a*o,t},t.prototype.localToWorld=function(t){var e=this.matrix,n=t.x,r=t.y;return t.x=n*e.a+r*e.c+e.tx,t.y=n*e.b+r*e.d+e.ty,t},t.yDown=!1,t}();n.Bone=i},{"./BoneData":8,"./Utils":26}],8:[function(t,e,n){"use strict";var r=function(){function t(t,e,n){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=a.Normal,t<0)throw new Error("index must be >= 0.");if(null==e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=n}return t}();n.BoneData=r,function(t){t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection",t[t.InheritRotation=5]="InheritRotation",t[t.InheritScale=6]="InheritScale"}(n.TransformMode||(n.TransformMode={}));var a=n.TransformMode},{}],9:[function(t,e,n){"use strict";var r=function(){function t(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e}return t}();n.Event=r},{}],10:[function(t,e,n){"use strict";var r=function(){function t(t){this.name=t}return t}();n.EventData=r},{}],11:[function(t,e,n){"use strict";var r=t("./Utils"),a=function(){function t(t,e){if(this.mix=1,this.bendDirection=0,this.level=0,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.bendDirection=t.bendDirection,this.bones=new Array;for(var n=0;n180?c-=360:c<-180&&(c+=360),t.updateWorldTransformWith(t.ax,t.ay,t.arotation+c*a,t.ascaleX,t.ascaleY,t.ashearX,t.ashearY)},t.prototype.apply2=function(t,e,n,a,i,o){if(0==o)return void e.updateWorldTransform();t.appliedValid||t.updateAppliedTransform(),e.appliedValid||e.updateAppliedTransform();var s=t.ax,h=t.ay,l=t.ascaleX,u=t.ascaleY,c=e.ascaleX,f=0,p=0,d=0;l<0?(l=-l,f=180,d=-1):(f=0,d=1),u<0&&(u=-u,d=-d),c<0?(c=-c,p=180):p=0;var m=t.matrix,g=e.ax,v=0,y=0,x=0,M=m.a,E=m.c,T=m.b,w=m.d,b=Math.abs(l-u)<=1e-4;b?(v=e.ay,y=M*g+E*v+m.tx,x=T*g+w*v+m.ty):(v=0,y=M*g+m.tx,x=T*g+m.ty);var A=(t.parent,t.parent.matrix);M=A.a,E=A.c,T=A.b,w=A.d;var S=1/(M*w-E*T),I=n-A.tx,R=a-A.ty,P=(I*w-R*E)*S-s,C=(R*M-I*T)*S-h;I=y-A.tx,R=x-A.ty;var V=(I*w-R*E)*S-s,N=(R*M-I*T)*S-h,D=Math.sqrt(V*V+N*N),k=e.data.length*c,U=0,_=0;t:if(b){k*=l;var O=(P*P+C*C-D*D-k*k)/(2*D*k);O<-1?O=-1:O>1&&(O=1),_=Math.acos(O)*i,M=D+k*O,E=k*Math.sin(_),U=Math.atan2(C*M-P*E,P*M+C*E)}else{M=l*k,E=u*k;var X=M*M,B=E*E,F=P*P+C*C,Y=Math.atan2(C,P);T=B*D*D+X*F-X*B;var L=-2*B*D,W=B-X;if(w=L*L-4*W*T,w>=0){var q=Math.sqrt(w);L<0&&(q=-q),q=-(L+q)/2;var j=q/W,Z=T/q,z=Math.abs(j)$&&(Q=0,$=w,tt=I),I=D-M,w=I*I,w$&&(Q=nt,$=w,tt=I,et=R),F<=(G+$)/2?(U=Y-Math.atan2(K*i,J),_=H*i):(U=Y-Math.atan2(et*i,tt),_=Q*i)}var rt=Math.atan2(v,g)*d,at=t.arotation;U=(U-rt)*r.MathUtils.radDeg+f-at,U>180?U-=360:U<-180&&(U+=360),t.updateWorldTransformWith(s,h,at+U*o,t.ascaleX,t.ascaleY,0,0),at=e.arotation,_=((_+rt)*r.MathUtils.radDeg-e.ashearX)*d+p-at,_>180?_-=360:_<-180&&(_+=360),e.updateWorldTransformWith(g,v,at+_*o,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)},t}();n.IkConstraint=a},{"./Utils":26}],12:[function(t,e,n){"use strict";var r=function(){function t(t){this.order=0,this.bones=new Array,this.bendDirection=1,this.mix=1,this.name=t}return t}();n.IkConstraintData=r},{}],13:[function(t,e,n){"use strict";var r=t("./PathConstraintData"),a=t("./attachments"),i=t("./Utils"),o=function(){function t(t,e){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(var n=0,r=t.bones.length;n0,s=e>0;if(o||s){var h=this.data,l=h.spacingMode,u=l==r.SpacingMode.Length,c=h.rotateMode,f=c==r.RotateMode.Tangent,p=c==r.RotateMode.ChainScale,d=this.bones.length,m=f?d:d+1,g=this.bones,v=i.Utils.setArraySize(this.spaces,m),y=null,x=this.spacing;if(p||u){p&&(y=i.Utils.setArraySize(this.lengths,d));for(var M=0,E=m-1;Mi.MathUtils.PI?Y-=i.MathUtils.PI2:Y<-i.MathUtils.PI&&(Y+=i.MathUtils.PI2),Y*=e,L=Math.cos(Y),W=Math.sin(Y),w.a=L*O-W*B,w.c=L*X-W*F,w.b=W*O+L*B,w.d=W*X+L*F}T.appliedValid=!1}}}},t.prototype.computeWorldPositions=function(e,n,r,a,o){var s=this.target,h=this.position,l=this.spaces,u=i.Utils.setArraySize(this.positions,3*n+2),c=null,f=e.closed,p=e.worldVerticesLength,d=p/6,m=t.NONE;if(!e.constantSpeed){var g=e.lengths;d-=f?1:2;var v=g[d];if(a&&(h*=v),o)for(var y=0;yv){m!=t.AFTER&&(m=t.AFTER,e.computeWorldVerticesWith(s,p-6,4,c,0)),this.addAfterPosition(T-v,c,0,u,x);continue}}for(;;M++){var w=g[M];if(!(T>w)){if(0==M)T/=w;else{var b=g[M-1];T=(T-b)/(w-b)}break}}M!=m&&(m=M,f&&M==d?(e.computeWorldVerticesWith(s,p-4,4,c,0),e.computeWorldVerticesWith(s,0,4,c,4)):e.computeWorldVerticesWith(s,6*M+2,8,c,0)),this.addCurvePosition(T,c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],u,x,r||y>0&&0==E)}return u}f?(p+=2,c=i.Utils.setArraySize(this.world,p),e.computeWorldVerticesWith(s,2,p-4,c,0),e.computeWorldVerticesWith(s,0,2,c,p-4),c[p-2]=c[0],c[p-1]=c[1]):(d--,p-=4,c=i.Utils.setArraySize(this.world,p),e.computeWorldVerticesWith(s,2,p,c,0));for(var A=i.Utils.setArraySize(this.curves,d),S=0,I=c[0],R=c[1],P=0,C=0,V=0,N=0,D=0,k=0,U=0,_=0,O=0,X=0,B=0,F=0,Y=0,L=0,y=0,W=2;yS){this.addAfterPosition(T-S,c,p-4,u,x);continue}}for(;;M++){var z=A[M];if(!(T>z)){if(0==M)T/=z;else{var b=A[M-1];T=(T-b)/(z-b)}break}}if(M!=m){m=M;var H=6*M;for(I=c[H],R=c[H+1],P=c[H+2],C=c[H+3],V=c[H+4],N=c[H+5],D=c[H+6],k=c[H+7],U=.03*(I-2*P+V),_=.03*(R-2*C+N),O=.006*(3*(P-V)-I+D),X=.006*(3*(C-N)-R+k),B=2*U+O,F=2*_+X,Y=.3*(P-I)+U+.16666667*O,L=.3*(C-R)+_+.16666667*X,j=Math.sqrt(Y*Y+L*L),q[0]=j,H=1;H<8;H++)Y+=B,L+=F,B+=O,F+=X,j+=Math.sqrt(Y*Y+L*L),q[H]=j;Y+=B,L+=F,j+=Math.sqrt(Y*Y+L*L),q[8]=j,Y+=B+O,L+=F+X,j+=Math.sqrt(Y*Y+L*L),q[9]=j,Z=0}for(T*=j;;Z++){var G=q[Z];if(!(T>G)){if(0==Z)T/=G;else{var b=q[Z-1];T=Z+(T-b)/(G-b)}break}}this.addCurvePosition(.1*T,I,R,P,C,V,N,D,k,u,x,r||y>0&&0==E)}return u},t.prototype.addBeforePosition=function(t,e,n,r,a){var i=e[n],o=e[n+1],s=e[n+2]-i,h=e[n+3]-o,l=Math.atan2(h,s);r[a]=i+t*Math.cos(l),r[a+1]=o+t*Math.sin(l),r[a+2]=l},t.prototype.addAfterPosition=function(t,e,n,r,a){var i=e[n+2],o=e[n+3],s=i-e[n],h=o-e[n+1],l=Math.atan2(h,s);r[a]=i+t*Math.cos(l),r[a+1]=o+t*Math.sin(l),r[a+2]=l},t.prototype.addCurvePosition=function(t,e,n,r,a,i,o,s,h,l,u,c){(0==t||isNaN(t))&&(t=1e-4);var f=t*t,p=f*t,d=1-t,m=d*d,g=m*d,v=d*t,y=3*v,x=d*y,M=y*t,E=e*g+r*x+i*M+s*p,T=n*g+a*x+o*M+h*p;l[u]=E,l[u+1]=T,c&&(l[u+2]=Math.atan2(T-(n*m+a*v*2+o*f),E-(e*m+r*v*2+i*f)))},t.prototype.getOrder=function(){return this.data.order},t.NONE=-1,t.BEFORE=-2,t.AFTER=-3,t}();n.PathConstraint=o},{"./PathConstraintData":14,"./Utils":26,"./attachments":33}],14:[function(t,e,n){"use strict";var r=function(){function t(t){this.order=0,this.bones=new Array,this.name=t}return t}();n.PathConstraintData=r,function(t){t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent"}(n.PositionMode||(n.PositionMode={}));n.PositionMode;!function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent"}(n.SpacingMode||(n.SpacingMode={}));n.SpacingMode;!function(t){t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale"}(n.RotateMode||(n.RotateMode={}));n.RotateMode},{}],15:[function(t,e,n){"use strict";var r=t("./Slot"),a=t("./Bone"),i=t("./IkConstraint"),o=t("./TransformConstraint"),s=t("./PathConstraint"),h=t("./Utils"),l=t("./attachments"),u=function(){function t(t){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.flipX=!1,this.flipY=!1,this.x=0,this.y=0,null==t)throw new Error("data cannot be null.");this.data=t,this.bones=new Array;for(var e=0;e1){var a=n[n.length-1];this._updateCache.indexOf(a)>-1||this.updateCacheReset.push(a)}this._updateCache.push(t),this.sortReset(r.children),n[n.length-1].sorted=!0},t.prototype.sortPathConstraint=function(t){var e=t.target,n=e.data.index,r=e.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,n,r),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,n,r);for(var a=0,i=this.data.skins.length;a=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},t.prototype.aabbIntersectsSegment=function(t,e,n,r){var a=this.minX,i=this.minY,o=this.maxX,s=this.maxY;if(t<=a&&n<=a||e<=i&&r<=i||t>=o&&n>=o||e>=s&&r>=s)return!1;var h=(r-e)/(n-t),l=h*(a-t)+e;if(l>i&&li&&la&&ua&&ut.minX&&this.minYt.minY},t.prototype.containsPoint=function(t,e){for(var n=this.polygons,r=0,a=n.length;r=n||l=n){var u=r[s];u+(n-h)/(l-h)*(r[i]-u)=u&&x<=p||x>=p&&x<=u)&&(x>=e&&x<=r||x>=r&&x<=e)){var M=(l*v-h*m)/y;if((M>=c&&M<=d||M>=d&&M<=c)&&(M>=n&&M<=a||M>=a&&M<=n))return!0}u=p,c=d}return!1},t.prototype.getPolygon=function(t){if(null==t)throw new Error("boundingBox cannot be null.");var e=this.boundingBoxes.indexOf(t);return e==-1?null:this.polygons[e]},t.prototype.getWidth=function(){return this.maxX-this.minX},t.prototype.getHeight=function(){return this.maxY-this.minY},t}();n.SkeletonBounds=i},{"./Utils":26,"./attachments":33}],17:[function(t,e,n){"use strict";var r=function(){function t(){this.bones=new Array,this.slots=new Array,this.skins=new Array,this.events=new Array,this.animations=new Array,this.ikConstraints=new Array,this.transformConstraints=new Array,this.pathConstraints=new Array,this.fps=0}return t.prototype.findBone=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,n=0,r=e.length;n=0;v--)Z[v]==-1&&(Z[v]=H[--J])}m.setFrame(g++,j.time,Z)}a.push(m),i=Math.max(i,m.frames[m.getFrameCount()-1])}if(t.events){for(var m=new p.EventTimeline(t.events.length),g=0,v=0;v=r.length&&(r.length=t+1),r[t]||(r[t]={}),r[t][e]=n},t.prototype.getAttachment=function(t,e){var n=this.attachments[t];return n?n[e]:null},t.prototype.attachAll=function(t,e){for(var n=0,r=0;r= 0.");if(null==e)throw new Error("name cannot be null.");if(null==n)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=n}return t}();n.SlotData=a},{"./Utils":26}],22:[function(t,e,n){"use strict";var r=function(){function t(t){this._image=t}return t.prototype.getImage=function(){return this._image},t.filterFromString=function(t){switch(t.toLowerCase()){case"nearest":return a.Nearest;case"linear":return a.Linear;case"mipmap":return a.MipMap;case"mipmapnearestnearest":return a.MipMapNearestNearest;case"mipmaplinearnearest":return a.MipMapLinearNearest;case"mipmapnearestlinear":return a.MipMapNearestLinear;case"mipmaplinearlinear":return a.MipMapLinearLinear;default:throw new Error("Unknown texture filter "+t)}},t.wrapFromString=function(t){switch(t.toLowerCase()){case"mirroredtepeat":return i.MirroredRepeat;case"clamptoedge":return i.ClampToEdge;case"repeat":return i.Repeat;default:throw new Error("Unknown texture wrap "+t)}},t}();n.Texture=r,function(t){t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear"}(n.TextureFilter||(n.TextureFilter={}));var a=n.TextureFilter;!function(t){t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat"}(n.TextureWrap||(n.TextureWrap={}));var i=n.TextureWrap,o=function(){function t(){this.size=null}return Object.defineProperty(t.prototype,"width",{get:function(){var t=this.texture;return"3"==PIXI.VERSION[0]?t.crop.width:t.trim?t.trim.width:t.orig.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){var t=this.texture;return"3"==PIXI.VERSION[0]?t.crop.height:t.trim?t.trim.height:t.orig.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"u",{get:function(){return this.texture._uvs.x0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"v",{get:function(){return this.texture._uvs.y0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"u2",{get:function(){return this.texture._uvs.x2},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"v2",{get:function(){return this.texture._uvs.y2},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"offsetX",{get:function(){var t=this.texture;return t.trim?t.trim.x:0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"offsetY",{get:function(){return 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."),this.spineOffsetY},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pixiOffsetY",{get:function(){var t=this.texture;return t.trim?t.trim.y:0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"spineOffsetY",{get:function(){var t=this.texture;return this.originalHeight-this.height-(t.trim?t.trim.y:0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"originalWidth",{get:function(){var t=this.texture;return"3"==PIXI.VERSION[0]?t.trim?t.trim.width:t.crop.width:t.orig.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"originalHeight",{get:function(){var t=this.texture;return"3"==PIXI.VERSION[0]?t.trim?t.trim.height:t.crop.height:t.orig.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this.texture.frame.x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.texture.frame.y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rotate",{get:function(){return 0!==this.texture.rotate},enumerable:!0,configurable:!0}),t}();n.TextureRegion=o},{}],23:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},a=t("./Texture"),i=function(){function t(t,e,n){this.pages=new Array,this.regions=new Array,t&&this.addSpineAtlas(t,e,n)}return t.prototype.addTexture=function(t,e){for(var n=this.pages,r=null,i=0;i=this.lines.length?null:this.lines[this.index++]},t.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(e==-1)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},t.prototype.readTuple=function(t){var e=this.readLine(),n=e.indexOf(":");if(n==-1)throw new Error("Invalid line: "+e);for(var r=0,a=n+1;r<3;r++){var i=e.indexOf(",",a);if(i==-1)break;t[r]=e.substr(a,i-a).trim(),a=i+1}return t[r]=e.substring(a).trim(),r+1},t}(),s=function(){function t(){}return t.prototype.setFilters=function(){var t=this.baseTexture,e=this.minFilter;e==a.TextureFilter.Linear?t.scaleMode=PIXI.SCALE_MODES.LINEAR:this.minFilter==a.TextureFilter.Nearest?t.scaleMode=PIXI.SCALE_MODES.NEAREST:(t.mipmap=!0,e==a.TextureFilter.MipMapNearestNearest?t.scaleMode=PIXI.SCALE_MODES.NEAREST:t.scaleMode=PIXI.SCALE_MODES.LINEAR)},t}();n.TextureAtlasPage=s;var h=function(t){function e(){t.apply(this,arguments)}return r(e,t),e}(a.TextureRegion);n.TextureAtlasRegion=h},{"./Texture":22}],24:[function(t,e,n){"use strict";var r=t("./Utils"),a=function(){function t(t,e){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new r.Vector2,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.rotateMix=t.rotateMix,this.translateMix=t.translateMix,this.scaleMix=t.scaleMix,this.shearMix=t.shearMix,this.bones=new Array;for(var n=0;nr.MathUtils.PI?M-=r.MathUtils.PI2:M<-r.MathUtils.PI&&(M+=r.MathUtils.PI2),M*=t;var E=Math.cos(M),T=Math.sin(M);d.a=E*g-T*y,d.c=E*v-T*x,d.b=T*g+E*y,d.d=T*v+E*x,m=!0}if(0!=e){var w=this.temp;i.localToWorld(w.set(this.data.offsetX,this.data.offsetY)),d.tx+=(w.x-d.tx)*e,d.ty+=(w.y-d.ty)*e,m=!0}if(n>0){var b=Math.sqrt(d.a*d.a+d.b*d.b),A=Math.sqrt(o*o+h*h);b>1e-5&&(b=(b+(A-b+this.data.offsetScaleX)*n)/b),d.a*=b,d.b*=b,b=Math.sqrt(d.c*d.c+d.d*d.d),A=Math.sqrt(s*s+l*l),b>1e-5&&(b=(b+(A-b+this.data.offsetScaleY)*n)/b),d.c*=b,d.d*=b,m=!0}if(a>0){var v=d.c,x=d.d,S=Math.atan2(x,v),M=Math.atan2(l,s)-Math.atan2(h,o)-(S-Math.atan2(d.b,d.a));M>r.MathUtils.PI?M-=r.MathUtils.PI2:M<-r.MathUtils.PI&&(M+=r.MathUtils.PI2),M=S+(M+this.data.offsetShearY*r.MathUtils.degRad)*a;var b=Math.sqrt(v*v+x*x);d.c=Math.cos(M)*b,d.d=Math.sin(M)*b,m=!0}m&&(p.appliedValid=!1)}},t.prototype.getOrder=function(){return this.data.order},t}();n.TransformConstraint=a},{"./Utils":26}],25:[function(t,e,n){"use strict";var r=function(){function t(t){if(this.order=0,this.bones=new Array,this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.offsetRotation=0,this.offsetX=0,this.offsetY=0,this.offsetScaleX=0,this.offsetScaleY=0,this.offsetShearY=0,null==t)throw new Error("name cannot be null.");this.name=t}return t}();n.TransformConstraintData=r},{}],26:[function(t,e,n){"use strict";var r=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.r=t,this.g=e,this.b=n,this.a=r}return t.prototype.set=function(t,e,n,r){return this.r=t,this.g=e,this.b=n,this.a=r,this.clamp(),this},t.prototype.setFromColor=function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this},t.prototype.setFromString=function(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=(8!=t.length?255:parseInt(t.substr(6,2),16))/255,this},t.prototype.add=function(t,e,n,r){return this.r+=t,this.g+=e,this.b+=n,this.a+=r,this.clamp(),this},t.prototype.clamp=function(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this},t.WHITE=new t(1,1,1,1),t.RED=new t(1,0,0,1),t.GREEN=new t(0,1,0,1),t.BLUE=new t(0,0,1,1),t.MAGENTA=new t(1,0,1,1),t}();n.Color=r;var a=function(){function t(){}return t.clamp=function(t,e,n){return tn?n:t},t.cosDeg=function(e){return Math.cos(e*t.degRad)},t.sinDeg=function(e){return Math.sin(e*t.degRad)},t.signum=function(t){return t>=0?1:-1},t.toInt=function(t){return t>0?Math.floor(t):Math.ceil(t)},t.cbrt=function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e},t.PI=3.1415927,t.PI2=2*t.PI,t.radiansToDegrees=180/t.PI,t.radDeg=t.radiansToDegrees,t.degreesToRadians=t.PI/180,t.degRad=t.degreesToRadians,t}();n.MathUtils=a;var i=function(){function t(){}return t.arrayCopy=function(t,e,n,r,a){for(var i=e,o=r;i0?this.items.pop():this.instantiator()},t.prototype.free=function(t){this.items.push(t)},t.prototype.freeAll=function(t){for(var e=0;ethis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)},t}();n.TimeKeeper=l},{}],27:[function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},a=function(){function t(t){if(null==t)throw new Error("name cannot be null.");this.name=t}return t}();n.Attachment=a;var i=function(t){function e(e){t.call(this,e),this.worldVerticesLength=0}return r(e,t),e.prototype.computeWorldVertices=function(t,e){this.computeWorldVerticesWith(t,0,this.worldVerticesLength,e,0)},e.prototype.computeWorldVerticesWith=function(t,e,n,r,a){n+=a;var i=t.bone.skeleton,o=t.attachmentVertices,s=this.vertices,h=this.bones;if(null!=h){for(var l=0,u=0,c=0;c0&&(s=o);for(var y=t.bone,x=y.matrix,A=x.tx,S=x.ty,I=x.a,m=x.c,R=x.b,P=x.d,C=e,d=a;d, uvs?: ArrayLike, indices?: ArrayLike, 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 * var spineAnimation = new PIXI.Spine(spineData);\n * ```\n *\n * @class\n * @extends Container\n * @memberof PIXI.spine\n * @param spineData {object} The spine data loaded from a spine atlas.\n */\nexport class Spine extends PIXI.Container {\n static globalAutoUpdate: boolean = true;\n\n tintRgb: ArrayLike;\n spineData: spine.SkeletonData;\n skeleton: spine.Skeleton;\n stateData: spine.AnimationStateData;\n state: spine.AnimationState;\n slotContainers: Array;\n\n constructor(spineData: spine.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 PIXI.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 spine.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 spine.AnimationStateData(spineData);\n\n /**\n * A spine AnimationState object created from the spine AnimationStateData object\n *\n * @member {object}\n */\n this.state = new spine.AnimationState(this.stateData);\n\n /**\n * An array of containers\n *\n * @member {Container[]}\n */\n this.slotContainers = [];\n\n for (var i = 0, n = this.skeleton.slots.length; i < n; i++) {\n var slot = this.skeleton.slots[i];\n var attachment : any = slot.attachment;\n var slotContainer = new PIXI.Container();\n this.slotContainers.push(slotContainer);\n this.addChild(slotContainer);\n\n if (attachment instanceof spine.RegionAttachment) {\n var spriteName = (attachment.region as TextureAtlasRegion).name;\n var sprite = this.createSprite(slot, attachment, spriteName);\n slot.currentSprite = sprite;\n slot.currentSpriteName = spriteName;\n slotContainer.addChild(sprite);\n }\n else if (attachment instanceof spine.MeshAttachment) {\n var mesh = this.createMesh(slot, attachment);\n slot.currentMesh = mesh;\n slot.currentMeshName = attachment.name;\n slotContainer.addChild(mesh);\n }\n else {\n continue;\n }\n\n }\n\n /**\n * Should the Spine object update its transforms\n *\n * @member {boolean}\n */\n this.autoUpdate = true;\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 PIXI.spine.Spine#\n */\n this.tintRgb = new Float32Array([1, 1, 1]);\n }\n\n /**\n * If this flag is set to true, the spine animation will be autoupdated every time\n * 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 PIXI.spine.Spine#\n * @default true\n */\n get autoUpdate(): boolean {\n return (this.updateTransform === Spine.prototype.autoUpdateTransform);\n }\n\n set autoUpdate(value: boolean) {\n this.updateTransform = value ? Spine.prototype.autoUpdateTransform : PIXI.Container.prototype.updateTransform;\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 PIXI.spine.Spine#\n * @default 0xFFFFFF\n */\n get tint(): number {\n return PIXI.utils.rgb2hex(this.tintRgb);\n }\n\n set tint(value: number) {\n this.tintRgb = PIXI.utils.hex2rgb(value, this.tintRgb);\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 this.state.update(dt);\n this.state.apply(this.skeleton);\n this.skeleton.updateWorldTransform();\n\n let drawOrder = this.skeleton.drawOrder;\n let slots = this.skeleton.slots;\n\n for (var i = 0, n = drawOrder.length; i < n; i++) {\n this.children[i] = this.slotContainers[drawOrder[i].data.index];\n }\n\n var r0 = this.tintRgb[0];\n var g0 = this.tintRgb[1];\n var b0 = this.tintRgb[2];\n\n for (i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n var attachment = slot.attachment;\n var slotContainer = this.slotContainers[i];\n\n if (!attachment) {\n slotContainer.visible = false;\n continue;\n }\n\n var attColor = (attachment as any).color;\n if (attachment instanceof spine.RegionAttachment) {\n let region = (attachment as spine.RegionAttachment).region;\n if (region) {\n let ar = region as TextureAtlasRegion;\n if (!slot.currentSpriteName || slot.currentSpriteName !== ar.name) {\n var 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 var sprite = this.createSprite(slot, attachment, spriteName);\n slotContainer.addChild(sprite);\n }\n slot.currentSprite = slot.sprites[spriteName];\n slot.currentSpriteName = spriteName;\n }\n }\n\n if (slotContainer.transform) {\n var transform = slotContainer.transform;\n let lt : PIXI.Matrix;\n if (slotContainer.transform.matrix2d) {\n //gameofbombs pixi fork\n lt = transform.matrix2d;\n transform._dirtyVersion++;\n transform.version = transform._dirtyVersion;\n transform.isStatic = true;\n transform.operMode = 0;\n } else {\n if (TransformBase) {\n //PIXI v4.0\n if (transform.position) {\n transform = new PIXI.TransformBase();\n slotContainer.transform = transform;\n }\n lt = transform.localTransform;\n } else {\n //PIXI v4.0rc\n if (!transform._dirtyLocal) {\n transform = new PIXI.TransformStatic();\n slotContainer.transform = transform;\n }\n lt = transform.localTransform;\n transform._dirtyParentVersion = -1;\n transform._dirtyLocal = 1;\n transform._versionLocal = 1;\n }\n }\n slot.bone.matrix.copy(lt);\n } else {\n //PIXI v3\n var lt = slotContainer.localTransform || new PIXI.Matrix();\n slot.bone.matrix.copy(lt);\n slotContainer.localTransform = lt;\n slotContainer.displayObjectUpdateTransform = SlotContainerUpdateTransformV3;\n }\n tempRgb[0] = r0 * slot.color.r * attColor.r;\n tempRgb[1] = g0 * slot.color.g * attColor.g;\n tempRgb[2] = b0 * slot.color.b * attColor.b;\n slot.currentSprite.tint = PIXI.utils.rgb2hex(tempRgb);\n slot.currentSprite.blendMode = slot.blendMode;\n }\n else if (attachment instanceof spine.MeshAttachment) {\n if (!slot.currentMeshName || slot.currentMeshName !== attachment.name) {\n var 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 var 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 VertexAttachment).computeWorldVertices(slot, slot.currentMesh.vertices);\n if (PIXI.VERSION[0] !== '3') {\n // PIXI version 4\n // slot.currentMesh.dirty++;\n //only for PIXI v4\n var tintRgb = slot.currentMesh.tintRgb;\n tintRgb[0] = r0 * slot.color.r * attColor.r;\n tintRgb[1] = g0 * slot.color.g * attColor.g;\n tintRgb[2] = b0 * slot.color.b * attColor.b;\n }\n slot.currentMesh.blendMode = slot.blendMode;\n }\n else {\n slotContainer.visible = false;\n continue;\n }\n slotContainer.visible = true;\n\n slotContainer.alpha = slot.color.a;\n }\n };\n\n private setSpriteRegion(attachment: spine.RegionAttachment, sprite: SpineSprite, region: spine.TextureRegion) {\n sprite.region = region;\n sprite.texture = region.texture;\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: spine.MeshAttachment, mesh: SpineMesh, region: spine.TextureRegion) {\n mesh.region = region;\n mesh.texture = region.texture;\n attachment.updateUVs(region, mesh.uvs);\n // if (PIXI.VERSION[0] !== '3') {\n // PIXI version 4\n // mesh.indexDirty++;\n // } else {\n // PIXI version 3\n mesh.dirty++;\n // }\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 var 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 spine.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: spine.Slot, attachment: spine.RegionAttachment, defName: string) {\n let region = attachment.region;\n if (slot.tempAttachment === attachment) {\n region = slot.tempRegion;\n slot.tempAttachment = null;\n slot.tempRegion = null;\n }\n var texture = region.texture;\n var sprite = new SpineSprite(texture);\n sprite.rotation = attachment.rotation * spine.MathUtils.degRad;\n sprite.anchor.x = 0.5;\n sprite.anchor.y = 0.5;\n sprite.position.x = attachment.x;\n sprite.position.y = attachment.y;\n sprite.alpha = attachment.color.a;\n\n sprite.region = attachment.region;\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: spine.Slot, attachment: spine.MeshAttachment) {\n let region = attachment.region;\n if (slot.tempAttachment === attachment) {\n region = slot.tempRegion;\n slot.tempAttachment = null;\n slot.tempRegion = null;\n }\n let strip = new SpineMesh(\n region.texture,\n new Float32Array(attachment.regionUVs.length),\n new Float32Array(attachment.regionUVs.length),\n new Uint16Array(attachment.triangles),\n PIXI.mesh.Mesh.DRAW_MODES.TRIANGLES);\n\n strip.canvasPadding = 1.5;\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 /**\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 var slot = this.skeleton.slots[slotIndex];\n if (!slot) {\n return false;\n }\n var attachment: any = slot.attachment;\n var region: spine.TextureRegion = attachment.region;\n if (texture) {\n region = new spine.TextureRegion();\n region.texture = texture;\n region.size = size;\n }\n if (slot.currentSprite && slot.currentSprite.region != region) {\n this.setSpriteRegion(attachment, slot.currentSprite, region);\n slot.currentSprite.region = region;\n } else\n if (slot.currentMesh && slot.currentMesh.region != region) {\n this.setMeshRegion(attachment, slot.currentMesh, region);\n } else {\n slot.tempRegion = region;\n slot.tempAttachment = attachment;\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 = function (slotName: String, texture: PIXI.Texture = null, size: PIXI.Rectangle = null) {\n var index = this.skeleton.findSlotIndex(slotName);\n if (index == -1) {\n return false;\n }\n return this.hackTextureBySlotIndex(index, texture, size);\n }\n}\n\nfunction SlotContainerUpdateTransformV3() {\n var pt = this.parent.worldTransform;\n var wt = this.worldTransform;\n var 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","import {Event} from \"./Event\";\nimport {Skeleton} from \"./Skeleton\";\nimport {PathConstraint} from \"./PathConstraint\";\nimport {Utils, MathUtils, Color, ArrayLike} from \"./Utils\";\nimport {TransformConstraint} from \"./TransformConstraint\";\nimport {IkConstraint} from \"./IkConstraint\";\nimport {VertexAttachment, Attachment} from \"./attachments\";\nimport {Slot} from \"./Slot\";\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\nexport class Animation {\n name: string;\n timelines: Array;\n duration: number;\n\n constructor (name: string, timelines: Array, duration: number) {\n if (name == null) throw new Error(\"name cannot be null.\");\n if (timelines == null) throw new Error(\"timelines cannot be null.\");\n this.name = name;\n this.timelines = timelines;\n this.duration = duration;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: Array) {\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\n\n if (loop && this.duration != 0) {\n time %= this.duration;\n if (lastTime > 0) lastTime %= this.duration;\n }\n\n let timelines = this.timelines;\n for (let i = 0, n = timelines.length; i < n; i++)\n timelines[i].apply(skeleton, lastTime, time, events, 1);\n }\n\n mix (skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: Array, alpha: number) {\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\n\n if (loop && this.duration != 0) {\n time %= this.duration;\n if (lastTime > 0) lastTime %= this.duration;\n }\n\n let timelines = this.timelines;\n for (let i = 0, n = timelines.length; i < n; i++)\n timelines[i].apply(skeleton, lastTime, time, events, alpha);\n }\n\n static binarySearch (values: ArrayLike, target: number, step: number = 1) {\n let low = 0;\n let high = values.length / step - 2;\n if (high == 0) return step;\n let current = high >>> 1;\n while (true) {\n if (values[(current + 1) * step] <= target)\n low = current + 1;\n else\n high = current;\n if (low == high) return (low + 1) * step;\n current = (low + high) >>> 1;\n }\n }\n\n static linearSearch (values: ArrayLike, target: number, step: number) {\n for (let i = 0, last = values.length - step; i <= last; i += step)\n if (values[i] > target) return i;\n return -1;\n }\n}\n\nexport interface Timeline {\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): void;\n}\n\nexport abstract class CurveTimeline implements Timeline {\n static LINEAR = 0; static STEPPED = 1; static BEZIER = 2;\n static BEZIER_SIZE = 10 * 2 - 1;\n\n private curves: ArrayLike; // type, x, y, ...\n\n constructor (frameCount: number) {\n if (frameCount <= 0) throw new Error(\"frameCount must be > 0: \" + frameCount);\n this.curves = Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\n }\n\n getFrameCount () {\n return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\n }\n\n setLinear (frameIndex: number) {\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\n }\n\n setStepped (frameIndex: number) {\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\n }\n\n getCurveType (frameIndex: number): number {\n let index = frameIndex * CurveTimeline.BEZIER_SIZE;\n if (index == this.curves.length) return CurveTimeline.LINEAR;\n let type = this.curves[index];\n if (type == CurveTimeline.LINEAR) return CurveTimeline.LINEAR;\n if (type == CurveTimeline.STEPPED) return CurveTimeline.STEPPED;\n return CurveTimeline.BEZIER;\n }\n\n /** Sets the control handle positions for an interpolation bezier curve used to transition from this keyframe to the next.\n * cx1 and cx2 are from 0 to 1, representing the percent of time between the two keyframes. cy1 and cy2 are the percent of\n * the difference between the keyframe's values. */\n setCurve (frameIndex: number, cx1: number, cy1: number, cx2: number, cy2: number) {\n let tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\n let dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\n let ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\n let dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\n\n let i = frameIndex * CurveTimeline.BEZIER_SIZE;\n let curves = this.curves;\n curves[i++] = CurveTimeline.BEZIER;\n\n let x = dfx, y = dfy;\n for (let n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n x += dfx;\n y += dfy;\n }\n }\n\n getCurvePercent (frameIndex: number, percent: number) {\n percent = MathUtils.clamp(percent, 0, 1);\n let curves = this.curves;\n let i = frameIndex * CurveTimeline.BEZIER_SIZE;\n let type = curves[i];\n if (type == CurveTimeline.LINEAR) return percent;\n if (type == CurveTimeline.STEPPED) return 0;\n i++;\n let x = 0;\n for (let start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\n x = curves[i];\n if (x >= percent) {\n let prevX: number, prevY: number;\n if (i == start) {\n prevX = 0;\n prevY = 0;\n } else {\n prevX = curves[i - 2];\n prevY = curves[i - 1];\n }\n return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\n }\n }\n let y = curves[i - 1];\n return y + (1 - y) * (percent - x) / (1 - x); // Last point is 1,1.\n }\n\n abstract apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): void;\n}\n\nexport class RotateTimeline extends CurveTimeline {\n static ENTRIES = 2;\n static PREV_TIME = -2; static PREV_ROTATION = -1;\n static ROTATION = 1;\n\n boneIndex: number;\n frames: ArrayLike; // time, degrees, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount << 1);\n }\n\n /** Sets the time and angle of the specified keyframe. */\n setFrame (frameIndex: number, time: number, degrees: number) {\n frameIndex <<= 1;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let bone = skeleton.bones[this.boneIndex];\n\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) { // Time is after last frame.\n let amount = bone.data.rotation + frames[frames.length + RotateTimeline.PREV_ROTATION] - bone.rotation;\n while (amount > 180)\n amount -= 360;\n while (amount < -180)\n amount += 360;\n bone.rotation += amount * alpha;\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\n let prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent((frame >> 1) - 1,\n 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\n\n let amount = frames[frame + RotateTimeline.ROTATION] - prevRotation;\n while (amount > 180)\n amount -= 360;\n while (amount < -180)\n amount += 360;\n amount = bone.data.rotation + (prevRotation + amount * percent) - bone.rotation;\n while (amount > 180)\n amount -= 360;\n while (amount < -180)\n amount += 360;\n bone.rotation += amount * alpha;\n }\n}\n\nexport class TranslateTimeline extends CurveTimeline {\n static ENTRIES = 3;\n static PREV_TIME = -3; static PREV_X = -2; static PREV_Y = -1;\n static X = 1; static Y = 2;\n\n boneIndex: number;\n frames: ArrayLike; // time, x, y, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\n }\n\n /** Sets the time and value of the specified keyframe. */\n setFrame (frameIndex: number, time: number, x: number, y: number) {\n frameIndex *= TranslateTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + TranslateTimeline.X] = x;\n this.frames[frameIndex + TranslateTimeline.Y] = y;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let bone = skeleton.bones[this.boneIndex];\n\n if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) { // Time is after last frame.\n bone.x += (bone.data.x + frames[frames.length + TranslateTimeline.PREV_X] - bone.x) * alpha;\n bone.y += (bone.data.y + frames[frames.length + TranslateTimeline.PREV_Y] - bone.y) * alpha;\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\n let prevX = frames[frame + TranslateTimeline.PREV_X];\n let prevY = frames[frame + TranslateTimeline.PREV_Y];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\n\n bone.x += (bone.data.x + prevX + (frames[frame + TranslateTimeline.X] - prevX) * percent - bone.x) * alpha;\n bone.y += (bone.data.y + prevY + (frames[frame + TranslateTimeline.Y] - prevY) * percent - bone.y) * alpha;\n }\n}\n\nexport class ScaleTimeline extends TranslateTimeline {\n constructor (frameCount: number) {\n super(frameCount);\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let bone = skeleton.bones[this.boneIndex];\n if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) { // Time is after last frame.\n bone.scaleX += (bone.data.scaleX * frames[frames.length + ScaleTimeline.PREV_X] - bone.scaleX) * alpha;\n bone.scaleY += (bone.data.scaleY * frames[frames.length + ScaleTimeline.PREV_Y] - bone.scaleY) * alpha;\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\n let prevX = frames[frame + ScaleTimeline.PREV_X];\n let prevY = frames[frame + ScaleTimeline.PREV_Y];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\n\n bone.scaleX += (bone.data.scaleX * (prevX + (frames[frame + ScaleTimeline.X] - prevX) * percent) - bone.scaleX) * alpha;\n bone.scaleY += (bone.data.scaleY * (prevY + (frames[frame + ScaleTimeline.Y] - prevY) * percent) - bone.scaleY) * alpha;\n }\n}\n\nexport class ShearTimeline extends TranslateTimeline {\n constructor (frameCount: number) {\n super(frameCount);\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let bone = skeleton.bones[this.boneIndex];\n if (time >= frames[frames.length - ShearTimeline.ENTRIES]) { // Time is after last frame.\n bone.shearX += (bone.data.shearX + frames[frames.length + ShearTimeline.PREV_X] - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY + frames[frames.length + ShearTimeline.PREV_Y] - bone.shearY) * alpha;\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\n let prevX = frames[frame + ShearTimeline.PREV_X];\n let prevY = frames[frame + ShearTimeline.PREV_Y];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\n\n bone.shearX += (bone.data.shearX + (prevX + (frames[frame + ShearTimeline.X] - prevX) * percent) - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY + (prevY + (frames[frame + ShearTimeline.Y] - prevY) * percent) - bone.shearY) * alpha;\n }\n}\n\nexport class ColorTimeline extends CurveTimeline {\n static ENTRIES = 5;\n static PREV_TIME = -5; static PREV_R = -4; static PREV_G = -3; static PREV_B = -2; static PREV_A = -1;\n static R = 1; static G = 2; static B = 3; static A = 4;\n\n slotIndex: number;\n frames: ArrayLike; // time, r, g, b, a, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\n }\n\n /** Sets the time and value of the specified keyframe. */\n setFrame (frameIndex: number, time: number, r: number, g: number, b: number, a: number) {\n frameIndex *= ColorTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + ColorTimeline.R] = r;\n this.frames[frameIndex + ColorTimeline.G] = g;\n this.frames[frameIndex + ColorTimeline.B] = b;\n this.frames[frameIndex + ColorTimeline.A] = a;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let r = 0, g = 0, b = 0, a = 0;\n if (time >= frames[frames.length - ColorTimeline.ENTRIES]) { // Time is after last frame.\n let i = frames.length;\n r = frames[i + ColorTimeline.PREV_R];\n g = frames[i + ColorTimeline.PREV_G];\n b = frames[i + ColorTimeline.PREV_B];\n a = frames[i + ColorTimeline.PREV_A];\n } else {\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\n r = frames[frame + ColorTimeline.PREV_R];\n g = frames[frame + ColorTimeline.PREV_G];\n b = frames[frame + ColorTimeline.PREV_B];\n a = frames[frame + ColorTimeline.PREV_A];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\n\n r += (frames[frame + ColorTimeline.R] - r) * percent;\n g += (frames[frame + ColorTimeline.G] - g) * percent;\n b += (frames[frame + ColorTimeline.B] - b) * percent;\n a += (frames[frame + ColorTimeline.A] - a) * percent;\n }\n let color: Color = skeleton.slots[this.slotIndex].color;\n if (alpha < 1)\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\n else\n color.set(r, g, b, a);\n }\n}\n\nexport class AttachmentTimeline implements Timeline {\n slotIndex: number;\n frames: ArrayLike // time, ...\n attachmentNames: Array;\n\n constructor (frameCount: number) {\n this.frames = Utils.newFloatArray(frameCount);\n this.attachmentNames = new Array(frameCount);\n }\n\n getFrameCount () {\n return this.frames.length;\n }\n\n /** Sets the time and value of the specified keyframe. */\n setFrame (frameIndex: number, time: number, attachmentName: string) {\n this.frames[frameIndex] = time;\n this.attachmentNames[frameIndex] = attachmentName;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let frameIndex = 0;\n if (time >= frames[frames.length - 1]) // Time is after last frame.\n frameIndex = frames.length - 1;\n else\n frameIndex = Animation.binarySearch(frames, time, 1) - 1;\n\n let attachmentName = this.attachmentNames[frameIndex];\n skeleton.slots[this.slotIndex]\n .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\n }\n}\n\nexport class EventTimeline implements Timeline {\n frames: ArrayLike; // time, ...\n events: Array;\n\n constructor (frameCount: number) {\n this.frames = Utils.newFloatArray(frameCount);\n this.events = new Array(frameCount);\n }\n\n getFrameCount () {\n return this.frames.length;\n }\n\n /** Sets the time of the specified keyframe. */\n setFrame (frameIndex: number, event: Event) {\n this.frames[frameIndex] = event.time;\n this.events[frameIndex] = event;\n }\n\n /** Fires events for frames > lastTime and <= time. */\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) {\n if (firedEvents == null) return;\n let frames = this.frames;\n let frameCount = this.frames.length;\n\n if (lastTime > time) { // Fire events after last time for looped animations.\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha);\n lastTime = -1;\n } else if (lastTime >= frames[frameCount - 1]) // Last time is after last frame.\n return;\n if (time < frames[0]) return; // Time is before first frame.\n\n let frame = 0;\n if (lastTime < frames[0])\n frame = 0;\n else {\n frame = Animation.binarySearch(frames, lastTime);\n let frameTime = frames[frame];\n while (frame > 0) { // Fire multiple events with the same frame.\n if (frames[frame - 1] != frameTime) break;\n frame--;\n }\n }\n for (; frame < frameCount && time >= frames[frame]; frame++)\n firedEvents.push(this.events[frame]);\n }\n}\n\nexport class DrawOrderTimeline implements Timeline {\n frames: ArrayLike; // time, ...\n drawOrders: Array>;\n\n constructor (frameCount: number) {\n this.frames = Utils.newFloatArray(frameCount);\n this.drawOrders = new Array>(frameCount);\n }\n\n getFrameCount () {\n return this.frames.length;\n }\n\n /** Sets the time of the specified keyframe.\n * @param drawOrder May be null to use bind pose draw order. */\n setFrame (frameIndex: number, time: number, drawOrder: Array) {\n this.frames[frameIndex] = time;\n this.drawOrders[frameIndex] = drawOrder;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let frame = 0;\n if (time >= frames[frames.length - 1]) // Time is after last frame.\n frame = frames.length - 1;\n else\n frame = Animation.binarySearch(frames, time) - 1;\n\n let drawOrder: Array = skeleton.drawOrder;\n let slots: Array = skeleton.slots;\n let drawOrderToSetupIndex = this.drawOrders[frame];\n if (drawOrderToSetupIndex == null)\n Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\n else {\n for (let i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\n }\n }\n}\n\nexport class DeformTimeline extends CurveTimeline {\n frames: ArrayLike; // time, ...\n frameVertices: Array>;\n slotIndex: number;\n attachment: VertexAttachment;\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount);\n this.frameVertices = new Array>(frameCount);\n }\n\n /** Sets the time of the specified keyframe. */\n setFrame (frameIndex: number, time: number, vertices: ArrayLike) {\n this.frames[frameIndex] = time;\n this.frameVertices[frameIndex] = vertices;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) {\n let slot: Slot = skeleton.slots[this.slotIndex];\n let slotAttachment: Attachment = slot.getAttachment();\n if (!(slotAttachment instanceof VertexAttachment) || !(slotAttachment).applyDeform(this.attachment)) return;\n\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let frameVertices = this.frameVertices;\n let vertexCount = frameVertices[0].length;\n\n let verticesArray: Array = slot.attachmentVertices;\n if (verticesArray.length != vertexCount) alpha = 1; // Don't mix from uninitialized slot vertices.\n let vertices: Array = Utils.setArraySize(verticesArray, vertexCount);\n\n if (time >= frames[frames.length - 1]) { // Time is after last frame.\n let lastVertices = frameVertices[frames.length - 1];\n if (alpha < 1) {\n for (let i = 0; i < vertexCount; i++)\n vertices[i] += (lastVertices[i] - vertices[i]) * alpha;\n } else\n Utils.arrayCopy(lastVertices, 0, vertices, 0, vertexCount);\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time);\n let prevVertices = frameVertices[frame - 1];\n let nextVertices = frameVertices[frame];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\n\n if (alpha < 1) {\n for (let i = 0; i < vertexCount; i++) {\n let prev = prevVertices[i];\n vertices[i] += (prev + (nextVertices[i] - prev) * percent - vertices[i]) * alpha;\n }\n } else {\n for (let i = 0; i < vertexCount; i++) {\n let prev = prevVertices[i];\n vertices[i] = prev + (nextVertices[i] - prev) * percent;\n }\n }\n }\n}\n\nexport class IkConstraintTimeline extends CurveTimeline {\n static ENTRIES = 3;\n static PREV_TIME = -3; static PREV_MIX = -2; static PREV_BEND_DIRECTION = -1;\n static MIX = 1; static BEND_DIRECTION = 2;\n\n ikConstraintIndex: number;\n frames: ArrayLike; // time, mix, bendDirection, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\n }\n\n /** Sets the time, mix and bend direction of the specified keyframe. */\n setFrame (frameIndex: number, time: number, mix: number, bendDirection: number) {\n frameIndex *= IkConstraintTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\n this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let constraint: IkConstraint = skeleton.ikConstraints[this.ikConstraintIndex];\n\n if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) { // Time is after last frame.\n constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\n constraint.bendDirection = Math.floor(frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION]);\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\n let mix = frames[frame + IkConstraintTimeline.PREV_MIX];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\n\n constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\n constraint.bendDirection = Math.floor(frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION]);\n }\n}\n\nexport class TransformConstraintTimeline extends CurveTimeline {\n static ENTRIES = 5;\n static PREV_TIME = -5; static PREV_ROTATE = -4; static PREV_TRANSLATE = -3; static PREV_SCALE = -2; static PREV_SHEAR = -1;\n static ROTATE = 1; static TRANSLATE = 2; static SCALE = 3; static SHEAR = 4;\n\n transformConstraintIndex: number;\n frames: ArrayLike; // time, rotate mix, translate mix, scale mix, shear mix, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\n }\n\n /** Sets the time and mixes of the specified keyframe. */\n setFrame (frameIndex: number, time: number, rotateMix: number, translateMix: number, scaleMix: number, shearMix: number) {\n frameIndex *= TransformConstraintTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\n this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\n this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\n this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let constraint: TransformConstraint = skeleton.transformConstraints[this.transformConstraintIndex];\n\n if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) { // Time is after last frame.\n let i = frames.length;\n constraint.rotateMix += (frames[i + TransformConstraintTimeline.PREV_ROTATE] - constraint.rotateMix) * alpha;\n constraint.translateMix += (frames[i + TransformConstraintTimeline.PREV_TRANSLATE] - constraint.translateMix) * alpha;\n constraint.scaleMix += (frames[i + TransformConstraintTimeline.PREV_SCALE] - constraint.scaleMix) * alpha;\n constraint.shearMix += (frames[i + TransformConstraintTimeline.PREV_SHEAR] - constraint.shearMix) * alpha;\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\n\n let rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\n let translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\n let scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\n let shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\n constraint.rotateMix += (rotate + (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent - constraint.rotateMix) * alpha;\n constraint.translateMix += (translate + (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent - constraint.translateMix)\n * alpha;\n constraint.scaleMix += (scale + (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent - constraint.scaleMix) * alpha;\n constraint.shearMix += (shear + (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent - constraint.shearMix) * alpha;\n }\n}\n\nexport class PathConstraintPositionTimeline extends CurveTimeline {\n static ENTRIES = 2;\n static PREV_TIME = -2; static PREV_VALUE = -1;\n static VALUE = 1;\n\n pathConstraintIndex: number;\n\n frames: ArrayLike; // time, position, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\n }\n\n /** Sets the time and value of the specified keyframe. */\n setFrame (frameIndex: number, time: number, value: number) {\n frameIndex *= PathConstraintPositionTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let constraint: PathConstraint = skeleton.pathConstraints[this.pathConstraintIndex];\n\n if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES]) { // Time is after last frame.\n let i = frames.length;\n constraint.position += (frames[i + PathConstraintPositionTimeline.PREV_VALUE] - constraint.position) * alpha;\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\n let position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\n\n constraint.position += (position + (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent - constraint.position) * alpha;\n }\n}\n\nexport class PathConstraintSpacingTimeline extends PathConstraintPositionTimeline {\n constructor (frameCount: number) {\n super(frameCount);\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let constraint: PathConstraint = skeleton.pathConstraints[this.pathConstraintIndex];\n\n if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES]) { // Time is after last frame.\n let i = frames.length;\n constraint.spacing += (frames[i + PathConstraintSpacingTimeline.PREV_VALUE] - constraint.spacing) * alpha;\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\n let spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\n\n constraint.spacing += (spacing + (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent - constraint.spacing) * alpha;\n }\n}\n\nexport class PathConstraintMixTimeline extends CurveTimeline {\n static ENTRIES = 3;\n static PREV_TIME = -3; static PREV_ROTATE = -2; static PREV_TRANSLATE = -1;\n static ROTATE = 1; static TRANSLATE = 2;\n\n pathConstraintIndex: number;\n\n frames: ArrayLike; // time, rotate mix, translate mix, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\n }\n\n /** Sets the time and mixes of the specified keyframe. */\n setFrame (frameIndex: number, time: number, rotateMix: number, translateMix: number) {\n frameIndex *= PathConstraintMixTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\n this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) {\n let frames = this.frames;\n if (time < frames[0]) return; // Time is before first frame.\n\n let constraint: PathConstraint = skeleton.pathConstraints[this.pathConstraintIndex];\n\n if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) { // Time is after last frame.\n let i = frames.length;\n constraint.rotateMix += (frames[i + PathConstraintMixTimeline.PREV_ROTATE] - constraint.rotateMix) * alpha;\n constraint.translateMix += (frames[i + PathConstraintMixTimeline.PREV_TRANSLATE] - constraint.translateMix) * alpha;\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\n let rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\n let translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\n\n constraint.rotateMix += (rotate + (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent - constraint.rotateMix) * alpha;\n constraint.translateMix += (translate + (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent - constraint.translateMix)\n * alpha;\n }\n}\n","import {Skeleton} from \"./Skeleton\";\r\nimport {MathUtils, Utils} from \"./Utils\";\r\nimport {Animation} from \"./Animation\";\r\nimport {AnimationStateData} from \"./AnimationStateData\";\r\nimport {Event} from \"./Event\";\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\nexport class AnimationState {\r\n data: AnimationStateData;\r\n tracks = new Array();\r\n events = new Array();\r\n timeScale = 1;\r\n\r\n constructor (data: AnimationStateData = null) {\r\n if (data == null) throw new Error(\"data cannot be null.\");\r\n this.data = data;\r\n }\r\n\r\n update (delta: number) {\r\n delta *= this.timeScale;\r\n for (let i = 0; i < this.tracks.length; i++) {\r\n let current = this.tracks[i];\r\n if (current == null) continue;\r\n\r\n let next = current.next;\r\n if (next != null) {\r\n let nextTime = current.lastTime - next.delay;\r\n if (nextTime >= 0) {\r\n let nextDelta = delta * next.timeScale;\r\n next.time = nextTime + nextDelta; // For start event to see correct time.\r\n current.time += delta * current.timeScale; // For end event to see correct time.\r\n this.setCurrent(i, next);\r\n next.time -= nextDelta; // Prevent increasing time twice, below.\r\n current = next;\r\n }\r\n } else if (!current.loop && current.lastTime >= current.endTime) {\r\n // End non-looping animation when it reaches its end time and there is no next entry.\r\n this.clearTrack(i);\r\n continue;\r\n }\r\n\r\n current.time += delta * current.timeScale;\r\n if (current.previous != null) {\r\n let previousDelta = delta * current.previous.timeScale;\r\n current.previous.time += previousDelta;\r\n current.mixTime += previousDelta;\r\n }\r\n }\r\n }\r\n\r\n apply (skeleton: Skeleton) {\r\n let events = this.events;\r\n\r\n for (let i = 0; i < this.tracks.length; i++) {\r\n let current = this.tracks[i];\r\n if (current == null) continue;\r\n\r\n events.length = 0;\r\n\r\n let time = current.time;\r\n let lastTime = current.lastTime;\r\n let endTime = current.endTime;\r\n let loop = current.loop;\r\n if (!loop && time > endTime) time = endTime;\r\n\r\n let previous = current.previous;\r\n if (previous == null)\r\n current.animation.mix(skeleton, lastTime, time, loop, events, current.mix);\r\n else {\r\n let previousTime = previous.time;\r\n if (!previous.loop && previousTime > previous.endTime) previousTime = previous.endTime;\r\n previous.animation.apply(skeleton, previousTime, previousTime, previous.loop, null);\r\n\r\n let alpha = current.mixTime / current.mixDuration * current.mix;\r\n if (alpha >= 1) {\r\n alpha = 1;\r\n current.previous = null;\r\n }\r\n current.animation.mix(skeleton, lastTime, time, loop, events, alpha);\r\n }\r\n\r\n for (let ii = 0, nn = events.length; ii < nn; ii++) {\r\n let event = events[ii];\r\n if (current.onEvent) current.onEvent(i, event);\r\n if (this.onEvent) this.onEvent(i, event);\r\n }\r\n\r\n // Check if completed the animation or a loop iteration.\r\n if (loop ? (lastTime % endTime > time % endTime) : (lastTime < endTime && time >= endTime)) {\r\n let count = MathUtils.toInt(time / endTime);\r\n if (current.onComplete) current.onComplete(i, count);\r\n if (this.onComplete) this.onComplete(i, count);\r\n }\r\n\r\n current.lastTime = current.time;\r\n }\r\n }\r\n\r\n clearTracks () {\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 }\r\n\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 if (current.onEnd) current.onEnd(trackIndex);\r\n if (this.onEnd) this.onEnd(trackIndex);\r\n\r\n this.tracks[trackIndex] = null;\r\n\r\n this.freeAll(current);\r\n }\r\n\r\n freeAll (entry: TrackEntry) {\r\n while (entry != null) {\r\n let next = entry.next;\r\n entry = next;\r\n }\r\n }\r\n\r\n expandToIndex (index: number) {\r\n if (index < this.tracks.length) return this.tracks[index];\r\n Utils.setArraySize(this.tracks, index - this.tracks.length + 1, null);\r\n this.tracks.length = index + 1;\r\n return null;\r\n }\r\n\r\n setCurrent (index: number, entry: TrackEntry) {\r\n let current = this.expandToIndex(index);\r\n if (current != null) {\r\n let previous = current.previous;\r\n current.previous = null;\r\n\r\n if (entry.onEnd) entry.onEnd(index);\r\n if (this.onEnd) this.onEnd(index);\r\n\r\n entry.mixDuration = this.data.getMix(current.animation, entry.animation);\r\n if (entry.mixDuration > 0) {\r\n entry.mixTime = 0;\r\n // If a mix is in progress, mix from the closest animation.\r\n if (previous != null && current.mixTime / current.mixDuration < 0.5) {\r\n entry.previous = previous;\r\n previous = current;\r\n } else\r\n entry.previous = current;\r\n }\r\n }\r\n\r\n this.tracks[index] = entry;\r\n\r\n if (entry.onStart) entry.onStart(index);\r\n if (this.onStart) this.onStart(index);\r\n }\r\n\r\n /** @see #setAnimation(int, Animation, boolean) */\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 /** Set the current animation. Any queued animations are cleared. */\r\n setAnimationWith (trackIndex: number, animation: Animation, loop: boolean) {\r\n let current = this.expandToIndex(trackIndex);\r\n if (current != null) this.freeAll(current.next);\r\n\r\n let entry = new TrackEntry();\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.endTime = animation.duration;\r\n this.setCurrent(trackIndex, entry);\r\n return entry;\r\n }\r\n\r\n /** {@link #addAnimation(int, Animation, boolean, float)} */\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 hasAnimation(animationName: string): boolean\r\n {\r\n let animation = this.data.skeletonData.findAnimation(animationName);\r\n return animation !== null;\r\n }\r\n\r\n /** Adds an animation to be played delay seconds after the current or last queued animation.\r\n * @param delay May be <= 0 to use duration of previous animation minus any mix duration plus the negative delay. */\r\n addAnimationWith (trackIndex: number, animation: Animation, loop: boolean, delay: number) {\r\n let entry = new TrackEntry();\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.endTime = animation.duration;\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 last.next = entry;\r\n } else\r\n this.tracks[trackIndex] = entry;\r\n\r\n if (delay <= 0) {\r\n if (last != null)\r\n delay += last.endTime - this.data.getMix(last.animation, animation);\r\n else\r\n delay = 0;\r\n }\r\n entry.delay = delay;\r\n\r\n return entry;\r\n }\r\n\r\n /** @return May be null. */\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 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 setAnimationByName (trackIndex: number, animationName: string, loop: boolean) {\r\n if (!AnimationState.deprecatedWarning1) {\r\n AnimationState.deprecatedWarning1 = true;\r\n console.warn(\"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 addAnimationByName (trackIndex: number, animationName: string, loop: boolean, delay: number) {\r\n if (!AnimationState.deprecatedWarning2) {\r\n AnimationState.deprecatedWarning2 = true;\r\n console.warn(\"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 hasAnimationByName (animationName: string): boolean\r\n {\r\n if (!AnimationState.deprecatedWarning3) {\r\n AnimationState.deprecatedWarning3 = true;\r\n console.warn(\"Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.\");\r\n }\r\n let animation = this.data.skeletonData.findAnimation(animationName);\r\n return animation !== null;\r\n }\r\n}\r\n\r\nexport class TrackEntry {\r\n next: TrackEntry; previous: TrackEntry;\r\n animation: Animation;\r\n loop = false;\r\n delay = 0; time = 0; lastTime = -1; endTime = 0; timeScale = 1;\r\n mixTime = 0; mixDuration = 0;\r\n mix = 1;\r\n\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 reset () {\r\n this.next = null;\r\n this.previous = null;\r\n this.animation = null;\r\n this.timeScale = 1;\r\n this.lastTime = -1; // Trigger events on frame zero.\r\n this.time = 0;\r\n }\r\n\r\n /** Returns true if the current time is greater than the end time, regardless of looping. */\r\n isComplete () : boolean {\r\n return this.time >= this.endTime;\r\n }\r\n}\r\n","import {Animation} from \"./Animation\";\nimport {SkeletonData} from \"./SkeletonData\";\nimport {Map} from \"./Utils\";\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\nexport class AnimationStateData {\n skeletonData: SkeletonData;\n animationToMixTime: Map = { };\n defaultMix = 0;\n\n constructor (skeletonData: SkeletonData) {\n if (skeletonData == null) throw new Error(\"skeletonData cannot be null.\");\n this.skeletonData = skeletonData;\n }\n\n setMix (fromName: string, toName: string, duration: number) {\n let from = this.skeletonData.findAnimation(fromName);\n if (from == null) throw new Error(\"Animation not found: \" + fromName);\n let to = this.skeletonData.findAnimation(toName);\n if (to == null) throw new Error(\"Animation not found: \" + toName);\n this.setMixWith(from, to, duration);\n }\n\n private static deprecatedWarning1: boolean = false;\n setMixByName(fromName: string, toName: string, duration: number) {\n if (!AnimationStateData.deprecatedWarning1) {\n AnimationStateData.deprecatedWarning1 = true;\n console.warn(\"Deprecation Warning: AnimationStateData.setMixByName is deprecated, please use setMix from now on.\");\n }\n this.setMix(fromName, toName, duration);\n }\n\n setMixWith (from: Animation, to: Animation, duration: number) {\n if (from == null) throw new Error(\"from cannot be null.\");\n if (to == null) throw new Error(\"to cannot be null.\");\n let key = from.name + to.name;\n this.animationToMixTime[key] = duration;\n }\n\n getMix (from: Animation, to: Animation) {\n let key = from.name + to.name;\n let value = this.animationToMixTime[key];\n return value === undefined ? this.defaultMix : value;\n }\n}\n","import {Skin} from \"./Skin\";\nimport {AttachmentLoader, BoundingBoxAttachment, MeshAttachment, PathAttachment, RegionAttachment} from \"./attachments\";\nimport {TextureAtlas} from \"./TextureAtlas\";\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\nexport class AtlasAttachmentLoader implements AttachmentLoader {\n atlas: TextureAtlas;\n\n constructor (atlas: TextureAtlas) {\n this.atlas = atlas;\n }\n\n /** @return May be null to not load an attachment. */\n newRegionAttachment (skin: Skin, name: string, path: string): RegionAttachment {\n let region = this.atlas.findRegion(path);\n if (region == null) throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\n let attachment = new RegionAttachment(name);\n attachment.region = region;\n return attachment;\n }\n\n /** @return May be null to not load an attachment. */\n newMeshAttachment (skin: Skin, name: string, path: string) : MeshAttachment {\n let region = this.atlas.findRegion(path);\n if (region == null) throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\n let attachment = new MeshAttachment(name);\n attachment.region = region;\n return attachment;\n }\n\n /** @return May be null to not load an attachment. */\n newBoundingBoxAttachment (skin: Skin, name: string) : BoundingBoxAttachment {\n return new BoundingBoxAttachment(name);\n }\n\n /** @return May be null to not load an attachment */\n newPathAttachment (skin: Skin, name: string): PathAttachment {\n return new PathAttachment(name);\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\nexport enum BlendMode {\r\n Normal,\r\n Additive,\r\n Multiply,\r\n Screen\r\n}\r\n","import {Updatable} from \"./Updatable\";\nimport {BoneData, TransformMode} from \"./BoneData\";\nimport {Skeleton} from \"./Skeleton\";\nimport {MathUtils, Vector2} from \"./Utils\";\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\nexport 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; y = 0; rotation = 0; scaleX = 0; scaleY = 0; shearX = 0; shearY = 0;\n ax = 0; ay = 0; arotation = 0; ascaleX = 0; ascaleY = 0; ashearX = 0; ashearY = 0;\n appliedValid = false;\n\n sorted = 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 /** 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 if (parent == null) { // Root bone.\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 let skeleton = this.skeleton;\n if (skeleton.flipX) {\n x = -x;\n la = -la;\n lb = -lb;\n }\n if (skeleton.flipY !== Bone.yDown) {\n y = -y;\n lc = -lc;\n ld = -ld;\n }\n m.a = la;\n m.c = lb;\n m.b = lc;\n m.d = ld;\n m.tx = x + skeleton.x;\n m.ty = y + 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 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;\n let zc = pc * cos + pd * sin;\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 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 if (this.data.transformMode != TransformMode.NoScaleOrReflection ? pa * pd - pb * pc < 0 : (this.skeleton.flipX != this.skeleton.flipY) != Bone.yDown) {\n m.b = -m.b;\n m.d = -m.d;\n }\n return;\n }\n //old < 3.5 stuff\n case TransformMode.InheritRotation: {\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\n pa = 1;\n pb = 0;\n pc = 0;\n pd = 1;\n do {\n let cos = MathUtils.cosDeg(parent.arotation), sin = MathUtils.sinDeg(parent.arotation);\n let temp = pa * cos + pb * sin;\n pb = pb * cos - pa * sin;\n pa = temp;\n temp = pc * cos + pd * sin;\n pd = pd * cos - pc * sin;\n pc = temp;\n\n if (parent.data.transformMode === TransformMode.InheritScale ||\n parent.data.transformMode === TransformMode.OnlyTranslation) break;\n parent = parent.parent;\n } while (parent != null);\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 //old < 3.5 stuff\n case TransformMode.InheritScale: {\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\n pa = 1;\n pb = 0;\n pc = 0;\n pd = 1;\n do {\n let cos = MathUtils.cosDeg(parent.arotation), sin = MathUtils.sinDeg(parent.arotation);\n let psx = parent.scaleX, psy = parent.scaleY;\n let za = cos * psx, zb = sin * psy, zc = sin * psx, zd = cos * psy;\n let temp = pa * za + pb * zc;\n pb = pb * zd - pa * zb;\n pa = temp;\n temp = pc * za + pd * zc;\n pd = pd * zd - pc * zb;\n pc = temp;\n\n if (psx >= 0) sin = -sin;\n temp = pa * cos + pb * sin;\n pb = pb * cos - pa * sin;\n pa = temp;\n temp = pc * cos + pd * sin;\n pd = pd * cos - pc * sin;\n pc = temp;\n\n if (parent.data.transformMode === TransformMode.InheritRotation ||\n parent.data.transformMode === TransformMode.OnlyTranslation) break;\n parent = parent.parent;\n } while (parent != null);\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 }\n if (this.skeleton.flipX) {\n m.a = -m.a;\n m.c = -m.c;\n }\n if (this.skeleton.flipY != Bone.yDown) {\n m.b = -m.b;\n m.d = -m.d;\n }\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 worldToLocalRotationX () {\n let parent = this.parent;\n if (parent == null) return this.arotation;\n let pm = parent.matrix, m = this.matrix;\n return Math.atan2(pm.a * m.b - pm.b * m.a, pm.d * m.a - pm.c * m.b) * MathUtils.radDeg;\n }\n\n worldToLocalRotationY () {\n let parent = this.parent;\n if (parent == null) return this.arotation;\n let pm = parent.matrix, m = this.matrix;\n return Math.atan2(pm.a * m.d - pm.b * m.c, pm.d * m.c - pm.c * m.d) * MathUtils.radDeg;\n }\n\n rotateWorld (degrees: number) {\n let m = this.matrix;\n let a = this.matrix.a, b = m.c, c = m.b, d = m.d;\n let cos = MathUtils.cosDeg(degrees), sin = MathUtils.sinDeg(degrees);\n m.a = cos * a - sin * c;\n m.c = cos * b - sin * d;\n m.b = sin * a + cos * c;\n m.d = sin * b + cos * d;\n this.appliedValid = false;\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","/******************************************************************************\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\nexport class BoneData {\n index: number;\n name: string;\n parent: BoneData;\n length: number;\n x = 0; y = 0; rotation = 0; scaleX = 1; scaleY = 1; shearX = 0; shearY = 0;\n transformMode = TransformMode.Normal;\n\n constructor (index: number, name: string, parent: BoneData) {\n if (index < 0) throw new Error(\"index must be >= 0.\");\n if (name == null) throw new Error(\"name cannot be null.\");\n this.index = index;\n this.name = name;\n this.parent = parent;\n }\n}\n\nexport enum TransformMode {\n Normal, OnlyTranslation, NoRotationOrReflection, NoScale, NoScaleOrReflection, InheritRotation, InheritScale\n}\n","import {EventData} from \"./EventData\";\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\nexport class Event {\r\n data: EventData;\r\n intValue: number;\r\n floatValue: number;\r\n stringValue: string;\r\n time: number;\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 * 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\nexport class EventData {\r\n name: string;\r\n intValue: number;\r\n floatValue: number;\r\n stringValue: string;\r\n\r\n constructor (name: string) {\r\n this.name = name;\r\n }\r\n}\r\n","import {IkConstraintData} from \"./IkConstraintData\";\nimport {Bone} from \"./Bone\";\nimport {Skeleton} from \"./Skeleton\";\nimport {MathUtils} from \"./Utils\";\nimport {Constraint} from \"./Constraint\";\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\nexport class IkConstraint implements Constraint {\n data: IkConstraintData;\n bones: Array;\n target: Bone;\n mix = 1;\n bendDirection = 0;\n\n level = 0;\n\n constructor (data: IkConstraintData, skeleton: Skeleton) {\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.mix = data.mix;\n this.bendDirection = data.bendDirection;\n\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findBone(data.target.name);\n }\n\n getOrder () {\n return this.data.order;\n }\n\n apply () {\n this.update();\n }\n\n update () {\n let target = this.target;\n let bones = this.bones;\n switch (bones.length) {\n case 1:\n this.apply1(bones[0], target.worldX, target.worldY, this.mix);\n break;\n case 2:\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.mix);\n break;\n }\n }\n\n /** Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified in the world\n * coordinate system. */\n apply1 (bone: Bone, targetX: number, targetY: number, alpha: number) {\n if (!bone.appliedValid) bone.updateAppliedTransform();\n let pp = bone.parent.matrix;\n let id = 1 / (pp.a * pp.d - pp.b * pp.c);\n let x = targetX - pp.tx, y = targetY - pp.ty;\n let tx = (x * pp.d - y * pp.c) * id - bone.ax, ty = (y * pp.a - x * pp.b) * id - bone.ay;\n let rotationIK = Math.atan2(ty, tx) * MathUtils.radDeg - bone.ashearX - bone.arotation;\n if (bone.ascaleX < 0) rotationIK += 180;\n if (rotationIK > 180)\n rotationIK -= 360;\n else if (rotationIK < -180) rotationIK += 360;\n bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, bone.ascaleX, bone.ascaleY, bone.ashearX,\n bone.ashearY);\n }\n\n /** Adjusts the parent and child bone rotations so the tip of the child is as close to the target position as possible. The\n * target is specified in the world coordinate system.\n * @param child A direct descendant of the parent bone. */\n apply2 (parent: Bone, child: Bone, targetX: number, targetY: number, bendDir: number, alpha: number) {\n if (alpha == 0) {\n child.updateWorldTransform();\n return;\n }\n if (!parent.appliedValid) parent.updateAppliedTransform();\n if (!child.appliedValid) child.updateAppliedTransform();\n let px = parent.ax, py = parent.ay, psx = parent.ascaleX, psy = parent.ascaleY, csx = child.ascaleX;\n\n let os1 = 0, os2 = 0, s2 = 0;\n if (psx < 0) {\n psx = -psx;\n os1 = 180;\n s2 = -1;\n } else {\n os1 = 0;\n s2 = 1;\n }\n if (psy < 0) {\n psy = -psy;\n s2 = -s2;\n }\n if (csx < 0) {\n csx = -csx;\n os2 = 180;\n } else\n os2 = 0;\n let pm = parent.matrix;\n let cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = pm.a, b = pm.c, c = pm.b, d = pm.d;\n let u = Math.abs(psx - psy) <= 0.0001;\n if (!u) {\n cy = 0;\n cwx = a * cx + pm.tx;\n cwy = c * cx + pm.ty;\n } else {\n cy = child.ay;\n cwx = a * cx + b * cy + pm.tx;\n cwy = c * cx + d * cy + pm.ty;\n }\n let pp = parent.parent;\n let ppm = parent.parent.matrix;\n a = ppm.a;\n b = ppm.c;\n c = ppm.b;\n d = ppm.d;\n let id = 1 / (a * d - b * c), x = targetX - ppm.tx, y = targetY - ppm.ty;\n let tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\n x = cwx - ppm.tx;\n y = cwy - ppm.ty;\n let dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\n let l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1 = 0, a2 = 0;\n outer:\n if (u) {\n l2 *= psx;\n let cos = (tx * tx + ty * ty - l1 * l1 - l2 * l2) / (2 * l1 * l2);\n if (cos < -1)\n cos = -1;\n else if (cos > 1) cos = 1;\n a2 = Math.acos(cos) * bendDir;\n a = l1 + l2 * cos;\n b = l2 * Math.sin(a2);\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\n } else {\n a = psx * l2;\n b = psy * l2;\n let aa = a * a, bb = b * b, dd = tx * tx + ty * ty, ta = Math.atan2(ty, tx);\n c = bb * l1 * l1 + aa * dd - aa * bb;\n let c1 = -2 * bb * l1, c2 = bb - aa;\n d = c1 * c1 - 4 * c2 * c;\n if (d >= 0) {\n let q = Math.sqrt(d);\n if (c1 < 0) q = -q;\n q = -(c1 + q) / 2;\n let r0 = q / c2, r1 = c / q;\n let r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\n if (r * r <= dd) {\n y = Math.sqrt(dd - r * r) * bendDir;\n a1 = ta - Math.atan2(y, r);\n a2 = Math.atan2(y / psy, (r - l1) / psx);\n break outer;\n }\n }\n let minAngle = 0, minDist = Number.MAX_VALUE, minX = 0, minY = 0;\n let maxAngle = 0, maxDist = 0, maxX = 0, maxY = 0;\n x = l1 + a;\n d = x * x;\n if (d > maxDist) {\n maxAngle = 0;\n maxDist = d;\n maxX = x;\n }\n x = l1 - a;\n d = x * x;\n if (d < minDist) {\n minAngle = MathUtils.PI;\n minDist = d;\n minX = x;\n }\n let angle = Math.acos(-a * l1 / (aa - bb));\n x = a * Math.cos(angle) + l1;\n y = b * Math.sin(angle);\n d = x * x + y * y;\n if (d < minDist) {\n minAngle = angle;\n minDist = d;\n minX = x;\n minY = y;\n }\n if (d > maxDist) {\n maxAngle = angle;\n maxDist = d;\n maxX = x;\n maxY = y;\n }\n if (dd <= (minDist + maxDist) / 2) {\n a1 = ta - Math.atan2(minY * bendDir, minX);\n a2 = minAngle * bendDir;\n } else {\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\n a2 = maxAngle * bendDir;\n }\n }\n let os = Math.atan2(cy, cx) * s2;\n let rotation = parent.arotation;\n a1 = (a1 - os) * MathUtils.radDeg + os1 - rotation;\n if (a1 > 180)\n a1 -= 360;\n else if (a1 < -180) a1 += 360;\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, parent.ascaleX, parent.ascaleY, 0, 0);\n rotation = child.arotation;\n a2 = ((a2 + os) * MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\n if (a2 > 180)\n a2 -= 360;\n else if (a2 < -180) a2 += 360;\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\n }\n}\n","import {BoneData} from \"./BoneData\";\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\nexport class IkConstraintData {\n name: string;\n order = 0;\n bones = new Array();\n target: BoneData;\n bendDirection = 1;\n mix = 1;\n\n constructor (name: string) {\n this.name = name;\n }\n}\n","import {PathConstraintData, SpacingMode, RotateMode, PositionMode} from \"./PathConstraintData\";\nimport {Bone} from \"./Bone\";\nimport {Slot} from \"./Slot\";\nimport {Skeleton} from \"./Skeleton\";\nimport {PathAttachment} from \"./attachments\";\nimport {Utils, MathUtils} from \"./Utils\";\nimport {Constraint} from \"./Constraint\";\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\nexport class PathConstraint implements Constraint {\n static NONE = -1; static BEFORE = -2; static AFTER = -3;\n\n data: PathConstraintData;\n bones: Array;\n target: Slot;\n position = 0; spacing = 0; rotateMix = 0; translateMix = 0;\n\n spaces = new Array(); positions = new Array();\n world = new Array(); curves = new Array(); lengths = new Array();\n segments = new Array();\n\n constructor (data: PathConstraintData, skeleton: Skeleton) {\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.bones = new Array();\n for (let i = 0, n = data.bones.length; i < n; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findSlot(data.target.name);\n this.position = data.position;\n this.spacing = data.spacing;\n this.rotateMix = data.rotateMix;\n this.translateMix = data.translateMix;\n }\n\n apply () {\n this.update();\n }\n\n update () {\n let attachment = this.target.getAttachment();\n if (!(attachment instanceof PathAttachment)) return;\n\n let rotateMix = this.rotateMix, translateMix = this.translateMix;\n let translate = translateMix > 0, rotate = rotateMix > 0;\n if (!translate && !rotate) return;\n\n let data = this.data;\n let spacingMode = data.spacingMode;\n let lengthSpacing = spacingMode == SpacingMode.Length;\n let rotateMode = data.rotateMode;\n let tangents = rotateMode == RotateMode.Tangent, scale = rotateMode == RotateMode.ChainScale;\n let boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\n let bones = this.bones;\n let spaces = Utils.setArraySize(this.spaces, spacesCount), lengths: Array = null;\n let spacing = this.spacing;\n if (scale || lengthSpacing) {\n if (scale) lengths = Utils.setArraySize(this.lengths, boneCount);\n for (let i = 0, n = spacesCount - 1; i < n;) {\n let bone = bones[i];\n let m = bone.matrix;\n let length = bone.data.length, x = length * m.a, y = length * m.b;\n length = Math.sqrt(x * x + y * y);\n if (scale) lengths[i] = length;\n spaces[++i] = lengthSpacing ? Math.max(0, length + spacing) : spacing;\n }\n } else {\n for (let i = 1; i < spacesCount; i++)\n spaces[i] = spacing;\n }\n\n let positions = this.computeWorldPositions(attachment, spacesCount, tangents,\n data.positionMode == PositionMode.Percent, spacingMode == SpacingMode.Percent);\n let boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\n let tip = rotateMode == RotateMode.Chain && offsetRotation == 0;\n for (let i = 0, p = 3; i < boneCount; i++, p += 3) {\n let bone = bones[i];\n let m = bone.matrix;\n m.tx += (boneX - m.tx) * translateMix;\n m.ty += (boneY - m.ty) * translateMix;\n let x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\n if (scale) {\n let length = lengths[i];\n if (length != 0) {\n let s = (Math.sqrt(dx * dx + dy * dy) / length - 1) * rotateMix + 1;\n m.a *= s;\n m.b *= s;\n }\n }\n boneX = x;\n boneY = y;\n if (rotate) {\n let a = m.a, b = m.c, c = m.b, d = m.d, r = 0, cos = 0, sin = 0;\n if (tangents)\n r = positions[p - 1];\n else if (spaces[i + 1] == 0)\n r = positions[p + 2];\n else\n r = Math.atan2(dy, dx);\n r -= Math.atan2(c, a) - offsetRotation * MathUtils.degRad;\n if (tip) {\n cos = Math.cos(r);\n sin = Math.sin(r);\n let length = bone.data.length;\n boneX += (length * (cos * a - sin * c) - dx) * rotateMix;\n boneY += (length * (sin * a + cos * c) - dy) * rotateMix;\n }\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI) //\n r += MathUtils.PI2;\n r *= rotateMix;\n cos = Math.cos(r);\n sin = Math.sin(r);\n m.a = cos * a - sin * c;\n m.c = cos * b - sin * d;\n m.b = sin * a + cos * c;\n m.d = sin * b + cos * d;\n }\n bone.appliedValid = false;\n }\n }\n\n computeWorldPositions (path: PathAttachment, spacesCount: number, tangents: boolean, percentPosition: boolean,\n percentSpacing: boolean) {\n let target = this.target;\n let position = this.position;\n let spaces = this.spaces, out = Utils.setArraySize(this.positions, spacesCount * 3 + 2), world: Array = null;\n let closed = path.closed;\n let verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\n\n if (!path.constantSpeed) {\n let lengths = path.lengths;\n curveCount -= closed ? 1 : 2;\n let pathLength = lengths[curveCount];\n if (percentPosition) position *= pathLength;\n if (percentSpacing) {\n for (let i = 0; i < spacesCount; i++)\n spaces[i] *= pathLength;\n }\n world = Utils.setArraySize(this.world, 8);\n for (let i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\n let space = spaces[i];\n position += space;\n let p = position;\n\n if (closed) {\n p %= pathLength;\n if (p < 0) p += pathLength;\n curve = 0;\n } else if (p < 0) {\n if (prevCurve != PathConstraint.BEFORE) {\n prevCurve = PathConstraint.BEFORE;\n path.computeWorldVerticesWith(target, 2, 4, world, 0);\n }\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n } else if (p > pathLength) {\n if (prevCurve != PathConstraint.AFTER) {\n prevCurve = PathConstraint.AFTER;\n path.computeWorldVerticesWith(target, verticesLength - 6, 4, world, 0);\n }\n this.addAfterPosition(p - pathLength, world, 0, out, o);\n continue;\n }\n\n // Determine curve containing position.\n for (;; curve++) {\n let length = lengths[curve];\n if (p > length) continue;\n if (curve == 0)\n p /= length;\n else {\n let prev = lengths[curve - 1];\n p = (p - prev) / (length - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n if (closed && curve == curveCount) {\n path.computeWorldVerticesWith(target, verticesLength - 4, 4, world, 0);\n path.computeWorldVerticesWith(target, 0, 4, world, 4);\n } else\n path.computeWorldVerticesWith(target, curve * 6 + 2, 8, world, 0);\n }\n this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o,\n tangents || (i > 0 && space == 0));\n }\n return out;\n }\n\n // World vertices.\n if (closed) {\n verticesLength += 2;\n world = Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVerticesWith(target, 2, verticesLength - 4, world, 0);\n path.computeWorldVerticesWith(target, 0, 2, world, verticesLength - 4);\n world[verticesLength - 2] = world[0];\n world[verticesLength - 1] = world[1];\n } else {\n curveCount--;\n verticesLength -= 4;\n world = Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVerticesWith(target, 2, verticesLength, world, 0);\n }\n\n // Curve lengths.\n let curves = Utils.setArraySize(this.curves, curveCount);\n let pathLength = 0;\n let x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\n let tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\n for (let i = 0, w = 2; i < curveCount; i++, w += 6) {\n cx1 = world[w];\n cy1 = world[w + 1];\n cx2 = world[w + 2];\n cy2 = world[w + 3];\n x2 = world[w + 4];\n y2 = world[w + 5];\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\n ddfx = tmpx * 2 + dddfx;\n ddfy = tmpy * 2 + dddfy;\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx;\n dfy += ddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx + dddfx;\n dfy += ddfy + dddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n curves[i] = pathLength;\n x1 = x2;\n y1 = y2;\n }\n if (percentPosition) position *= pathLength;\n if (percentSpacing) {\n for (let i = 0; i < spacesCount; i++)\n spaces[i] *= pathLength;\n }\n\n let segments = this.segments;\n let curveLength = 0;\n for (let i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\n let space = spaces[i];\n position += space;\n let p = position;\n\n if (closed) {\n p %= pathLength;\n if (p < 0) p += pathLength;\n curve = 0;\n } else if (p < 0) {\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n } else if (p > pathLength) {\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\n continue;\n }\n\n // Determine curve containing position.\n for (;; curve++) {\n let length = curves[curve];\n if (p > length) continue;\n if (curve == 0)\n p /= length;\n else {\n let prev = curves[curve - 1];\n p = (p - prev) / (length - prev);\n }\n break;\n }\n\n // Curve segment lengths.\n if (curve != prevCurve) {\n prevCurve = curve;\n let ii = curve * 6;\n x1 = world[ii];\n y1 = world[ii + 1];\n cx1 = world[ii + 2];\n cy1 = world[ii + 3];\n cx2 = world[ii + 4];\n cy2 = world[ii + 5];\n x2 = world[ii + 6];\n y2 = world[ii + 7];\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\n ddfx = tmpx * 2 + dddfx;\n ddfy = tmpy * 2 + dddfy;\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\n segments[0] = curveLength;\n for (ii = 1; ii < 8; ii++) {\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[ii] = curveLength;\n }\n dfx += ddfx;\n dfy += ddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[8] = curveLength;\n dfx += ddfx + dddfx;\n dfy += ddfy + dddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[9] = curveLength;\n segment = 0;\n }\n\n // Weight by segment length.\n p *= curveLength;\n for (;; segment++) {\n let length = segments[segment];\n if (p > length) continue;\n if (segment == 0)\n p /= length;\n else {\n let prev = segments[segment - 1];\n p = segment + (p - prev) / (length - prev);\n }\n break;\n }\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\n }\n return out;\n }\n\n addBeforePosition (p: number, temp: Array, i: number, out: Array, o: number) {\n let x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\n out[o] = x1 + p * Math.cos(r);\n out[o + 1] = y1 + p * Math.sin(r);\n out[o + 2] = r;\n }\n\n addAfterPosition (p: number, temp: Array, i: number, out: Array, o: number) {\n let x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\n out[o] = x1 + p * Math.cos(r);\n out[o + 1] = y1 + p * Math.sin(r);\n out[o + 2] = r;\n }\n\n addCurvePosition (p: number, x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number,\n out: Array, o: number, tangents: boolean) {\n if (p == 0 || isNaN(p)) p = 0.0001;\n let tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\n let ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\n let x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\n out[o] = x;\n out[o + 1] = y;\n if (tangents) out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\n }\n\n getOrder () {\n return this.data.order;\n }\n}\n","import {BoneData} from \"./BoneData\";\nimport {SlotData} from \"./SlotData\";\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\nexport class PathConstraintData {\n name: string;\n order = 0;\n bones = new Array();\n target: SlotData;\n positionMode: PositionMode;\n spacingMode: SpacingMode;\n rotateMode: RotateMode;\n offsetRotation: number;\n position: number; spacing: number; rotateMix: number; translateMix: number;\n\n constructor (name: string) {\n this.name = name;\n }\n}\n\nexport enum PositionMode {\n Fixed, Percent\n}\n\nexport enum SpacingMode {\n Length, Fixed, Percent\n}\n\nexport enum RotateMode {\n Tangent, Chain, ChainScale\n}\n","import {Slot} from \"./Slot\";\nimport {Bone} from \"./Bone\";\nimport {IkConstraint} from \"./IkConstraint\";\nimport {TransformConstraint} from \"./TransformConstraint\";\nimport {PathConstraint} from \"./PathConstraint\";\nimport {Color, Utils, Vector2} from \"./Utils\";\nimport {Skin} from \"./Skin\";\nimport {SkeletonData} from \"./SkeletonData\";\nimport {Updatable} from \"./Updatable\";\nimport {Attachment, PathAttachment, RegionAttachment, MeshAttachment} from \"./attachments\";\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\nexport class Skeleton {\n data: SkeletonData;\n bones: Array;\n slots: Array;\n drawOrder: Array;\n ikConstraints: Array;\n transformConstraints: Array;\n pathConstraints: Array;\n _updateCache = new Array();\n updateCacheReset = new Array();\n skin: Skin;\n color: Color;\n time = 0;\n flipX = false; flipY = false;\n x = 0; y = 0;\n\n constructor (data: SkeletonData) {\n if (data == null) throw new Error(\"data cannot be null.\");\n this.data = data;\n\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++) {\n let boneData = data.bones[i];\n let bone: Bone;\n if (boneData.parent == null)\n bone = new Bone(boneData, this, null);\n else {\n let parent = this.bones[boneData.parent.index];\n bone = new Bone(boneData, this, parent);\n parent.children.push(bone);\n }\n this.bones.push(bone);\n }\n\n this.slots = new Array();\n this.drawOrder = new Array();\n for (let i = 0; i < data.slots.length; i++) {\n let slotData = data.slots[i];\n let bone = this.bones[slotData.boneData.index];\n let slot = new Slot(slotData, bone);\n this.slots.push(slot);\n this.drawOrder.push(slot);\n }\n\n this.ikConstraints = new Array();\n for (let i = 0; i < data.ikConstraints.length; i++) {\n let ikConstraintData = data.ikConstraints[i];\n this.ikConstraints.push(new IkConstraint(ikConstraintData, this));\n }\n\n this.transformConstraints = new Array();\n for (let i = 0; i < data.transformConstraints.length; i++) {\n let transformConstraintData = data.transformConstraints[i];\n this.transformConstraints.push(new TransformConstraint(transformConstraintData, this));\n }\n\n this.pathConstraints = new Array();\n for (let i = 0; i < data.pathConstraints.length; i++) {\n let pathConstraintData = data.pathConstraints[i];\n this.pathConstraints.push(new PathConstraint(pathConstraintData, this));\n }\n\n this.color = new Color(1, 1, 1, 1);\n this.updateCache();\n }\n\n updateCache () {\n let updateCache = this._updateCache;\n updateCache.length = 0;\n\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++)\n bones[i].sorted = false;\n\n let ikConstraints = this.ikConstraints;\n let transformConstraints = this.transformConstraints;\n let pathConstraints = this.pathConstraints;\n let ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\n let constraintCount = ikCount + transformCount + pathCount;\n\n outer:\n for (let i = 0; i < constraintCount; i++) {\n for (let ii = 0; ii < ikCount; ii++) {\n let constraint = ikConstraints[ii];\n if (constraint.data.order == i) {\n this.sortIkConstraint(constraint);\n continue outer;\n }\n }\n for (let ii = 0; ii < transformCount; ii++) {\n let constraint = transformConstraints[ii];\n if (constraint.data.order == i) {\n this.sortTransformConstraint(constraint);\n continue outer;\n }\n }\n for (let ii = 0; ii < pathCount; ii++) {\n let constraint = pathConstraints[ii];\n if (constraint.data.order == i) {\n this.sortPathConstraint(constraint);\n continue outer;\n }\n }\n }\n\n for (let i = 0, n = bones.length; i < n; i++)\n this.sortBone(bones[i]);\n }\n\n sortIkConstraint (constraint: IkConstraint) {\n let target = constraint.target;\n this.sortBone(target);\n\n let constrained = constraint.bones;\n let parent = constrained[0];\n this.sortBone(parent);\n\n if (constrained.length > 1) {\n let child = constrained[constrained.length - 1];\n if (!(this._updateCache.indexOf(child) > -1)) this.updateCacheReset.push(child);\n }\n\n this._updateCache.push(constraint);\n\n this.sortReset(parent.children);\n constrained[constrained.length - 1].sorted = true;\n }\n\n sortPathConstraint (constraint: PathConstraint) {\n let slot = constraint.target;\n let slotIndex = slot.data.index;\n let slotBone = slot.bone;\n if (this.skin != null) this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\n if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\n for (let ii = 0, nn = this.data.skins.length; ii < nn; ii++)\n this.sortPathConstraintAttachment(this.data.skins[ii], slotIndex, slotBone);\n\n let attachment = slot.getAttachment();\n if (attachment instanceof PathAttachment) this.sortPathConstraintAttachmentWith(attachment, slotBone);\n\n let constrained = constraint.bones;\n let boneCount = constrained.length;\n for (let ii = 0; ii < boneCount; ii++)\n this.sortBone(constrained[ii]);\n\n this._updateCache.push(constraint);\n\n for (let ii = 0; ii < boneCount; ii++)\n this.sortReset(constrained[ii].children);\n for (let ii = 0; ii < boneCount; ii++)\n constrained[ii].sorted = true;\n }\n\n sortTransformConstraint (constraint: TransformConstraint) {\n this.sortBone(constraint.target);\n\n let constrained = constraint.bones;\n let boneCount = constrained.length;\n for (let ii = 0; ii < boneCount; ii++)\n this.sortBone(constrained[ii]);\n\n this._updateCache.push(constraint);\n\n for (let ii = 0; ii < boneCount; ii++)\n this.sortReset(constrained[ii].children);\n for (let ii = 0; ii < boneCount; ii++)\n constrained[ii].sorted = true;\n }\n\n sortPathConstraintAttachment (skin: Skin, slotIndex: number, slotBone: Bone) {\n let attachments = skin.attachments[slotIndex];\n if (!attachments) return;\n for (let key in attachments) {\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\n }\n }\n\n sortPathConstraintAttachmentWith (attachment: Attachment, slotBone: Bone) {\n if (!(attachment instanceof PathAttachment)) return;\n let pathBones = (attachment).bones;\n if (pathBones == null)\n this.sortBone(slotBone);\n else {\n let bones = this.bones;\n let i = 0;\n while (i < pathBones.length) {\n let boneCount = pathBones[i++];\n for (let n = i + boneCount; i < n; i++) {\n let boneIndex = pathBones[i];\n this.sortBone(bones[boneIndex]);\n }\n }\n }\n }\n\n sortBone (bone: Bone) {\n if (bone.sorted) return;\n let parent = bone.parent;\n if (parent != null) this.sortBone(parent);\n bone.sorted = true;\n this._updateCache.push(bone);\n }\n\n sortReset (bones: Array) {\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.sorted) this.sortReset(bone.children);\n bone.sorted = false;\n }\n }\n\n /** Updates the world transform for each bone and applies constraints. */\n updateWorldTransform () {\n let updateCacheReset = this.updateCacheReset;\n for (let i = 0, n = updateCacheReset.length; i < n; i++) {\n let bone = updateCacheReset[i] as Bone;\n bone.ax = bone.x;\n bone.ay = bone.y;\n bone.arotation = bone.rotation;\n bone.ascaleX = bone.scaleX;\n bone.ascaleY = bone.scaleY;\n bone.ashearX = bone.shearX;\n bone.ashearY = bone.shearY;\n bone.appliedValid = true;\n }\n let updateCache = this._updateCache;\n for (let i = 0, n = updateCache.length; i < n; i++)\n updateCache[i].update();\n }\n\n /** Sets the bones, constraints, and slots to their setup pose values. */\n setToSetupPose () {\n this.setBonesToSetupPose();\n this.setSlotsToSetupPose();\n }\n\n /** Sets the bones and constraints to their setup pose values. */\n setBonesToSetupPose () {\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++)\n bones[i].setToSetupPose();\n\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let constraint = ikConstraints[i];\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.mix = constraint.data.mix;\n }\n\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n let data = constraint.data;\n constraint.rotateMix = data.rotateMix;\n constraint.translateMix = data.translateMix;\n constraint.scaleMix = data.scaleMix;\n constraint.shearMix = data.shearMix;\n }\n\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n let data = constraint.data;\n constraint.position = data.position;\n constraint.spacing = data.spacing;\n constraint.rotateMix = data.rotateMix;\n constraint.translateMix = data.translateMix;\n }\n }\n\n setSlotsToSetupPose () {\n let slots = this.slots;\n Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\n for (let i = 0, n = slots.length; i < n; i++)\n slots[i].setToSetupPose();\n }\n\n /** @return May return null. */\n getRootBone () {\n if (this.bones.length == 0) return null;\n return this.bones[0];\n }\n\n /** @return May be null. */\n findBone (boneName: string) {\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.data.name == boneName) return bone;\n }\n return null;\n }\n\n /** @return -1 if the bone was not found. */\n findBoneIndex (boneName: string) {\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++)\n if (bones[i].data.name == boneName) return i;\n return -1;\n }\n\n /** @return May be null. */\n findSlot (slotName: string) {\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.data.name == slotName) return slot;\n }\n return null;\n }\n\n /** @return -1 if the bone was not found. */\n findSlotIndex (slotName: string) {\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++)\n if (slots[i].data.name == slotName) return i;\n return -1;\n }\n\n /** Sets a skin by name.\n * @see #setSkin(Skin) */\n setSkinByName (skinName: string) {\n let skin = this.data.findSkin(skinName);\n if (skin == null) throw new Error(\"Skin not found: \" + skinName);\n this.setSkin(skin);\n }\n\n /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default skin}.\n * Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no\n * old skin, each slot's setup mode attachment is attached from the new skin.\n * @param newSkin May be null. */\n setSkin (newSkin: Skin) {\n if (newSkin != null) {\n if (this.skin != null)\n newSkin.attachAll(this, this.skin);\n else {\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n let name = slot.data.attachmentName;\n if (name != null) {\n let attachment: Attachment = newSkin.getAttachment(i, name);\n if (attachment != null) slot.setAttachment(attachment);\n }\n }\n }\n }\n this.skin = newSkin;\n }\n\n /** @return May be null. */\n getAttachmentByName (slotName: string, attachmentName: string): Attachment {\n return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\n }\n\n /** @return May be null. */\n getAttachment (slotIndex: number, attachmentName: string): Attachment {\n if (attachmentName == null) throw new Error(\"attachmentName cannot be null.\");\n if (this.skin != null) {\n let attachment: Attachment = this.skin.getAttachment(slotIndex, attachmentName);\n if (attachment != null) return attachment;\n }\n if (this.data.defaultSkin != null) return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\n return null;\n }\n\n /** @param attachmentName May be null. */\n setAttachment (slotName: string, attachmentName: string) {\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.data.name == slotName) {\n let attachment: Attachment = null;\n if (attachmentName != null) {\n attachment = this.getAttachment(i, attachmentName);\n if (attachment == null)\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\n }\n slot.setAttachment(attachment);\n return;\n }\n }\n throw new Error(\"Slot not found: \" + slotName);\n }\n\n /** @return May be null. */\n findIkConstraint (constraintName: string) {\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let ikConstraint = ikConstraints[i];\n if (ikConstraint.data.name == constraintName) return ikConstraint;\n }\n return null;\n }\n\n /** @return May be null. */\n findTransformConstraint (constraintName: string) {\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n if (constraint.data.name == constraintName) return constraint;\n }\n return null;\n }\n\n /** @return May be null. */\n findPathConstraint (constraintName: string) {\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n if (constraint.data.name == constraintName) return constraint;\n }\n return null;\n }\n\n /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\n * @param offset The distance from the skeleton origin to the bottom left corner of the AABB.\n * @param size The width and height of the AABB. */\n getBounds (offset: Vector2, size: Vector2) {\n if (offset == null) throw new Error(\"offset cannot be null.\");\n if (size == null) throw new Error(\"size cannot be null.\");\n let drawOrder = this.drawOrder;\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let slot = drawOrder[i];\n let vertices: ArrayLike = null;\n let attachment = slot.getAttachment();\n if (attachment instanceof RegionAttachment)\n vertices = (attachment).updateWorldVertices(slot, false);\n else if (attachment instanceof MeshAttachment) //\n vertices = (attachment).updateWorldVertices(slot, true);\n if (vertices != null) {\n for (let ii = 0, nn = vertices.length; ii < nn; ii += 8) {\n let x = vertices[ii], y = vertices[ii + 1];\n minX = Math.min(minX, x);\n minY = Math.min(minY, y);\n maxX = Math.max(maxX, x);\n maxY = Math.max(maxY, y);\n }\n }\n }\n offset.set(minX, minY);\n size.set(maxX - minX, maxY - minY);\n }\n\n update (delta: number) {\n this.time += delta;\n }\n}\n","import {Utils, Pool} from \"./Utils\";\r\nimport {Skeleton} from \"./Skeleton\";\r\nimport {BoundingBoxAttachment} from \"./attachments\";\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\nexport 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 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, polygon);\r\n }\r\n }\r\n\r\n if (updateAabb) this.aabbCompute();\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","import {BoneData} from \"./BoneData\";\nimport {SlotData} from \"./SlotData\";\nimport {Skin} from \"./Skin\";\nimport {EventData} from \"./EventData\";\nimport {Animation} from \"./Animation\";\nimport {IkConstraintData} from \"./IkConstraintData\";\nimport {TransformConstraintData} from \"./TransformConstraintData\";\nimport {PathConstraintData} from \"./PathConstraintData\";\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\nexport class SkeletonData {\n name: string;\n bones = new Array(); // Ordered parents first.\n slots = new Array(); // Setup pose draw order.\n skins = new Array();\n defaultSkin: Skin;\n events = new Array();\n animations = new Array();\n ikConstraints = new Array();\n transformConstraints = new Array();\n pathConstraints = new Array();\n width: number; height: number;\n version: string; hash: string;\n\n // Nonessential\n fps = 0;\n imagesPath: string;\n\n findBone (boneName: string) {\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.name == boneName) return bone;\n }\n return null;\n }\n\n findBoneIndex (boneName: string) {\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++)\n if (bones[i].name == boneName) return i;\n return -1;\n }\n\n findSlot (slotName: string) {\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.name == slotName) return slot;\n }\n return null;\n }\n\n findSlotIndex (slotName: string) {\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++)\n if (slots[i].name == slotName) return i;\n return -1;\n }\n\n findSkin (skinName: string) {\n if (skinName == null) throw new Error(\"skinName cannot be null.\");\n let skins = this.skins;\n for (let i = 0, n = skins.length; i < n; i++) {\n let skin = skins[i];\n if (skin.name == skinName) return skin;\n }\n return null;\n }\n\n findEvent (eventDataName: string) {\n if (eventDataName == null) throw new Error(\"eventDataName cannot be null.\");\n let events = this.events;\n for (let i = 0, n = events.length; i < n; i++) {\n let event = events[i];\n if (event.name == eventDataName) return event;\n }\n return null;\n }\n\n findAnimation (animationName: string) {\n if (animationName == null) throw new Error(\"animationName cannot be null.\");\n let animations = this.animations;\n for (let i = 0, n = animations.length; i < n; i++) {\n let animation = animations[i];\n if (animation.name == animationName) return animation;\n }\n return null;\n }\n\n findIkConstraint (constraintName: string) {\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let constraint = ikConstraints[i];\n if (constraint.name == constraintName) return constraint;\n }\n return null;\n }\n\n findTransformConstraint (constraintName: string) {\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n if (constraint.name == constraintName) return constraint;\n }\n return null;\n }\n\n findPathConstraint (constraintName: string) {\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n if (constraint.name == constraintName) return constraint;\n }\n return null;\n }\n\n findPathConstraintIndex (pathConstraintName: string) {\n if (pathConstraintName == null) throw new Error(\"pathConstraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++)\n if (pathConstraints[i].name == pathConstraintName) return i;\n return -1;\n }\n}\n","import {SkeletonData} from \"./SkeletonData\";\nimport {BoneData, TransformMode} from \"./BoneData\";\nimport {SlotData} from \"./SlotData\";\nimport {Event} from \"./Event\";\nimport {IkConstraintData} from \"./IkConstraintData\";\nimport {TransformConstraintData} from \"./TransformConstraintData\";\nimport {PathConstraintData, PositionMode, SpacingMode, RotateMode} from \"./PathConstraintData\";\nimport {Skin} from \"./Skin\";\nimport {EventData} from \"./EventData\";\nimport {Attachment, AttachmentLoader, MeshAttachment, VertexAttachment} from \"./attachments\";\nimport {Utils, Color, ArrayLike} from \"./Utils\";\nimport {\n Timeline, ColorTimeline, AttachmentTimeline, RotateTimeline, TranslateTimeline,\n ScaleTimeline, ShearTimeline, IkConstraintTimeline, TransformConstraintTimeline, PathConstraintPositionTimeline,\n PathConstraintSpacingTimeline, PathConstraintMixTimeline, DeformTimeline, DrawOrderTimeline, EventTimeline,\n Animation, CurveTimeline\n} from \"./Animation\";\nimport {BlendMode} from \"./BlendMode\";\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\nexport class SkeletonJson {\n attachmentLoader: AttachmentLoader;\n scale = 1;\n private linkedMeshes = new Array();\n\n constructor (attachmentLoader: AttachmentLoader) {\n this.attachmentLoader = attachmentLoader;\n }\n\n readSkeletonData (json: string | any ): SkeletonData {\n let scale = this.scale;\n let skeletonData = new SkeletonData();\n let root = typeof(json) === \"string\" ? JSON.parse(json) : json;\n\n // Skeleton\n let skeletonMap = root.skeleton;\n if (skeletonMap != null) {\n skeletonData.hash = skeletonMap.hash;\n skeletonData.version = skeletonMap.spine;\n skeletonData.width = skeletonMap.width;\n skeletonData.height = skeletonMap.height;\n skeletonData.fps = skeletonMap.fps;\n skeletonData.imagesPath = skeletonMap.images;\n }\n\n // Bones\n if (root.bones) {\n for (let i = 0; i < root.bones.length; i++) {\n let boneMap = root.bones[i];\n\n let parent: BoneData = null;\n let parentName: string = this.getValue(boneMap, \"parent\", null);\n if (parentName != null) {\n parent = skeletonData.findBone(parentName);\n if (parent == null) throw new Error(\"Parent bone not found: \" + parentName);\n }\n let data = new BoneData(skeletonData.bones.length, boneMap.name, parent);\n data.length = this.getValue(boneMap, \"length\", 0) * scale;\n data.x = this.getValue(boneMap, \"x\", 0) * scale;\n data.y = this.getValue(boneMap, \"y\", 0) * scale;\n data.rotation = this.getValue(boneMap, \"rotation\", 0);\n data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\n data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\n data.shearX = this.getValue(boneMap, \"shearX\", 0);\n data.shearY = this.getValue(boneMap, \"shearY\", 0);\n\n //this is legacy\n if (boneMap.hasOwnProperty(\"inheritScale\") || boneMap.hasOwnProperty(\"inheritRotation\")) {\n //before 3.5\n data.transformMode = SkeletonJson.transformModeLegacy(\n this.getValue(boneMap, \"inheritRotation\", true),\n this.getValue(boneMap, \"inheritScale\", true));\n } else {\n //after 3.5\n data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\n }\n\n skeletonData.bones.push(data);\n }\n }\n\n // Slots.\n if (root.slots) {\n for (let i = 0; i < root.slots.length; i++) {\n let slotMap = root.slots[i];\n let slotName: string = slotMap.name;\n let boneName: string = slotMap.bone;\n let boneData = skeletonData.findBone(boneName);\n if (boneData == null) throw new Error(\"Slot bone not found: \" + boneName);\n let data = new SlotData(skeletonData.slots.length, slotName, boneData);\n\n let color: string = this.getValue(slotMap, \"color\", null);\n if (color != null) data.color.setFromString(color);\n\n data.attachmentName = this.getValue(slotMap, \"attachment\", null);\n data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\n skeletonData.slots.push(data);\n }\n }\n\n // IK constraints\n if (root.ik) {\n for (let i = 0; i < root.ik.length; i++) {\n let constraintMap = root.ik[i];\n let data = new IkConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n\n for (let j = 0; j < constraintMap.bones.length; j++) {\n let boneName = constraintMap.bones[j];\n let bone = skeletonData.findBone(boneName);\n if (bone == null) throw new Error(\"IK bone not found: \" + boneName);\n data.bones.push(bone);\n }\n\n let targetName: string = constraintMap.target;\n data.target = skeletonData.findBone(targetName);\n if (data.target == null) throw new Error(\"IK target bone not found: \" + targetName);\n\n data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\n data.mix = this.getValue(constraintMap, \"mix\", 1);\n\n skeletonData.ikConstraints.push(data);\n }\n }\n\n // Transform constraints.\n if (root.transform) {\n for (let i = 0; i < root.transform.length; i++) {\n let constraintMap = root.transform[i];\n let data = new TransformConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n\n for (let j = 0; j < constraintMap.bones.length; j++) {\n let boneName = constraintMap.bones[j];\n let bone = skeletonData.findBone(boneName);\n if (bone == null) throw new Error(\"Transform constraint bone not found: \" + boneName);\n data.bones.push(bone);\n }\n\n let targetName: string = constraintMap.target;\n data.target = skeletonData.findBone(targetName);\n if (data.target == null) throw new Error(\"Transform constraint target bone not found: \" + targetName);\n\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\n data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\n data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\n data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\n data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\n data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\n\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\n data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\n data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\n\n skeletonData.transformConstraints.push(data);\n }\n }\n\n // Path constraints.\n if (root.path) {\n for (let i = 0; i < root.path.length; i++) {\n let constraintMap = root.path[i];\n let data = new PathConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n\n for (let j = 0; j < constraintMap.bones.length; j++) {\n let boneName = constraintMap.bones[j];\n let bone = skeletonData.findBone(boneName);\n if (bone == null) throw new Error(\"Transform constraint bone not found: \" + boneName);\n data.bones.push(bone);\n }\n\n let targetName: string = constraintMap.target;\n data.target = skeletonData.findSlot(targetName);\n if (data.target == null) throw new Error(\"Path target slot not found: \" + targetName);\n\n data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\n data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\n data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\n data.position = this.getValue(constraintMap, \"position\", 0);\n if (data.positionMode == PositionMode.Fixed) data.position *= scale;\n data.spacing = this.getValue(constraintMap, \"spacing\", 0);\n if (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) data.spacing *= scale;\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\n\n skeletonData.pathConstraints.push(data);\n }\n }\n\n // Skins.\n if (root.skins) {\n for (let skinName in root.skins) {\n let skinMap = root.skins[skinName]\n let skin = new Skin(skinName);\n for (let slotName in skinMap) {\n let slotIndex = skeletonData.findSlotIndex(slotName);\n if (slotIndex == -1) throw new Error(\"Slot not found: \" + slotName);\n let slotMap = skinMap[slotName];\n for (let entryName in slotMap) {\n let attachment = this.readAttachment(slotMap[entryName], skin, slotIndex, entryName);\n if (attachment != null) skin.addAttachment(slotIndex, entryName, attachment);\n }\n }\n skeletonData.skins.push(skin);\n if (skin.name == \"default\") skeletonData.defaultSkin = skin;\n }\n }\n\n // Linked meshes.\n for (let i = 0, n = this.linkedMeshes.length; i < n; i++) {\n let linkedMesh = this.linkedMeshes[i];\n let skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (skin == null) throw new Error(\"Skin not found: \" + linkedMesh.skin);\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (parent == null) throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\n linkedMesh.mesh.setParentMesh( parent);\n // linkedMesh.mesh.updateUVs();\n }\n this.linkedMeshes.length = 0;\n\n // Events.\n if (root.events) {\n for (let eventName in root.events) {\n let eventMap = root.events[eventName];\n let data = new EventData(eventName);\n data.intValue = this.getValue(eventMap, \"int\", 0);\n data.floatValue = this.getValue(eventMap, \"float\", 0);\n data.stringValue = this.getValue(eventMap, \"string\", null);\n skeletonData.events.push(data);\n }\n }\n\n // Animations.\n if (root.animations) {\n for (let animationName in root.animations) {\n let animationMap = root.animations[animationName];\n this.readAnimation(animationMap, animationName, skeletonData);\n }\n }\n\n return skeletonData;\n }\n\n readAttachment (map: any, skin: Skin, slotIndex: number, name: string): Attachment {\n let scale = this.scale;\n name = this.getValue(map, \"name\", name);\n\n let type = this.getValue(map, \"type\", \"region\");\n\n switch (type) {\n case \"region\": {\n let path = this.getValue(map, \"path\", name);\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path);\n if (region == null) return null;\n region.path = path;\n region.x = this.getValue(map, \"x\", 0) * scale;\n region.y = this.getValue(map, \"y\", 0) * scale;\n region.scaleX = this.getValue(map, \"scaleX\", 1);\n region.scaleY = this.getValue(map, \"scaleY\", 1);\n region.rotation = this.getValue(map, \"rotation\", 0);\n region.width = map.width * scale;\n region.height = map.height * scale;\n\n let color: string = this.getValue(map, \"color\", null);\n if (color != null) region.color.setFromString(color);\n\n return region;\n }\n case \"boundingbox\": {\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (box == null) return null;\n this.readVertices(map, box, map.vertexCount << 1);\n let color: string = this.getValue(map, \"color\", null);\n if (color != null) box.color.setFromString(color);\n return box;\n }\n //weightedmesh is deprecated but who cares\n case \"weightedmesh\":\n case \"skinnedmesh\":\n case \"mesh\":\n case \"linkedmesh\": {\n let path = this.getValue(map, \"path\", name);\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\n if (mesh == null) return null;\n mesh.path = path;\n\n let color = this.getValue(map, \"color\", null);\n if (color != null) mesh.color.setFromString(color);\n\n let parent: string = this.getValue(map, \"parent\", null);\n if (parent != null) {\n mesh.inheritDeform = this.getValue(map, \"deform\", true);\n this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent));\n return mesh;\n }\n\n let uvs: Array = map.uvs;\n this.readVertices(map, mesh, uvs.length);\n mesh.triangles = map.triangles;\n mesh.regionUVs = uvs;\n // mesh.updateUVs();\n\n mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\n return mesh;\n }\n case \"path\": {\n let path = this.attachmentLoader.newPathAttachment(skin, name);\n if (path == null) return null;\n path.closed = this.getValue(map, \"closed\", false);\n path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\n\n let vertexCount = map.vertexCount;\n this.readVertices(map, path, vertexCount << 1);\n\n let lengths: Array = Utils.newArray(vertexCount / 3, 0);\n for (let i = 0; i < map.lengths.length; i++)\n lengths[i++] = map.lengths[i] * scale;\n path.lengths = lengths;\n\n let color: string = this.getValue(map, \"color\", null);\n if (color != null) path.color.setFromString(color);\n return path;\n }\n }\n return null;\n }\n\n readVertices (map: any, attachment: VertexAttachment, verticesLength: number) {\n let scale = this.scale;\n attachment.worldVerticesLength = verticesLength;\n let vertices: Array = map.vertices;\n if (verticesLength == vertices.length) {\n if (scale != 1) {\n for (let i = 0, n = vertices.length; i < n; i++)\n vertices[i] *= scale;\n }\n attachment.vertices = Utils.toFloatArray(vertices);\n return;\n }\n let weights = new Array();\n let bones = new Array();\n for (let i = 0, n = vertices.length; i < n;) {\n let boneCount = vertices[i++];\n bones.push(boneCount);\n for (let nn = i + boneCount * 4; i < nn; i += 4) {\n bones.push(vertices[i]);\n weights.push(vertices[i + 1] * scale);\n weights.push(vertices[i + 2] * scale);\n weights.push(vertices[i + 3]);\n }\n }\n attachment.bones = bones;\n attachment.vertices = Utils.toFloatArray(weights);\n }\n\n readAnimation (map: any, name: string, skeletonData: SkeletonData) {\n let scale = this.scale;\n let timelines = new Array();\n let duration = 0;\n\n // Slot timelines.\n if (map.slots) {\n for (let slotName in map.slots) {\n let slotMap = map.slots[slotName];\n let slotIndex = skeletonData.findSlotIndex(slotName);\n if (slotIndex == -1) throw new Error(\"Slot not found: \" + slotName);\n for (let timelineName in slotMap) {\n let timelineMap = slotMap[timelineName];\n if (timelineName == \"color\") {\n let timeline = new ColorTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n let color = new Color();\n color.setFromString(valueMap.color);\n timeline.setFrame(frameIndex, valueMap.time, color.r, color.g, color.b, color.a);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * ColorTimeline.ENTRIES]);\n\n } else if (timelineName = \"attachment\") {\n let timeline = new AttachmentTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n timeline.setFrame(frameIndex++, valueMap.time, valueMap.name);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n } else\n throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\n }\n }\n }\n\n // Bone timelines.\n if (map.bones) {\n for (let boneName in map.bones) {\n let boneMap = map.bones[boneName];\n let boneIndex = skeletonData.findBoneIndex(boneName);\n if (boneIndex == -1) throw new Error(\"Bone not found: \" + boneName);\n for (let timelineName in boneMap) {\n let timelineMap = boneMap[timelineName];\n if (timelineName === \"rotate\") {\n let timeline = new RotateTimeline(timelineMap.length);\n timeline.boneIndex = boneIndex;\n\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, valueMap.time, valueMap.angle);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * RotateTimeline.ENTRIES]);\n\n } else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\n let timeline: TranslateTimeline = null;\n let timelineScale = 1;\n if (timelineName === \"scale\")\n timeline = new ScaleTimeline(timelineMap.length);\n else if (timelineName === \"shear\")\n timeline = new ShearTimeline(timelineMap.length);\n else {\n timeline = new TranslateTimeline(timelineMap.length);\n timelineScale = scale;\n }\n timeline.boneIndex = boneIndex;\n\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n let x = this.getValue(valueMap, \"x\", 0), y = this.getValue(valueMap, \"y\", 0);\n timeline.setFrame(frameIndex, valueMap.time, x * timelineScale, y * timelineScale);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * TranslateTimeline.ENTRIES]);\n\n } else\n throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\n }\n }\n }\n\n // IK constraint timelines.\n if (map.ik) {\n for (let constraintName in map.ik) {\n let constraintMap = map.ik[constraintName];\n let constraint = skeletonData.findIkConstraint(constraintName);\n let timeline = new IkConstraintTimeline(constraintMap.length);\n timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\n let frameIndex = 0;\n for (let i = 0; i < constraintMap.length; i++) {\n let valueMap = constraintMap[i];\n timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, \"mix\", 1),\n this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * IkConstraintTimeline.ENTRIES]);\n }\n }\n\n // Transform constraint timelines.\n if (map.transform) {\n for (let constraintName in map.transform) {\n let constraintMap = map.transform[constraintName];\n let constraint = skeletonData.findTransformConstraint(constraintName);\n let timeline = new TransformConstraintTimeline(constraintMap.length);\n timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\n let frameIndex = 0;\n for (let i = 0; i < constraintMap.length; i++) {\n let valueMap = constraintMap[i];\n timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, \"rotateMix\", 1),\n this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration,\n timeline.frames[(timeline.getFrameCount() - 1) * TransformConstraintTimeline.ENTRIES]);\n }\n }\n\n // Path constraint timelines.\n if (map.paths) {\n for (let constraintName in map.paths) {\n let constraintMap = map.paths[constraintName];\n let index = skeletonData.findPathConstraintIndex(constraintName);\n if (index == -1) throw new Error(\"Path constraint not found: \" + constraintName);\n let data = skeletonData.pathConstraints[index];\n for (let timelineName in constraintMap) {\n let timelineMap = constraintMap[timelineName];\n if (timelineName === \"position\" || timelineName === \"spacing\") {\n let timeline: PathConstraintPositionTimeline = null;\n let timelineScale = 1;\n if (timelineName === \"spacing\") {\n timeline = new PathConstraintSpacingTimeline(timelineMap.length);\n if (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) timelineScale = scale;\n } else {\n timeline = new PathConstraintPositionTimeline(timelineMap.length);\n if (data.positionMode == PositionMode.Fixed) timelineScale = scale;\n }\n timeline.pathConstraintIndex = index;\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, timelineName, 0) * timelineScale);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration,\n timeline.frames[(timeline.getFrameCount() - 1) * PathConstraintPositionTimeline.ENTRIES]);\n } else if (timelineName === \"mix\") {\n let timeline = new PathConstraintMixTimeline(timelineMap.length);\n timeline.pathConstraintIndex = index;\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, \"rotateMix\", 1),\n this.getValue(valueMap, \"translateMix\", 1));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration,\n timeline.frames[(timeline.getFrameCount() - 1) * PathConstraintMixTimeline.ENTRIES]);\n }\n }\n }\n }\n\n // Deform timelines.\n if (map.deform) {\n for (let deformName in map.deform) {\n let deformMap = map.deform[deformName];\n let skin = skeletonData.findSkin(deformName);\n if (skin == null) throw new Error(\"Skin not found: \" + deformName);\n for (let slotName in deformMap) {\n let slotMap = deformMap[slotName];\n let slotIndex = skeletonData.findSlotIndex(slotName);\n if (slotIndex == -1) throw new Error(\"Slot not found: \" + slotMap.name);\n for (let timelineName in slotMap) {\n let timelineMap = slotMap[timelineName];\n let attachment = skin.getAttachment(slotIndex, timelineName);\n if (attachment == null) throw new Error(\"Deform attachment not found: \" + timelineMap.name);\n let weighted = attachment.bones != null;\n let vertices = attachment.vertices;\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n\n let timeline = new DeformTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n timeline.attachment = attachment;\n\n let frameIndex = 0;\n for (let j = 0; j < timelineMap.length; j++) {\n let valueMap = timelineMap[j];\n let deform: ArrayLike;\n let verticesValue: Array = this.getValue(valueMap, \"vertices\", null);\n if (verticesValue == null)\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = Utils.newFloatArray(deformLength);\n let start = this.getValue(valueMap, \"offset\", 0);\n Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\n if (scale != 1) {\n for (let i = start, n = i + verticesValue.length; i < n; i++)\n deform[i] *= scale;\n }\n if (!weighted) {\n for (let i = 0; i < deformLength; i++)\n deform[i] += vertices[i];\n }\n }\n\n timeline.setFrame(frameIndex, valueMap.time, deform);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n }\n }\n }\n\n // Draw order timeline.\n let drawOrderNode = map.drawOrder;\n if (drawOrderNode == null) drawOrderNode = map.draworder;\n if (drawOrderNode != null) {\n let timeline = new DrawOrderTimeline(drawOrderNode.length);\n let slotCount = skeletonData.slots.length;\n let frameIndex = 0;\n for (let j = 0; j < drawOrderNode.length; j++) {\n let drawOrderMap = drawOrderNode[j];\n let drawOrder: Array = null;\n let offsets = this.getValue(drawOrderMap, \"offsets\", null);\n if (offsets != null) {\n drawOrder = Utils.newArray(slotCount, -1);\n let unchanged = Utils.newArray(slotCount - offsets.length, 0);\n let originalIndex = 0, unchangedIndex = 0;\n for (let i = 0; i < offsets.length; i++) {\n let offsetMap = offsets[i];\n let slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\n if (slotIndex == -1) throw new Error(\"Slot not found: \" + offsetMap.slot);\n // Collect unchanged items.\n while (originalIndex != slotIndex)\n unchanged[unchangedIndex++] = originalIndex++;\n // Set changed items.\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\n }\n // Collect remaining unchanged items.\n while (originalIndex < slotCount)\n unchanged[unchangedIndex++] = originalIndex++;\n // Fill in unchanged items.\n for (let i = slotCount - 1; i >= 0; i--)\n if (drawOrder[i] == -1) drawOrder[i] = unchanged[--unchangedIndex];\n }\n timeline.setFrame(frameIndex++, drawOrderMap.time, drawOrder);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n\n // Event timeline.\n if (map.events) {\n let timeline = new EventTimeline(map.events.length);\n let frameIndex = 0;\n for (let i = 0; i < map.events.length; i++) {\n let eventMap = map.events[i];\n let eventData = skeletonData.findEvent(eventMap.name);\n if (eventData == null) throw new Error(\"Event not found: \" + eventMap.name);\n let event = new Event(eventMap.time, eventData);\n event.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\n event.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\n event.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\n timeline.setFrame(frameIndex++, event);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n\n if (isNaN(duration)) {\n throw new Error(\"Error while parsing animation, duration is NaN\");\n }\n\n skeletonData.animations.push(new Animation(name, timelines, duration));\n }\n\n readCurve (map: any, timeline: CurveTimeline, frameIndex: number) {\n if (!map.curve) return;\n if (map.curve === \"stepped\")\n timeline.setStepped(frameIndex);\n else if (Object.prototype.toString.call(map.curve) === '[object Array]') {\n let curve: Array = map.curve;\n timeline.setCurve(frameIndex, curve[0], curve[1], curve[2], curve[3]);\n }\n }\n\n getValue (map: any, prop: string, defaultValue: any) {\n return map[prop] !== undefined ? map[prop] : defaultValue;\n }\n\n static blendModeFromString (str: string): number {\n if (str === 'multiply') return PIXI.BLEND_MODES.MULTIPLY;\n if (str === 'additive') return PIXI.BLEND_MODES.ADD;\n if (str === 'screen') return PIXI.BLEND_MODES.SCREEN;\n if (str === 'normal') return PIXI.BLEND_MODES.NORMAL;\n throw new Error(`Unknown blend mode: ${str}`);\n }\n\n static positionModeFromString (str: string) {\n str = str.toLowerCase();\n if (str == \"fixed\") return PositionMode.Fixed;\n if (str == \"percent\") return PositionMode.Percent;\n throw new Error(`Unknown position mode: ${str}`);\n }\n\n static spacingModeFromString (str: string) {\n str = str.toLowerCase();\n if (str == \"length\") return SpacingMode.Length;\n if (str == \"fixed\") return SpacingMode.Fixed;\n if (str == \"percent\") return SpacingMode.Percent;\n throw new Error(`Unknown position mode: ${str}`);\n }\n\n static rotateModeFromString (str: string) {\n str = str.toLowerCase();\n if (str == \"tangent\") return RotateMode.Tangent;\n if (str == \"chain\") return RotateMode.Chain;\n if (str == \"chainscale\") return RotateMode.ChainScale;\n throw new Error(`Unknown rotate mode: ${str}`);\n }\n\n static transformModeFromString(str: string) {\n str = str.toLowerCase();\n if (str == \"normal\") return TransformMode.Normal;\n if (str == \"onlytranslation\") return TransformMode.OnlyTranslation;\n if (str == \"norotationorreflection\") return TransformMode.NoRotationOrReflection;\n if (str == \"noscale\") return TransformMode.NoScale;\n if (str == \"noscaleorreflection\") return TransformMode.NoScaleOrReflection;\n throw new Error(`Unknown transform mode: ${str}`);\n }\n\n static transformModeLegacy(inheritRotation: boolean, inheritScale: boolean) {\n if (inheritRotation && inheritScale) {\n return TransformMode.Normal;\n } else if (inheritRotation) {\n return TransformMode.InheritRotation;\n } else if (inheritScale) {\n return TransformMode.InheritScale;\n } else {\n return TransformMode.OnlyTranslation;\n }\n }\n}\n\nclass LinkedMesh {\n parent: string; skin: string;\n slotIndex: number;\n mesh: MeshAttachment;\n\n constructor (mesh: MeshAttachment, skin: string, slotIndex: number, parent: string) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n }\n}\n","import {Attachment} from \"./attachments\";\nimport {Skeleton} from \"./Skeleton\";\nimport {Map} from \"./Utils\";\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\nexport class Skin {\n name: string;\n attachments = new Array>();\n\n constructor (name: string) {\n if (name == null) throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n\n addAttachment (slotIndex: number, name: string, attachment: Attachment) {\n if (attachment == null) throw new Error(\"attachment cannot be null.\");\n let attachments = this.attachments;\n if (slotIndex >= attachments.length) attachments.length = slotIndex + 1;\n if (!attachments[slotIndex]) attachments[slotIndex] = { };\n attachments[slotIndex][name] = attachment;\n }\n\n /** @return May be null. */\n getAttachment (slotIndex: number, name: string): Attachment {\n let dictionary = this.attachments[slotIndex];\n return dictionary ? dictionary[name] : null;\n }\n\n /** Attach each attachment in this skin if the corresponding attachment in the old skin is currently attached. */\n attachAll (skeleton: Skeleton, oldSkin: Skin) {\n let slotIndex = 0;\n for (let i = 0; i < skeleton.slots.length; i++) {\n let slot = skeleton.slots[i];\n let slotAttachment = slot.getAttachment();\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\n let dictionary = oldSkin.attachments[slotIndex];\n for (let key in dictionary) {\n let skinAttachment:Attachment = dictionary[key];\n if (slotAttachment == skinAttachment) {\n let attachment = this.getAttachment(slotIndex, name);\n if (attachment != null) slot.setAttachment(attachment);\n break;\n }\n }\n }\n slotIndex++;\n }\n }\n}\n","import {Attachment} from \"./attachments\";\r\nimport {SlotData} from \"./SlotData\";\r\nimport {Bone} from \"./Bone\";\r\nimport {Color} from \"./Utils\";\r\nimport {TextureRegion} from \"./Texture\";\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\nexport class Slot {\r\n //this is for PIXI\r\n currentMesh: any;\r\n currentSprite: any;\r\n meshes: any;\r\n currentMeshName: String;\r\n sprites: any;\r\n currentSpriteName: String;\r\n blendMode: number;\r\n //assign hack region a bit later\r\n tempRegion: TextureRegion;\r\n tempAttachment: Attachment;\r\n\r\n //canon\r\n data: SlotData;\r\n bone: Bone;\r\n color: Color;\r\n attachment: Attachment;\r\n private attachmentTime: number;\r\n attachmentVertices = 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.blendMode = data.blendMode;\r\n this.setToSetupPose();\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.attachmentVertices.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.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","import {BoneData} from \"./BoneData\";\r\nimport {Color} from \"./Utils\";\r\nimport {BlendMode} from \"./BlendMode\";\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\nexport 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 attachmentName: string;\r\n blendMode: number;\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","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\nexport 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\nexport 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\nexport 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.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.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._uvs.x0;\r\n }\r\n\r\n get v(): number {\r\n return this.texture._uvs.y0;\r\n }\r\n\r\n get u2(): number {\r\n return this.texture._uvs.x2;\r\n }\r\n\r\n get v2(): number {\r\n return this.texture._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 var 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 var 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.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.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","import {Disposable, Map} from \"./Utils\";\r\nimport {Texture, TextureWrap, TextureRegion, TextureFilter} from \"./Texture\";\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\nexport 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 (var i=0;i, stripExtension: boolean) {\r\n for (var 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 page.baseTexture = texture;\r\n if (!texture.hasLoaded) {\r\n texture.width = page.width;\r\n texture.height = 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 rotate: number = reader.readValue() == \"true\" ? 6 : 0;\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 let frame = new PIXI.Rectangle(x, y, rotate ? height : width, rotate ? 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] == '4') {\r\n // pixi v4.0.0\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 var frame2 = new PIXI.Rectangle(x, y, width, height);\r\n var 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\nclass 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\nexport 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 = true;\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\nexport class TextureAtlasRegion extends TextureRegion {\r\n page: TextureAtlasPage;\r\n name: string;\r\n index: number;\r\n}\r\n","import {TransformConstraintData} from \"./TransformConstraintData\";\nimport {Bone} from \"./Bone\";\nimport {Vector2, MathUtils} from \"./Utils\";\nimport {Skeleton} from \"./Skeleton\";\nimport {Constraint} from \"./Constraint\";\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\nexport class TransformConstraint implements Constraint {\n data: TransformConstraintData;\n bones: Array;\n target: Bone;\n rotateMix = 0; translateMix = 0; scaleMix = 0; shearMix = 0;\n temp = new Vector2();\n\n constructor (data: TransformConstraintData, skeleton: Skeleton) {\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.rotateMix = data.rotateMix;\n this.translateMix = data.translateMix;\n this.scaleMix = data.scaleMix;\n this.shearMix = data.shearMix;\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findBone(data.target.name);\n }\n\n apply () {\n this.update();\n }\n\n update () {\n let rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\n let target = this.target;\n let ta = target.matrix.a, tb = target.matrix.c, tc = target.matrix.b, td = target.matrix.d;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n let m = bone.matrix;\n let modified = false;\n\n if (rotateMix != 0) {\n let a = m.a, b = m.c, c = m.b, d = m.d;\n let r = Math.atan2(tc, ta) - Math.atan2(c, a) + this.data.offsetRotation * MathUtils.degRad;\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= rotateMix;\n let cos = Math.cos(r), sin = Math.sin(r);\n m.a = cos * a - sin * c;\n m.c = cos * b - sin * d;\n m.b = sin * a + cos * c;\n m.d = sin * b + cos * d;\n modified = true;\n }\n\n if (translateMix != 0) {\n let temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n m.tx += (temp.x - m.tx) * translateMix;\n m.ty += (temp.y - m.ty) * translateMix;\n modified = true;\n }\n\n if (scaleMix > 0) {\n let s = Math.sqrt(m.a * m.a + m.b * m.b);\n let ts = Math.sqrt(ta * ta + tc * tc);\n if (s > 0.00001) s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\n m.a *= s;\n m.b *= s;\n s = Math.sqrt(m.c * m.c + m.d * m.d);\n ts = Math.sqrt(tb * tb + td * td);\n if (s > 0.00001) s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\n m.c *= s;\n m.d *= s;\n modified = true;\n }\n\n if (shearMix > 0) {\n let b = m.c, d = m.d;\n let by = Math.atan2(d, b);\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(m.b, m.a));\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r = by + (r + this.data.offsetShearY * MathUtils.degRad) * shearMix;\n let s = Math.sqrt(b * b + d * d);\n m.c = Math.cos(r) * s;\n m.d = Math.sin(r) * s;\n modified = true;\n }\n\n if (modified) bone.appliedValid = false;\n }\n }\n\n getOrder () {\n return this.data.order;\n }\n}\n","import {BoneData} from \"./BoneData\";\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\nexport class TransformConstraintData {\n name: string;\n order = 0;\n bones = new Array();\n target: BoneData;\n rotateMix = 0; translateMix = 0; scaleMix = 0; shearMix = 0;\n offsetRotation = 0; offsetX = 0; offsetY = 0; offsetScaleX = 0; offsetScaleY = 0; offsetShearY = 0;\n\n constructor (name: string) {\n if (name == null) throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n}\n","import {Skeleton} from \"./Skeleton\";\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\nexport interface Map {\n [key: string]: T;\n}\n\nexport interface Disposable {\n dispose (): void;\n}\n\nexport class Color {\n public static WHITE = new Color(1, 1, 1, 1);\n public static RED = new Color(1, 0, 0, 1);\n public static GREEN = new Color(0, 1, 0, 1);\n public static BLUE = new Color(0, 0, 1, 1);\n public static MAGENTA = new Color(1, 0, 1, 1);\n\n constructor (public r: number = 0, public g: number = 0, public b: number = 0, public a: number = 0) {\n }\n\n set (r: number, g: number, b: number, a: number) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n this.clamp();\n return this;\n }\n\n setFromColor (c: Color) {\n this.r = c.r;\n this.g = c.g;\n this.b = c.b;\n this.a = c.a;\n return this;\n }\n\n setFromString (hex: string) {\n hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\n this.r = parseInt(hex.substr(0, 2), 16) / 255.0;\n this.g = parseInt(hex.substr(2, 2), 16) / 255.0;\n this.b = parseInt(hex.substr(4, 2), 16) / 255.0;\n this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\n return this;\n }\n\n add (r: number, g: number, b: number, a: number) {\n this.r += r;\n this.g += g;\n this.b += b;\n this.a += a;\n this.clamp();\n return this;\n }\n\n clamp () {\n if (this.r < 0) this.r = 0;\n else if (this.r > 1) this.r = 1;\n\n if (this.g < 0) this.g = 0;\n else if (this.g > 1) this.g = 1;\n\n if (this.b < 0) this.b = 0;\n else if (this.b > 1) this.b = 1;\n\n if (this.a < 0) this.a = 0;\n else if (this.a > 1) this.a = 1;\n return this;\n }\n}\n\nexport class MathUtils {\n static PI = 3.1415927;\n static PI2 = MathUtils.PI * 2;\n static radiansToDegrees = 180 / MathUtils.PI;\n static radDeg = MathUtils.radiansToDegrees;\n static degreesToRadians = MathUtils.PI / 180;\n static degRad = MathUtils.degreesToRadians;\n\n static clamp (value: number, min: number, max: number) {\n if (value < min) return min;\n if (value > max) return max;\n return value;\n }\n\n static cosDeg (degrees: number) {\n return Math.cos(degrees * MathUtils.degRad);\n }\n\n static sinDeg (degrees: number) {\n return Math.sin(degrees * MathUtils.degRad);\n }\n\n static signum (value: number): number {\n return value >= 0 ? 1 : -1;\n }\n\n static toInt (x: number) {\n return x > 0 ? Math.floor(x) : Math.ceil(x);\n }\n\n static cbrt (x: number) {\n var y = Math.pow(Math.abs(x), 1/3);\n return x < 0 ? -y : y;\n }\n}\n\nexport class Utils {\n static SUPPORTS_TYPED_ARRAYS = typeof(Float32Array) !== \"undefined\";\n\n static arrayCopy (source: ArrayLike, sourceStart: number, dest: ArrayLike, destStart: number, numElements: number) {\n for (let i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\n dest[j] = source[i];\n }\n }\n\n static setArraySize (array: Array, size: number, value: any = 0): Array {\n let oldSize = array.length;\n if (oldSize == size) return array;\n array.length = size;\n if (oldSize < size) {\n for (let i = oldSize; i < size; i++) array[i] = value;\n }\n return array;\n }\n\n static newArray (size: number, defaultValue: T): Array {\n let array = new Array(size);\n for (let i = 0; i < size; i++) array[i] = defaultValue;\n return array;\n }\n\n static newFloatArray (size: number): ArrayLike {\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\n return new Float32Array(size)\n } else {\n let array = new Array(size);\n for (let i = 0; i < array.length; i++) array[i] = 0;\n return array;\n }\n }\n\n static toFloatArray (array: Array) {\n return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\n }\n}\n\nexport class DebugUtils {\n static logBones(skeleton: Skeleton) {\n for (let i = 0; i < skeleton.bones.length; i++) {\n let bone = skeleton.bones[i];\n let m = bone.matrix;\n console.log(bone.data.name + \", \" + m.a + \", \" + m.b + \", \" + m.c + \", \" + m.d + \", \" + m.tx + \", \" + m.ty);\n }\n }\n}\n\nexport class Pool {\n private items = new Array();\n private instantiator: () => T;\n\n constructor (instantiator: () => T) {\n this.instantiator = instantiator;\n }\n\n obtain () {\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\n }\n\n free (item: T) {\n this.items.push(item);\n }\n\n freeAll (items: ArrayLike) {\n for (let i = 0; i < items.length; i++) this.items[i] = items[i];\n }\n\n clear () {\n this.items.length = 0;\n }\n}\n\nexport class Vector2 {\n constructor (public x = 0, public y = 0) {\n }\n\n set (x: number, y: number): Vector2 {\n this.x = x;\n this.y = y;\n return this;\n }\n\n length () {\n let x = this.x;\n let y = this.y;\n return Math.sqrt(x * x + y * y);\n }\n\n normalize () {\n let len = this.length();\n if (len != 0) {\n this.x /= len;\n this.y /= len;\n }\n return this;\n }\n}\n\nexport class TimeKeeper {\n maxDelta = 0.064;\n framesPerSecond = 0;\n delta = 0;\n totalTime = 0;\n\n private lastTime = Date.now() / 1000;\n private frameCount = 0;\n private frameTime = 0;\n\n update () {\n var now = Date.now() / 1000;\n this.delta = now - this.lastTime;\n this.frameTime += this.delta;\n this.totalTime += this.delta;\n if (this.delta > this.maxDelta) this.delta = this.maxDelta;\n this.lastTime = now;\n\n this.frameCount++;\n if (this.frameTime > 1) {\n this.framesPerSecond = this.frameCount / this.frameTime;\n this.frameTime = 0;\n this.frameCount = 0;\n }\n }\n}\n\nexport interface ArrayLike {\n length: number;\n [n: number]: T;\n}\n","import {Slot} from \"../Slot\";\nimport {ArrayLike} from \"../Utils\";\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\nexport abstract class Attachment {\n name: string;\n\n constructor (name: string) {\n if (name == null) throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n}\n\nexport abstract class VertexAttachment extends Attachment {\n bones: Array;\n vertices: ArrayLike;\n worldVerticesLength = 0;\n\n constructor (name: string) {\n super(name);\n }\n\n computeWorldVertices (slot: Slot, worldVertices: ArrayLike) {\n this.computeWorldVerticesWith(slot, 0, this.worldVerticesLength, worldVertices, 0);\n }\n\n /** Transforms local vertices to world coordinates.\n * @param start The index of the first local vertex value to transform. Each vertex has 2 values, x and y.\n * @param count The number of world vertex values to output. Must be <= {@link #getWorldVerticesLength()} - start.\n * @param worldVertices The output world vertices. Must have a length >= offset + count.\n * @param offset The worldVertices index to begin writing values. */\n computeWorldVerticesWith (slot: Slot, start: number, count: number, worldVertices: ArrayLike, offset: number) {\n count += offset;\n let skeleton = slot.bone.skeleton;\n let deformArray = slot.attachmentVertices;\n let vertices = this.vertices;\n let bones = this.bones;\n if (bones == null) {\n if (deformArray.length > 0) vertices = deformArray;\n let bone = slot.bone;\n let m = bone.matrix;\n let x = m.tx;\n let y = m.ty;\n let a = m.a, b = m.c, c = m.b, d = m.d;\n for (let v = start, w = offset; w < count; v += 2, w += 2) {\n let vx = vertices[v], vy = vertices[v + 1];\n worldVertices[w] = vx * a + vy * b + x;\n worldVertices[w + 1] = vx * c + vy * d + y;\n }\n return;\n }\n let v = 0, skip = 0;\n for (let i = 0; i < start; i += 2) {\n let n = bones[v];\n v += n + 1;\n skip += n;\n }\n let skeletonBones = skeleton.bones;\n if (deformArray.length == 0) {\n for (let w = offset, b = skip * 3; w < count; w += 2) {\n let wx = 0, wy = 0;\n let n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3) {\n let bone = skeletonBones[bones[v]];\n let m = bone.matrix;\n let vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\n wx += (vx * m.a + vy * m.c + m.tx) * weight;\n wy += (vx * m.b + vy * m.d + m.ty) * weight;\n }\n worldVertices[w] = wx;\n worldVertices[w + 1] = wy;\n }\n } else {\n let deform = deformArray;\n for (let w = offset, b = skip * 3, f = skip << 1; w < count; w += 2) {\n let wx = 0, wy = 0;\n let n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3, f += 2) {\n let bone = skeletonBones[bones[v]];\n let m = bone.matrix;\n let vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\n wx += (vx * m.a + vy * m.c + m.tx) * weight;\n wy += (vx * m.b + vy * m.d + m.ty) * weight;\n }\n worldVertices[w] = wx;\n worldVertices[w + 1] = wy;\n }\n }\n }\n\n /** Returns true if a deform originally applied to the specified attachment should be applied to this attachment. */\n applyDeform (sourceAttachment: VertexAttachment) {\n return this == sourceAttachment;\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\nexport enum AttachmentType {\r\n Region, BoundingBox, Mesh, LinkedMesh, Path\r\n}\r\n","import {VertexAttachment} from \"./Attachment\";\r\nimport {Color} from \"../Utils\";\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\nexport class BoundingBoxAttachment extends VertexAttachment {\r\n color = new Color(1, 1, 1, 1);\r\n\r\n constructor(name: string) {\r\n super(name);\r\n }\r\n}\r\n","import {VertexAttachment} from \"./Attachment\";\nimport {TextureRegion} from \"../Texture\";\nimport {Color, Utils, ArrayLike} from \"../Utils\";\nimport {Slot} from \"../Slot\";\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\nexport class MeshAttachment extends VertexAttachment {\n region: TextureRegion;\n path: string;\n regionUVs: ArrayLike;\n triangles: Array;\n color = new Color(1, 1, 1, 1);\n hullLength: number;\n private parentMesh: MeshAttachment;\n inheritDeform = false;\n tempColor = new Color(0, 0, 0, 0);\n\n constructor(name: string) {\n super(name);\n }\n\n updateWorldVertices(slot: Slot, premultipliedAlpha: boolean): ArrayLike {\n return [];\n //nothing\n }\n\n updateUVs(region: TextureRegion, uvs: ArrayLike): ArrayLike {\n let regionUVs = this.regionUVs;\n let n = regionUVs.length;\n if (!uvs || uvs.length != n) {\n uvs = Utils.newFloatArray(n);\n }\n\n if (region == null) {\n return;\n }\n\n let texture = region.texture;\n let r = texture._uvs;\n let w1 = region.width, h1 = region.height, w2 = region.originalWidth, h2 = region.originalHeight;\n let x = region.offsetX, y = region.pixiOffsetY;\n\n for (let i = 0; i < n; i += 2) {\n let u = this.regionUVs[i], v = this.regionUVs[i + 1];\n u = (u * w2 - x) / w1;\n v = (v * h2 - y) / h1;\n uvs[i] = (r.x0 * (1 - u) + r.x1 * u) * (1 - v) + (r.x3 * (1 - u) + r.x2 * u) * v;\n uvs[i + 1] = (r.y0 * (1 - u) + r.y1 * u) * (1 - v) + (r.y3 * (1 - u) + r.y2 * u) * v;\n }\n\n return uvs;\n }\n\n applyDeform(sourceAttachment: VertexAttachment): boolean {\n return this == sourceAttachment || (this.inheritDeform && this.parentMesh == sourceAttachment);\n }\n\n getParentMesh() {\n return this.parentMesh;\n }\n\n /** @param parentMesh May be null. */\n setParentMesh(parentMesh: MeshAttachment) {\n this.parentMesh = parentMesh;\n if (parentMesh != null) {\n this.bones = parentMesh.bones;\n this.vertices = parentMesh.vertices;\n this.regionUVs = parentMesh.regionUVs;\n this.triangles = parentMesh.triangles;\n this.hullLength = parentMesh.hullLength;\n }\n }\n}\n","import {VertexAttachment} from \"./Attachment\";\r\nimport {Color} from \"../Utils\";\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\nexport class PathAttachment extends VertexAttachment {\r\n lengths: Array;\r\n closed = false; constantSpeed = false;\r\n color = new Color(1, 1, 1, 1);\r\n\r\n constructor (name: string) {\r\n super(name);\r\n }\r\n}\r\n","import {Attachment} from \"./Attachment\";\r\nimport {Color, Utils} from \"../Utils\";\r\nimport {TextureRegion} from \"../Texture\";\r\nimport {Slot} from \"../Slot\";\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\nexport class RegionAttachment extends Attachment {\r\n x = 0; y = 0; scaleX = 1; scaleY = 1; rotation = 0; width = 0; height = 0;\r\n color = new Color(1, 1, 1, 1);\r\n\r\n path: string;\r\n region: TextureRegion;\r\n\r\n constructor (name:string) {\r\n super(name);\r\n }\r\n\r\n updateWorldVertices(slot: Slot, premultipliedAlpha: boolean): ArrayLike {\r\n return [];\r\n //nothing\r\n }\r\n}\r\n","export {Attachment, VertexAttachment} from \"./Attachment\";\r\nexport {AttachmentLoader} from \"./AttachmentLoader\";\r\nexport {AttachmentType} from \"./AttachmentType\";\r\nexport {BoundingBoxAttachment} from \"./BoundingBoxAttachment\";\r\nexport {MeshAttachment} from \"./MeshAttachment\";\r\nexport {PathAttachment} from \"./PathAttachment\";\r\nexport {RegionAttachment} from \"./RegionAttachment\";\r\n","export * from \"./attachments\";\n\nexport {\n Timeline, ColorTimeline, AttachmentTimeline, RotateTimeline, TranslateTimeline,\n ScaleTimeline, ShearTimeline, IkConstraintTimeline, TransformConstraintTimeline, PathConstraintPositionTimeline,\n PathConstraintSpacingTimeline, PathConstraintMixTimeline, DeformTimeline, DrawOrderTimeline, EventTimeline,\n Animation, CurveTimeline\n} from \"./Animation\";\nexport {AnimationState} from \"./AnimationState\";\nexport {AnimationStateData} from \"./AnimationStateData\";\nexport {BlendMode} from \"./BlendMode\";\nexport {Bone} from \"./Bone\";\nexport {BoneData, TransformMode} from \"./BoneData\";\nexport {Constraint} from \"./Constraint\";\nexport {Event} from \"./Event\";\nexport {EventData} from \"./EventData\";\nexport {IkConstraint} from \"./IkConstraint\";\nexport {IkConstraintData} from \"./IkConstraintData\";\nexport {PathConstraint} from \"./PathConstraint\";\nexport {PathConstraintData, SpacingMode, RotateMode, PositionMode} from \"./PathConstraintData\";\nexport {Skeleton} from \"./Skeleton\";\nexport {SkeletonBounds} from \"./SkeletonBounds\";\nexport {SkeletonData} from \"./SkeletonData\";\nexport {SkeletonJson} from \"./SkeletonJson\";\nexport {Skin} from \"./Skin\";\nexport {Slot} from \"./Slot\";\nexport {SlotData} from \"./SlotData\";\nexport {Texture, TextureWrap, TextureRegion, TextureFilter} from \"./Texture\";\nexport {TextureAtlas, TextureAtlasRegion} from \"./TextureAtlas\";\nexport {AtlasAttachmentLoader} from \"./AtlasAttachmentLoader\";\nexport {TransformConstraint} from \"./TransformConstraint\";\nexport {TransformConstraintData} from \"./TransformConstraintData\";\nexport {Updatable} from \"./Updatable\";\nexport {Disposable, Map, Utils, Pool, MathUtils, Color, Vector2} from \"./Utils\";\n","import * as spine from \"./core\";\n\nexport function atlasParser() {\n return function (resource: PIXI.loaders.Resource, next: () => any) {\n // skip if no data, its not json, or it isn't atlas data\n if (!resource.data || !resource.isJson || !resource.data.bones) {\n return next();\n }\n\n var metadataAtlas = resource.metadata ? resource.metadata.spineAtlas: null;\n if (metadataAtlas === false) {\n return next();\n }\n if (metadataAtlas && metadataAtlas.pages) {\n //its an atlas!\n var spineJsonParser = new spine.SkeletonJson(new spine.AtlasAttachmentLoader(metadataAtlas));\n var skeletonData = spineJsonParser.readSkeletonData(resource.data);\n\n resource.spineData = skeletonData;\n resource.spineAtlas = metadataAtlas;\n\n return next();\n }\n\n var metadataAtlasSuffix = '.atlas';\n if (resource.metadata && resource.metadata.spineAtlasSuffix) {\n metadataAtlasSuffix = resource.metadata.spineAtlasSuffix;\n }\n\n /**\n * use a bit of hackery to load the atlas file, here we assume that the .json, .atlas and .png files\n * that correspond to the spine file are in the same base URL and that the .json and .atlas files\n * have the same name\n */\n var atlasPath = resource.url.substr(0, resource.url.lastIndexOf('.')) + metadataAtlasSuffix;\n //remove the baseUrl\n atlasPath = atlasPath.replace(this.baseUrl, '');\n\n var atlasOptions = {\n crossOrigin: resource.crossOrigin,\n xhrType: PIXI.loaders.Resource.XHR_RESPONSE_TYPE.TEXT,\n metadata: resource.metadata ? resource.metadata.spineMetadata : null\n };\n var imageOptions = {\n crossOrigin: resource.crossOrigin,\n metadata: resource.metadata ? resource.metadata.imageMetadata: null\n };\n var baseUrl = resource.url.substr(0, resource.url.lastIndexOf('/') + 1);\n //remove the baseUrl\n baseUrl = baseUrl.replace(this.baseUrl, '');\n\n var adapter = imageLoaderAdapter(this, resource.name + '_atlas_page_', baseUrl, imageOptions);\n\n this.add(resource.name + '_atlas', atlasPath, atlasOptions, function () {\n new spine.TextureAtlas(this.xhr.responseText, adapter, function(spineAtlas) {\n var spineJsonParser = new spine.SkeletonJson(new spine.AtlasAttachmentLoader(spineAtlas));\n var skeletonData = spineJsonParser.readSkeletonData(resource.data);\n\n resource.spineData = skeletonData;\n resource.spineAtlas = spineAtlas;\n\n next();\n });\n });\n };\n}\n\nexport function imageLoaderAdapter(loader: any, namePrefix: any, baseUrl: any, imageOptions: any) {\n if (baseUrl && baseUrl.lastIndexOf('/') !== (baseUrl.length-1))\n {\n baseUrl += '/';\n }\n return function(line: String, callback: (baseTexture: PIXI.BaseTexture) => any) {\n var name = namePrefix + line;\n var url = baseUrl + line;\n loader.add(name, url, imageOptions, (resource: PIXI.loaders.Resource) => {\n callback(resource.texture.baseTexture);\n });\n }\n}\n\nexport function syncImageLoaderAdapter (baseUrl: any, crossOrigin: any) {\n if (baseUrl && baseUrl.lastIndexOf('/') !== (baseUrl.length-1))\n {\n baseUrl += '/';\n }\n return function(line: any, callback: any) {\n callback(PIXI.BaseTexture.fromImage(line, crossOrigin));\n }\n}\n\nPIXI.loaders.Loader.addPixiMiddleware(atlasParser);\nPIXI.loader.use(atlasParser());\n","import * as core from \"./core\";\r\nimport * as loaders from \"./loaders\";\r\n\r\nexport {core, loaders}\r\nexport {Spine, SpineMesh, SpineSprite} from \"./Spine\";\r\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/src/core/Bone.ts b/src/core/Bone.ts index 0b8c7476..d1ecce26 100644 --- a/src/core/Bone.ts +++ b/src/core/Bone.ts @@ -192,78 +192,6 @@ export class Bone implements Updatable { } return; } - //old < 3.5 stuff - case TransformMode.InheritRotation: { - let rotationY = rotation + 90 + shearY; - let la = MathUtils.cosDeg(rotation + shearX) * scaleX; - let lb = MathUtils.cosDeg(rotationY) * scaleY; - let lc = MathUtils.sinDeg(rotation + shearX) * scaleX; - let ld = MathUtils.sinDeg(rotationY) * scaleY; - - pa = 1; - pb = 0; - pc = 0; - pd = 1; - do { - let cos = MathUtils.cosDeg(parent.arotation), sin = MathUtils.sinDeg(parent.arotation); - let temp = pa * cos + pb * sin; - pb = pb * cos - pa * sin; - pa = temp; - temp = pc * cos + pd * sin; - pd = pd * cos - pc * sin; - pc = temp; - - if (parent.data.transformMode === TransformMode.InheritScale || - parent.data.transformMode === TransformMode.OnlyTranslation) break; - parent = parent.parent; - } while (parent != null); - m.a = pa * la + pb * lc; - m.c = pa * lb + pb * ld; - m.b = pc * la + pd * lc; - m.d = pc * lb + pd * ld; - break; - } - //old < 3.5 stuff - case TransformMode.InheritScale: { - let rotationY = rotation + 90 + shearY; - let la = MathUtils.cosDeg(rotation + shearX) * scaleX; - let lb = MathUtils.cosDeg(rotationY) * scaleY; - let lc = MathUtils.sinDeg(rotation + shearX) * scaleX; - let ld = MathUtils.sinDeg(rotationY) * scaleY; - - pa = 1; - pb = 0; - pc = 0; - pd = 1; - do { - let cos = MathUtils.cosDeg(parent.arotation), sin = MathUtils.sinDeg(parent.arotation); - let psx = parent.scaleX, psy = parent.scaleY; - let za = cos * psx, zb = sin * psy, zc = sin * psx, zd = cos * psy; - let temp = pa * za + pb * zc; - pb = pb * zd - pa * zb; - pa = temp; - temp = pc * za + pd * zc; - pd = pd * zd - pc * zb; - pc = temp; - - if (psx >= 0) sin = -sin; - temp = pa * cos + pb * sin; - pb = pb * cos - pa * sin; - pa = temp; - temp = pc * cos + pd * sin; - pd = pd * cos - pc * sin; - pc = temp; - - if (parent.data.transformMode === TransformMode.InheritRotation || - parent.data.transformMode === TransformMode.OnlyTranslation) break; - parent = parent.parent; - } while (parent != null); - m.a = pa * la + pb * lc; - m.c = pa * lb + pb * ld; - m.b = pc * la + pd * lc; - m.d = pc * lb + pd * ld; - break; - } } if (this.skeleton.flipX) { m.a = -m.a; diff --git a/src/core/BoneData.ts b/src/core/BoneData.ts index b0bd119a..473a9362 100644 --- a/src/core/BoneData.ts +++ b/src/core/BoneData.ts @@ -47,5 +47,5 @@ export class BoneData { } export enum TransformMode { - Normal, OnlyTranslation, NoRotationOrReflection, NoScale, NoScaleOrReflection, InheritRotation, InheritScale + Normal, OnlyTranslation, NoRotationOrReflection, NoScale, NoScaleOrReflection } diff --git a/src/core/SkeletonJson.ts b/src/core/SkeletonJson.ts index 33773a52..522d5111 100644 --- a/src/core/SkeletonJson.ts +++ b/src/core/SkeletonJson.ts @@ -746,12 +746,13 @@ export class SkeletonJson { } static transformModeLegacy(inheritRotation: boolean, inheritScale: boolean) { + console.log("Deprecation Warning: re-export your model with spine 3.5, or downgrade to pixi-spine 1.1 branch. There were many breaking changes, place breakpoint here if you want to know which model is broken"); if (inheritRotation && inheritScale) { return TransformMode.Normal; } else if (inheritRotation) { - return TransformMode.InheritRotation; + return TransformMode.NoScaleOrReflection; } else if (inheritScale) { - return TransformMode.InheritScale; + return TransformMode.NoRotationOrReflection; } else { return TransformMode.OnlyTranslation; }