/*! * phaser-nineslice - version 2.0.1 * NineSlice plugin for Phaser.io! * * Azerion * Build at 15-03-2019 * Released under MIT License */ var __extends=this&&this.__extends||function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return function(b,c){function d(){this.constructor=b}a(b,c),b.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)}}(),PhaserNineSlice;!function(a){var b=function(a){function b(b,c,d,e,f,g,h,i){var j=a.call(this,b,c,d,e,f)||this;return j.baseTexture=j.texture.baseTexture,j.baseFrame=j.texture.frame,null===f||i?i||(i=b.cache.getNineSlice(e)):i=b.cache.getNineSlice(f),void 0===i?j:(j.topSize=i.top,i.left?j.leftSize=i.left:j.leftSize=j.topSize,i.right?j.rightSize=i.right:j.rightSize=j.leftSize,i.bottom?j.bottomSize=i.bottom:j.bottomSize=j.topSize,j.loadTexture(new Phaser.RenderTexture(j.game,j.localWidth,j.localHeight)),j.resize(g,h),j)}return __extends(b,a),b.prototype.renderTexture=function(){this.texture.resize(this.localWidth,this.localHeight,!0);var a=[0,this.leftSize,this.baseFrame.width-this.rightSize,this.baseFrame.width],b=[0,this.topSize,this.baseFrame.height-this.bottomSize,this.baseFrame.height],c=[0,this.leftSize,this.localWidth-this.rightSize,this.localWidth],d=[0,this.topSize,this.localHeight-this.bottomSize,this.localHeight];this.texture.clear();for(var e=0;e<3;e++)for(var f=0;f<3;f++){var g=this.createTexturePart(a[f],b[e],a[f+1]-a[f],b[e+1]-b[e]);g.width=c[f+1]-c[f],g.height=d[e+1]-d[e],this.texture.renderXY(g,c[f],d[e])}},b.prototype.resize=function(a,b){this.localWidth=a,this.localHeight=b,this.renderTexture()},b.prototype.destroy=function(){for(var b=[],c=0;c