Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pixi-spine

Package Overview
Dependencies
Maintainers
2
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pixi-spine - npm Package Compare versions

Comparing version 1.0.12 to 1.0.13

2

bin/pixi-spine.min.js
!function t(e,n,i){function a(o,s){if(!n[o]){if(!e[o]){var h="function"==typeof require&&require;if(!s&&h)return h(o,!0);if(r)return r(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,i)}return n[o].exports}for(var r="function"==typeof require&&require,o=0;o<i.length;o++)a(i[o]);return a}({1:[function(t,e,n){e.exports=PIXI.spine={Spine:t("./Spine"),SpineRuntime:t("./SpineRuntime"),loaders:t("./loaders")}},{"./Spine":41,"./SpineRuntime":39,"./loaders":45}],2:[function(t,e,n){var i=t("../SpineUtil");i.Animation=function(t,e,n){this.name=t,this.timelines=e,this.duration=n},i.Animation.prototype={apply:function(t,e,n,i,a){i&&0!=this.duration&&(n%=this.duration,e%=this.duration);for(var r=this.timelines,o=0,s=r.length;s>o;o++)r[o].apply(t,e,n,a,1)},mix:function(t,e,n,i,a,r){i&&0!=this.duration&&(n%=this.duration,e%=this.duration);for(var o=this.timelines,s=0,h=o.length;h>s;s++)o[s].apply(t,e,n,a,r)}},i.Animation.binarySearch=function(t,e,n){var i=0,a=Math.floor(t.length/n)-2;if(!a)return n;for(var r=a>>>1;;){if(t[(r+1)*n]<=e?i=r+1:a=r,i==a)return(i+1)*n;r=i+a>>>1}},i.Animation.binarySearch1=function(t,e){var n=0,i=t.length-2;if(!i)return 1;for(var a=i>>>1;;){if(t[a+1]<=e?n=a+1:i=a,n==i)return n+1;a=n+i>>>1}},i.Animation.linearSearch=function(t,e,n){for(var i=0,a=t.length-n;a>=i;i+=n)if(t[i]>e)return i;return-1},e.exports=i.Animation},{"../SpineUtil":40}],3:[function(t,e,n){var i=t("../SpineUtil");i.TrackEntry=t("./TrackEntry"),i.AnimationState=function(t){this.data=t,this.tracks=[],this.events=[]},i.AnimationState.prototype={onStart:null,onEnd:null,onComplete:null,onEvent:null,timeScale:1,update:function(t){t*=this.timeScale;for(var e=0;e<this.tracks.length;e++){var n=this.tracks[e];if(n){if(n.time+=t*n.timeScale,n.previous){var i=t*n.previous.timeScale;n.previous.time+=i,n.mixTime+=i}var a=n.next;a?(a.time=n.lastTime-a.delay,a.time>=0&&this.setCurrent(e,a)):!n.loop&&n.lastTime>=n.endTime&&this.clearTrack(e)}}},apply:function(t){t.resetDrawOrder();for(var e=0;e<this.tracks.length;e++){var n=this.tracks[e];if(n){this.events.length=0;var i=n.time,a=n.lastTime,r=n.endTime,o=n.loop;!o&&i>r&&(i=r);var s=n.previous;if(s){var h=s.time;!s.loop&&h>s.endTime&&(h=s.endTime),s.animation.apply(t,h,h,s.loop,null);var l=n.mixTime/n.mixDuration*n.mix;l>=1&&(l=1,n.previous=null),n.animation.mix(t,n.lastTime,i,o,this.events,l)}else 1==n.mix?n.animation.apply(t,n.lastTime,i,o,this.events):n.animation.mix(t,n.lastTime,i,o,this.events,n.mix);for(var u=0,m=this.events.length;m>u;u++){var f=this.events[u];n.onEvent&&n.onEvent(e,f),this.onEvent&&this.onEvent(e,f)}if(o?a%r>i%r:r>a&&i>=r){var c=Math.floor(i/r);n.onComplete&&n.onComplete(e,c),this.onComplete&&this.onComplete(e,c)}n.lastTime=n.time}}},clearTracks:function(){for(var t=0,e=this.tracks.length;e>t;t++)this.clearTrack(t);this.tracks.length=0},clearTrack:function(t){if(!(t>=this.tracks.length)){var e=this.tracks[t];e&&(e.onEnd&&e.onEnd(t),this.onEnd&&this.onEnd(t),this.tracks[t]=null)}},_expandToIndex:function(t){if(t<this.tracks.length)return this.tracks[t];for(;t>=this.tracks.length;)this.tracks.push(null);return null},setCurrent:function(t,e){var n=this._expandToIndex(t);if(n){var i=n.previous;n.previous=null,n.onEnd&&n.onEnd(t),this.onEnd&&this.onEnd(t),e.mixDuration=this.data.getMix(n.animation,e.animation),e.mixDuration>0&&(e.mixTime=0,i&&n.mixTime/n.mixDuration<.5?e.previous=i:e.previous=n)}this.tracks[t]=e,e.onStart&&e.onStart(t),this.onStart&&this.onStart(t)},setAnimationByName:function(t,e,n){var i=this.data.skeletonData.findAnimation(e);if(!i)throw"Animation not found: "+e;return this.setAnimation(t,i,n)},setAnimation:function(t,e,n){var a=new i.TrackEntry;return a.animation=e,a.loop=n,a.endTime=e.duration,this.setCurrent(t,a),a},addAnimationByName:function(t,e,n,i){var a=this.data.skeletonData.findAnimation(e);if(!a)throw"Animation not found: "+e;return this.addAnimation(t,a,n,i)},addAnimation:function(t,e,n,a){var r=new i.TrackEntry;r.animation=e,r.loop=n,r.endTime=e.duration;var o=this._expandToIndex(t);if(o){for(;o.next;)o=o.next;o.next=r}else this.tracks[t]=r;return 0>=a&&(o?a+=o.endTime-this.data.getMix(o.animation,e):a=0),r.delay=a,r},getCurrent:function(t){return t>=this.tracks.length?null:this.tracks[t]}},e.exports=i.AnimationState},{"../SpineUtil":40,"./TrackEntry":36}],4:[function(t,e,n){var i=t("../SpineUtil");i.AnimationStateData=function(t){this.skeletonData=t,this.animationToMixTime={}},i.AnimationStateData.prototype={defaultMix:0,setMixByName:function(t,e,n){var i=this.skeletonData.findAnimation(t);if(!i)throw"Animation not found: "+t;var a=this.skeletonData.findAnimation(e);if(!a)throw"Animation not found: "+e;this.setMix(i,a,n)},setMix:function(t,e,n){this.animationToMixTime[t.name+":"+e.name]=n},getMix:function(t,e){var n=t.name+":"+e.name;return this.animationToMixTime.hasOwnProperty(n)?this.animationToMixTime[n]:this.defaultMix}},e.exports=i.AnimationStateData},{"../SpineUtil":40}],5:[function(t,e,n){var i=t("../SpineUtil");i.AtlasReader=t("./AtlasReader"),i.AtlasPage=t("./AtlasPage"),i.AtlasRegion=t("./AtlasRegion");var a=t("../loaders/syncImageLoaderAdapter.js");i.Atlas=function(t,e,n){function r(){for(;;){var t=l.readLine();if(null===t)return n&&n(h);if(t=l.trim(t),t.length){if(!m){m=new i.AtlasPage,m.name=t,2==l.readTuple(u)&&(m.width=parseInt(u[0]),m.height=parseInt(u[1]),l.readTuple(u)),m.format=i.Atlas.Format[u[0]],l.readTuple(u),m.minFilter=i.Atlas.TextureFilter[u[0]],m.magFilter=i.Atlas.TextureFilter[u[1]];var a=l.readValue();m.uWrap=i.Atlas.TextureWrap.clampToEdge,m.vWrap=i.Atlas.TextureWrap.clampToEdge,"x"==a?m.uWrap=i.Atlas.TextureWrap.repeat:"y"==a?m.vWrap=i.Atlas.TextureWrap.repeat:"xy"==a&&(m.uWrap=m.vWrap=i.Atlas.TextureWrap.repeat),e(t,function(t){m.rendererObject=t,h.pages.push(m),m.width&&m.height||(m.width=t.width,m.height=t.height,m.width&&m.height||console.log("ERROR spine atlas page "+m.name+": meshes wont work if you dont specify size in atlas (http://www.html5gamedevs.com/topic/18888-pixi-spines-and-meshes/?p=107121)")),r()});break}var o=new i.AtlasRegion;o.name=t,o.page=m,o.rotate="true"==l.readValue(),l.readTuple(u);var s=parseInt(u[0]),f=parseInt(u[1]);l.readTuple(u);var c=parseInt(u[0]),d=parseInt(u[1]);o.u=s/m.width,o.v=f/m.height,o.rotate?(o.u2=(s+d)/m.width,o.v2=(f+c)/m.height):(o.u2=(s+c)/m.width,o.v2=(f+d)/m.height);var p=m.rendererObject.resolution;o.x=s/p,o.y=f/p,o.width=Math.abs(c)/p,o.height=Math.abs(d)/p,4==l.readTuple(u)&&(o.splits=[parseInt(u[0]),parseInt(u[1]),parseInt(u[2]),parseInt(u[3])],4==l.readTuple(u)&&(o.pads=[parseInt(u[0]),parseInt(u[1]),parseInt(u[2]),parseInt(u[3])],l.readTuple(u))),o.originalWidth=parseInt(u[0])/p,o.originalHeight=parseInt(u[1])/p,l.readTuple(u),o.offsetX=parseInt(u[0])/p,o.offsetY=parseInt(u[1])/p,o.index=parseInt(l.readValue()),h.regions.push(o)}else m=null}}if("function"!=typeof e){var o=e,s=n;e=a(o,s),n=null}this.pages=[],this.regions=[],this.texturesLoading=0;var h=this,l=new i.AtlasReader(t),u=[];u.length=4;var m=null;r()},i.Atlas.prototype={findRegion:function(t){for(var e=this.regions,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null},dispose:function(){for(var t=this.pages,e=0,n=t.length;n>e;e++)t[e].rendererObject.destroy(!0)},updateUVs:function(t){for(var e=this.regions,n=0,i=e.length;i>n;n++){var a=e[n];a.page==t&&(a.u=a.x/t.width,a.v=a.y/t.height,a.rotate?(a.u2=(a.x+a.height)/t.width,a.v2=(a.y+a.width)/t.height):(a.u2=(a.x+a.width)/t.width,a.v2=(a.y+a.height)/t.height))}}},i.Atlas.Format={alpha:0,intensity:1,luminanceAlpha:2,rgb565:3,rgba4444:4,rgb888:5,rgba8888:6},i.Atlas.TextureFilter={nearest:0,linear:1,mipMap:2,mipMapNearestNearest:3,mipMapLinearNearest:4,mipMapNearestLinear:5,mipMapLinearLinear:6},i.Atlas.TextureWrap={mirroredRepeat:0,clampToEdge:1,repeat:2},e.exports=i.Atlas},{"../SpineUtil":40,"../loaders/syncImageLoaderAdapter.js":46,"./AtlasPage":7,"./AtlasReader":8,"./AtlasRegion":9}],6:[function(t,e,n){var i=t("../SpineUtil");i.RegionAttachment=t("./RegionAttachment"),i.MeshAttachment=t("./MeshAttachment"),i.WeightedMeshAttachment=t("./WeightedMeshAttachment"),i.BoundingBoxAttachment=t("./BoundingBoxAttachment"),i.AtlasAttachmentParser=function(t){this.atlas=t},i.AtlasAttachmentParser.prototype={newRegionAttachment:function(t,e,n){var a=this.atlas.findRegion(n);if(!a)throw"Region not found in atlas: "+n+" (region attachment: "+e+")";var r=new i.RegionAttachment(e);return r.rendererObject=a,r.setUVs(a.u,a.v,a.u2,a.v2,a.rotate),r.regionOffsetX=a.offsetX,r.regionOffsetY=a.offsetY,r.regionWidth=a.width,r.regionHeight=a.height,r.regionOriginalWidth=a.originalWidth,r.regionOriginalHeight=a.originalHeight,r},newMeshAttachment:function(t,e,n){var a=this.atlas.findRegion(n);if(!a)throw"Region not found in atlas: "+n+" (mesh attachment: "+e+")";var r=new i.MeshAttachment(e);return r.rendererObject=a,r.regionU=a.u,r.regionV=a.v,r.regionU2=a.u2,r.regionV2=a.v2,r.regionRotate=a.rotate,r.regionOffsetX=a.offsetX,r.regionOffsetY=a.offsetY,r.regionWidth=a.width,r.regionHeight=a.height,r.regionOriginalWidth=a.originalWidth,r.regionOriginalHeight=a.originalHeight,r},newWeightedMeshAttachment:function(t,e,n){var a=this.atlas.findRegion(n);if(!a)throw"Region not found in atlas: "+n+" (skinned mesh attachment: "+e+")";var r=new i.WeightedMeshAttachment(e);return r.rendererObject=a,r.regionU=a.u,r.regionV=a.v,r.regionU2=a.u2,r.regionV2=a.v2,r.regionRotate=a.rotate,r.regionOffsetX=a.offsetX,r.regionOffsetY=a.offsetY,r.regionWidth=a.width,r.regionHeight=a.height,r.regionOriginalWidth=a.originalWidth,r.regionOriginalHeight=a.originalHeight,r},newBoundingBoxAttachment:function(t,e){return new i.BoundingBoxAttachment(e)}},e.exports=i.AtlasAttachmentParser},{"../SpineUtil":40,"./BoundingBoxAttachment":14,"./MeshAttachment":25,"./RegionAttachment":26,"./WeightedMeshAttachment":38}],7:[function(t,e,n){var i=t("../SpineUtil");i.AtlasPage=function(){},i.AtlasPage.prototype={name:null,format:null,minFilter:null,magFilter:null,uWrap:null,vWrap:null,rendererObject:null,width:0,height:0},e.exports=i.AtlasPage},{"../SpineUtil":40}],8:[function(t,e,n){var i=t("../SpineUtil");i.AtlasReader=function(t){this.lines=t.split(/\r\n|\r|\n/)},i.AtlasReader.prototype={index:0,trim:function(t){return t.replace(/^\s+|\s+$/g,"")},readLine:function(){return this.index>=this.lines.length?null:this.lines[this.index++]},readValue:function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw"Invalid line: "+t;return this.trim(t.substring(e+1))},readTuple:function(t){var e=this.readLine(),n=e.indexOf(":");if(-1==n)throw"Invalid line: "+e;for(var i=0,a=n+1;3>i;i++){var r=e.indexOf(",",a);if(-1==r)break;t[i]=this.trim(e.substr(a,r-a)),a=r+1}return t[i]=this.trim(e.substring(a)),i+1}},e.exports=i.AtlasReader},{"../SpineUtil":40}],9:[function(t,e,n){var i=t("../SpineUtil");i.AtlasRegion=function(){},i.AtlasRegion.prototype={page:null,name:null,x:0,y:0,width:0,height:0,u:0,v:0,u2:0,v2:0,offsetX:0,offsetY:0,originalWidth:0,originalHeight:0,index:0,rotate:!1,splits:null,pads:null},e.exports=i.AtlasRegion},{"../SpineUtil":40}],10:[function(t,e,n){var i=t("../SpineUtil");i.Curves=t("./Curves"),i.Animation=t("./Animation"),i.AttachmentTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=t,this.attachmentNames=[],this.attachmentNames.length=t},i.AttachmentTimeline.prototype={slotIndex:0,getFrameCount:function(){return this.frames.length},setFrame:function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},apply:function(t,e,n,a,r){var o=this.frames;if(n<o[0])return void(e>n&&this.apply(t,e,Number.MAX_VALUE,null,0));e>n&&(e=-1);var s=n>=o[o.length-1]?o.length-1:i.Animation.binarySearch1(o,n)-1;if(!(o[s]<e)){var h=this.attachmentNames[s];t.slots[this.slotIndex].setAttachment(h?t.getAttachmentBySlotIndex(this.slotIndex,h):null)}}},e.exports=i.AttachmentTimeline},{"../SpineUtil":40,"./Animation":2,"./Curves":16}],11:[function(t,e,n){var i=t("../SpineUtil");i.AttachmentType={region:0,boundingbox:1,mesh:2,weightedmesh:3,skinnedmesh:3,linkedmesh:4,weightedlinkedmesh:5},e.exports=i.AttachmentType},{"../SpineUtil":40}],12:[function(t,e,n){var i=t("../SpineUtil");i.Bone=function(t,e,n){this.data=t,this.skeleton=e,this.parent=n,this.matrix=new PIXI.Matrix,this.setToSetupPose()},i.Bone.yDown=!1,i.Bone.prototype={x:0,y:0,rotation:0,rotationIK:0,scaleX:1,scaleY:1,flipX:!1,flipY:!1,worldSignX:1,worldSignY:1,updateWorldTransform:function(){var t=this.rotationIK,e=this.scaleX,n=this.scaleY,a=this.x,r=this.y,o=Math.cos(t*i.degRad),s=Math.sin(t*i.degRad),h=o*e,l=-s*n,u=s*e,m=o*n,f=this.parent,c=this.matrix,d=this.skeleton;if(!f)return d.flipX&&(a=-a,h=-h,l=-l),d.flipY!==i.Bone.yDown&&(r=-r,u=-u,m=-m),c.a=h,c.c=l,c.b=u,c.d=m,c.tx=a,c.ty=r,this.worldSignX=i.signum(e),void(this.worldSignY=i.signum(n));var p=f.matrix.a,g=f.matrix.c,v=f.matrix.b,A=f.matrix.d;c.tx=p*a+g*r+f.matrix.tx,c.ty=v*a+A*r+f.matrix.ty,this.worldSignX=f.worldSignX*i.signum(e),this.worldSignY=f.worldSignY*i.signum(n);var x=this.data;if(x.inheritRotation&&x.inheritScale)c.a=p*h+g*u,c.c=p*l+g*m,c.b=v*h+A*u,c.d=v*l+A*m;else if(x.inheritRotation){p=1,g=0,v=0,A=1;do{o=Math.cos(f.rotationIK*i.degRad),s=Math.sin(f.rotationIK*i.degRad);var y=p*o+g*s;if(g=p*-s+g*o,p=y,y=v*o+A*s,A=v*-s+A*o,v=y,!f.data.inheritRotation)break;f=f.parent}while(null!=f);c.a=p*h+g*u,c.c=p*l+g*m,c.b=v*h+A*u,c.d=v*l+A*m,d.flipX&&(c.a=-c.a,c.c=-c.c),d.flipY!==i.Bone.yDown&&(c.b=-c.b,c.d=-c.d)}else if(x.inheritScale){p=1,g=0,v=0,A=1;do{var S=f.rotation;o=Math.cos(S*i.degRad),s=Math.sin(S*i.degRad);var T=f.scaleX,w=f.scaleY,b=o*T,k=-s*w,I=s*T,C=o*w;if(y=p*b+g*I,g=p*k+g*C,p=y,y=v*b+A*I,A=v*k+A*C,v=y,0>T?S=-S:s=-s,y=p*o+g*s,g=p*-s+g*o,p=y,y=v*o+A*s,A=v*-s+A*o,v=y,!f.data.inheritScale)break;f=f.parent}while(null!=f);c.a=p*h+g*u,c.c=p*l+g*m,c.b=v*h+A*u,c.d=v*l+A*m,d.flipX&&(c.a=-c.a,c.c=-c.c),d.flipY!==i.Bone.yDown&&(c.b=-c.b,c.d=-c.d)}else c.a=h,c.c=l,c.b=u,c.d=m},setToSetupPose:function(){var t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.rotationIK=this.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY},worldToLocal:function(t){var e=this.matrix,n=t[0]-e.tx,i=e.ty,a=1/(e.a*e.d-e.b*e.c);t[0]=n*e.a*a-i*e.c*a,t[1]=i*e.d*a-n*e.b*a},localToWorld:function(t){var e=t[0],n=t[1],i=this.matrix;t[0]=e*i.a+n*i.c+i.tx,t[1]=e*i.b+n*i.d+i.ty},getWorldRotationX:function(){return Math.atan2(this.matrix.b,this.matrix.a)*i.radDeg},getWorldRotationY:function(){return Math.atan2(this.matrix.d,this.matrix.c)*i.radDeg},getWorldScaleX:function(){var t=this.matrix.a,e=this.matrix.b;return Math.sqrt(t*t+e*e)},getWorldScaleY:function(){var t=this.matrix.c,e=this.matrix.d;return Math.sqrt(t*t+e*e)}},Object.defineProperties(i.Bone.prototype,{worldX:{get:function(){return this.matrix.tx}},worldY:{get:function(){return this.matrix.ty}}}),e.exports=i.Bone},{"../SpineUtil":40}],13:[function(t,e,n){var i=t("../SpineUtil");i.BoneData=function(t,e){this.name=t,this.parent=e},i.BoneData.prototype={length:0,x:0,y:0,rotation:0,scaleX:1,scaleY:1,inheritScale:!0,inheritRotation:!0},e.exports=i.BoneData},{"../SpineUtil":40}],14:[function(t,e,n){var i=t("../SpineUtil");i.AttachmentType=t("./AttachmentType"),i.BoundingBoxAttachment=function(t){this.name=t,this.vertices=[]},i.BoundingBoxAttachment.prototype={type:i.AttachmentType.boundingbox,computeWorldVertices:function(t,e,n,i){t+=n.worldX,e+=n.worldY;for(var a=n.a,r=n.c,o=n.b,s=n.d,h=this.vertices,l=0,u=h.length;u>l;l+=2){var m=h[l],f=h[l+1];i[l]=m*a+f*r+t,i[l+1]=m*o+f*s+e}}},e.exports=i.BoundingBoxAttachment},{"../SpineUtil":40,"./AttachmentType":11}],15:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.ColorTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=5*t},i.ColorTimeline.prototype={slotIndex:0,getFrameCount:function(){return this.frames.length/5},setFrame:function(t,e,n,i,a,r){t*=5,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=i,this.frames[t+3]=a,this.frames[t+4]=r},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s,h,l,u;if(n>=o[o.length-5]){var m=o.length-1;s=o[m-3],h=o[m-2],l=o[m-1],u=o[m]}else{var f=i.Animation.binarySearch(o,n,5),c=o[f-4],d=o[f-3],p=o[f-2],g=o[f-1],v=o[f],A=1-(n-v)/(o[f-5]-v);A=this.curves.getCurvePercent(f/5-1,A),s=c+(o[f+1]-c)*A,h=d+(o[f+2]-d)*A,l=p+(o[f+3]-p)*A,u=g+(o[f+4]-g)*A}var x=t.slots[this.slotIndex];1>r?(x.r+=(s-x.r)*r,x.g+=(h-x.g)*r,x.b+=(l-x.b)*r,x.a+=(u-x.a)*r):(x.r=s,x.g=h,x.b=l,x.a=u)}}},e.exports=i.ColorTimeline},{"../SpineUtil":40,"./Animation":2,"./Curves":16}],16:[function(t,e,n){var i=t("../SpineUtil");i.Curves=function(t){this.curves=[]},i.Curves.prototype={setLinear:function(t){this.curves[19*t]=0},setStepped:function(t){this.curves[19*t]=1},setCurve:function(t,e,n,i,a){var r=.1,o=r*r,s=o*r,h=3*r,l=3*o,u=6*o,m=6*s,f=2*-e+i,c=2*-n+a,d=3*(e-i)+1,p=3*(n-a)+1,g=e*h+f*l+d*s,v=n*h+c*l+p*s,A=f*u+d*m,x=c*u+p*m,y=d*m,S=p*m,T=19*t,w=this.curves;w[T++]=2;for(var b=g,k=v,I=T+19-1;I>T;T+=2)w[T]=b,w[T+1]=k,g+=A,v+=x,A+=y,x+=S,b+=g,k+=v},getCurvePercent:function(t,e){e=0>e?0:e>1?1:e;var n=this.curves,i=19*t,a=n[i];if(0===a)return e;if(1==a)return 0;i++;for(var r=0,o=i,s=i+19-1;s>i;i+=2)if(r=n[i],r>=e){var h,l;return i==o?(h=0,l=0):(h=n[i-2],l=n[i-1]),l+(n[i+1]-l)*(e-h)/(r-h)}var u=n[i-1];return u+(1-u)*(e-r)/(1-r)}},e.exports=i.Curves},{"../SpineUtil":40}],17:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.DrawOrderTimeline=function(t){this.frames=[],this.frames.length=t,this.drawOrders=[],this.drawOrders.length=t},i.DrawOrderTimeline.prototype={getFrameCount:function(){return this.frames.length},setFrame:function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s;s=n>=o[o.length-1]?o.length-1:i.Animation.binarySearch1(o,n)-1;var h=t.drawOrder,l=(t.slots,this.drawOrders[s]);if(l)for(var u=0,m=l.length;m>u;u++)h[u]=l[u]}}},e.exports=i.DrawOrderTimeline},{"../SpineUtil":40,"./Animation":2}],18:[function(t,e,n){var i=t("../SpineUtil");i.Event=function(t){this.data=t},i.Event.prototype={intValue:0,floatValue:0,stringValue:null},e.exports=i.Event},{"../SpineUtil":40}],19:[function(t,e,n){var i=t("../SpineUtil");i.EventData=function(t){this.name=t},i.EventData.prototype={intValue:0,floatValue:0,stringValue:null},e.exports=i.EventData},{"../SpineUtil":40}],20:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.EventTimeline=function(t){this.frames=[],this.frames.length=t,this.events=[],this.events.length=t},i.EventTimeline.prototype={getFrameCount:function(){return this.frames.length},setFrame:function(t,e,n){this.frames[t]=e,this.events[t]=n},apply:function(t,e,n,a,r){if(a){var o=this.frames,s=o.length;if(e>n)this.apply(t,e,Number.MAX_VALUE,a,r),e=-1;else if(e>=o[s-1])return;if(!(n<o[0])){var h;if(e<o[0])h=0;else{h=i.Animation.binarySearch1(o,e);for(var l=o[h];h>0&&o[h-1]==l;)h--}for(var u=this.events;s>h&&n>=o[h];h++)a.push(u[h])}}}},e.exports=i.EventTimeline},{"../SpineUtil":40,"./Animation":2}],21:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.FfdTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=t,this.frameVertices=[],this.frameVertices.length=t},i.FfdTimeline.prototype={slotIndex:0,attachment:0,getFrameCount:function(){return this.frames.length},setFrame:function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},apply:function(t,e,n,a,r){var o=t.slots[this.slotIndex],s=o.attachment;if(s.applyFFD&&s.applyFFD(this.attachment)){var h=this.frames;if(!(n<h[0])){var l=this.frameVertices,u=l[0].length,m=o.attachmentVertices;if(m.length!=u){m=o.attachmentVertices=[];for(var f=0;u>f;f++)m.push(0);r=1}if(n>=h[h.length-1]){var c=l[h.length-1];if(1>r)for(var d=0;u>d;d++)m[d]+=(c[d]-m[d])*r;else for(var d=0;u>d;d++)m[d]=c[d]}else{var p=i.Animation.binarySearch1(h,n),g=h[p],v=1-(n-g)/(h[p-1]-g);v=this.curves.getCurvePercent(p-1,0>v?0:v>1?1:v);var A=l[p-1],x=l[p];if(1>r)for(var d=0;u>d;d++){var y=A[d];m[d]+=(y+(x[d]-y)*v-m[d])*r}else for(var d=0;u>d;d++){var y=A[d];m[d]=y+(x[d]-y)*v}}}}}},e.exports=i.FfdTimeline},{"../SpineUtil":40,"./Animation":2,"./Curves":16}],22:[function(t,e,n){var i=t("../SpineUtil");i.IkConstraint=function(t,e){this.data=t,this.mix=t.mix,this.bendDirection=t.bendDirection,this.bones=[];for(var n=0,i=t.bones.length;i>n;n++)this.bones.push(e.findBone(t.bones[n].name));this.target=e.findBone(t.target.name)},i.IkConstraint.prototype={apply:function(){var t=this.target,e=this.bones;switch(e.length){case 1:i.IkConstraint.apply1(e[0],t.worldX,t.worldY,this.mix);break;case 2:i.IkConstraint.apply2(e[0],e[1],t.worldX,t.worldY,this.bendDirection,this.mix)}}},i.IkConstraint.apply1=function(t,e,n,a){var r=t.parent?t.parent.getWorldRotationX():0,o=t.rotation,s=Math.atan2(n-t.worldY,e-t.worldX)*i.radDeg-r;t.worldSignX!=t.worldSignY!=(t.skeleton.flipX!=(t.skeleton.flipY!=i.Bone.yDown))&&(s=360-s),s>180?s-=360:-180>s&&(s+=360),t.rotationIK=o+(s-o)*a},i.IkConstraint.apply2=function(t,e,n,a,r,o){if(0!=o){var s,h,l,u=t.x,m=t.y,f=t.scaleX,c=t.scaleY,d=e.scaleX,p=e.y;0>f?(f=-f,s=180,l=-1):(s=0,l=1),0>c&&(c=-c,l=-l),0>d?(d=-d,h=180):h=0;var g,v,A,x,y=t.parent,S=y.matrix;if(null==y)g=n-u,v=a-m,A=e.worldX-u,x=e.worldY-m;else{var T=S.a,w=S.c,b=S.b,k=S.d,I=1/(T*k-w*b),C=S.tx,M=S.ty,D=n-C,U=a-M;g=(D*k-U*w)*I-u,v=(U*T-D*b)*I-m,D=e.worldX-C,U=e.worldY-M,A=(D*k-U*w)*I-u,x=(U*T-D*b)*I-m}var O,P,X=Math.sqrt(A*A+x*x),R=e.data.length*d;t:if(Math.abs(f-c)<=1e-4){R*=f;var E=(g*g+v*v-X*X-R*R)/(2*X*R);-1>E?E=-1:E>1&&(E=1),P=Math.acos(E)*r;var T=X+R*E,B=R*Math.sin(P);O=Math.atan2(v*T-g*B,g*T+v*B)}else{p=0;var T=f*R,w=c*R,F=Math.atan2(v,g),V=T*T,Y=w*w,W=X*X,L=g*g+v*v,N=Y*W+V*L-V*Y,_=-2*Y*X,j=Y-V,k=_*_-4*j*N;if(k>=0){var H=Math.sqrt(k);0>_&&(H=-H),H=-(_+H)/2;var q=H/j,K=N/H,J=Math.abs(q)<Math.abs(K)?q:K;if(L>=J*J){var U=Math.sqrt(L-J*J)*r;O=F-Math.atan2(U,J),P=Math.atan2(U/c,(J-X)/f);break t}}var z=0,G=1/0,$=0,Q=0,Z=0,tt=0,et=0,nt=0,D=X+T,it=D*D;it>tt&&(Z=0,tt=it,et=D),D=X-T,it=D*D,G>it&&(z=Math.PI,G=it,$=D);var at=Math.acos(-T*X/(V-Y));D=T*Math.cos(at)+X;var U=w*Math.sin(at);it=D*D+U*U,G>it&&(z=at,G=it,$=D,Q=U),it>tt&&(Z=at,tt=it,et=D,nt=U),(G+tt)/2>=L?(O=F-Math.atan2(Q*r,$),P=z*r):(O=F-Math.atan2(nt*r,et),P=Z*r)}var rt=Math.atan2(p,e.x)*l;O=(O-rt)*i.radDeg+s,P=(P+rt)*i.radDeg*l+h,O>180?O-=360:-180>O&&(O+=360),P>180?P-=360:-180>P&&(P+=360);var ot=t.rotation;t.rotationIK=ot+(O-ot)*o,ot=e.rotation,e.rotationIK=ot+(P-ot)*o}},e.exports=i.IkConstraint},{"../SpineUtil":40}],23:[function(t,e,n){var i=t("../SpineUtil")||{};i.IkConstraintData=function(t){this.name=t,this.bones=[]},i.IkConstraintData.prototype={target:null,bendDirection:1,mix:1},e.exports=i.IkConstraintData},{"../SpineUtil":40}],24:[function(t,e,n){var i=t("../SpineUtil")||{};i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.IkConstraintTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=3*t},i.IkConstraintTimeline.prototype={ikConstraintIndex:0,getFrameCount:function(){return this.frames.length/3},setFrame:function(t,e,n,i){t*=3,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=i},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s=t.ikConstraints[this.ikConstraintIndex];if(n>=o[o.length-3])return s.mix+=(o[o.length-2]-s.mix)*r,void(s.bendDirection=o[o.length-1]);var h=i.Animation.binarySearch(o,n,3),l=o[h+-2],u=o[h],m=1-(n-u)/(o[h+-3]-u);m=this.curves.getCurvePercent(h/3-1,m);var f=l+(o[h+1]-l)*m;s.mix+=(f-s.mix)*r,s.bendDirection=o[h+-1]}}},e.exports=i.IkConstraintTimeline},{"../SpineUtil":40,"./Animation":2,"./Curves":16}],25:[function(t,e,n){var i=t("../SpineUtil")||{};i.AttachmentType=t("./AttachmentType"),i.MeshAttachment=function(t){this.name=t},i.MeshAttachment.prototype={type:i.AttachmentType.mesh,parentMesh:null,inheritFFD:!1,vertices:null,uvs:null,regionUVs:null,triangles:null,hullLength:0,r:1,g:1,b:1,a:1,path:null,rendererObject:null,regionU:0,regionV:0,regionU2:0,regionV2:0,regionRotate:!1,regionOffsetX:0,regionOffsetY:0,regionWidth:0,regionHeight:0,regionOriginalWidth:0,regionOriginalHeight:0,edges:null,width:0,height:0,updateUVs:function(){var t=this.regionU2-this.regionU,e=this.regionV2-this.regionV,n=this.regionUVs.length;if(this.uvs&&this.uvs.length==n||(this.uvs=new i.Float32Array(n)),this.regionRotate)for(var a=0;n>a;a+=2)this.uvs[a]=this.regionU+this.regionUVs[a+1]*t,this.uvs[a+1]=this.regionV+e-this.regionUVs[a]*e;else for(var a=0;n>a;a+=2)this.uvs[a]=this.regionU+this.regionUVs[a]*t,this.uvs[a+1]=this.regionV+this.regionUVs[a+1]*e},computeWorldVertices:function(t,e,n,i){var a=n.bone;t+=a.worldX,e+=a.worldY;var r=a.matrix.a,o=a.matrix.c,s=a.matrix.b,h=a.matrix.d,l=this.vertices,u=l.length;n.attachmentVertices.length==u&&(l=n.attachmentVertices);for(var m=0;u>m;m+=2){var f=l[m],c=l[m+1];i[m]=f*r+c*o+t,i[m+1]=f*s+c*h+e}},applyFFD:function(t){return this===t||this.inheritFFD&&parentMesh===t},setParentMesh:function(t){this.parentMesh=t,null!=t&&(this.vertices=t.vertices,this.regionUVs=t.regionUVs,this.triangles=t.triangles,this.hullLength=t.hullLength)}},e.exports=i.MeshAttachment},{"../SpineUtil":40,"./AttachmentType":11}],26:[function(t,e,n){var i=t("../SpineUtil");i.AttachmentType=t("./AttachmentType"),i.RegionAttachment=function(t){this.name=t,this.offset=[],this.offset.length=8,this.uvs=[],this.uvs.length=8},i.RegionAttachment.prototype={type:i.AttachmentType.region,x:0,y:0,rotation:0,scaleX:1,scaleY:1,width:0,height:0,r:1,g:1,b:1,a:1,path:null,rendererObject:null,regionOffsetX:0,regionOffsetY:0,regionWidth:0,regionHeight:0,regionOriginalWidth:0,regionOriginalHeight:0,setUVs:function(t,e,n,i,a){var r=this.uvs;a?(r[2]=t,r[3]=i,r[4]=t,r[5]=e,r[6]=n,r[7]=e,r[0]=n,r[1]=i):(r[0]=t,r[1]=i,r[2]=t,r[3]=e,r[4]=n,r[5]=e,r[6]=n,r[7]=i)},updateOffset:function(){var t=this.width/this.regionOriginalWidth*this.scaleX,e=this.height/this.regionOriginalHeight*this.scaleY,n=-this.width/2*this.scaleX+this.regionOffsetX*t,a=-this.height/2*this.scaleY+this.regionOffsetY*e,r=n+this.regionWidth*t,o=a+this.regionHeight*e,s=this.rotation*i.degRad,h=Math.cos(s),l=Math.sin(s),u=n*h+this.x,m=n*l,f=a*h+this.y,c=a*l,d=r*h+this.x,p=r*l,g=o*h+this.y,v=o*l,A=this.offset;A[0]=u-c,A[1]=f+m,A[2]=u-v,A[3]=g+m,A[4]=d-v,A[5]=g+p,A[6]=d-c,A[7]=f+p},computeVertices:function(t,e,n,i){t+=n.worldX,e+=n.worldY;var a=n.matrix.a,r=n.matrix.c,o=n.matrix.b,s=n.matrix.d,h=this.offset;i[0]=h[0]*a+h[1]*r+t,i[1]=h[0]*o+h[1]*s+e,i[2]=h[2]*a+h[3]*r+t,i[3]=h[2]*o+h[3]*s+e,i[4]=h[4]*a+h[5]*r+t,i[5]=h[4]*o+h[5]*s+e,i[6]=h[6]*a+h[7]*r+t,i[7]=h[6]*o+h[7]*s+e}},e.exports=i.RegionAttachment},{"../SpineUtil":40,"./AttachmentType":11}],27:[function(t,e,n){var i=t("../SpineUtil")||{};i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.RotateTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=2*t},i.RotateTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/2},setFrame:function(t,e,n){t*=2,this.frames[t]=e,this.frames[t+1]=n},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s=t.bones[this.boneIndex];if(n>=o[o.length-2]){for(var h=s.data.rotation+o[o.length-1]-s.rotation;h>180;)h-=360;for(;-180>h;)h+=360;return void(s.rotation+=h*r)}var l=i.Animation.binarySearch(o,n,2),u=o[l-1],m=o[l],f=1-(n-m)/(o[l-2]-m);f=this.curves.getCurvePercent(l/2-1,f);for(var h=o[l+1]-u;h>180;)h-=360;for(;-180>h;)h+=360;for(h=s.data.rotation+(u+h*f)-s.rotation;h>180;)h-=360;for(;-180>h;)h+=360;s.rotation+=h*r}}},e.exports=i.RotateTimeline},{"../SpineUtil":40,"./Animation":2,"./Curves":16}],28:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.ScaleTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=3*t},i.ScaleTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/3},setFrame:function(t,e,n,i){t*=3,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=i},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s=t.bones[this.boneIndex];if(n>=o[o.length-3])return s.scaleX+=(s.data.scaleX*o[o.length-2]-s.scaleX)*r,void(s.scaleY+=(s.data.scaleY*o[o.length-1]-s.scaleY)*r);var h=i.Animation.binarySearch(o,n,3),l=o[h-2],u=o[h-1],m=o[h],f=1-(n-m)/(o[h+-3]-m);f=this.curves.getCurvePercent(h/3-1,f),s.scaleX+=(s.data.scaleX*(l+(o[h+1]-l)*f)-s.scaleX)*r,s.scaleY+=(s.data.scaleY*(u+(o[h+2]-u)*f)-s.scaleY)*r}}},e.exports=i.ScaleTimeline},{"../SpineUtil":40,"./Animation":2,"./Curves":16}],29:[function(t,e,n){var i=t("../SpineUtil");i.Bone=t("./Bone"),i.Slot=t("./Slot"),i.IkConstraint=t("./IkConstraint"),i.Skeleton=function(t){this.data=t,this.bones=[];for(var e=0,n=t.bones.length;n>e;e++){var a=t.bones[e],r=a.parent?this.bones[t.bones.indexOf(a.parent)]:null;this.bones.push(new i.Bone(a,this,r))}this.slots=[],this.drawOrder=[];for(var e=0,n=t.slots.length;n>e;e++){var o=t.slots[e],s=this.bones[t.bones.indexOf(o.boneData)],h=new i.Slot(o,s);this.slots.push(h),this.drawOrder.push(e)}this.ikConstraints=[];for(var e=0,n=t.ikConstraints.length;n>e;e++)this.ikConstraints.push(new i.IkConstraint(t.ikConstraints[e],this));this.boneCache=[],this.updateCache()},i.Skeleton.prototype={x:0,y:0,skin:null,r:1,g:1,b:1,a:1,time:0,flipX:!1,flipY:!1,updateCache:function(){var t=this.ikConstraints,e=t.length,n=e+1,i=this.boneCache;i.length>n&&(i.length=n);for(var a=0,r=i.length;r>a;a++)i[a].length=0;for(;i.length<n;)i[i.length]=[];var o=i[0],s=this.bones;t:for(var a=0,r=s.length;r>a;a++){var h=s[a],l=h;do{for(var u=0;e>u;u++)for(var m=t[u],f=m.bones[0],c=m.bones[m.bones.length-1];;){if(l==c){i[u].push(h),i[u+1].push(h);continue t}if(c==f)break;c=c.parent}l=l.parent}while(l);o[o.length]=h}},updateWorldTransform:function(){for(var t=this.bones,e=0,n=t.length;n>e;e++){var i=t[e];i.rotationIK=i.rotation}for(var e=0,a=this.boneCache.length-1;;){for(var r=this.boneCache[e],o=0,s=r.length;s>o;o++)r[o].updateWorldTransform();if(e==a)break;this.ikConstraints[e].apply(),e++}},setToSetupPose:function(){this.setBonesToSetupPose(),this.setSlotsToSetupPose()},setBonesToSetupPose:function(){for(var t=this.bones,e=0,n=t.length;n>e;e++)t[e].setToSetupPose();for(var i=this.ikConstraints,e=0,n=i.length;n>e;e++){var a=i[e];a.bendDirection=a.data.bendDirection,a.mix=a.data.mix}},setSlotsToSetupPose:function(){for(var t=this.slots,e=0,n=t.length;n>e;e++)t[e].setToSetupPose(e);this.resetDrawOrder()},getRootBone:function(){return this.bones.length?this.bones[0]:null},findBone:function(t){for(var e=this.bones,n=0,i=e.length;i>n;n++)if(e[n].data.name==t)return e[n];return null},findBoneIndex:function(t){for(var e=this.bones,n=0,i=e.length;i>n;n++)if(e[n].data.name==t)return n;return-1},findSlot:function(t){for(var e=this.slots,n=0,i=e.length;i>n;n++)if(e[n].data.name==t)return e[n];return null},findSlotIndex:function(t){for(var e=this.slots,n=0,i=e.length;i>n;n++)if(e[n].data.name==t)return n;return-1},setSkinByName:function(t){var e=this.data.findSkin(t);if(!e)throw"Skin not found: "+t;this.setSkin(e)},setSkin:function(t){if(t)if(this.skin)t._attachAll(this,this.skin);else for(var e=this.slots,n=0,i=e.length;i>n;n++){var a=e[n],r=a.data.attachmentName;if(r){var o=t.getAttachment(n,r);o&&a.setAttachment(o)}}this.skin=t},getAttachmentBySlotName:function(t,e){return this.getAttachmentBySlotIndex(this.data.findSlotIndex(t),e)},getAttachmentBySlotIndex:function(t,e){if(this.skin){var n=this.skin.getAttachment(t,e);if(n)return n}return this.data.defaultSkin?this.data.defaultSkin.getAttachment(t,e):null},setAttachment:function(t,e){for(var n=this.slots,i=0,a=n.length;a>i;i++){var r=n[i];if(r.data.name==t){var o=null;if(e&&(o=this.getAttachmentBySlotIndex(i,e),!o))throw"Attachment not found: "+e+", for slot: "+t;return void r.setAttachment(o)}}throw"Slot not found: "+t},findIkConstraint:function(t){for(var e=this.ikConstraints,n=0,i=e.length;i>n;n++)if(e[n].data.name==t)return e[n];return null},update:function(t){this.time+=t},resetDrawOrder:function(){
for(var t=0,e=this.drawOrder.length;e>t;t++)this.drawOrder[t]=t}},e.exports=i.Skeleton},{"../SpineUtil":40,"./Bone":12,"./IkConstraint":22,"./Slot":34}],30:[function(t,e,n){var i=t("../SpineRuntime")||{};i.AttachmentType=t("./AttachmentType"),i.SkeletonBounds=function(){this.polygonPool=[],this.polygons=[],this.boundingBoxes=[]},i.SkeletonBounds.prototype={minX:0,minY:0,maxX:0,maxY:0,update:function(t,e){var n=t.slots,a=n.length,r=t.x,o=t.y,s=this.boundingBoxes,h=this.polygonPool,l=this.polygons;s.length=0;for(var u=0,m=l.length;m>u;u++)h.push(l[u]);l.length=0;for(var u=0;a>u;u++){var f=n[u],c=f.attachment;if(c.type==i.AttachmentType.boundingbox){s.push(c);var d,p=h.length;p>0?(d=h[p-1],h.splice(p-1,1)):d=[],l.push(d),d.length=c.vertices.length,c.computeWorldVertices(r,o,f.bone,d)}}e&&this.aabbCompute()},aabbCompute:function(){for(var t=this.polygons,e=Number.MAX_VALUE,n=Number.MAX_VALUE,i=Number.MIN_VALUE,a=Number.MIN_VALUE,r=0,o=t.length;o>r;r++)for(var s=t[r],h=0,l=s.length;l>h;h+=2){var u=s[h],m=s[h+1];e=Math.min(e,u),n=Math.min(n,m),i=Math.max(i,u),a=Math.max(a,m)}this.minX=e,this.minY=n,this.maxX=i,this.maxY=a},aabbContainsPoint:function(t,e){return t>=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},aabbIntersectsSegment:function(t,e,n,i){var a=this.minX,r=this.minY,o=this.maxX,s=this.maxY;if(a>=t&&a>=n||r>=e&&r>=i||t>=o&&n>=o||e>=s&&i>=s)return!1;var h=(i-e)/(n-t),l=h*(a-t)+e;if(l>r&&s>l)return!0;if(l=h*(o-t)+e,l>r&&s>l)return!0;var u=(r-e)/h+t;return u>a&&o>u?!0:(u=(s-e)/h+t,u>a&&o>u?!0:!1)},aabbIntersectsSkeleton:function(t){return this.minX<t.maxX&&this.maxX>t.minX&&this.minY<t.maxY&&this.maxY>t.minY},containsPoint:function(t,e){for(var n=this.polygons,i=0,a=n.length;a>i;i++)if(this.polygonContainsPoint(n[i],t,e))return this.boundingBoxes[i];return null},intersectsSegment:function(t,e,n,i){for(var a=this.polygons,r=0,o=a.length;o>r;r++)if(a[r].intersectsSegment(t,e,n,i))return this.boundingBoxes[r];return null},polygonContainsPoint:function(t,e,n){for(var i=t.length,a=i-2,r=!1,o=0;i>o;o+=2){var s=t[o+1],h=t[a+1];if(n>s&&h>=n||n>h&&s>=n){var l=t[o];l+(n-s)/(h-s)*(t[a]-l)<e&&(r=!r)}a=o}return r},polygonIntersectsSegment:function(t,e,n,i,a){for(var r=t.length,o=e-i,s=n-a,h=e*a-n*i,l=t[r-2],u=t[r-1],m=0;r>m;m+=2){var f=t[m],c=t[m+1],d=l*c-u*f,p=l-f,g=u-c,v=o*g-s*p,A=(h*p-o*d)/v;if((A>=l&&f>=A||A>=f&&l>=A)&&(A>=e&&i>=A||A>=i&&e>=A)){var x=(h*g-s*d)/v;if((x>=u&&c>=x||x>=c&&u>=x)&&(x>=n&&a>=x||x>=a&&n>=x))return!0}l=f,u=c}return!1},getPolygon:function(t){var e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]},getWidth:function(){return this.maxX-this.minX},getHeight:function(){return this.maxY-this.minY}},e.exports=i.SkeletonBounds},{"../SpineRuntime":39,"./AttachmentType":11}],31:[function(t,e,n){var i=t("../SpineUtil");i.SkeletonData=function(){this.bones=[],this.slots=[],this.skins=[],this.events=[],this.animations=[],this.ikConstraints=[]},i.SkeletonData.prototype={name:null,defaultSkin:null,width:0,height:0,version:null,hash:null,findBone:function(t){for(var e=this.bones,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null},findBoneIndex:function(t){for(var e=this.bones,n=0,i=e.length;i>n;n++)if(e[n].name==t)return n;return-1},findSlot:function(t){for(var e=this.slots,n=0,i=e.length;i>n;n++)if(e[n].name==t)return this.slots[n];return null},findSlotIndex:function(t){for(var e=this.slots,n=0,i=e.length;i>n;n++)if(e[n].name==t)return n;return-1},findSkin:function(t){for(var e=this.skins,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null},findEvent:function(t){for(var e=this.events,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null},findAnimation:function(t){for(var e=this.animations,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null},findIkConstraint:function(t){for(var e=this.ikConstraints,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null}},e.exports=i.SkeletonData},{"../SpineUtil":40}],32:[function(t,e,n){function i(t,e,n,i){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=i}var a=t("../SpineUtil");a.SkeletonData=t("./SkeletonData"),a.BoneData=t("./BoneData"),a.IkConstraintData=t("./IkConstraintData"),a.SlotData=t("./SlotData"),a.Skin=t("./Skin"),a.EventData=t("./EventData"),a.AttachmentType=t("./AttachmentType"),a.ColorTimeline=t("./ColorTimeline"),a.AttachmentTimeline=t("./AttachmentTimeline"),a.RotateTimeline=t("./RotateTimeline"),a.ScaleTimeline=t("./ScaleTimeline"),a.TranslateTimeline=t("./TranslateTimeline"),a.IkConstraintTimeline=t("./IkConstraintTimeline"),a.FfdTimeline=t("./FfdTimeline"),a.DrawOrderTimeline=t("./DrawOrderTimeline"),a.EventTimeline=t("./EventTimeline"),a.Event=t("./Event"),a.Animation=t("./Animation"),a.SkeletonJsonParser=function(t){this.attachmentLoader=t,this.linkedMeshes=[]},a.SkeletonJsonParser.prototype={scale:1,readSkeletonData:function(t,e){var n=new a.SkeletonData;n.name=e;var i=t.skeleton;i&&(n.hash=i.hash,n.version=i.spine,n.width=i.width||0,n.height=i.height||0);for(var r=t.bones,o=0,s=r.length;s>o;o++){var h=r[o],l=null;if(h.parent&&(l=n.findBone(h.parent),!l))throw"Parent bone not found: "+h.parent;var u=new a.BoneData(h.name,l);u.length=(h.length||0)*this.scale,u.x=(h.x||0)*this.scale,u.y=(h.y||0)*this.scale,u.rotation=h.rotation||0,u.scaleX=h.hasOwnProperty("scaleX")?h.scaleX:1,u.scaleY=h.hasOwnProperty("scaleY")?h.scaleY:1,u.inheritScale=h.hasOwnProperty("inheritScale")?h.inheritScale:!0,u.inheritRotation=h.hasOwnProperty("inheritRotation")?h.inheritRotation:!0,n.bones.push(u)}var m=t.ik;if(m)for(var o=0,s=m.length;s>o;o++){for(var f=m[o],c=new a.IkConstraintData(f.name),r=f.bones,d=0,p=r.length;p>d;d++){var g=n.findBone(r[d]);if(!g)throw"IK bone not found: "+r[d];c.bones.push(g)}if(c.target=n.findBone(f.target),!c.target)throw"Target bone not found: "+f.target;c.bendDirection=!f.hasOwnProperty("bendPositive")||f.bendPositive?1:-1,c.mix=f.hasOwnProperty("mix")?f.mix:1,n.ikConstraints.push(c)}for(var v=t.slots,o=0,s=v.length;s>o;o++){var A=v[o],u=n.findBone(A.bone);if(!u)throw"Slot bone not found: "+A.bone;var x=new a.SlotData(A.name,u),y=A.color;y&&(x.r=this.toColor(y,0),x.g=this.toColor(y,1),x.b=this.toColor(y,2),x.a=this.toColor(y,3)),x.attachmentName=A.attachment,x.blendMode=A.blend&&a.SlotData.PIXI_BLEND_MODE_MAP[A.blend]||a.SlotData.PIXI_BLEND_MODE_MAP.normal,n.slots.push(x)}var S=t.skins;for(var T in S)if(S.hasOwnProperty(T)){var w=S[T],b=new a.Skin(T);for(var k in w)if(w.hasOwnProperty(k)){var I=n.findSlotIndex(k),C=w[k];for(var M in C)if(C.hasOwnProperty(M)){var D=this.readAttachment(b,I,M,C[M]);D&&b.addAttachment(I,M,D)}}n.skins.push(b),"default"==b.name&&(n.defaultSkin=b)}for(var U=this.linkedMeshes,o=0,s=U.size;s>o;o++){var O=U[o],b=O.skin?n.findSkin(O.skin):n.defaultSkin,l=b.getAttachment(O.slotIndex,O.parent);O.mesh.setParentMesh(l),O.mesh.updateUVs()}U.length=0;var P=t.events;for(var X in P)if(P.hasOwnProperty(X)){var R=P[X],E=new a.EventData(X);E.intValue=R["int"]||0,E.floatValue=R["float"]||0,E.stringValue=R.string||null,n.events.push(E)}var B=t.animations;for(var F in B)B.hasOwnProperty(F)&&this.readAnimation(F,B[F],n);return n},readAttachment:function(t,e,n,r){n=r.name||n;var o=a.AttachmentType[r.type||"region"],s=r.path||n,h=this.scale;if(o==a.AttachmentType.region){var l=this.attachmentLoader.newRegionAttachment(t,n,s);if(!l)return null;l.path=s,l.x=(r.x||0)*h,l.y=(r.y||0)*h,l.scaleX=r.hasOwnProperty("scaleX")?r.scaleX:1,l.scaleY=r.hasOwnProperty("scaleY")?r.scaleY:1,l.rotation=r.rotation||0,l.width=(r.width||0)*h,l.height=(r.height||0)*h;var u=r.color;return u&&(l.r=this.toColor(u,0),l.g=this.toColor(u,1),l.b=this.toColor(u,2),l.a=this.toColor(u,3)),l.updateOffset(),l}if(o==a.AttachmentType.boundingbox){for(var m=this.attachmentLoader.newBoundingBoxAttachment(t,n),f=r.vertices,c=0,d=f.length;d>c;c++)m.vertices.push(f[c]*h);return m}if(o==a.AttachmentType.mesh||o==a.AttachmentType.linkedmesh){var p=this.attachmentLoader.newMeshAttachment(t,n,s);if(!p)return null;p.path=s,u=r.color,u&&(p.r=this.toColor(u,0),p.g=this.toColor(u,1),p.b=this.toColor(u,2),p.a=this.toColor(u,3)),p.width=(r.width||0)*h,p.height=(r.height||0)*h;var g=r.parent;return g?(p.inheritFFD=!!r.ffd,this.linkedMeshes.push(new i(p,r.skin||null,e,g))):(p.vertices=this.getFloatArray(r,"vertices",h),p.triangles=this.getIntArray(r,"triangles"),p.regionUVs=this.getFloatArray(r,"uvs",1),p.updateUVs(),p.hullLength=2*(r.hull||0),r.edges&&(p.edges=this.getIntArray(r,"edges"))),p}if(o==a.AttachmentType.weightedmesh||o==a.AttachmentType.weightedlinkedmesh){var p=this.attachmentLoader.newWeightedMeshAttachment(t,n,s);if(!p)return null;p.path=s,u=r.color,u&&(p.r=this.toColor(u,0),p.g=this.toColor(u,1),p.b=this.toColor(u,2),p.a=this.toColor(u,3)),p.width=(r.width||0)*h,p.height=(r.height||0)*h;var g=r.parent;if(g)p.inheritFFD=!!r.ffd,this.linkedMeshes.push(new i(p,r.skin||null,e,g));else{for(var v=this.getFloatArray(r,"uvs",1),f=this.getFloatArray(r,"vertices",1),A=[],x=[],c=0,d=f.length;d>c;){var y=0|f[c++];x[x.length]=y;for(var S=c+4*y;S>c;)x[x.length]=f[c],A[A.length]=f[c+1]*h,A[A.length]=f[c+2]*h,A[A.length]=f[c+3],c+=4}p.bones=x,p.weights=A,p.triangles=this.getIntArray(r,"triangles"),p.regionUVs=v,p.updateUVs(),p.hullLength=2*(r.hull||0),r.edges&&(p.edges=this.getIntArray(r,"edges"))}return p}throw"Unknown attachment type: "+o},readAnimation:function(t,e,n){var i=[],r=0,o=e.slots;for(var s in o)if(o.hasOwnProperty(s)){var h=o[s],l=n.findSlotIndex(s);for(var u in h)if(h.hasOwnProperty(u)){var m=h[u];if("color"==u){var f=new a.ColorTimeline(m.length);f.slotIndex=l;for(var c=0,d=0,p=m.length;p>d;d++){var g=m[d],v=g.color,A=this.toColor(v,0),x=this.toColor(v,1),y=this.toColor(v,2),S=this.toColor(v,3);f.setFrame(c,g.time,A,x,y,S),this.readCurve(f,c,g),c++}i.push(f),r=Math.max(r,f.frames[5*f.getFrameCount()-5])}else{if("attachment"!=u)throw"Invalid timeline type for a slot: "+u+" ("+s+")";var f=new a.AttachmentTimeline(m.length);f.slotIndex=l;for(var c=0,d=0,p=m.length;p>d;d++){var g=m[d];f.setFrame(c++,g.time,g.name)}i.push(f),r=Math.max(r,f.frames[f.getFrameCount()-1])}}}var T=e.bones;for(var w in T)if(T.hasOwnProperty(w)){var b=n.findBoneIndex(w);if(-1==b)throw"Bone not found: "+w;var k=T[w];for(var u in k)if(k.hasOwnProperty(u)){var m=k[u];if("rotate"==u){var f=new a.RotateTimeline(m.length);f.boneIndex=b;for(var c=0,d=0,p=m.length;p>d;d++){var g=m[d];f.setFrame(c,g.time,g.angle),this.readCurve(f,c,g),c++}i.push(f),r=Math.max(r,f.frames[2*f.getFrameCount()-2])}else{if("translate"!=u&&"scale"!=u)throw"flipX"==u||"flipY"==u?"flipX and flipY are not supported in spine v3: ("+w+")":"Invalid timeline type for a bone: "+u+" ("+w+")";var f,I=1;"scale"==u?f=new a.ScaleTimeline(m.length):(f=new a.TranslateTimeline(m.length),I=this.scale),f.boneIndex=b;for(var c=0,d=0,p=m.length;p>d;d++){var g=m[d],C=(g.x||0)*I,M=(g.y||0)*I;f.setFrame(c,g.time,C,M),this.readCurve(f,c,g),c++}i.push(f),r=Math.max(r,f.frames[3*f.getFrameCount()-3])}}}var D=e.ik;for(var U in D)if(D.hasOwnProperty(U)){var O=n.findIkConstraint(U),m=D[U],f=new a.IkConstraintTimeline(m.length);f.ikConstraintIndex=n.ikConstraints.indexOf(O);for(var c=0,d=0,p=m.length;p>d;d++){var g=m[d],P=g.hasOwnProperty("mix")?g.mix:1,X=!g.hasOwnProperty("bendPositive")||g.bendPositive?1:-1;f.setFrame(c,g.time,P,X),this.readCurve(f,c,g),c++}i.push(f),r=Math.max(r,f.frames[3*f.getFrameCount()-3])}var R=e.ffd;for(var E in R){var B=n.findSkin(E),h=R[E];for(s in h){var l=n.findSlotIndex(s),F=h[s];for(var V in F){var m=F[V],f=new a.FfdTimeline(m.length),Y=B.getAttachment(l,V);if(!Y)throw"FFD attachment not found: "+V;f.slotIndex=l,f.attachment=Y;var W,L=Y.type==a.AttachmentType.mesh;W=L?Y.vertices.length:Y.weights.length/3*2;for(var c=0,d=0,p=m.length;p>d;d++){var N,g=m[d];if(g.vertices){var _=g.vertices;N=[];for(var j=0;W>j;++j)N.push(0);var H=g.offset||0,q=_.length;if(1==this.scale)for(var K=0;q>K;K++)N[K+H]=_[K];else for(var K=0;q>K;K++)N[K+H]=_[K]*this.scale;if(L)for(var J=Y.vertices,K=0,q=N.length;q>K;K++)N[K]+=J[K]}else if(L)N=Y.vertices;else{N=[];for(var j=0;W>j;++j)N.push(0)}f.setFrame(c,g.time,N),this.readCurve(f,c,g),c++}i[i.length]=f,r=Math.max(r,f.frames[f.getFrameCount()-1])}}}var z=e.drawOrder;if(z||(z=e.draworder),z){for(var f=new a.DrawOrderTimeline(z.length),G=n.slots.length,c=0,d=0,p=z.length;p>d;d++){var $=z[d],Q=null;if($.offsets){Q=[],Q.length=G;for(var K=G-1;K>=0;K--)Q[K]=-1;var Z=$.offsets,tt=[];tt.length=G-Z.length;for(var et=0,nt=0,K=0,q=Z.length;q>K;K++){var it=Z[K],l=n.findSlotIndex(it.slot);if(-1==l)throw"Slot not found: "+it.slot;for(;et!=l;)tt[nt++]=et++;Q[et+it.offset]=et++}for(;G>et;)tt[nt++]=et++;for(var K=G-1;K>=0;K--)-1==Q[K]&&(Q[K]=tt[--nt])}f.setFrame(c++,$.time,Q)}i.push(f),r=Math.max(r,f.frames[f.getFrameCount()-1])}var at=e.events;if(at){for(var f=new a.EventTimeline(at.length),c=0,d=0,p=at.length;p>d;d++){var rt=at[d],ot=n.findEvent(rt.name);if(!ot)throw"Event not found: "+rt.name;var st=new a.Event(ot);st.intValue=rt.hasOwnProperty("int")?rt["int"]:ot.intValue,st.floatValue=rt.hasOwnProperty("float")?rt["float"]:ot.floatValue,st.stringValue=rt.hasOwnProperty("string")?rt.string:ot.stringValue,f.setFrame(c++,rt.time,st)}i.push(f),r=Math.max(r,f.frames[f.getFrameCount()-1])}n.animations.push(new a.Animation(t,i,r))},readCurve:function(t,e,n){var i=n.curve;i?"stepped"==i?t.curves.setStepped(e):i instanceof Array&&t.curves.setCurve(e,i[0],i[1],i[2],i[3]):t.curves.setLinear(e)},toColor:function(t,e){if(8!=t.length)throw"Color hexidecimal length must be 8, recieved: "+t;return parseInt(t.substring(2*e,2*e+2),16)/255},getFloatArray:function(t,e,n){var i=t[e],r=new a.Float32Array(i.length),o=0,s=i.length;if(1==n)for(;s>o;o++)r[o]=i[o];else for(;s>o;o++)r[o]=i[o]*n;return r},getIntArray:function(t,e){for(var n=t[e],i=new a.Uint16Array(n.length),r=0,o=n.length;o>r;r++)i[r]=0|n[r];return i}},e.exports=a.SkeletonJsonParser},{"../SpineUtil":40,"./Animation":2,"./AttachmentTimeline":10,"./AttachmentType":11,"./BoneData":13,"./ColorTimeline":15,"./DrawOrderTimeline":17,"./Event":18,"./EventData":19,"./EventTimeline":20,"./FfdTimeline":21,"./IkConstraintData":23,"./IkConstraintTimeline":24,"./RotateTimeline":27,"./ScaleTimeline":28,"./SkeletonData":31,"./Skin":33,"./SlotData":35,"./TranslateTimeline":37}],33:[function(t,e,n){var i=t("../SpineUtil");i.Skin=function(t){this.name=t,this.attachments={}},i.Skin.prototype={addAttachment:function(t,e,n){this.attachments[t+":"+e]=n},getAttachment:function(t,e){return this.attachments[t+":"+e]},_attachAll:function(t,e){for(var n in e.attachments){var i=n.indexOf(":"),a=parseInt(n.substring(0,i)),r=n.substring(i+1),o=t.slots[a];if(o.attachment&&o.attachment.name==r){var s=this.getAttachment(a,r);s&&o.setAttachment(s)}}}},e.exports=i.Skin},{"../SpineUtil":40}],34:[function(t,e,n){var i=t("../SpineUtil");i.Slot=function(t,e){this.data=t,this.bone=e,this.setToSetupPose()},i.Slot.prototype={r:1,g:1,b:1,a:1,_attachmentTime:0,attachment:null,attachmentVertices:[],setAttachment:function(t){this.attachment=t,this._attachmentTime=this.bone.skeleton.time,this.attachmentVertices.length=0},setAttachmentTime:function(t){this._attachmentTime=this.bone.skeleton.time-t},getAttachmentTime:function(){return this.bone.skeleton.time-this._attachmentTime},setToSetupPose:function(){var t=this.data;this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this.blendMode=t.blendMode;for(var e=this.bone.skeleton.data.slots,n=0,i=e.length;i>n;n++)if(e[n]==t){this.setAttachment(t.attachmentName?this.bone.skeleton.getAttachmentBySlotIndex(n,t.attachmentName):null);break}}},e.exports=i.Slot},{"../SpineUtil":40}],35:[function(t,e,n){var i=t("../SpineUtil");i.SlotData=function(t,e){this.name=t,this.boneData=e},i.SlotData.PIXI_BLEND_MODE_MAP={multiply:PIXI.BLEND_MODES.MULTIPLY,screen:PIXI.BLEND_MODES.SCREEN,additive:PIXI.BLEND_MODES.ADD,normal:PIXI.BLEND_MODES.NORMAL},i.SlotData.prototype={r:1,g:1,b:1,a:1,attachmentName:null,blendMode:PIXI.BLEND_MODES.NORMAL},e.exports=i.SlotData},{"../SpineUtil":40}],36:[function(t,e,n){var i=t("../SpineUtil");i.TrackEntry=function(){},i.TrackEntry.prototype={next:null,previous:null,animation:null,loop:!1,delay:0,time:0,lastTime:-1,endTime:0,timeScale:1,mixTime:0,mixDuration:0,mix:1,onStart:null,onEnd:null,onComplete:null,onEvent:null},e.exports=i.TrackEntry},{"../SpineUtil":40}],37:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.TranslateTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=3*t},i.TranslateTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/3},setFrame:function(t,e,n,i){t*=3,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=i},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s=t.bones[this.boneIndex];if(n>=o[o.length-3])return s.x+=(s.data.x+o[o.length-2]-s.x)*r,void(s.y+=(s.data.y+o[o.length-1]-s.y)*r);var h=i.Animation.binarySearch(o,n,3),l=o[h-2],u=o[h-1],m=o[h],f=1-(n-m)/(o[h+-3]-m);f=this.curves.getCurvePercent(h/3-1,f),s.x+=(s.data.x+l+(o[h+1]-l)*f-s.x)*r,s.y+=(s.data.y+u+(o[h+2]-u)*f-s.y)*r}}},e.exports=i.TranslateTimeline},{"../SpineUtil":40,"./Animation":2,"./Curves":16}],38:[function(t,e,n){var i=t("../SpineUtil")||{};i.AttachmentType=t("./AttachmentType"),i.WeightedMeshAttachment=function(t){this.name=t},i.WeightedMeshAttachment.prototype={type:i.AttachmentType.weightedmesh,parentMesh:null,inheritFFD:!1,bones:null,weights:null,uvs:null,regionUVs:null,triangles:null,hullLength:0,r:1,g:1,b:1,a:1,path:null,rendererObject:null,regionU:0,regionV:0,regionU2:0,regionV2:0,regionRotate:!1,regionOffsetX:0,regionOffsetY:0,regionWidth:0,regionHeight:0,regionOriginalWidth:0,regionOriginalHeight:0,edges:null,width:0,height:0,updateUVs:function(t,e,n,a,r){var o=this.regionU2-this.regionU,s=this.regionV2-this.regionV,h=this.regionUVs.length;if(this.uvs&&this.uvs.length==h||(this.uvs=new i.Float32Array(h)),this.regionRotate)for(var l=0;h>l;l+=2)this.uvs[l]=this.regionU+this.regionUVs[l+1]*o,this.uvs[l+1]=this.regionV+s-this.regionUVs[l]*s;else for(var l=0;h>l;l+=2)this.uvs[l]=this.regionU+this.regionUVs[l]*o,this.uvs[l+1]=this.regionV+this.regionUVs[l+1]*s},computeWorldVertices:function(t,e,n,i){var a,r,o,s,h,l,u,m=n.bone.skeleton.bones,f=this.weights,c=this.bones,d=0,p=0,g=0,v=0,A=c.length;if(n.attachmentVertices.length)for(var x=n.attachmentVertices;A>p;d+=2){for(r=0,o=0,a=c[p++]+p;a>p;p++,g+=3,v+=2)u=m[c[p]].matrix,s=f[g]+x[v],h=f[g+1]+x[v+1],l=f[g+2],r+=(s*u.a+h*u.c+u.tx)*l,o+=(s*u.b+h*u.d+u.ty)*l;i[d]=r+t,i[d+1]=o+e}else for(;A>p;d+=2){for(r=0,o=0,a=c[p++]+p;a>p;p++,g+=3)u=m[c[p]].matrix,s=f[g],h=f[g+1],l=f[g+2],r+=(s*u.a+h*u.c+u.tx)*l,o+=(s*u.b+h*u.d+u.ty)*l;i[d]=r+t,i[d+1]=o+e}},applyFFD:function(t){return this===t||this.inheritFFD&&parentMesh===t},setParentMesh:function(t){this.parentMesh=t,null!=t&&(this.bones=t.bones,this.weights=t.weights,this.regionUVs=t.regionUVs,this.triangles=t.triangles,this.hullLength=t.hullLength)}},e.exports=i.WeightedMeshAttachment},{"../SpineUtil":40,"./AttachmentType":11}],39:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.AnimationStateData=t("./AnimationStateData"),i.AnimationState=t("./AnimationState"),i.AtlasAttachmentParser=t("./AtlasAttachmentParser"),i.Atlas=t("./Atlas"),i.AtlasPage=t("./AtlasPage"),i.AtlasReader=t("./AtlasReader"),i.AtlasRegion=t("./AtlasRegion"),i.AttachmentTimeline=t("./AttachmentTimeline"),i.AttachmentType=t("./AttachmentType"),i.BoneData=t("./BoneData"),i.Bone=t("./Bone"),i.BoundingBoxAttachment=t("./BoundingBoxAttachment"),i.ColorTimeline=t("./ColorTimeline"),i.Curves=t("./Curves"),i.DrawOrderTimeline=t("./DrawOrderTimeline"),i.EventData=t("./EventData"),i.Event=t("./Event"),i.EventTimeline=t("./EventTimeline"),i.FfdTimeline=t("./FfdTimeline"),i.IkConstraintData=t("./IkConstraintData"),i.IkConstraint=t("./IkConstraint"),i.IkConstraintTimeline=t("./IkConstraintTimeline"),i.MeshAttachment=t("./MeshAttachment"),i.RegionAttachment=t("./RegionAttachment"),i.RotateTimeline=t("./RotateTimeline"),i.ScaleTimeline=t("./ScaleTimeline"),i.SkeletonBounds=t("./SkeletonBounds"),i.SkeletonData=t("./SkeletonData"),i.Skeleton=t("./Skeleton"),i.SkeletonJsonParser=t("./SkeletonJsonParser"),i.Skin=t("./Skin.js"),i.WeightedMeshAttachment=t("./WeightedMeshAttachment"),i.SlotData=t("./SlotData"),i.Slot=t("./Slot"),i.TrackEntry=t("./TrackEntry"),i.TranslateTimeline=t("./TranslateTimeline"),e.exports=i},{"../SpineUtil":40,"./Animation":2,"./AnimationState":3,"./AnimationStateData":4,"./Atlas":5,"./AtlasAttachmentParser":6,"./AtlasPage":7,"./AtlasReader":8,"./AtlasRegion":9,"./AttachmentTimeline":10,"./AttachmentType":11,"./Bone":12,"./BoneData":13,"./BoundingBoxAttachment":14,"./ColorTimeline":15,"./Curves":16,"./DrawOrderTimeline":17,"./Event":18,"./EventData":19,"./EventTimeline":20,"./FfdTimeline":21,"./IkConstraint":22,"./IkConstraintData":23,"./IkConstraintTimeline":24,"./MeshAttachment":25,"./RegionAttachment":26,"./RotateTimeline":27,"./ScaleTimeline":28,"./Skeleton":29,"./SkeletonBounds":30,"./SkeletonData":31,"./SkeletonJsonParser":32,"./Skin.js":33,"./Slot":34,"./SlotData":35,"./TrackEntry":36,"./TranslateTimeline":37,"./WeightedMeshAttachment":38}],40:[function(t,e,n){e.exports={radDeg:180/Math.PI,degRad:Math.PI/180,temp:[],Float32Array:"undefined"==typeof Float32Array?Array:Float32Array,Uint16Array:"undefined"==typeof Uint16Array?Array:Uint16Array,signum:function(t){return t>0?1:0>t?-1:0}}},{}],41:[function(t,e,n){function i(t){if(PIXI.Container.call(this),!t)throw new Error("The spineData param is required.");if("string"==typeof t)throw new Error('spineData param cant be string. Please use PIXI.spine.Spine.fromAtlas("YOUR_RESOURCE_NAME") from now on.');this.spineData=t,this.skeleton=new r.Skeleton(t),this.skeleton.updateWorldTransform(),this.stateData=new r.AnimationStateData(t),this.state=new r.AnimationState(this.stateData),this.slotContainers=[];for(var e=0,n=this.skeleton.slots.length;n>e;e++){var i=this.skeleton.slots[e],a=i.attachment,o=new PIXI.Container;if(this.slotContainers.push(o),this.addChild(o),a instanceof r.RegionAttachment){var s=a.rendererObject.name,h=this.createSprite(i,a);i.currentSprite=h,i.currentSpriteName=s,o.addChild(h)}else{if(!(a instanceof r.MeshAttachment))continue;var l=this.createMesh(i,a);i.currentMesh=l,i.currentMeshName=a.name,o.addChild(l)}}this.autoUpdate=!0}function a(){var t=this.parent.worldTransform,e=this.worldTransform,n=this.localTransform;e.a=n.a*t.a+n.b*t.c,e.b=n.a*t.b+n.b*t.d,e.c=n.c*t.a+n.d*t.c,e.d=n.c*t.b+n.d*t.d,e.tx=n.tx*t.a+n.ty*t.c+t.tx,e.ty=n.tx*t.b+n.ty*t.d+t.ty,this.worldAlpha=this.alpha*this.parent.worldAlpha,this._currentBounds=null}var r=t("../SpineRuntime"),o=t("../loaders/atlasParser");r.Bone.yDown=!0,i.fromAtlas=function(t){var e=o.AnimCache[t];if(!e)throw new Error('Spine data "'+t+'" does not exist in the animation cache');return new i(e)},i.prototype=Object.create(PIXI.Container.prototype),i.prototype.constructor=i,e.exports=i,i.globalAutoUpdate=!0,Object.defineProperties(i.prototype,{autoUpdate:{get:function(){return this.updateTransform===i.prototype.autoUpdateTransform},set:function(t){this.updateTransform=t?i.prototype.autoUpdateTransform:PIXI.Container.prototype.updateTransform}}}),i.prototype.update=function(t){this.state.update(t),this.state.apply(this.skeleton),this.skeleton.updateWorldTransform();for(var e=this.skeleton.drawOrder,n=this.skeleton.slots,i=0,o=e.length;o>i;i++)this.children[i]=this.slotContainers[e[i]];for(i=0,o=n.length;o>i;i++){var s=n[i],h=s.attachment,l=this.slotContainers[i];if(h){var u=h.type;if(u===r.AttachmentType.region){if(h.rendererObject&&(!s.currentSpriteName||s.currentSpriteName!==h.rendererObject.name)){var m=h.rendererObject.name;if(void 0!==s.currentSprite&&(s.currentSprite.visible=!1),s.sprites=s.sprites||{},void 0!==s.sprites[m])s.sprites[m].visible=!0;else{var f=this.createSprite(s,h);l.addChild(f)}s.currentSprite=s.sprites[m],s.currentSpriteName=m}if(l.transform){l.transform._dirtyLocal||(l.transform=new PIXI.TransformStatic);var c=l.transform,d=c.localTransform;c._dirtyParentVersion=-1,c._dirtyLocal=1,c._versionLocal=1,s.bone.matrix.copy(d),d.tx+=s.bone.skeleton.x,d.ty+=s.bone.skeleton.y}else{var d=l.localTransform||new PIXI.Matrix;s.bone.matrix.copy(d),d.tx+=s.bone.skeleton.x,d.ty+=s.bone.skeleton.y,l.localTransform=d,l.displayObjectUpdateTransform=a}s.currentSprite.blendMode=s.blendMode,s.currentSprite.tint=PIXI.utils.rgb2hex([s.r,s.g,s.b])}else{if(u!==r.AttachmentType.skinnedmesh&&u!==r.AttachmentType.mesh){l.visible=!1;continue}if(!s.currentMeshName||s.currentMeshName!==h.name){var p=h.name;if(void 0!==s.currentMesh&&(s.currentMesh.visible=!1),s.meshes=s.meshes||{},void 0!==s.meshes[p])s.meshes[p].visible=!0;else{var g=this.createMesh(s,h);l.addChild(g)}s.currentMesh=s.meshes[p],s.currentMeshName=p}h.computeWorldVertices(s.bone.skeleton.x,s.bone.skeleton.y,s,s.currentMesh.vertices)}l.visible=!0,l.alpha=s.a}else l.visible=!1}},i.prototype.autoUpdateTransform=function(){if(i.globalAutoUpdate){this.lastTime=this.lastTime||Date.now();var t=.001*(Date.now()-this.lastTime);this.lastTime=Date.now(),this.update(t)}else this.lastTime=0;PIXI.Container.prototype.updateTransform.call(this)},i.prototype.createSprite=function(t,e){var n=e.rendererObject,i=n.page.rendererObject,a=new PIXI.Rectangle(n.x,n.y,n.rotate?n.height:n.width,n.rotate?n.width:n.height),o=new PIXI.Texture(i,a),s=new PIXI.Sprite(o),h=n.rotate?.5*Math.PI:0;if(s.scale.x=e.width/n.originalWidth*e.scaleX,s.scale.y=e.height/n.originalHeight*e.scaleY,s.rotation=h+e.rotation*r.degRad,s.anchor.x=(.5*n.originalWidth-n.offsetX)/n.width,s.anchor.y=1-(.5*n.originalHeight-n.offsetY)/n.height,s.position.x=e.x,s.position.y=e.y,s.alpha=e.a,n.rotate){var l=s.scale.x;s.scale.x=s.scale.y,s.scale.y=l}return s.scale.y=-s.scale.y,t.sprites=t.sprites||{},t.sprites[n.name]=s,s},i.prototype.createMesh=function(t,e){var n=e.rendererObject,i=n.page.rendererObject,a=new PIXI.Texture(i),r=new PIXI.mesh.Mesh(a,new Float32Array(e.uvs.length),new Float32Array(e.uvs),new Uint16Array(e.triangles),PIXI.mesh.Mesh.DRAW_MODES.TRIANGLES);return r.canvasPadding=1.5,r.alpha=e.a,t.meshes=t.meshes||{},t.meshes[e.name]=r,r}},{"../SpineRuntime":39,"../loaders/atlasParser":43}],42:[function(t,e,n){var i=t("./atlasParser");PIXI.loaders.Loader.addPixiMiddleware(i),PIXI.loader.use(i())},{"./atlasParser":43}],43:[function(t,e,n){var i=PIXI.loaders.Resource,a=t("../SpineRuntime"),r=t("./imageLoaderAdapter"),o=e.exports=function(){return function(t,e){if(!t.data||!t.isJson||!t.data.bones)return e();var n=t.url.substr(0,t.url.lastIndexOf("."))+".atlas",s={crossOrigin:t.crossOrigin,xhrType:i.XHR_RESPONSE_TYPE.TEXT,metadata:t.metadata.spineMetadata},h={crossOrigin:t.crossOrigin,metadata:t.metadata.imageMetadata},l=t.url.substr(0,t.url.lastIndexOf("/")+1),u=r(this,t.name+"_atlas_page_",l,h);this.add(t.name+"_atlas",n,s,function(n){new a.Atlas(this.xhr.responseText,u,function(n){var i=new a.SkeletonJsonParser(new a.AtlasAttachmentParser(n)),r=i.readSkeletonData(t.data);t.spineData=r,t.spineAtlas=n,o.enableCaching&&(o.AnimCache[t.name]=t.spineData),e()})})}};o.AnimCache={},o.enableCaching=!0},{"../SpineRuntime":39,"./imageLoaderAdapter":44}],44:[function(t,e,n){t("../SpineRuntime");e.exports=function(t,e,n,i){return n&&n.lastIndexOf("/")!==n.length-1&&(n+="/"),function(a,r){var o=e+a,s=n+a;t.add(o,s,i,function(t){r(t.texture.baseTexture)})}}},{"../SpineRuntime":39}],45:[function(t,e,n){e.exports={atlasParser:t("./atlasParser"),Loader:t("./Loader"),syncImageLoaderAdapter:t("./syncImageLoaderAdapter"),imageLoaderAdapter:t("./imageLoaderAdapter")}},{"./Loader":42,"./atlasParser":43,"./imageLoaderAdapter":44,"./syncImageLoaderAdapter":46}],46:[function(t,e,n){t("../SpineRuntime");e.exports=function(t,e){return t&&t.lastIndexOf("/")!==t.length-1&&(t+="/"),function(t,n){n(PIXI.BaseTexture.fromImage(t,e))}}},{"../SpineRuntime":39}]},{},[1]);
for(var t=0,e=this.drawOrder.length;e>t;t++)this.drawOrder[t]=t}},e.exports=i.Skeleton},{"../SpineUtil":40,"./Bone":12,"./IkConstraint":22,"./Slot":34}],30:[function(t,e,n){var i=t("../SpineRuntime")||{};i.AttachmentType=t("./AttachmentType"),i.SkeletonBounds=function(){this.polygonPool=[],this.polygons=[],this.boundingBoxes=[]},i.SkeletonBounds.prototype={minX:0,minY:0,maxX:0,maxY:0,update:function(t,e){var n=t.slots,a=n.length,r=t.x,o=t.y,s=this.boundingBoxes,h=this.polygonPool,l=this.polygons;s.length=0;for(var u=0,m=l.length;m>u;u++)h.push(l[u]);l.length=0;for(var u=0;a>u;u++){var f=n[u],c=f.attachment;if(c.type==i.AttachmentType.boundingbox){s.push(c);var d,p=h.length;p>0?(d=h[p-1],h.splice(p-1,1)):d=[],l.push(d),d.length=c.vertices.length,c.computeWorldVertices(r,o,f.bone,d)}}e&&this.aabbCompute()},aabbCompute:function(){for(var t=this.polygons,e=Number.MAX_VALUE,n=Number.MAX_VALUE,i=Number.MIN_VALUE,a=Number.MIN_VALUE,r=0,o=t.length;o>r;r++)for(var s=t[r],h=0,l=s.length;l>h;h+=2){var u=s[h],m=s[h+1];e=Math.min(e,u),n=Math.min(n,m),i=Math.max(i,u),a=Math.max(a,m)}this.minX=e,this.minY=n,this.maxX=i,this.maxY=a},aabbContainsPoint:function(t,e){return t>=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},aabbIntersectsSegment:function(t,e,n,i){var a=this.minX,r=this.minY,o=this.maxX,s=this.maxY;if(a>=t&&a>=n||r>=e&&r>=i||t>=o&&n>=o||e>=s&&i>=s)return!1;var h=(i-e)/(n-t),l=h*(a-t)+e;if(l>r&&s>l)return!0;if(l=h*(o-t)+e,l>r&&s>l)return!0;var u=(r-e)/h+t;return u>a&&o>u?!0:(u=(s-e)/h+t,u>a&&o>u?!0:!1)},aabbIntersectsSkeleton:function(t){return this.minX<t.maxX&&this.maxX>t.minX&&this.minY<t.maxY&&this.maxY>t.minY},containsPoint:function(t,e){for(var n=this.polygons,i=0,a=n.length;a>i;i++)if(this.polygonContainsPoint(n[i],t,e))return this.boundingBoxes[i];return null},intersectsSegment:function(t,e,n,i){for(var a=this.polygons,r=0,o=a.length;o>r;r++)if(a[r].intersectsSegment(t,e,n,i))return this.boundingBoxes[r];return null},polygonContainsPoint:function(t,e,n){for(var i=t.length,a=i-2,r=!1,o=0;i>o;o+=2){var s=t[o+1],h=t[a+1];if(n>s&&h>=n||n>h&&s>=n){var l=t[o];l+(n-s)/(h-s)*(t[a]-l)<e&&(r=!r)}a=o}return r},polygonIntersectsSegment:function(t,e,n,i,a){for(var r=t.length,o=e-i,s=n-a,h=e*a-n*i,l=t[r-2],u=t[r-1],m=0;r>m;m+=2){var f=t[m],c=t[m+1],d=l*c-u*f,p=l-f,g=u-c,v=o*g-s*p,A=(h*p-o*d)/v;if((A>=l&&f>=A||A>=f&&l>=A)&&(A>=e&&i>=A||A>=i&&e>=A)){var x=(h*g-s*d)/v;if((x>=u&&c>=x||x>=c&&u>=x)&&(x>=n&&a>=x||x>=a&&n>=x))return!0}l=f,u=c}return!1},getPolygon:function(t){var e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]},getWidth:function(){return this.maxX-this.minX},getHeight:function(){return this.maxY-this.minY}},e.exports=i.SkeletonBounds},{"../SpineRuntime":39,"./AttachmentType":11}],31:[function(t,e,n){var i=t("../SpineUtil");i.SkeletonData=function(){this.bones=[],this.slots=[],this.skins=[],this.events=[],this.animations=[],this.ikConstraints=[]},i.SkeletonData.prototype={name:null,defaultSkin:null,width:0,height:0,version:null,hash:null,findBone:function(t){for(var e=this.bones,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null},findBoneIndex:function(t){for(var e=this.bones,n=0,i=e.length;i>n;n++)if(e[n].name==t)return n;return-1},findSlot:function(t){for(var e=this.slots,n=0,i=e.length;i>n;n++)if(e[n].name==t)return this.slots[n];return null},findSlotIndex:function(t){for(var e=this.slots,n=0,i=e.length;i>n;n++)if(e[n].name==t)return n;return-1},findSkin:function(t){for(var e=this.skins,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null},findEvent:function(t){for(var e=this.events,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null},findAnimation:function(t){for(var e=this.animations,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null},findIkConstraint:function(t){for(var e=this.ikConstraints,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null}},e.exports=i.SkeletonData},{"../SpineUtil":40}],32:[function(t,e,n){function i(t,e,n,i){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=i}var a=t("../SpineUtil");a.SkeletonData=t("./SkeletonData"),a.BoneData=t("./BoneData"),a.IkConstraintData=t("./IkConstraintData"),a.SlotData=t("./SlotData"),a.Skin=t("./Skin"),a.EventData=t("./EventData"),a.AttachmentType=t("./AttachmentType"),a.ColorTimeline=t("./ColorTimeline"),a.AttachmentTimeline=t("./AttachmentTimeline"),a.RotateTimeline=t("./RotateTimeline"),a.ScaleTimeline=t("./ScaleTimeline"),a.TranslateTimeline=t("./TranslateTimeline"),a.IkConstraintTimeline=t("./IkConstraintTimeline"),a.FfdTimeline=t("./FfdTimeline"),a.DrawOrderTimeline=t("./DrawOrderTimeline"),a.EventTimeline=t("./EventTimeline"),a.Event=t("./Event"),a.Animation=t("./Animation"),a.SkeletonJsonParser=function(t){this.attachmentLoader=t,this.linkedMeshes=[]},a.SkeletonJsonParser.prototype={scale:1,readSkeletonData:function(t,e){var n=new a.SkeletonData;n.name=e;var i=t.skeleton;i&&(n.hash=i.hash,n.version=i.spine,n.width=i.width||0,n.height=i.height||0);for(var r=t.bones,o=0,s=r.length;s>o;o++){var h=r[o],l=null;if(h.parent&&(l=n.findBone(h.parent),!l))throw"Parent bone not found: "+h.parent;var u=new a.BoneData(h.name,l);u.length=(h.length||0)*this.scale,u.x=(h.x||0)*this.scale,u.y=(h.y||0)*this.scale,u.rotation=h.rotation||0,u.scaleX=h.hasOwnProperty("scaleX")?h.scaleX:1,u.scaleY=h.hasOwnProperty("scaleY")?h.scaleY:1,u.inheritScale=h.hasOwnProperty("inheritScale")?h.inheritScale:!0,u.inheritRotation=h.hasOwnProperty("inheritRotation")?h.inheritRotation:!0,n.bones.push(u)}var m=t.ik;if(m)for(var o=0,s=m.length;s>o;o++){for(var f=m[o],c=new a.IkConstraintData(f.name),r=f.bones,d=0,p=r.length;p>d;d++){var g=n.findBone(r[d]);if(!g)throw"IK bone not found: "+r[d];c.bones.push(g)}if(c.target=n.findBone(f.target),!c.target)throw"Target bone not found: "+f.target;c.bendDirection=!f.hasOwnProperty("bendPositive")||f.bendPositive?1:-1,c.mix=f.hasOwnProperty("mix")?f.mix:1,n.ikConstraints.push(c)}for(var v=t.slots,o=0,s=v.length;s>o;o++){var A=v[o],u=n.findBone(A.bone);if(!u)throw"Slot bone not found: "+A.bone;var x=new a.SlotData(A.name,u),y=A.color;y&&(x.r=this.toColor(y,0),x.g=this.toColor(y,1),x.b=this.toColor(y,2),x.a=this.toColor(y,3)),x.attachmentName=A.attachment,x.blendMode=A.blend&&a.SlotData.PIXI_BLEND_MODE_MAP[A.blend]||a.SlotData.PIXI_BLEND_MODE_MAP.normal,n.slots.push(x)}var S=t.skins;for(var T in S)if(S.hasOwnProperty(T)){var w=S[T],b=new a.Skin(T);for(var k in w)if(w.hasOwnProperty(k)){var I=n.findSlotIndex(k),C=w[k];for(var M in C)if(C.hasOwnProperty(M)){var D=this.readAttachment(b,I,M,C[M]);D&&b.addAttachment(I,M,D)}}n.skins.push(b),"default"==b.name&&(n.defaultSkin=b)}for(var U=this.linkedMeshes,o=0,s=U.size;s>o;o++){var O=U[o],b=O.skin?n.findSkin(O.skin):n.defaultSkin,l=b.getAttachment(O.slotIndex,O.parent);O.mesh.setParentMesh(l),O.mesh.updateUVs()}U.length=0;var P=t.events;for(var X in P)if(P.hasOwnProperty(X)){var R=P[X],E=new a.EventData(X);E.intValue=R["int"]||0,E.floatValue=R["float"]||0,E.stringValue=R.string||null,n.events.push(E)}var B=t.animations;for(var F in B)B.hasOwnProperty(F)&&this.readAnimation(F,B[F],n);return n},readAttachment:function(t,e,n,r){n=r.name||n;var o=a.AttachmentType[r.type||"region"],s=r.path||n,h=this.scale;if(o==a.AttachmentType.region){var l=this.attachmentLoader.newRegionAttachment(t,n,s);if(!l)return null;l.path=s,l.x=(r.x||0)*h,l.y=(r.y||0)*h,l.scaleX=r.hasOwnProperty("scaleX")?r.scaleX:1,l.scaleY=r.hasOwnProperty("scaleY")?r.scaleY:1,l.rotation=r.rotation||0,l.width=(r.width||0)*h,l.height=(r.height||0)*h;var u=r.color;return u&&(l.r=this.toColor(u,0),l.g=this.toColor(u,1),l.b=this.toColor(u,2),l.a=this.toColor(u,3)),l.updateOffset(),l}if(o==a.AttachmentType.boundingbox){for(var m=this.attachmentLoader.newBoundingBoxAttachment(t,n),f=r.vertices,c=0,d=f.length;d>c;c++)m.vertices.push(f[c]*h);return m}if(o==a.AttachmentType.mesh||o==a.AttachmentType.linkedmesh){var p=this.attachmentLoader.newMeshAttachment(t,n,s);if(!p)return null;p.path=s,u=r.color,u&&(p.r=this.toColor(u,0),p.g=this.toColor(u,1),p.b=this.toColor(u,2),p.a=this.toColor(u,3)),p.width=(r.width||0)*h,p.height=(r.height||0)*h;var g=r.parent;return g?(p.inheritFFD=!!r.ffd,this.linkedMeshes.push(new i(p,r.skin||null,e,g))):(p.vertices=this.getFloatArray(r,"vertices",h),p.triangles=this.getIntArray(r,"triangles"),p.regionUVs=this.getFloatArray(r,"uvs",1),p.updateUVs(),p.hullLength=2*(r.hull||0),r.edges&&(p.edges=this.getIntArray(r,"edges"))),p}if(o==a.AttachmentType.weightedmesh||o==a.AttachmentType.weightedlinkedmesh){var p=this.attachmentLoader.newWeightedMeshAttachment(t,n,s);if(!p)return null;p.path=s,u=r.color,u&&(p.r=this.toColor(u,0),p.g=this.toColor(u,1),p.b=this.toColor(u,2),p.a=this.toColor(u,3)),p.width=(r.width||0)*h,p.height=(r.height||0)*h;var g=r.parent;if(g)p.inheritFFD=!!r.ffd,this.linkedMeshes.push(new i(p,r.skin||null,e,g));else{for(var v=this.getFloatArray(r,"uvs",1),f=this.getFloatArray(r,"vertices",1),A=[],x=[],c=0,d=f.length;d>c;){var y=0|f[c++];x[x.length]=y;for(var S=c+4*y;S>c;)x[x.length]=f[c],A[A.length]=f[c+1]*h,A[A.length]=f[c+2]*h,A[A.length]=f[c+3],c+=4}p.bones=x,p.weights=A,p.triangles=this.getIntArray(r,"triangles"),p.regionUVs=v,p.updateUVs(),p.hullLength=2*(r.hull||0),r.edges&&(p.edges=this.getIntArray(r,"edges"))}return p}throw"Unknown attachment type: "+o},readAnimation:function(t,e,n){var i=[],r=0,o=e.slots;for(var s in o)if(o.hasOwnProperty(s)){var h=o[s],l=n.findSlotIndex(s);for(var u in h)if(h.hasOwnProperty(u)){var m=h[u];if("color"==u){var f=new a.ColorTimeline(m.length);f.slotIndex=l;for(var c=0,d=0,p=m.length;p>d;d++){var g=m[d],v=g.color,A=this.toColor(v,0),x=this.toColor(v,1),y=this.toColor(v,2),S=this.toColor(v,3);f.setFrame(c,g.time,A,x,y,S),this.readCurve(f,c,g),c++}i.push(f),r=Math.max(r,f.frames[5*f.getFrameCount()-5])}else{if("attachment"!=u)throw"Invalid timeline type for a slot: "+u+" ("+s+")";var f=new a.AttachmentTimeline(m.length);f.slotIndex=l;for(var c=0,d=0,p=m.length;p>d;d++){var g=m[d];f.setFrame(c++,g.time,g.name)}i.push(f),r=Math.max(r,f.frames[f.getFrameCount()-1])}}}var T=e.bones;for(var w in T)if(T.hasOwnProperty(w)){var b=n.findBoneIndex(w);if(-1==b)throw"Bone not found: "+w;var k=T[w];for(var u in k)if(k.hasOwnProperty(u)){var m=k[u];if("rotate"==u){var f=new a.RotateTimeline(m.length);f.boneIndex=b;for(var c=0,d=0,p=m.length;p>d;d++){var g=m[d];f.setFrame(c,g.time,g.angle),this.readCurve(f,c,g),c++}i.push(f),r=Math.max(r,f.frames[2*f.getFrameCount()-2])}else{if("translate"!=u&&"scale"!=u)throw"flipX"==u||"flipY"==u?"flipX and flipY are not supported in spine v3: ("+w+")":"Invalid timeline type for a bone: "+u+" ("+w+")";var f,I=1;"scale"==u?f=new a.ScaleTimeline(m.length):(f=new a.TranslateTimeline(m.length),I=this.scale),f.boneIndex=b;for(var c=0,d=0,p=m.length;p>d;d++){var g=m[d],C=(g.x||0)*I,M=(g.y||0)*I;f.setFrame(c,g.time,C,M),this.readCurve(f,c,g),c++}i.push(f),r=Math.max(r,f.frames[3*f.getFrameCount()-3])}}}var D=e.ik;for(var U in D)if(D.hasOwnProperty(U)){var O=n.findIkConstraint(U),m=D[U],f=new a.IkConstraintTimeline(m.length);f.ikConstraintIndex=n.ikConstraints.indexOf(O);for(var c=0,d=0,p=m.length;p>d;d++){var g=m[d],P=g.hasOwnProperty("mix")?g.mix:1,X=!g.hasOwnProperty("bendPositive")||g.bendPositive?1:-1;f.setFrame(c,g.time,P,X),this.readCurve(f,c,g),c++}i.push(f),r=Math.max(r,f.frames[3*f.getFrameCount()-3])}var R=e.ffd;for(var E in R){var B=n.findSkin(E),h=R[E];for(s in h){var l=n.findSlotIndex(s),F=h[s];for(var V in F){var m=F[V],f=new a.FfdTimeline(m.length),Y=B.getAttachment(l,V);if(!Y)throw"FFD attachment not found: "+V;f.slotIndex=l,f.attachment=Y;var W,L=Y.type==a.AttachmentType.mesh;W=L?Y.vertices.length:Y.weights.length/3*2;for(var c=0,d=0,p=m.length;p>d;d++){var N,g=m[d];if(g.vertices){var _=g.vertices;N=[];for(var j=0;W>j;++j)N.push(0);var H=g.offset||0,q=_.length;if(1==this.scale)for(var K=0;q>K;K++)N[K+H]=_[K];else for(var K=0;q>K;K++)N[K+H]=_[K]*this.scale;if(L)for(var J=Y.vertices,K=0,q=N.length;q>K;K++)N[K]+=J[K]}else if(L)N=Y.vertices;else{N=[];for(var j=0;W>j;++j)N.push(0)}f.setFrame(c,g.time,N),this.readCurve(f,c,g),c++}i[i.length]=f,r=Math.max(r,f.frames[f.getFrameCount()-1])}}}var z=e.drawOrder;if(z||(z=e.draworder),z){for(var f=new a.DrawOrderTimeline(z.length),G=n.slots.length,c=0,d=0,p=z.length;p>d;d++){var $=z[d],Q=null;if($.offsets){Q=[],Q.length=G;for(var K=G-1;K>=0;K--)Q[K]=-1;var Z=$.offsets,tt=[];tt.length=G-Z.length;for(var et=0,nt=0,K=0,q=Z.length;q>K;K++){var it=Z[K],l=n.findSlotIndex(it.slot);if(-1==l)throw"Slot not found: "+it.slot;for(;et!=l;)tt[nt++]=et++;Q[et+it.offset]=et++}for(;G>et;)tt[nt++]=et++;for(var K=G-1;K>=0;K--)-1==Q[K]&&(Q[K]=tt[--nt])}f.setFrame(c++,$.time,Q)}i.push(f),r=Math.max(r,f.frames[f.getFrameCount()-1])}var at=e.events;if(at){for(var f=new a.EventTimeline(at.length),c=0,d=0,p=at.length;p>d;d++){var rt=at[d],ot=n.findEvent(rt.name);if(!ot)throw"Event not found: "+rt.name;var st=new a.Event(ot);st.intValue=rt.hasOwnProperty("int")?rt["int"]:ot.intValue,st.floatValue=rt.hasOwnProperty("float")?rt["float"]:ot.floatValue,st.stringValue=rt.hasOwnProperty("string")?rt.string:ot.stringValue,f.setFrame(c++,rt.time,st)}i.push(f),r=Math.max(r,f.frames[f.getFrameCount()-1])}n.animations.push(new a.Animation(t,i,r))},readCurve:function(t,e,n){var i=n.curve;i?"stepped"==i?t.curves.setStepped(e):i instanceof Array&&t.curves.setCurve(e,i[0],i[1],i[2],i[3]):t.curves.setLinear(e)},toColor:function(t,e){if(8!=t.length)throw"Color hexidecimal length must be 8, recieved: "+t;return parseInt(t.substring(2*e,2*e+2),16)/255},getFloatArray:function(t,e,n){var i=t[e],r=new a.Float32Array(i.length),o=0,s=i.length;if(1==n)for(;s>o;o++)r[o]=i[o];else for(;s>o;o++)r[o]=i[o]*n;return r},getIntArray:function(t,e){for(var n=t[e],i=new a.Uint16Array(n.length),r=0,o=n.length;o>r;r++)i[r]=0|n[r];return i}},e.exports=a.SkeletonJsonParser},{"../SpineUtil":40,"./Animation":2,"./AttachmentTimeline":10,"./AttachmentType":11,"./BoneData":13,"./ColorTimeline":15,"./DrawOrderTimeline":17,"./Event":18,"./EventData":19,"./EventTimeline":20,"./FfdTimeline":21,"./IkConstraintData":23,"./IkConstraintTimeline":24,"./RotateTimeline":27,"./ScaleTimeline":28,"./SkeletonData":31,"./Skin":33,"./SlotData":35,"./TranslateTimeline":37}],33:[function(t,e,n){var i=t("../SpineUtil");i.Skin=function(t){this.name=t,this.attachments={}},i.Skin.prototype={addAttachment:function(t,e,n){this.attachments[t+":"+e]=n},getAttachment:function(t,e){return this.attachments[t+":"+e]},_attachAll:function(t,e){for(var n in e.attachments){var i=n.indexOf(":"),a=parseInt(n.substring(0,i)),r=n.substring(i+1),o=t.slots[a];if(o.attachment&&o.attachment.name==r){var s=this.getAttachment(a,r);s&&o.setAttachment(s)}}}},e.exports=i.Skin},{"../SpineUtil":40}],34:[function(t,e,n){var i=t("../SpineUtil");i.Slot=function(t,e){this.data=t,this.bone=e,this.setToSetupPose()},i.Slot.prototype={r:1,g:1,b:1,a:1,_attachmentTime:0,attachment:null,attachmentVertices:[],setAttachment:function(t){this.attachment=t,this._attachmentTime=this.bone.skeleton.time,this.attachmentVertices.length=0},setAttachmentTime:function(t){this._attachmentTime=this.bone.skeleton.time-t},getAttachmentTime:function(){return this.bone.skeleton.time-this._attachmentTime},setToSetupPose:function(){var t=this.data;this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this.blendMode=t.blendMode;for(var e=this.bone.skeleton.data.slots,n=0,i=e.length;i>n;n++)if(e[n]==t){this.setAttachment(t.attachmentName?this.bone.skeleton.getAttachmentBySlotIndex(n,t.attachmentName):null);break}}},e.exports=i.Slot},{"../SpineUtil":40}],35:[function(t,e,n){var i=t("../SpineUtil");i.SlotData=function(t,e){this.name=t,this.boneData=e},i.SlotData.PIXI_BLEND_MODE_MAP={multiply:PIXI.BLEND_MODES.MULTIPLY,screen:PIXI.BLEND_MODES.SCREEN,additive:PIXI.BLEND_MODES.ADD,normal:PIXI.BLEND_MODES.NORMAL},i.SlotData.prototype={r:1,g:1,b:1,a:1,attachmentName:null,blendMode:PIXI.BLEND_MODES.NORMAL},e.exports=i.SlotData},{"../SpineUtil":40}],36:[function(t,e,n){var i=t("../SpineUtil");i.TrackEntry=function(){},i.TrackEntry.prototype={next:null,previous:null,animation:null,loop:!1,delay:0,time:0,lastTime:-1,endTime:0,timeScale:1,mixTime:0,mixDuration:0,mix:1,onStart:null,onEnd:null,onComplete:null,onEvent:null},e.exports=i.TrackEntry},{"../SpineUtil":40}],37:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.TranslateTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=3*t},i.TranslateTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/3},setFrame:function(t,e,n,i){t*=3,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=i},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s=t.bones[this.boneIndex];if(n>=o[o.length-3])return s.x+=(s.data.x+o[o.length-2]-s.x)*r,void(s.y+=(s.data.y+o[o.length-1]-s.y)*r);var h=i.Animation.binarySearch(o,n,3),l=o[h-2],u=o[h-1],m=o[h],f=1-(n-m)/(o[h+-3]-m);f=this.curves.getCurvePercent(h/3-1,f),s.x+=(s.data.x+l+(o[h+1]-l)*f-s.x)*r,s.y+=(s.data.y+u+(o[h+2]-u)*f-s.y)*r}}},e.exports=i.TranslateTimeline},{"../SpineUtil":40,"./Animation":2,"./Curves":16}],38:[function(t,e,n){var i=t("../SpineUtil")||{};i.AttachmentType=t("./AttachmentType"),i.WeightedMeshAttachment=function(t){this.name=t},i.WeightedMeshAttachment.prototype={type:i.AttachmentType.weightedmesh,parentMesh:null,inheritFFD:!1,bones:null,weights:null,uvs:null,regionUVs:null,triangles:null,hullLength:0,r:1,g:1,b:1,a:1,path:null,rendererObject:null,regionU:0,regionV:0,regionU2:0,regionV2:0,regionRotate:!1,regionOffsetX:0,regionOffsetY:0,regionWidth:0,regionHeight:0,regionOriginalWidth:0,regionOriginalHeight:0,edges:null,width:0,height:0,updateUVs:function(t,e,n,a,r){var o=this.regionU2-this.regionU,s=this.regionV2-this.regionV,h=this.regionUVs.length;if(this.uvs&&this.uvs.length==h||(this.uvs=new i.Float32Array(h)),this.regionRotate)for(var l=0;h>l;l+=2)this.uvs[l]=this.regionU+this.regionUVs[l+1]*o,this.uvs[l+1]=this.regionV+s-this.regionUVs[l]*s;else for(var l=0;h>l;l+=2)this.uvs[l]=this.regionU+this.regionUVs[l]*o,this.uvs[l+1]=this.regionV+this.regionUVs[l+1]*s},computeWorldVertices:function(t,e,n,i){var a,r,o,s,h,l,u,m=n.bone.skeleton.bones,f=this.weights,c=this.bones,d=0,p=0,g=0,v=0,A=c.length;if(n.attachmentVertices.length)for(var x=n.attachmentVertices;A>p;d+=2){for(r=0,o=0,a=c[p++]+p;a>p;p++,g+=3,v+=2)u=m[c[p]].matrix,s=f[g]+x[v],h=f[g+1]+x[v+1],l=f[g+2],r+=(s*u.a+h*u.c+u.tx)*l,o+=(s*u.b+h*u.d+u.ty)*l;i[d]=r+t,i[d+1]=o+e}else for(;A>p;d+=2){for(r=0,o=0,a=c[p++]+p;a>p;p++,g+=3)u=m[c[p]].matrix,s=f[g],h=f[g+1],l=f[g+2],r+=(s*u.a+h*u.c+u.tx)*l,o+=(s*u.b+h*u.d+u.ty)*l;i[d]=r+t,i[d+1]=o+e}},applyFFD:function(t){return this===t||this.inheritFFD&&parentMesh===t},setParentMesh:function(t){this.parentMesh=t,null!=t&&(this.bones=t.bones,this.weights=t.weights,this.regionUVs=t.regionUVs,this.triangles=t.triangles,this.hullLength=t.hullLength)}},e.exports=i.WeightedMeshAttachment},{"../SpineUtil":40,"./AttachmentType":11}],39:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.AnimationStateData=t("./AnimationStateData"),i.AnimationState=t("./AnimationState"),i.AtlasAttachmentParser=t("./AtlasAttachmentParser"),i.Atlas=t("./Atlas"),i.AtlasPage=t("./AtlasPage"),i.AtlasReader=t("./AtlasReader"),i.AtlasRegion=t("./AtlasRegion"),i.AttachmentTimeline=t("./AttachmentTimeline"),i.AttachmentType=t("./AttachmentType"),i.BoneData=t("./BoneData"),i.Bone=t("./Bone"),i.BoundingBoxAttachment=t("./BoundingBoxAttachment"),i.ColorTimeline=t("./ColorTimeline"),i.Curves=t("./Curves"),i.DrawOrderTimeline=t("./DrawOrderTimeline"),i.EventData=t("./EventData"),i.Event=t("./Event"),i.EventTimeline=t("./EventTimeline"),i.FfdTimeline=t("./FfdTimeline"),i.IkConstraintData=t("./IkConstraintData"),i.IkConstraint=t("./IkConstraint"),i.IkConstraintTimeline=t("./IkConstraintTimeline"),i.MeshAttachment=t("./MeshAttachment"),i.RegionAttachment=t("./RegionAttachment"),i.RotateTimeline=t("./RotateTimeline"),i.ScaleTimeline=t("./ScaleTimeline"),i.SkeletonBounds=t("./SkeletonBounds"),i.SkeletonData=t("./SkeletonData"),i.Skeleton=t("./Skeleton"),i.SkeletonJsonParser=t("./SkeletonJsonParser"),i.Skin=t("./Skin.js"),i.WeightedMeshAttachment=t("./WeightedMeshAttachment"),i.SlotData=t("./SlotData"),i.Slot=t("./Slot"),i.TrackEntry=t("./TrackEntry"),i.TranslateTimeline=t("./TranslateTimeline"),e.exports=i},{"../SpineUtil":40,"./Animation":2,"./AnimationState":3,"./AnimationStateData":4,"./Atlas":5,"./AtlasAttachmentParser":6,"./AtlasPage":7,"./AtlasReader":8,"./AtlasRegion":9,"./AttachmentTimeline":10,"./AttachmentType":11,"./Bone":12,"./BoneData":13,"./BoundingBoxAttachment":14,"./ColorTimeline":15,"./Curves":16,"./DrawOrderTimeline":17,"./Event":18,"./EventData":19,"./EventTimeline":20,"./FfdTimeline":21,"./IkConstraint":22,"./IkConstraintData":23,"./IkConstraintTimeline":24,"./MeshAttachment":25,"./RegionAttachment":26,"./RotateTimeline":27,"./ScaleTimeline":28,"./Skeleton":29,"./SkeletonBounds":30,"./SkeletonData":31,"./SkeletonJsonParser":32,"./Skin.js":33,"./Slot":34,"./SlotData":35,"./TrackEntry":36,"./TranslateTimeline":37,"./WeightedMeshAttachment":38}],40:[function(t,e,n){e.exports={radDeg:180/Math.PI,degRad:Math.PI/180,temp:[],Float32Array:"undefined"==typeof Float32Array?Array:Float32Array,Uint16Array:"undefined"==typeof Uint16Array?Array:Uint16Array,signum:function(t){return t>0?1:0>t?-1:0}}},{}],41:[function(t,e,n){function i(t){if(PIXI.Container.call(this),!t)throw new Error("The spineData param is required.");if("string"==typeof t)throw new Error('spineData param cant be string. Please use PIXI.spine.Spine.fromAtlas("YOUR_RESOURCE_NAME") from now on.');this.spineData=t,this.skeleton=new r.Skeleton(t),this.skeleton.updateWorldTransform(),this.stateData=new r.AnimationStateData(t),this.state=new r.AnimationState(this.stateData),this.slotContainers=[];for(var e=0,n=this.skeleton.slots.length;n>e;e++){var i=this.skeleton.slots[e],a=i.attachment,o=new PIXI.Container;if(this.slotContainers.push(o),this.addChild(o),a instanceof r.RegionAttachment){var s=a.rendererObject.name,h=this.createSprite(i,a);i.currentSprite=h,i.currentSpriteName=s,o.addChild(h)}else{if(!(a instanceof r.MeshAttachment))continue;var l=this.createMesh(i,a);i.currentMesh=l,i.currentMeshName=a.name,o.addChild(l)}}this.autoUpdate=!0}function a(){var t=this.parent.worldTransform,e=this.worldTransform,n=this.localTransform;e.a=n.a*t.a+n.b*t.c,e.b=n.a*t.b+n.b*t.d,e.c=n.c*t.a+n.d*t.c,e.d=n.c*t.b+n.d*t.d,e.tx=n.tx*t.a+n.ty*t.c+t.tx,e.ty=n.tx*t.b+n.ty*t.d+t.ty,this.worldAlpha=this.alpha*this.parent.worldAlpha,this._currentBounds=null}var r=t("../SpineRuntime"),o=t("../loaders/atlasParser");r.Bone.yDown=!0,i.fromAtlas=function(t){var e=o.AnimCache[t];if(!e)throw new Error('Spine data "'+t+'" does not exist in the animation cache');return new i(e)},i.prototype=Object.create(PIXI.Container.prototype),i.prototype.constructor=i,e.exports=i,i.globalAutoUpdate=!0,Object.defineProperties(i.prototype,{autoUpdate:{get:function(){return this.updateTransform===i.prototype.autoUpdateTransform},set:function(t){this.updateTransform=t?i.prototype.autoUpdateTransform:PIXI.Container.prototype.updateTransform}}}),i.prototype.update=function(t){this.state.update(t),this.state.apply(this.skeleton),this.skeleton.updateWorldTransform();for(var e=this.skeleton.drawOrder,n=this.skeleton.slots,i=0,o=e.length;o>i;i++)this.children[i]=this.slotContainers[e[i]];for(i=0,o=n.length;o>i;i++){var s=n[i],h=s.attachment,l=this.slotContainers[i];if(h){var u=h.type;if(u===r.AttachmentType.region){if(h.rendererObject&&(!s.currentSpriteName||s.currentSpriteName!==h.rendererObject.name)){var m=h.rendererObject.name;if(void 0!==s.currentSprite&&(s.currentSprite.visible=!1),s.sprites=s.sprites||{},void 0!==s.sprites[m])s.sprites[m].visible=!0;else{var f=this.createSprite(s,h);l.addChild(f)}s.currentSprite=s.sprites[m],s.currentSpriteName=m}if(l.transform){l.transform._dirtyLocal||(l.transform=new PIXI.TransformStatic);var c=l.transform,d=c.localTransform;c._dirtyParentVersion=-1,c._dirtyLocal=1,c._versionLocal=1,s.bone.matrix.copy(d),d.tx+=s.bone.skeleton.x,d.ty+=s.bone.skeleton.y}else{var d=l.localTransform||new PIXI.Matrix;s.bone.matrix.copy(d),d.tx+=s.bone.skeleton.x,d.ty+=s.bone.skeleton.y,l.localTransform=d,l.displayObjectUpdateTransform=a}s.currentSprite.blendMode=s.blendMode,s.currentSprite.tint=PIXI.utils.rgb2hex([s.r,s.g,s.b])}else{if(u!==r.AttachmentType.skinnedmesh&&u!==r.AttachmentType.mesh){l.visible=!1;continue}if(!s.currentMeshName||s.currentMeshName!==h.name){var p=h.name;if(void 0!==s.currentMesh&&(s.currentMesh.visible=!1),s.meshes=s.meshes||{},void 0!==s.meshes[p])s.meshes[p].visible=!0;else{var g=this.createMesh(s,h);l.addChild(g)}s.currentMesh=s.meshes[p],s.currentMeshName=p}h.computeWorldVertices(s.bone.skeleton.x,s.bone.skeleton.y,s,s.currentMesh.vertices)}l.visible=!0,l.alpha=s.a}else l.visible=!1}},i.prototype.autoUpdateTransform=function(){if(i.globalAutoUpdate){this.lastTime=this.lastTime||Date.now();var t=.001*(Date.now()-this.lastTime);this.lastTime=Date.now(),this.update(t)}else this.lastTime=0;PIXI.Container.prototype.updateTransform.call(this)},i.prototype.createSprite=function(t,e){var n=e.rendererObject,i=n.page.rendererObject,a=new PIXI.Rectangle(n.x,n.y,n.rotate?n.height:n.width,n.rotate?n.width:n.height),o=new PIXI.Texture(i,a),s=new PIXI.Sprite(o),h=n.rotate?.5*Math.PI:0;if(s.scale.x=e.width/n.originalWidth*e.scaleX,s.scale.y=e.height/n.originalHeight*e.scaleY,s.rotation=-h+e.rotation*r.degRad,s.anchor.x=(.5*n.originalWidth-n.offsetX)/n.width,s.anchor.y=1-(.5*n.originalHeight-n.offsetY)/n.height,s.position.x=e.x,s.position.y=e.y,s.alpha=e.a,n.rotate){var l=s.scale.x;s.scale.x=s.scale.y,s.scale.y=l}return s.scale.y=-s.scale.y,t.sprites=t.sprites||{},t.sprites[n.name]=s,s},i.prototype.createMesh=function(t,e){var n=e.rendererObject,i=n.page.rendererObject,a=new PIXI.Texture(i),r=new PIXI.mesh.Mesh(a,new Float32Array(e.uvs.length),new Float32Array(e.uvs),new Uint16Array(e.triangles),PIXI.mesh.Mesh.DRAW_MODES.TRIANGLES);return r.canvasPadding=1.5,r.alpha=e.a,t.meshes=t.meshes||{},t.meshes[e.name]=r,r}},{"../SpineRuntime":39,"../loaders/atlasParser":43}],42:[function(t,e,n){var i=t("./atlasParser");PIXI.loaders.Loader.addPixiMiddleware(i),PIXI.loader.use(i())},{"./atlasParser":43}],43:[function(t,e,n){var i=PIXI.loaders.Resource,a=t("../SpineRuntime"),r=t("./imageLoaderAdapter"),o=e.exports=function(){return function(t,e){if(!t.data||!t.isJson||!t.data.bones)return e();var n=t.url.substr(0,t.url.lastIndexOf("."))+".atlas",s={crossOrigin:t.crossOrigin,xhrType:i.XHR_RESPONSE_TYPE.TEXT,metadata:t.metadata.spineMetadata},h={crossOrigin:t.crossOrigin,metadata:t.metadata.imageMetadata},l=t.url.substr(0,t.url.lastIndexOf("/")+1),u=r(this,t.name+"_atlas_page_",l,h);this.add(t.name+"_atlas",n,s,function(n){new a.Atlas(this.xhr.responseText,u,function(n){var i=new a.SkeletonJsonParser(new a.AtlasAttachmentParser(n)),r=i.readSkeletonData(t.data);t.spineData=r,t.spineAtlas=n,o.enableCaching&&(o.AnimCache[t.name]=t.spineData),e()})})}};o.AnimCache={},o.enableCaching=!0},{"../SpineRuntime":39,"./imageLoaderAdapter":44}],44:[function(t,e,n){t("../SpineRuntime");e.exports=function(t,e,n,i){return n&&n.lastIndexOf("/")!==n.length-1&&(n+="/"),function(a,r){var o=e+a,s=n+a;t.add(o,s,i,function(t){r(t.texture.baseTexture)})}}},{"../SpineRuntime":39}],45:[function(t,e,n){e.exports={atlasParser:t("./atlasParser"),Loader:t("./Loader"),syncImageLoaderAdapter:t("./syncImageLoaderAdapter"),imageLoaderAdapter:t("./imageLoaderAdapter")}},{"./Loader":42,"./atlasParser":43,"./imageLoaderAdapter":44,"./syncImageLoaderAdapter":46}],46:[function(t,e,n){t("../SpineRuntime");e.exports=function(t,e){return t&&t.lastIndexOf("/")!==t.length-1&&(t+="/"),function(t,n){n(PIXI.BaseTexture.fromImage(t,e))}}},{"../SpineRuntime":39}]},{},[1]);
{
"name": "pixi-spine",
"version": "1.0.12",
"version": "1.0.13",
"description": "Spine implementation for pixi v3",

@@ -5,0 +5,0 @@ "author": "Mat Groves",

@@ -313,3 +313,3 @@ var spine = require('../SpineRuntime');

sprite.scale.y = attachment.height / descriptor.originalHeight * attachment.scaleY;
sprite.rotation = baseRotation + (attachment.rotation * spine.degRad);
sprite.rotation = -baseRotation + (attachment.rotation * spine.degRad);
sprite.anchor.x = (0.5 * descriptor.originalWidth - descriptor.offsetX) / descriptor.width;

@@ -316,0 +316,0 @@ sprite.anchor.y = 1.0 - ((0.5 * descriptor.originalHeight - descriptor.offsetY) / descriptor.height);

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc