Socket
Socket
Sign inDemoInstall

@pixi/display

Package Overview
Dependencies
Maintainers
2
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pixi/display - npm Package Compare versions

Comparing version 6.2.2 to 6.3.0

6

dist/browser/display.min.js
/*!
* @pixi/display - v6.2.2
* Compiled Wed, 26 Jan 2022 16:23:27 UTC
* @pixi/display - v6.3.0
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
*

@@ -8,3 +8,3 @@ * @pixi/display is licensed under the MIT License.

*/
this.PIXI=this.PIXI||{};var _pixi_display=function(t,i,e,n,r){"use strict";i.settings.SORTABLE_CHILDREN=!1;var s=function(){function t(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},t.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?e.Rectangle.EMPTY:((t=t||new e.Rectangle(0,0,1,1)).x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},t.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},t.prototype.addPointMatrix=function(t,i){var e=t.a,n=t.b,r=t.c,s=t.d,o=t.tx,a=t.ty,h=e*i.x+r*i.y+o,l=n*i.x+s*i.y+a;this.minX=Math.min(this.minX,h),this.maxX=Math.max(this.maxX,h),this.minY=Math.min(this.minY,l),this.maxY=Math.max(this.maxY,l)},t.prototype.addQuad=function(t){var i=this.minX,e=this.minY,n=this.maxX,r=this.maxY,s=t[0],o=t[1];i=s<i?s:i,e=o<e?o:e,n=s>n?s:n,r=o>r?o:r,i=(s=t[2])<i?s:i,e=(o=t[3])<e?o:e,n=s>n?s:n,r=o>r?o:r,i=(s=t[4])<i?s:i,e=(o=t[5])<e?o:e,n=s>n?s:n,r=o>r?o:r,i=(s=t[6])<i?s:i,e=(o=t[7])<e?o:e,n=s>n?s:n,r=o>r?o:r,this.minX=i,this.minY=e,this.maxX=n,this.maxY=r},t.prototype.addFrame=function(t,i,e,n,r){this.addFrameMatrix(t.worldTransform,i,e,n,r)},t.prototype.addFrameMatrix=function(t,i,e,n,r){var s=t.a,o=t.b,a=t.c,h=t.d,l=t.tx,d=t.ty,p=this.minX,m=this.minY,u=this.maxX,c=this.maxY,f=s*i+a*e+l,y=o*i+h*e+d;p=f<p?f:p,m=y<m?y:m,u=f>u?f:u,c=y>c?y:c,p=(f=s*n+a*e+l)<p?f:p,m=(y=o*n+h*e+d)<m?y:m,u=f>u?f:u,c=y>c?y:c,p=(f=s*i+a*r+l)<p?f:p,m=(y=o*i+h*r+d)<m?y:m,u=f>u?f:u,c=y>c?y:c,p=(f=s*n+a*r+l)<p?f:p,m=(y=o*n+h*r+d)<m?y:m,u=f>u?f:u,c=y>c?y:c,this.minX=p,this.minY=m,this.maxX=u,this.maxY=c},t.prototype.addVertexData=function(t,i,e){for(var n=this.minX,r=this.minY,s=this.maxX,o=this.maxY,a=i;a<e;a+=2){var h=t[a],l=t[a+1];n=h<n?h:n,r=l<r?l:r,s=h>s?h:s,o=l>o?l:o}this.minX=n,this.minY=r,this.maxX=s,this.maxY=o},t.prototype.addVertices=function(t,i,e,n){this.addVerticesMatrix(t.worldTransform,i,e,n)},t.prototype.addVerticesMatrix=function(t,i,e,n,r,s){void 0===r&&(r=0),void 0===s&&(s=r);for(var o=t.a,a=t.b,h=t.c,l=t.d,d=t.tx,p=t.ty,m=this.minX,u=this.minY,c=this.maxX,f=this.maxY,y=e;y<n;y+=2){var b=i[y],x=i[y+1],_=o*b+h*x+d,v=l*x+a*b+p;m=Math.min(m,_-r),c=Math.max(c,_+r),u=Math.min(u,v-s),f=Math.max(f,v+s)}this.minX=m,this.minY=u,this.maxX=c,this.maxY=f},t.prototype.addBounds=function(t){var i=this.minX,e=this.minY,n=this.maxX,r=this.maxY;this.minX=t.minX<i?t.minX:i,this.minY=t.minY<e?t.minY:e,this.maxX=t.maxX>n?t.maxX:n,this.maxY=t.maxY>r?t.maxY:r},t.prototype.addBoundsMask=function(t,i){var e=t.minX>i.minX?t.minX:i.minX,n=t.minY>i.minY?t.minY:i.minY,r=t.maxX<i.maxX?t.maxX:i.maxX,s=t.maxY<i.maxY?t.maxY:i.maxY;if(e<=r&&n<=s){var o=this.minX,a=this.minY,h=this.maxX,l=this.maxY;this.minX=e<o?e:o,this.minY=n<a?n:a,this.maxX=r>h?r:h,this.maxY=s>l?s:l}},t.prototype.addBoundsMatrix=function(t,i){this.addFrameMatrix(i,t.minX,t.minY,t.maxX,t.maxY)},t.prototype.addBoundsArea=function(t,i){var e=t.minX>i.x?t.minX:i.x,n=t.minY>i.y?t.minY:i.y,r=t.maxX<i.x+i.width?t.maxX:i.x+i.width,s=t.maxY<i.y+i.height?t.maxY:i.y+i.height;if(e<=r&&n<=s){var o=this.minX,a=this.minY,h=this.maxX,l=this.maxY;this.minX=e<o?e:o,this.minY=n<a?n:a,this.maxX=r>h?r:h,this.maxY=s>l?s:l}},t.prototype.pad=function(t,i){void 0===t&&(t=0),void 0===i&&(i=t),this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=i,this.maxY+=i)},t.prototype.addFramePad=function(t,i,e,n,r,s){t-=r,i-=s,e+=r,n+=s,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>e?this.maxX:e,this.minY=this.minY<i?this.minY:i,this.maxY=this.maxY>n?this.maxY:n},t}(),o=function(t,i){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)};function a(t,i){function e(){this.constructor=t}o(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)}var h=function(t){function i(){var i=t.call(this)||this;return i.tempDisplayObjectParent=null,i.transform=new e.Transform,i.alpha=1,i.visible=!0,i.renderable=!0,i.parent=null,i.worldAlpha=1,i._lastSortedIndex=0,i._zIndex=0,i.filterArea=null,i.filters=null,i._enabledFilters=null,i._bounds=new s,i._localBounds=null,i._boundsID=0,i._boundsRect=null,i._localBoundsRect=null,i._mask=null,i._maskRefCount=0,i._destroyed=!1,i.isSprite=!1,i.isMask=!1,i}return a(i,t),i.mixin=function(t){for(var e=Object.keys(t),n=0;n<e.length;++n){var r=e[n];Object.defineProperty(i.prototype,r,Object.getOwnPropertyDescriptor(t,r))}},Object.defineProperty(i.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!1,configurable:!0}),i.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},i.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha},i.prototype.getBounds=function(t,i){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),i||(this._boundsRect||(this._boundsRect=new e.Rectangle),i=this._boundsRect),this._bounds.getRectangle(i)},i.prototype.getLocalBounds=function(t){t||(this._localBoundsRect||(this._localBoundsRect=new e.Rectangle),t=this._localBoundsRect),this._localBounds||(this._localBounds=new s);var i=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;var r=this._bounds,o=this._boundsID;this._bounds=this._localBounds;var a=this.getBounds(!1,t);return this.parent=n,this.transform=i,this._bounds=r,this._bounds.updateID+=this._boundsID-o,a},i.prototype.toGlobal=function(t,i,e){return void 0===e&&(e=!1),e||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,i)},i.prototype.toLocal=function(t,i,e,n){return i&&(t=i.toGlobal(t,e,n)),n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,e)},i.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},i.prototype.setTransform=function(t,i,e,n,r,s,o,a,h){return void 0===t&&(t=0),void 0===i&&(i=0),void 0===e&&(e=1),void 0===n&&(n=1),void 0===r&&(r=0),void 0===s&&(s=0),void 0===o&&(o=0),void 0===a&&(a=0),void 0===h&&(h=0),this.position.x=t,this.position.y=i,this.scale.x=e||1,this.scale.y=n||1,this.rotation=r,this.skew.x=s,this.skew.y=o,this.pivot.x=a,this.pivot.y=h,this},i.prototype.destroy=function(t){this.parent&&this.parent.removeChild(this),this.emit("destroyed"),this.removeAllListeners(),this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.interactive=!1,this.interactiveChildren=!1,this._destroyed=!0},Object.defineProperty(i.prototype,"_tempDisplayObjectParent",{get:function(){return null===this.tempDisplayObjectParent&&(this.tempDisplayObjectParent=new l),this.tempDisplayObjectParent},enumerable:!1,configurable:!0}),i.prototype.enableTempParent=function(){var t=this.parent;return this.parent=this._tempDisplayObjectParent,t},i.prototype.disableTempParent=function(t){this.parent=t},Object.defineProperty(i.prototype,"x",{get:function(){return this.position.x},set:function(t){this.transform.position.x=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"y",{get:function(){return this.position.y},set:function(t){this.transform.position.y=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"worldTransform",{get:function(){return this.transform.worldTransform},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"localTransform",{get:function(){return this.transform.localTransform},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"position",{get:function(){return this.transform.position},set:function(t){this.transform.position.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"scale",{get:function(){return this.transform.scale},set:function(t){this.transform.scale.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"pivot",{get:function(){return this.transform.pivot},set:function(t){this.transform.pivot.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"skew",{get:function(){return this.transform.skew},set:function(t){this.transform.skew.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"rotation",{get:function(){return this.transform.rotation},set:function(t){this.transform.rotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"angle",{get:function(){return this.transform.rotation*e.RAD_TO_DEG},set:function(t){this.transform.rotation=t*e.DEG_TO_RAD},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"zIndex",{get:function(){return this._zIndex},set:function(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"worldVisible",{get:function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"mask",{get:function(){return this._mask},set:function(t){if(this._mask!==t){var i;if(this._mask)(i=this._mask.maskObject||this._mask)._maskRefCount--,0===i._maskRefCount&&(i.renderable=!0,i.isMask=!1);if(this._mask=t,this._mask)0===(i=this._mask.maskObject||this._mask)._maskRefCount&&(i.renderable=!1,i.isMask=!0),i._maskRefCount++}},enumerable:!1,configurable:!0}),i}(n.EventEmitter),l=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.sortDirty=null,i}return a(i,t),i}(h);function d(t,i){return t.zIndex===i.zIndex?t._lastSortedIndex-i._lastSortedIndex:t.zIndex-i.zIndex}h.prototype.displayObjectUpdateTransform=h.prototype.updateTransform;var p=function(t){function e(){var e=t.call(this)||this;return e.children=[],e.sortableChildren=i.settings.SORTABLE_CHILDREN,e.sortDirty=!1,e}return a(e,t),e.prototype.onChildrenChange=function(t){},e.prototype.addChild=function(){for(var t=arguments,i=[],e=0;e<arguments.length;e++)i[e]=t[e];if(i.length>1)for(var n=0;n<i.length;n++)this.addChild(i[n]);else{var r=i[0];r.parent&&r.parent.removeChild(r),r.parent=this,this.sortDirty=!0,r.transform._parentID=-1,this.children.push(r),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",r,this,this.children.length-1),r.emit("added",this)}return i[0]},e.prototype.addChildAt=function(t,i){if(i<0||i>this.children.length)throw new Error(t+"addChildAt: The index "+i+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(i,0,t),this._boundsID++,this.onChildrenChange(i),t.emit("added",this),this.emit("childAdded",t,this,i),t},e.prototype.swapChildren=function(t,i){if(t!==i){var e=this.getChildIndex(t),n=this.getChildIndex(i);this.children[e]=i,this.children[n]=t,this.onChildrenChange(e<n?e:n)}},e.prototype.getChildIndex=function(t){var i=this.children.indexOf(t);if(-1===i)throw new Error("The supplied DisplayObject must be a child of the caller");return i},e.prototype.setChildIndex=function(t,i){if(i<0||i>=this.children.length)throw new Error("The index "+i+" supplied is out of bounds "+this.children.length);var e=this.getChildIndex(t);n.removeItems(this.children,e,1),this.children.splice(i,0,t),this.onChildrenChange(i)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},e.prototype.removeChild=function(){for(var t=arguments,i=[],e=0;e<arguments.length;e++)i[e]=t[e];if(i.length>1)for(var r=0;r<i.length;r++)this.removeChild(i[r]);else{var s=i[0],o=this.children.indexOf(s);if(-1===o)return null;s.parent=null,s.transform._parentID=-1,n.removeItems(this.children,o,1),this._boundsID++,this.onChildrenChange(o),s.emit("removed",this),this.emit("childRemoved",s,this,o)}return i[0]},e.prototype.removeChildAt=function(t){var i=this.getChildAt(t);return i.parent=null,i.transform._parentID=-1,n.removeItems(this.children,t,1),this._boundsID++,this.onChildrenChange(t),i.emit("removed",this),this.emit("childRemoved",i,this,t),i},e.prototype.removeChildren=function(t,i){void 0===t&&(t=0),void 0===i&&(i=this.children.length);var e,n=t,r=i-n;if(r>0&&r<=i){e=this.children.splice(n,r);for(var s=0;s<e.length;++s)e[s].parent=null,e[s].transform&&(e[s].transform._parentID=-1);this._boundsID++,this.onChildrenChange(t);for(s=0;s<e.length;++s)e[s].emit("removed",this),this.emit("childRemoved",e[s],this,s);return e}if(0===r&&0===this.children.length)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},e.prototype.sortChildren=function(){for(var t=!1,i=0,e=this.children.length;i<e;++i){var n=this.children[i];n._lastSortedIndex=i,t||0===n.zIndex||(t=!0)}t&&this.children.length>1&&this.children.sort(d),this.sortDirty=!1},e.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,i=this.children.length;t<i;++t){var e=this.children[t];e.visible&&e.updateTransform()}},e.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var t=0;t<this.children.length;t++){var i=this.children[t];if(i.visible&&i.renderable)if(i.calculateBounds(),i._mask){var e=i._mask.maskObject||i._mask;e.calculateBounds(),this._bounds.addBoundsMask(i._bounds,e._bounds)}else i.filterArea?this._bounds.addBoundsArea(i._bounds,i.filterArea):this._bounds.addBounds(i._bounds)}this._bounds.updateID=this._boundsID},e.prototype.getLocalBounds=function(i,e){void 0===e&&(e=!1);var n=t.prototype.getLocalBounds.call(this,i);if(!e)for(var r=0,s=this.children.length;r<s;++r){var o=this.children[r];o.visible&&o.updateTransform()}return n},e.prototype._calculateBounds=function(){},e.prototype.render=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this.filters&&this.filters.length)this.renderAdvanced(t);else{this._render(t);for(var i=0,e=this.children.length;i<e;++i)this.children[i].render(t)}},e.prototype.renderAdvanced=function(t){var i=this.filters,e=this._mask;if(i){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var n=0;n<i.length;n++)i[n].enabled&&this._enabledFilters.push(i[n])}var s=i&&this._enabledFilters&&this._enabledFilters.length||e&&(!e.isMaskData||e.enabled&&(e.autoDetect||e.type!==r.MASK_TYPES.NONE));s&&t.batch.flush(),i&&this._enabledFilters&&this._enabledFilters.length&&t.filter.push(this,this._enabledFilters),e&&t.mask.push(this,this._mask),this._render(t);n=0;for(var o=this.children.length;n<o;n++)this.children[n].render(t);s&&t.batch.flush(),e&&t.mask.pop(this),i&&this._enabledFilters&&this._enabledFilters.length&&t.filter.pop()},e.prototype._render=function(t){},e.prototype.destroy=function(i){t.prototype.destroy.call(this),this.sortDirty=!1;var e="boolean"==typeof i?i:i&&i.children,n=this.removeChildren(0,this.children.length);if(e)for(var r=0;r<n.length;++r)n[r].destroy(i)},Object.defineProperty(e.prototype,"width",{get:function(){return this.scale.x*this.getLocalBounds().width},set:function(t){var i=this.getLocalBounds().width;this.scale.x=0!==i?t/i:1,this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.scale.y*this.getLocalBounds().height},set:function(t){var i=this.getLocalBounds().height;this.scale.y=0!==i?t/i:1,this._height=t},enumerable:!1,configurable:!0}),e}(h);return p.prototype.containerUpdateTransform=p.prototype.updateTransform,t.Bounds=s,t.Container=p,t.DisplayObject=h,t.TemporaryDisplayObject=l,t}({},PIXI,PIXI,PIXI.utils,PIXI);Object.assign(this.PIXI,_pixi_display);
this.PIXI=this.PIXI||{};var _pixi_display=function(t,e,i,n,r){"use strict";e.settings.SORTABLE_CHILDREN=!1;var s=function(){function t(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},t.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?i.Rectangle.EMPTY:((t=t||new i.Rectangle(0,0,1,1)).x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},t.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},t.prototype.addPointMatrix=function(t,e){var i=t.a,n=t.b,r=t.c,s=t.d,o=t.tx,a=t.ty,h=i*e.x+r*e.y+o,l=n*e.x+s*e.y+a;this.minX=Math.min(this.minX,h),this.maxX=Math.max(this.maxX,h),this.minY=Math.min(this.minY,l),this.maxY=Math.max(this.maxY,l)},t.prototype.addQuad=function(t){var e=this.minX,i=this.minY,n=this.maxX,r=this.maxY,s=t[0],o=t[1];e=s<e?s:e,i=o<i?o:i,n=s>n?s:n,r=o>r?o:r,e=(s=t[2])<e?s:e,i=(o=t[3])<i?o:i,n=s>n?s:n,r=o>r?o:r,e=(s=t[4])<e?s:e,i=(o=t[5])<i?o:i,n=s>n?s:n,r=o>r?o:r,e=(s=t[6])<e?s:e,i=(o=t[7])<i?o:i,n=s>n?s:n,r=o>r?o:r,this.minX=e,this.minY=i,this.maxX=n,this.maxY=r},t.prototype.addFrame=function(t,e,i,n,r){this.addFrameMatrix(t.worldTransform,e,i,n,r)},t.prototype.addFrameMatrix=function(t,e,i,n,r){var s=t.a,o=t.b,a=t.c,h=t.d,l=t.tx,d=t.ty,u=this.minX,p=this.minY,m=this.maxX,c=this.maxY,f=s*e+a*i+l,y=o*e+h*i+d;u=f<u?f:u,p=y<p?y:p,m=f>m?f:m,c=y>c?y:c,u=(f=s*n+a*i+l)<u?f:u,p=(y=o*n+h*i+d)<p?y:p,m=f>m?f:m,c=y>c?y:c,u=(f=s*e+a*r+l)<u?f:u,p=(y=o*e+h*r+d)<p?y:p,m=f>m?f:m,c=y>c?y:c,u=(f=s*n+a*r+l)<u?f:u,p=(y=o*n+h*r+d)<p?y:p,m=f>m?f:m,c=y>c?y:c,this.minX=u,this.minY=p,this.maxX=m,this.maxY=c},t.prototype.addVertexData=function(t,e,i){for(var n=this.minX,r=this.minY,s=this.maxX,o=this.maxY,a=e;a<i;a+=2){var h=t[a],l=t[a+1];n=h<n?h:n,r=l<r?l:r,s=h>s?h:s,o=l>o?l:o}this.minX=n,this.minY=r,this.maxX=s,this.maxY=o},t.prototype.addVertices=function(t,e,i,n){this.addVerticesMatrix(t.worldTransform,e,i,n)},t.prototype.addVerticesMatrix=function(t,e,i,n,r,s){void 0===r&&(r=0),void 0===s&&(s=r);for(var o=t.a,a=t.b,h=t.c,l=t.d,d=t.tx,u=t.ty,p=this.minX,m=this.minY,c=this.maxX,f=this.maxY,y=i;y<n;y+=2){var b=e[y],x=e[y+1],_=o*b+h*x+d,v=l*x+a*b+u;p=Math.min(p,_-r),c=Math.max(c,_+r),m=Math.min(m,v-s),f=Math.max(f,v+s)}this.minX=p,this.minY=m,this.maxX=c,this.maxY=f},t.prototype.addBounds=function(t){var e=this.minX,i=this.minY,n=this.maxX,r=this.maxY;this.minX=t.minX<e?t.minX:e,this.minY=t.minY<i?t.minY:i,this.maxX=t.maxX>n?t.maxX:n,this.maxY=t.maxY>r?t.maxY:r},t.prototype.addBoundsMask=function(t,e){var i=t.minX>e.minX?t.minX:e.minX,n=t.minY>e.minY?t.minY:e.minY,r=t.maxX<e.maxX?t.maxX:e.maxX,s=t.maxY<e.maxY?t.maxY:e.maxY;if(i<=r&&n<=s){var o=this.minX,a=this.minY,h=this.maxX,l=this.maxY;this.minX=i<o?i:o,this.minY=n<a?n:a,this.maxX=r>h?r:h,this.maxY=s>l?s:l}},t.prototype.addBoundsMatrix=function(t,e){this.addFrameMatrix(e,t.minX,t.minY,t.maxX,t.maxY)},t.prototype.addBoundsArea=function(t,e){var i=t.minX>e.x?t.minX:e.x,n=t.minY>e.y?t.minY:e.y,r=t.maxX<e.x+e.width?t.maxX:e.x+e.width,s=t.maxY<e.y+e.height?t.maxY:e.y+e.height;if(i<=r&&n<=s){var o=this.minX,a=this.minY,h=this.maxX,l=this.maxY;this.minX=i<o?i:o,this.minY=n<a?n:a,this.maxX=r>h?r:h,this.maxY=s>l?s:l}},t.prototype.pad=function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=e,this.maxY+=e)},t.prototype.addFramePad=function(t,e,i,n,r,s){t-=r,e-=s,i+=r,n+=s,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>i?this.maxX:i,this.minY=this.minY<e?this.minY:e,this.maxY=this.maxY>n?this.maxY:n},t}(),o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function a(t,e){function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var h=function(t){function e(){var e=t.call(this)||this;return e.tempDisplayObjectParent=null,e.transform=new i.Transform,e.alpha=1,e.visible=!0,e.renderable=!0,e.cullable=!1,e.cullArea=null,e.parent=null,e.worldAlpha=1,e._lastSortedIndex=0,e._zIndex=0,e.filterArea=null,e.filters=null,e._enabledFilters=null,e._bounds=new s,e._localBounds=null,e._boundsID=0,e._boundsRect=null,e._localBoundsRect=null,e._mask=null,e._maskRefCount=0,e._destroyed=!1,e.isSprite=!1,e.isMask=!1,e}return a(e,t),e.mixin=function(t){for(var i=Object.keys(t),n=0;n<i.length;++n){var r=i[n];Object.defineProperty(e.prototype,r,Object.getOwnPropertyDescriptor(t,r))}},Object.defineProperty(e.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!1,configurable:!0}),e.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},e.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha},e.prototype.getBounds=function(t,e){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),e||(this._boundsRect||(this._boundsRect=new i.Rectangle),e=this._boundsRect),this._bounds.getRectangle(e)},e.prototype.getLocalBounds=function(t){t||(this._localBoundsRect||(this._localBoundsRect=new i.Rectangle),t=this._localBoundsRect),this._localBounds||(this._localBounds=new s);var e=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;var r=this._bounds,o=this._boundsID;this._bounds=this._localBounds;var a=this.getBounds(!1,t);return this.parent=n,this.transform=e,this._bounds=r,this._bounds.updateID+=this._boundsID-o,a},e.prototype.toGlobal=function(t,e,i){return void 0===i&&(i=!1),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,e)},e.prototype.toLocal=function(t,e,i,n){return e&&(t=e.toGlobal(t,i,n)),n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,i)},e.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},e.prototype.setTransform=function(t,e,i,n,r,s,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=1),void 0===n&&(n=1),void 0===r&&(r=0),void 0===s&&(s=0),void 0===o&&(o=0),void 0===a&&(a=0),void 0===h&&(h=0),this.position.x=t,this.position.y=e,this.scale.x=i||1,this.scale.y=n||1,this.rotation=r,this.skew.x=s,this.skew.y=o,this.pivot.x=a,this.pivot.y=h,this},e.prototype.destroy=function(t){this.parent&&this.parent.removeChild(this),this.emit("destroyed"),this.removeAllListeners(),this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.interactive=!1,this.interactiveChildren=!1,this._destroyed=!0},Object.defineProperty(e.prototype,"_tempDisplayObjectParent",{get:function(){return null===this.tempDisplayObjectParent&&(this.tempDisplayObjectParent=new l),this.tempDisplayObjectParent},enumerable:!1,configurable:!0}),e.prototype.enableTempParent=function(){var t=this.parent;return this.parent=this._tempDisplayObjectParent,t},e.prototype.disableTempParent=function(t){this.parent=t},Object.defineProperty(e.prototype,"x",{get:function(){return this.position.x},set:function(t){this.transform.position.x=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.position.y},set:function(t){this.transform.position.y=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"worldTransform",{get:function(){return this.transform.worldTransform},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"localTransform",{get:function(){return this.transform.localTransform},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"position",{get:function(){return this.transform.position},set:function(t){this.transform.position.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this.transform.scale},set:function(t){this.transform.scale.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pivot",{get:function(){return this.transform.pivot},set:function(t){this.transform.pivot.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"skew",{get:function(){return this.transform.skew},set:function(t){this.transform.skew.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotation",{get:function(){return this.transform.rotation},set:function(t){this.transform.rotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"angle",{get:function(){return this.transform.rotation*i.RAD_TO_DEG},set:function(t){this.transform.rotation=t*i.DEG_TO_RAD},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zIndex",{get:function(){return this._zIndex},set:function(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"worldVisible",{get:function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mask",{get:function(){return this._mask},set:function(t){if(this._mask!==t){var e;if(this._mask)(e=this._mask.maskObject||this._mask)._maskRefCount--,0===e._maskRefCount&&(e.renderable=!0,e.isMask=!1);if(this._mask=t,this._mask)0===(e=this._mask.maskObject||this._mask)._maskRefCount&&(e.renderable=!1,e.isMask=!0),e._maskRefCount++}},enumerable:!1,configurable:!0}),e}(n.EventEmitter),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.sortDirty=null,e}return a(e,t),e}(h);function d(t,e){return t.zIndex===e.zIndex?t._lastSortedIndex-e._lastSortedIndex:t.zIndex-e.zIndex}h.prototype.displayObjectUpdateTransform=h.prototype.updateTransform;var u=function(t){function i(){var i=t.call(this)||this;return i.children=[],i.sortableChildren=e.settings.SORTABLE_CHILDREN,i.sortDirty=!1,i}return a(i,t),i.prototype.onChildrenChange=function(t){},i.prototype.addChild=function(){for(var t=arguments,e=[],i=0;i<arguments.length;i++)e[i]=t[i];if(e.length>1)for(var n=0;n<e.length;n++)this.addChild(e[n]);else{var r=e[0];r.parent&&r.parent.removeChild(r),r.parent=this,this.sortDirty=!0,r.transform._parentID=-1,this.children.push(r),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",r,this,this.children.length-1),r.emit("added",this)}return e[0]},i.prototype.addChildAt=function(t,e){if(e<0||e>this.children.length)throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),this.emit("childAdded",t,this,e),t},i.prototype.swapChildren=function(t,e){if(t!==e){var i=this.getChildIndex(t),n=this.getChildIndex(e);this.children[i]=e,this.children[n]=t,this.onChildrenChange(i<n?i:n)}},i.prototype.getChildIndex=function(t){var e=this.children.indexOf(t);if(-1===e)throw new Error("The supplied DisplayObject must be a child of the caller");return e},i.prototype.setChildIndex=function(t,e){if(e<0||e>=this.children.length)throw new Error("The index "+e+" supplied is out of bounds "+this.children.length);var i=this.getChildIndex(t);n.removeItems(this.children,i,1),this.children.splice(e,0,t),this.onChildrenChange(e)},i.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},i.prototype.removeChild=function(){for(var t=arguments,e=[],i=0;i<arguments.length;i++)e[i]=t[i];if(e.length>1)for(var r=0;r<e.length;r++)this.removeChild(e[r]);else{var s=e[0],o=this.children.indexOf(s);if(-1===o)return null;s.parent=null,s.transform._parentID=-1,n.removeItems(this.children,o,1),this._boundsID++,this.onChildrenChange(o),s.emit("removed",this),this.emit("childRemoved",s,this,o)}return e[0]},i.prototype.removeChildAt=function(t){var e=this.getChildAt(t);return e.parent=null,e.transform._parentID=-1,n.removeItems(this.children,t,1),this._boundsID++,this.onChildrenChange(t),e.emit("removed",this),this.emit("childRemoved",e,this,t),e},i.prototype.removeChildren=function(t,e){void 0===t&&(t=0),void 0===e&&(e=this.children.length);var i,n=t,r=e-n;if(r>0&&r<=e){i=this.children.splice(n,r);for(var s=0;s<i.length;++s)i[s].parent=null,i[s].transform&&(i[s].transform._parentID=-1);this._boundsID++,this.onChildrenChange(t);for(s=0;s<i.length;++s)i[s].emit("removed",this),this.emit("childRemoved",i[s],this,s);return i}if(0===r&&0===this.children.length)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},i.prototype.sortChildren=function(){for(var t=!1,e=0,i=this.children.length;e<i;++e){var n=this.children[e];n._lastSortedIndex=e,t||0===n.zIndex||(t=!0)}t&&this.children.length>1&&this.children.sort(d),this.sortDirty=!1},i.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,e=this.children.length;t<e;++t){var i=this.children[t];i.visible&&i.updateTransform()}},i.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var t=0;t<this.children.length;t++){var e=this.children[t];if(e.visible&&e.renderable)if(e.calculateBounds(),e._mask){var i=e._mask.maskObject||e._mask;i.calculateBounds(),this._bounds.addBoundsMask(e._bounds,i._bounds)}else e.filterArea?this._bounds.addBoundsArea(e._bounds,e.filterArea):this._bounds.addBounds(e._bounds)}this._bounds.updateID=this._boundsID},i.prototype.getLocalBounds=function(e,i){void 0===i&&(i=!1);var n=t.prototype.getLocalBounds.call(this,e);if(!i)for(var r=0,s=this.children.length;r<s;++r){var o=this.children[r];o.visible&&o.updateTransform()}return n},i.prototype._calculateBounds=function(){},i.prototype._renderWithCulling=function(t){var e=t.renderTexture.sourceFrame;if(e.width>0&&e.height>0){var n,r;if(this.cullArea?(n=this.cullArea,r=this.worldTransform):this._render!==i.prototype._render&&(n=this.getBounds(!0)),n&&e.intersects(n,r))this._render(t);else if(this.cullArea)return;for(var s=0,o=this.children.length;s<o;++s){var a=this.children[s],h=a.cullable;a.cullable=h||!this.cullArea,a.render(t),a.cullable=h}}},i.prototype.render=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this.filters&&this.filters.length)this.renderAdvanced(t);else if(this.cullable)this._renderWithCulling(t);else{this._render(t);for(var e=0,i=this.children.length;e<i;++e)this.children[e].render(t)}},i.prototype.renderAdvanced=function(t){var e=this.filters,i=this._mask;if(e){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var n=0;n<e.length;n++)e[n].enabled&&this._enabledFilters.push(e[n])}var s=e&&this._enabledFilters&&this._enabledFilters.length||i&&(!i.isMaskData||i.enabled&&(i.autoDetect||i.type!==r.MASK_TYPES.NONE));if(s&&t.batch.flush(),e&&this._enabledFilters&&this._enabledFilters.length&&t.filter.push(this,this._enabledFilters),i&&t.mask.push(this,this._mask),this.cullable)this._renderWithCulling(t);else{this._render(t);n=0;for(var o=this.children.length;n<o;++n)this.children[n].render(t)}s&&t.batch.flush(),i&&t.mask.pop(this),e&&this._enabledFilters&&this._enabledFilters.length&&t.filter.pop()},i.prototype._render=function(t){},i.prototype.destroy=function(e){t.prototype.destroy.call(this),this.sortDirty=!1;var i="boolean"==typeof e?e:e&&e.children,n=this.removeChildren(0,this.children.length);if(i)for(var r=0;r<n.length;++r)n[r].destroy(e)},Object.defineProperty(i.prototype,"width",{get:function(){return this.scale.x*this.getLocalBounds().width},set:function(t){var e=this.getLocalBounds().width;this.scale.x=0!==e?t/e:1,this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"height",{get:function(){return this.scale.y*this.getLocalBounds().height},set:function(t){var e=this.getLocalBounds().height;this.scale.y=0!==e?t/e:1,this._height=t},enumerable:!1,configurable:!0}),i}(h);return u.prototype.containerUpdateTransform=u.prototype.updateTransform,t.Bounds=s,t.Container=u,t.DisplayObject=h,t.TemporaryDisplayObject=l,t}({},PIXI,PIXI,PIXI.utils,PIXI);Object.assign(this.PIXI,_pixi_display);
//# sourceMappingURL=display.min.js.map
/*!
* @pixi/display - v6.2.2
* Compiled Wed, 26 Jan 2022 16:23:27 UTC
* @pixi/display - v6.3.0
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
*

@@ -8,3 +8,3 @@ * @pixi/display is licensed under the MIT License.

*/
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var settings=require("@pixi/settings"),math=require("@pixi/math"),utils=require("@pixi/utils");settings.settings.SORTABLE_CHILDREN=!1;var Bounds=function(){function t(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},t.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?math.Rectangle.EMPTY:((t=t||new math.Rectangle(0,0,1,1)).x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},t.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},t.prototype.addPointMatrix=function(t,i){var e=t.a,n=t.b,r=t.c,s=t.d,o=t.tx,a=t.ty,h=e*i.x+r*i.y+o,l=n*i.x+s*i.y+a;this.minX=Math.min(this.minX,h),this.maxX=Math.max(this.maxX,h),this.minY=Math.min(this.minY,l),this.maxY=Math.max(this.maxY,l)},t.prototype.addQuad=function(t){var i=this.minX,e=this.minY,n=this.maxX,r=this.maxY,s=t[0],o=t[1];i=s<i?s:i,e=o<e?o:e,n=s>n?s:n,r=o>r?o:r,i=(s=t[2])<i?s:i,e=(o=t[3])<e?o:e,n=s>n?s:n,r=o>r?o:r,i=(s=t[4])<i?s:i,e=(o=t[5])<e?o:e,n=s>n?s:n,r=o>r?o:r,i=(s=t[6])<i?s:i,e=(o=t[7])<e?o:e,n=s>n?s:n,r=o>r?o:r,this.minX=i,this.minY=e,this.maxX=n,this.maxY=r},t.prototype.addFrame=function(t,i,e,n,r){this.addFrameMatrix(t.worldTransform,i,e,n,r)},t.prototype.addFrameMatrix=function(t,i,e,n,r){var s=t.a,o=t.b,a=t.c,h=t.d,l=t.tx,d=t.ty,_=this.minX,p=this.minY,u=this.maxX,m=this.maxY,E=s*i+a*e+l,c=o*i+h*e+d;_=E<_?E:_,p=c<p?c:p,u=E>u?E:u,m=c>m?c:m,_=(E=s*n+a*e+l)<_?E:_,p=(c=o*n+h*e+d)<p?c:p,u=E>u?E:u,m=c>m?c:m,_=(E=s*i+a*r+l)<_?E:_,p=(c=o*i+h*r+d)<p?c:p,u=E>u?E:u,m=c>m?c:m,_=(E=s*n+a*r+l)<_?E:_,p=(c=o*n+h*r+d)<p?c:p,u=E>u?E:u,m=c>m?c:m,this.minX=_,this.minY=p,this.maxX=u,this.maxY=m},t.prototype.addVertexData=function(t,i,e){for(var n=this.minX,r=this.minY,s=this.maxX,o=this.maxY,a=i;a<e;a+=2){var h=t[a],l=t[a+1];n=h<n?h:n,r=l<r?l:r,s=h>s?h:s,o=l>o?l:o}this.minX=n,this.minY=r,this.maxX=s,this.maxY=o},t.prototype.addVertices=function(t,i,e,n){this.addVerticesMatrix(t.worldTransform,i,e,n)},t.prototype.addVerticesMatrix=function(t,i,e,n,r,s){void 0===r&&(r=0),void 0===s&&(s=r);for(var o=t.a,a=t.b,h=t.c,l=t.d,d=t.tx,_=t.ty,p=this.minX,u=this.minY,m=this.maxX,E=this.maxY,c=e;c<n;c+=2){var f=i[c],T=i[c+1],R=o*f+h*T+d,A=l*T+a*f+_;p=Math.min(p,R-r),m=Math.max(m,R+r),u=Math.min(u,A-s),E=Math.max(E,A+s)}this.minX=p,this.minY=u,this.maxX=m,this.maxY=E},t.prototype.addBounds=function(t){var i=this.minX,e=this.minY,n=this.maxX,r=this.maxY;this.minX=t.minX<i?t.minX:i,this.minY=t.minY<e?t.minY:e,this.maxX=t.maxX>n?t.maxX:n,this.maxY=t.maxY>r?t.maxY:r},t.prototype.addBoundsMask=function(t,i){var e=t.minX>i.minX?t.minX:i.minX,n=t.minY>i.minY?t.minY:i.minY,r=t.maxX<i.maxX?t.maxX:i.maxX,s=t.maxY<i.maxY?t.maxY:i.maxY;if(e<=r&&n<=s){var o=this.minX,a=this.minY,h=this.maxX,l=this.maxY;this.minX=e<o?e:o,this.minY=n<a?n:a,this.maxX=r>h?r:h,this.maxY=s>l?s:l}},t.prototype.addBoundsMatrix=function(t,i){this.addFrameMatrix(i,t.minX,t.minY,t.maxX,t.maxY)},t.prototype.addBoundsArea=function(t,i){var e=t.minX>i.x?t.minX:i.x,n=t.minY>i.y?t.minY:i.y,r=t.maxX<i.x+i.width?t.maxX:i.x+i.width,s=t.maxY<i.y+i.height?t.maxY:i.y+i.height;if(e<=r&&n<=s){var o=this.minX,a=this.minY,h=this.maxX,l=this.maxY;this.minX=e<o?e:o,this.minY=n<a?n:a,this.maxX=r>h?r:h,this.maxY=s>l?s:l}},t.prototype.pad=function(t,i){void 0===t&&(t=0),void 0===i&&(i=t),this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=i,this.maxY+=i)},t.prototype.addFramePad=function(t,i,e,n,r,s){t-=r,i-=s,e+=r,n+=s,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>e?this.maxX:e,this.minY=this.minY<i?this.minY:i,this.maxY=this.maxY>n?this.maxY:n},t}(),extendStatics=function(t,i){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)};function __extends(t,i){function e(){this.constructor=t}extendStatics(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)}var ENV,RENDERER_TYPE,BUFFER_BITS,BLEND_MODES,DRAW_MODES,FORMATS,TARGETS,TYPES,SAMPLER_TYPES,SCALE_MODES,WRAP_MODES,MIPMAP_MODES,ALPHA_MODES,CLEAR_MODES,GC_MODES,PRECISION,MASK_TYPES,MSAA_QUALITY,BUFFER_TYPE,DisplayObject=function(t){function i(){var i=t.call(this)||this;return i.tempDisplayObjectParent=null,i.transform=new math.Transform,i.alpha=1,i.visible=!0,i.renderable=!0,i.parent=null,i.worldAlpha=1,i._lastSortedIndex=0,i._zIndex=0,i.filterArea=null,i.filters=null,i._enabledFilters=null,i._bounds=new Bounds,i._localBounds=null,i._boundsID=0,i._boundsRect=null,i._localBoundsRect=null,i._mask=null,i._maskRefCount=0,i._destroyed=!1,i.isSprite=!1,i.isMask=!1,i}return __extends(i,t),i.mixin=function(t){for(var e=Object.keys(t),n=0;n<e.length;++n){var r=e[n];Object.defineProperty(i.prototype,r,Object.getOwnPropertyDescriptor(t,r))}},Object.defineProperty(i.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!1,configurable:!0}),i.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},i.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha},i.prototype.getBounds=function(t,i){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),i||(this._boundsRect||(this._boundsRect=new math.Rectangle),i=this._boundsRect),this._bounds.getRectangle(i)},i.prototype.getLocalBounds=function(t){t||(this._localBoundsRect||(this._localBoundsRect=new math.Rectangle),t=this._localBoundsRect),this._localBounds||(this._localBounds=new Bounds);var i=this.transform,e=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;var n=this._bounds,r=this._boundsID;this._bounds=this._localBounds;var s=this.getBounds(!1,t);return this.parent=e,this.transform=i,this._bounds=n,this._bounds.updateID+=this._boundsID-r,s},i.prototype.toGlobal=function(t,i,e){return void 0===e&&(e=!1),e||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,i)},i.prototype.toLocal=function(t,i,e,n){return i&&(t=i.toGlobal(t,e,n)),n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,e)},i.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},i.prototype.setTransform=function(t,i,e,n,r,s,o,a,h){return void 0===t&&(t=0),void 0===i&&(i=0),void 0===e&&(e=1),void 0===n&&(n=1),void 0===r&&(r=0),void 0===s&&(s=0),void 0===o&&(o=0),void 0===a&&(a=0),void 0===h&&(h=0),this.position.x=t,this.position.y=i,this.scale.x=e||1,this.scale.y=n||1,this.rotation=r,this.skew.x=s,this.skew.y=o,this.pivot.x=a,this.pivot.y=h,this},i.prototype.destroy=function(t){this.parent&&this.parent.removeChild(this),this.emit("destroyed"),this.removeAllListeners(),this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.interactive=!1,this.interactiveChildren=!1,this._destroyed=!0},Object.defineProperty(i.prototype,"_tempDisplayObjectParent",{get:function(){return null===this.tempDisplayObjectParent&&(this.tempDisplayObjectParent=new TemporaryDisplayObject),this.tempDisplayObjectParent},enumerable:!1,configurable:!0}),i.prototype.enableTempParent=function(){var t=this.parent;return this.parent=this._tempDisplayObjectParent,t},i.prototype.disableTempParent=function(t){this.parent=t},Object.defineProperty(i.prototype,"x",{get:function(){return this.position.x},set:function(t){this.transform.position.x=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"y",{get:function(){return this.position.y},set:function(t){this.transform.position.y=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"worldTransform",{get:function(){return this.transform.worldTransform},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"localTransform",{get:function(){return this.transform.localTransform},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"position",{get:function(){return this.transform.position},set:function(t){this.transform.position.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"scale",{get:function(){return this.transform.scale},set:function(t){this.transform.scale.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"pivot",{get:function(){return this.transform.pivot},set:function(t){this.transform.pivot.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"skew",{get:function(){return this.transform.skew},set:function(t){this.transform.skew.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"rotation",{get:function(){return this.transform.rotation},set:function(t){this.transform.rotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"angle",{get:function(){return this.transform.rotation*math.RAD_TO_DEG},set:function(t){this.transform.rotation=t*math.DEG_TO_RAD},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"zIndex",{get:function(){return this._zIndex},set:function(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"worldVisible",{get:function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"mask",{get:function(){return this._mask},set:function(t){if(this._mask!==t){var i;if(this._mask)(i=this._mask.maskObject||this._mask)._maskRefCount--,0===i._maskRefCount&&(i.renderable=!0,i.isMask=!1);if(this._mask=t,this._mask)0===(i=this._mask.maskObject||this._mask)._maskRefCount&&(i.renderable=!1,i.isMask=!0),i._maskRefCount++}},enumerable:!1,configurable:!0}),i}(utils.EventEmitter),TemporaryDisplayObject=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.sortDirty=null,i}return __extends(i,t),i}(DisplayObject);function sortChildren(t,i){return t.zIndex===i.zIndex?t._lastSortedIndex-i._lastSortedIndex:t.zIndex-i.zIndex}DisplayObject.prototype.displayObjectUpdateTransform=DisplayObject.prototype.updateTransform,function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"}(ENV||(ENV={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"}(RENDERER_TYPE||(RENDERER_TYPE={})),function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"}(BUFFER_BITS||(BUFFER_BITS={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"}(BLEND_MODES||(BLEND_MODES={})),function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(DRAW_MODES||(DRAW_MODES={})),function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(FORMATS||(FORMATS={})),function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(TARGETS||(TARGETS={})),function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT"}(TYPES||(TYPES={})),function(t){t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT"}(SAMPLER_TYPES||(SAMPLER_TYPES={})),function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"}(SCALE_MODES||(SCALE_MODES={})),function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(WRAP_MODES||(WRAP_MODES={})),function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL"}(MIPMAP_MODES||(MIPMAP_MODES={})),function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",t[t.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"}(ALPHA_MODES||(ALPHA_MODES={})),function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"}(CLEAR_MODES||(CLEAR_MODES={})),function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"}(GC_MODES||(GC_MODES={})),function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"}(PRECISION||(PRECISION={})),function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"}(MASK_TYPES||(MASK_TYPES={})),function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"}(MSAA_QUALITY||(MSAA_QUALITY={})),function(t){t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"}(BUFFER_TYPE||(BUFFER_TYPE={}));var Container=function(t){function i(){var i=t.call(this)||this;return i.children=[],i.sortableChildren=settings.settings.SORTABLE_CHILDREN,i.sortDirty=!1,i}return __extends(i,t),i.prototype.onChildrenChange=function(t){},i.prototype.addChild=function(){for(var t=arguments,i=[],e=0;e<arguments.length;e++)i[e]=t[e];if(i.length>1)for(var n=0;n<i.length;n++)this.addChild(i[n]);else{var r=i[0];r.parent&&r.parent.removeChild(r),r.parent=this,this.sortDirty=!0,r.transform._parentID=-1,this.children.push(r),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",r,this,this.children.length-1),r.emit("added",this)}return i[0]},i.prototype.addChildAt=function(t,i){if(i<0||i>this.children.length)throw new Error(t+"addChildAt: The index "+i+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(i,0,t),this._boundsID++,this.onChildrenChange(i),t.emit("added",this),this.emit("childAdded",t,this,i),t},i.prototype.swapChildren=function(t,i){if(t!==i){var e=this.getChildIndex(t),n=this.getChildIndex(i);this.children[e]=i,this.children[n]=t,this.onChildrenChange(e<n?e:n)}},i.prototype.getChildIndex=function(t){var i=this.children.indexOf(t);if(-1===i)throw new Error("The supplied DisplayObject must be a child of the caller");return i},i.prototype.setChildIndex=function(t,i){if(i<0||i>=this.children.length)throw new Error("The index "+i+" supplied is out of bounds "+this.children.length);var e=this.getChildIndex(t);utils.removeItems(this.children,e,1),this.children.splice(i,0,t),this.onChildrenChange(i)},i.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},i.prototype.removeChild=function(){for(var t=arguments,i=[],e=0;e<arguments.length;e++)i[e]=t[e];if(i.length>1)for(var n=0;n<i.length;n++)this.removeChild(i[n]);else{var r=i[0],s=this.children.indexOf(r);if(-1===s)return null;r.parent=null,r.transform._parentID=-1,utils.removeItems(this.children,s,1),this._boundsID++,this.onChildrenChange(s),r.emit("removed",this),this.emit("childRemoved",r,this,s)}return i[0]},i.prototype.removeChildAt=function(t){var i=this.getChildAt(t);return i.parent=null,i.transform._parentID=-1,utils.removeItems(this.children,t,1),this._boundsID++,this.onChildrenChange(t),i.emit("removed",this),this.emit("childRemoved",i,this,t),i},i.prototype.removeChildren=function(t,i){void 0===t&&(t=0),void 0===i&&(i=this.children.length);var e,n=t,r=i-n;if(r>0&&r<=i){e=this.children.splice(n,r);for(var s=0;s<e.length;++s)e[s].parent=null,e[s].transform&&(e[s].transform._parentID=-1);this._boundsID++,this.onChildrenChange(t);for(s=0;s<e.length;++s)e[s].emit("removed",this),this.emit("childRemoved",e[s],this,s);return e}if(0===r&&0===this.children.length)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},i.prototype.sortChildren=function(){for(var t=!1,i=0,e=this.children.length;i<e;++i){var n=this.children[i];n._lastSortedIndex=i,t||0===n.zIndex||(t=!0)}t&&this.children.length>1&&this.children.sort(sortChildren),this.sortDirty=!1},i.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,i=this.children.length;t<i;++t){var e=this.children[t];e.visible&&e.updateTransform()}},i.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var t=0;t<this.children.length;t++){var i=this.children[t];if(i.visible&&i.renderable)if(i.calculateBounds(),i._mask){var e=i._mask.maskObject||i._mask;e.calculateBounds(),this._bounds.addBoundsMask(i._bounds,e._bounds)}else i.filterArea?this._bounds.addBoundsArea(i._bounds,i.filterArea):this._bounds.addBounds(i._bounds)}this._bounds.updateID=this._boundsID},i.prototype.getLocalBounds=function(i,e){void 0===e&&(e=!1);var n=t.prototype.getLocalBounds.call(this,i);if(!e)for(var r=0,s=this.children.length;r<s;++r){var o=this.children[r];o.visible&&o.updateTransform()}return n},i.prototype._calculateBounds=function(){},i.prototype.render=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this.filters&&this.filters.length)this.renderAdvanced(t);else{this._render(t);for(var i=0,e=this.children.length;i<e;++i)this.children[i].render(t)}},i.prototype.renderAdvanced=function(t){var i=this.filters,e=this._mask;if(i){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var n=0;n<i.length;n++)i[n].enabled&&this._enabledFilters.push(i[n])}var r=i&&this._enabledFilters&&this._enabledFilters.length||e&&(!e.isMaskData||e.enabled&&(e.autoDetect||e.type!==MASK_TYPES.NONE));r&&t.batch.flush(),i&&this._enabledFilters&&this._enabledFilters.length&&t.filter.push(this,this._enabledFilters),e&&t.mask.push(this,this._mask),this._render(t);n=0;for(var s=this.children.length;n<s;n++)this.children[n].render(t);r&&t.batch.flush(),e&&t.mask.pop(this),i&&this._enabledFilters&&this._enabledFilters.length&&t.filter.pop()},i.prototype._render=function(t){},i.prototype.destroy=function(i){t.prototype.destroy.call(this),this.sortDirty=!1;var e="boolean"==typeof i?i:i&&i.children,n=this.removeChildren(0,this.children.length);if(e)for(var r=0;r<n.length;++r)n[r].destroy(i)},Object.defineProperty(i.prototype,"width",{get:function(){return this.scale.x*this.getLocalBounds().width},set:function(t){var i=this.getLocalBounds().width;this.scale.x=0!==i?t/i:1,this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"height",{get:function(){return this.scale.y*this.getLocalBounds().height},set:function(t){var i=this.getLocalBounds().height;this.scale.y=0!==i?t/i:1,this._height=t},enumerable:!1,configurable:!0}),i}(DisplayObject);Container.prototype.containerUpdateTransform=Container.prototype.updateTransform,exports.Bounds=Bounds,exports.Container=Container,exports.DisplayObject=DisplayObject,exports.TemporaryDisplayObject=TemporaryDisplayObject;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var settings=require("@pixi/settings"),math=require("@pixi/math"),utils=require("@pixi/utils");settings.settings.SORTABLE_CHILDREN=!1;var Bounds=function(){function t(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},t.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?math.Rectangle.EMPTY:((t=t||new math.Rectangle(0,0,1,1)).x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},t.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},t.prototype.addPointMatrix=function(t,e){var i=t.a,n=t.b,r=t.c,s=t.d,o=t.tx,a=t.ty,h=i*e.x+r*e.y+o,l=n*e.x+s*e.y+a;this.minX=Math.min(this.minX,h),this.maxX=Math.max(this.maxX,h),this.minY=Math.min(this.minY,l),this.maxY=Math.max(this.maxY,l)},t.prototype.addQuad=function(t){var e=this.minX,i=this.minY,n=this.maxX,r=this.maxY,s=t[0],o=t[1];e=s<e?s:e,i=o<i?o:i,n=s>n?s:n,r=o>r?o:r,e=(s=t[2])<e?s:e,i=(o=t[3])<i?o:i,n=s>n?s:n,r=o>r?o:r,e=(s=t[4])<e?s:e,i=(o=t[5])<i?o:i,n=s>n?s:n,r=o>r?o:r,e=(s=t[6])<e?s:e,i=(o=t[7])<i?o:i,n=s>n?s:n,r=o>r?o:r,this.minX=e,this.minY=i,this.maxX=n,this.maxY=r},t.prototype.addFrame=function(t,e,i,n,r){this.addFrameMatrix(t.worldTransform,e,i,n,r)},t.prototype.addFrameMatrix=function(t,e,i,n,r){var s=t.a,o=t.b,a=t.c,h=t.d,l=t.tx,d=t.ty,_=this.minX,u=this.minY,p=this.maxX,m=this.maxY,E=s*e+a*i+l,c=o*e+h*i+d;_=E<_?E:_,u=c<u?c:u,p=E>p?E:p,m=c>m?c:m,_=(E=s*n+a*i+l)<_?E:_,u=(c=o*n+h*i+d)<u?c:u,p=E>p?E:p,m=c>m?c:m,_=(E=s*e+a*r+l)<_?E:_,u=(c=o*e+h*r+d)<u?c:u,p=E>p?E:p,m=c>m?c:m,_=(E=s*n+a*r+l)<_?E:_,u=(c=o*n+h*r+d)<u?c:u,p=E>p?E:p,m=c>m?c:m,this.minX=_,this.minY=u,this.maxX=p,this.maxY=m},t.prototype.addVertexData=function(t,e,i){for(var n=this.minX,r=this.minY,s=this.maxX,o=this.maxY,a=e;a<i;a+=2){var h=t[a],l=t[a+1];n=h<n?h:n,r=l<r?l:r,s=h>s?h:s,o=l>o?l:o}this.minX=n,this.minY=r,this.maxX=s,this.maxY=o},t.prototype.addVertices=function(t,e,i,n){this.addVerticesMatrix(t.worldTransform,e,i,n)},t.prototype.addVerticesMatrix=function(t,e,i,n,r,s){void 0===r&&(r=0),void 0===s&&(s=r);for(var o=t.a,a=t.b,h=t.c,l=t.d,d=t.tx,_=t.ty,u=this.minX,p=this.minY,m=this.maxX,E=this.maxY,c=i;c<n;c+=2){var f=e[c],T=e[c+1],R=o*f+h*T+d,A=l*T+a*f+_;u=Math.min(u,R-r),m=Math.max(m,R+r),p=Math.min(p,A-s),E=Math.max(E,A+s)}this.minX=u,this.minY=p,this.maxX=m,this.maxY=E},t.prototype.addBounds=function(t){var e=this.minX,i=this.minY,n=this.maxX,r=this.maxY;this.minX=t.minX<e?t.minX:e,this.minY=t.minY<i?t.minY:i,this.maxX=t.maxX>n?t.maxX:n,this.maxY=t.maxY>r?t.maxY:r},t.prototype.addBoundsMask=function(t,e){var i=t.minX>e.minX?t.minX:e.minX,n=t.minY>e.minY?t.minY:e.minY,r=t.maxX<e.maxX?t.maxX:e.maxX,s=t.maxY<e.maxY?t.maxY:e.maxY;if(i<=r&&n<=s){var o=this.minX,a=this.minY,h=this.maxX,l=this.maxY;this.minX=i<o?i:o,this.minY=n<a?n:a,this.maxX=r>h?r:h,this.maxY=s>l?s:l}},t.prototype.addBoundsMatrix=function(t,e){this.addFrameMatrix(e,t.minX,t.minY,t.maxX,t.maxY)},t.prototype.addBoundsArea=function(t,e){var i=t.minX>e.x?t.minX:e.x,n=t.minY>e.y?t.minY:e.y,r=t.maxX<e.x+e.width?t.maxX:e.x+e.width,s=t.maxY<e.y+e.height?t.maxY:e.y+e.height;if(i<=r&&n<=s){var o=this.minX,a=this.minY,h=this.maxX,l=this.maxY;this.minX=i<o?i:o,this.minY=n<a?n:a,this.maxX=r>h?r:h,this.maxY=s>l?s:l}},t.prototype.pad=function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=e,this.maxY+=e)},t.prototype.addFramePad=function(t,e,i,n,r,s){t-=r,e-=s,i+=r,n+=s,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>i?this.maxX:i,this.minY=this.minY<e?this.minY:e,this.maxY=this.maxY>n?this.maxY:n},t}(),extendStatics=function(t,e){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function __extends(t,e){function i(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var ENV,RENDERER_TYPE,BUFFER_BITS,BLEND_MODES,DRAW_MODES,FORMATS,TARGETS,TYPES,SAMPLER_TYPES,SCALE_MODES,WRAP_MODES,MIPMAP_MODES,ALPHA_MODES,CLEAR_MODES,GC_MODES,PRECISION,MASK_TYPES,MSAA_QUALITY,BUFFER_TYPE,DisplayObject=function(t){function e(){var e=t.call(this)||this;return e.tempDisplayObjectParent=null,e.transform=new math.Transform,e.alpha=1,e.visible=!0,e.renderable=!0,e.cullable=!1,e.cullArea=null,e.parent=null,e.worldAlpha=1,e._lastSortedIndex=0,e._zIndex=0,e.filterArea=null,e.filters=null,e._enabledFilters=null,e._bounds=new Bounds,e._localBounds=null,e._boundsID=0,e._boundsRect=null,e._localBoundsRect=null,e._mask=null,e._maskRefCount=0,e._destroyed=!1,e.isSprite=!1,e.isMask=!1,e}return __extends(e,t),e.mixin=function(t){for(var i=Object.keys(t),n=0;n<i.length;++n){var r=i[n];Object.defineProperty(e.prototype,r,Object.getOwnPropertyDescriptor(t,r))}},Object.defineProperty(e.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!1,configurable:!0}),e.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},e.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha},e.prototype.getBounds=function(t,e){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),e||(this._boundsRect||(this._boundsRect=new math.Rectangle),e=this._boundsRect),this._bounds.getRectangle(e)},e.prototype.getLocalBounds=function(t){t||(this._localBoundsRect||(this._localBoundsRect=new math.Rectangle),t=this._localBoundsRect),this._localBounds||(this._localBounds=new Bounds);var e=this.transform,i=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;var n=this._bounds,r=this._boundsID;this._bounds=this._localBounds;var s=this.getBounds(!1,t);return this.parent=i,this.transform=e,this._bounds=n,this._bounds.updateID+=this._boundsID-r,s},e.prototype.toGlobal=function(t,e,i){return void 0===i&&(i=!1),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,e)},e.prototype.toLocal=function(t,e,i,n){return e&&(t=e.toGlobal(t,i,n)),n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,i)},e.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},e.prototype.setTransform=function(t,e,i,n,r,s,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=1),void 0===n&&(n=1),void 0===r&&(r=0),void 0===s&&(s=0),void 0===o&&(o=0),void 0===a&&(a=0),void 0===h&&(h=0),this.position.x=t,this.position.y=e,this.scale.x=i||1,this.scale.y=n||1,this.rotation=r,this.skew.x=s,this.skew.y=o,this.pivot.x=a,this.pivot.y=h,this},e.prototype.destroy=function(t){this.parent&&this.parent.removeChild(this),this.emit("destroyed"),this.removeAllListeners(),this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.interactive=!1,this.interactiveChildren=!1,this._destroyed=!0},Object.defineProperty(e.prototype,"_tempDisplayObjectParent",{get:function(){return null===this.tempDisplayObjectParent&&(this.tempDisplayObjectParent=new TemporaryDisplayObject),this.tempDisplayObjectParent},enumerable:!1,configurable:!0}),e.prototype.enableTempParent=function(){var t=this.parent;return this.parent=this._tempDisplayObjectParent,t},e.prototype.disableTempParent=function(t){this.parent=t},Object.defineProperty(e.prototype,"x",{get:function(){return this.position.x},set:function(t){this.transform.position.x=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.position.y},set:function(t){this.transform.position.y=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"worldTransform",{get:function(){return this.transform.worldTransform},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"localTransform",{get:function(){return this.transform.localTransform},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"position",{get:function(){return this.transform.position},set:function(t){this.transform.position.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this.transform.scale},set:function(t){this.transform.scale.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pivot",{get:function(){return this.transform.pivot},set:function(t){this.transform.pivot.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"skew",{get:function(){return this.transform.skew},set:function(t){this.transform.skew.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotation",{get:function(){return this.transform.rotation},set:function(t){this.transform.rotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"angle",{get:function(){return this.transform.rotation*math.RAD_TO_DEG},set:function(t){this.transform.rotation=t*math.DEG_TO_RAD},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zIndex",{get:function(){return this._zIndex},set:function(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"worldVisible",{get:function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mask",{get:function(){return this._mask},set:function(t){if(this._mask!==t){var e;if(this._mask)(e=this._mask.maskObject||this._mask)._maskRefCount--,0===e._maskRefCount&&(e.renderable=!0,e.isMask=!1);if(this._mask=t,this._mask)0===(e=this._mask.maskObject||this._mask)._maskRefCount&&(e.renderable=!1,e.isMask=!0),e._maskRefCount++}},enumerable:!1,configurable:!0}),e}(utils.EventEmitter),TemporaryDisplayObject=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.sortDirty=null,e}return __extends(e,t),e}(DisplayObject);function sortChildren(t,e){return t.zIndex===e.zIndex?t._lastSortedIndex-e._lastSortedIndex:t.zIndex-e.zIndex}DisplayObject.prototype.displayObjectUpdateTransform=DisplayObject.prototype.updateTransform,function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"}(ENV||(ENV={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"}(RENDERER_TYPE||(RENDERER_TYPE={})),function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"}(BUFFER_BITS||(BUFFER_BITS={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"}(BLEND_MODES||(BLEND_MODES={})),function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(DRAW_MODES||(DRAW_MODES={})),function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(FORMATS||(FORMATS={})),function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(TARGETS||(TARGETS={})),function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT"}(TYPES||(TYPES={})),function(t){t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT"}(SAMPLER_TYPES||(SAMPLER_TYPES={})),function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"}(SCALE_MODES||(SCALE_MODES={})),function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(WRAP_MODES||(WRAP_MODES={})),function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL"}(MIPMAP_MODES||(MIPMAP_MODES={})),function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",t[t.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"}(ALPHA_MODES||(ALPHA_MODES={})),function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"}(CLEAR_MODES||(CLEAR_MODES={})),function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"}(GC_MODES||(GC_MODES={})),function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"}(PRECISION||(PRECISION={})),function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"}(MASK_TYPES||(MASK_TYPES={})),function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"}(MSAA_QUALITY||(MSAA_QUALITY={})),function(t){t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"}(BUFFER_TYPE||(BUFFER_TYPE={}));var Container=function(t){function e(){var e=t.call(this)||this;return e.children=[],e.sortableChildren=settings.settings.SORTABLE_CHILDREN,e.sortDirty=!1,e}return __extends(e,t),e.prototype.onChildrenChange=function(t){},e.prototype.addChild=function(){for(var t=arguments,e=[],i=0;i<arguments.length;i++)e[i]=t[i];if(e.length>1)for(var n=0;n<e.length;n++)this.addChild(e[n]);else{var r=e[0];r.parent&&r.parent.removeChild(r),r.parent=this,this.sortDirty=!0,r.transform._parentID=-1,this.children.push(r),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",r,this,this.children.length-1),r.emit("added",this)}return e[0]},e.prototype.addChildAt=function(t,e){if(e<0||e>this.children.length)throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),this.emit("childAdded",t,this,e),t},e.prototype.swapChildren=function(t,e){if(t!==e){var i=this.getChildIndex(t),n=this.getChildIndex(e);this.children[i]=e,this.children[n]=t,this.onChildrenChange(i<n?i:n)}},e.prototype.getChildIndex=function(t){var e=this.children.indexOf(t);if(-1===e)throw new Error("The supplied DisplayObject must be a child of the caller");return e},e.prototype.setChildIndex=function(t,e){if(e<0||e>=this.children.length)throw new Error("The index "+e+" supplied is out of bounds "+this.children.length);var i=this.getChildIndex(t);utils.removeItems(this.children,i,1),this.children.splice(e,0,t),this.onChildrenChange(e)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},e.prototype.removeChild=function(){for(var t=arguments,e=[],i=0;i<arguments.length;i++)e[i]=t[i];if(e.length>1)for(var n=0;n<e.length;n++)this.removeChild(e[n]);else{var r=e[0],s=this.children.indexOf(r);if(-1===s)return null;r.parent=null,r.transform._parentID=-1,utils.removeItems(this.children,s,1),this._boundsID++,this.onChildrenChange(s),r.emit("removed",this),this.emit("childRemoved",r,this,s)}return e[0]},e.prototype.removeChildAt=function(t){var e=this.getChildAt(t);return e.parent=null,e.transform._parentID=-1,utils.removeItems(this.children,t,1),this._boundsID++,this.onChildrenChange(t),e.emit("removed",this),this.emit("childRemoved",e,this,t),e},e.prototype.removeChildren=function(t,e){void 0===t&&(t=0),void 0===e&&(e=this.children.length);var i,n=t,r=e-n;if(r>0&&r<=e){i=this.children.splice(n,r);for(var s=0;s<i.length;++s)i[s].parent=null,i[s].transform&&(i[s].transform._parentID=-1);this._boundsID++,this.onChildrenChange(t);for(s=0;s<i.length;++s)i[s].emit("removed",this),this.emit("childRemoved",i[s],this,s);return i}if(0===r&&0===this.children.length)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},e.prototype.sortChildren=function(){for(var t=!1,e=0,i=this.children.length;e<i;++e){var n=this.children[e];n._lastSortedIndex=e,t||0===n.zIndex||(t=!0)}t&&this.children.length>1&&this.children.sort(sortChildren),this.sortDirty=!1},e.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,e=this.children.length;t<e;++t){var i=this.children[t];i.visible&&i.updateTransform()}},e.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var t=0;t<this.children.length;t++){var e=this.children[t];if(e.visible&&e.renderable)if(e.calculateBounds(),e._mask){var i=e._mask.maskObject||e._mask;i.calculateBounds(),this._bounds.addBoundsMask(e._bounds,i._bounds)}else e.filterArea?this._bounds.addBoundsArea(e._bounds,e.filterArea):this._bounds.addBounds(e._bounds)}this._bounds.updateID=this._boundsID},e.prototype.getLocalBounds=function(e,i){void 0===i&&(i=!1);var n=t.prototype.getLocalBounds.call(this,e);if(!i)for(var r=0,s=this.children.length;r<s;++r){var o=this.children[r];o.visible&&o.updateTransform()}return n},e.prototype._calculateBounds=function(){},e.prototype._renderWithCulling=function(t){var i=t.renderTexture.sourceFrame;if(i.width>0&&i.height>0){var n,r;if(this.cullArea?(n=this.cullArea,r=this.worldTransform):this._render!==e.prototype._render&&(n=this.getBounds(!0)),n&&i.intersects(n,r))this._render(t);else if(this.cullArea)return;for(var s=0,o=this.children.length;s<o;++s){var a=this.children[s],h=a.cullable;a.cullable=h||!this.cullArea,a.render(t),a.cullable=h}}},e.prototype.render=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this.filters&&this.filters.length)this.renderAdvanced(t);else if(this.cullable)this._renderWithCulling(t);else{this._render(t);for(var e=0,i=this.children.length;e<i;++e)this.children[e].render(t)}},e.prototype.renderAdvanced=function(t){var e=this.filters,i=this._mask;if(e){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var n=0;n<e.length;n++)e[n].enabled&&this._enabledFilters.push(e[n])}var r=e&&this._enabledFilters&&this._enabledFilters.length||i&&(!i.isMaskData||i.enabled&&(i.autoDetect||i.type!==MASK_TYPES.NONE));if(r&&t.batch.flush(),e&&this._enabledFilters&&this._enabledFilters.length&&t.filter.push(this,this._enabledFilters),i&&t.mask.push(this,this._mask),this.cullable)this._renderWithCulling(t);else{this._render(t);n=0;for(var s=this.children.length;n<s;++n)this.children[n].render(t)}r&&t.batch.flush(),i&&t.mask.pop(this),e&&this._enabledFilters&&this._enabledFilters.length&&t.filter.pop()},e.prototype._render=function(t){},e.prototype.destroy=function(e){t.prototype.destroy.call(this),this.sortDirty=!1;var i="boolean"==typeof e?e:e&&e.children,n=this.removeChildren(0,this.children.length);if(i)for(var r=0;r<n.length;++r)n[r].destroy(e)},Object.defineProperty(e.prototype,"width",{get:function(){return this.scale.x*this.getLocalBounds().width},set:function(t){var e=this.getLocalBounds().width;this.scale.x=0!==e?t/e:1,this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.scale.y*this.getLocalBounds().height},set:function(t){var e=this.getLocalBounds().height;this.scale.y=0!==e?t/e:1,this._height=t},enumerable:!1,configurable:!0}),e}(DisplayObject);Container.prototype.containerUpdateTransform=Container.prototype.updateTransform,exports.Bounds=Bounds,exports.Container=Container,exports.DisplayObject=DisplayObject,exports.TemporaryDisplayObject=TemporaryDisplayObject;
//# sourceMappingURL=display.min.js.map
/*!
* @pixi/display - v6.2.2
* Compiled Wed, 26 Jan 2022 16:23:27 UTC
* @pixi/display - v6.3.0
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
*

@@ -8,3 +8,3 @@ * @pixi/display is licensed under the MIT License.

*/
import{settings as t}from"@pixi/settings";import{Rectangle as i,RAD_TO_DEG as e,DEG_TO_RAD as n,Transform as r}from"@pixi/math";import{EventEmitter as s,removeItems as o}from"@pixi/utils";t.SORTABLE_CHILDREN=!1;var a=function(){function t(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},t.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?i.EMPTY:((t=t||new i(0,0,1,1)).x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},t.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},t.prototype.addPointMatrix=function(t,i){var e=t.a,n=t.b,r=t.c,s=t.d,o=t.tx,a=t.ty,h=e*i.x+r*i.y+o,l=n*i.x+s*i.y+a;this.minX=Math.min(this.minX,h),this.maxX=Math.max(this.maxX,h),this.minY=Math.min(this.minY,l),this.maxY=Math.max(this.maxY,l)},t.prototype.addQuad=function(t){var i=this.minX,e=this.minY,n=this.maxX,r=this.maxY,s=t[0],o=t[1];i=s<i?s:i,e=o<e?o:e,n=s>n?s:n,r=o>r?o:r,i=(s=t[2])<i?s:i,e=(o=t[3])<e?o:e,n=s>n?s:n,r=o>r?o:r,i=(s=t[4])<i?s:i,e=(o=t[5])<e?o:e,n=s>n?s:n,r=o>r?o:r,i=(s=t[6])<i?s:i,e=(o=t[7])<e?o:e,n=s>n?s:n,r=o>r?o:r,this.minX=i,this.minY=e,this.maxX=n,this.maxY=r},t.prototype.addFrame=function(t,i,e,n,r){this.addFrameMatrix(t.worldTransform,i,e,n,r)},t.prototype.addFrameMatrix=function(t,i,e,n,r){var s=t.a,o=t.b,a=t.c,h=t.d,l=t.tx,d=t.ty,_=this.minX,p=this.minY,u=this.maxX,m=this.maxY,c=s*i+a*e+l,f=o*i+h*e+d;_=c<_?c:_,p=f<p?f:p,u=c>u?c:u,m=f>m?f:m,_=(c=s*n+a*e+l)<_?c:_,p=(f=o*n+h*e+d)<p?f:p,u=c>u?c:u,m=f>m?f:m,_=(c=s*i+a*r+l)<_?c:_,p=(f=o*i+h*r+d)<p?f:p,u=c>u?c:u,m=f>m?f:m,_=(c=s*n+a*r+l)<_?c:_,p=(f=o*n+h*r+d)<p?f:p,u=c>u?c:u,m=f>m?f:m,this.minX=_,this.minY=p,this.maxX=u,this.maxY=m},t.prototype.addVertexData=function(t,i,e){for(var n=this.minX,r=this.minY,s=this.maxX,o=this.maxY,a=i;a<e;a+=2){var h=t[a],l=t[a+1];n=h<n?h:n,r=l<r?l:r,s=h>s?h:s,o=l>o?l:o}this.minX=n,this.minY=r,this.maxX=s,this.maxY=o},t.prototype.addVertices=function(t,i,e,n){this.addVerticesMatrix(t.worldTransform,i,e,n)},t.prototype.addVerticesMatrix=function(t,i,e,n,r,s){void 0===r&&(r=0),void 0===s&&(s=r);for(var o=t.a,a=t.b,h=t.c,l=t.d,d=t.tx,_=t.ty,p=this.minX,u=this.minY,m=this.maxX,c=this.maxY,f=e;f<n;f+=2){var E=i[f],T=i[f+1],N=o*E+h*T+d,I=l*T+a*E+_;p=Math.min(p,N-r),m=Math.max(m,N+r),u=Math.min(u,I-s),c=Math.max(c,I+s)}this.minX=p,this.minY=u,this.maxX=m,this.maxY=c},t.prototype.addBounds=function(t){var i=this.minX,e=this.minY,n=this.maxX,r=this.maxY;this.minX=t.minX<i?t.minX:i,this.minY=t.minY<e?t.minY:e,this.maxX=t.maxX>n?t.maxX:n,this.maxY=t.maxY>r?t.maxY:r},t.prototype.addBoundsMask=function(t,i){var e=t.minX>i.minX?t.minX:i.minX,n=t.minY>i.minY?t.minY:i.minY,r=t.maxX<i.maxX?t.maxX:i.maxX,s=t.maxY<i.maxY?t.maxY:i.maxY;if(e<=r&&n<=s){var o=this.minX,a=this.minY,h=this.maxX,l=this.maxY;this.minX=e<o?e:o,this.minY=n<a?n:a,this.maxX=r>h?r:h,this.maxY=s>l?s:l}},t.prototype.addBoundsMatrix=function(t,i){this.addFrameMatrix(i,t.minX,t.minY,t.maxX,t.maxY)},t.prototype.addBoundsArea=function(t,i){var e=t.minX>i.x?t.minX:i.x,n=t.minY>i.y?t.minY:i.y,r=t.maxX<i.x+i.width?t.maxX:i.x+i.width,s=t.maxY<i.y+i.height?t.maxY:i.y+i.height;if(e<=r&&n<=s){var o=this.minX,a=this.minY,h=this.maxX,l=this.maxY;this.minX=e<o?e:o,this.minY=n<a?n:a,this.maxX=r>h?r:h,this.maxY=s>l?s:l}},t.prototype.pad=function(t,i){void 0===t&&(t=0),void 0===i&&(i=t),this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=i,this.maxY+=i)},t.prototype.addFramePad=function(t,i,e,n,r,s){t-=r,i-=s,e+=r,n+=s,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>e?this.maxX:e,this.minY=this.minY<i?this.minY:i,this.maxY=this.maxY>n?this.maxY:n},t}(),h=function(t,i){return(h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)};function l(t,i){function e(){this.constructor=t}h(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)}var d,_,p,u,m,c,f,E,T,N,I,R,A,O,y,b,P,x,L,D=function(t){function s(){var i=t.call(this)||this;return i.tempDisplayObjectParent=null,i.transform=new r,i.alpha=1,i.visible=!0,i.renderable=!0,i.parent=null,i.worldAlpha=1,i._lastSortedIndex=0,i._zIndex=0,i.filterArea=null,i.filters=null,i._enabledFilters=null,i._bounds=new a,i._localBounds=null,i._boundsID=0,i._boundsRect=null,i._localBoundsRect=null,i._mask=null,i._maskRefCount=0,i._destroyed=!1,i.isSprite=!1,i.isMask=!1,i}return l(s,t),s.mixin=function(t){for(var i=Object.keys(t),e=0;e<i.length;++e){var n=i[e];Object.defineProperty(s.prototype,n,Object.getOwnPropertyDescriptor(t,n))}},Object.defineProperty(s.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!1,configurable:!0}),s.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},s.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha},s.prototype.getBounds=function(t,e){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),e||(this._boundsRect||(this._boundsRect=new i),e=this._boundsRect),this._bounds.getRectangle(e)},s.prototype.getLocalBounds=function(t){t||(this._localBoundsRect||(this._localBoundsRect=new i),t=this._localBoundsRect),this._localBounds||(this._localBounds=new a);var e=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;var r=this._bounds,s=this._boundsID;this._bounds=this._localBounds;var o=this.getBounds(!1,t);return this.parent=n,this.transform=e,this._bounds=r,this._bounds.updateID+=this._boundsID-s,o},s.prototype.toGlobal=function(t,i,e){return void 0===e&&(e=!1),e||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,i)},s.prototype.toLocal=function(t,i,e,n){return i&&(t=i.toGlobal(t,e,n)),n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,e)},s.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},s.prototype.setTransform=function(t,i,e,n,r,s,o,a,h){return void 0===t&&(t=0),void 0===i&&(i=0),void 0===e&&(e=1),void 0===n&&(n=1),void 0===r&&(r=0),void 0===s&&(s=0),void 0===o&&(o=0),void 0===a&&(a=0),void 0===h&&(h=0),this.position.x=t,this.position.y=i,this.scale.x=e||1,this.scale.y=n||1,this.rotation=r,this.skew.x=s,this.skew.y=o,this.pivot.x=a,this.pivot.y=h,this},s.prototype.destroy=function(t){this.parent&&this.parent.removeChild(this),this.emit("destroyed"),this.removeAllListeners(),this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.interactive=!1,this.interactiveChildren=!1,this._destroyed=!0},Object.defineProperty(s.prototype,"_tempDisplayObjectParent",{get:function(){return null===this.tempDisplayObjectParent&&(this.tempDisplayObjectParent=new U),this.tempDisplayObjectParent},enumerable:!1,configurable:!0}),s.prototype.enableTempParent=function(){var t=this.parent;return this.parent=this._tempDisplayObjectParent,t},s.prototype.disableTempParent=function(t){this.parent=t},Object.defineProperty(s.prototype,"x",{get:function(){return this.position.x},set:function(t){this.transform.position.x=t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"y",{get:function(){return this.position.y},set:function(t){this.transform.position.y=t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"worldTransform",{get:function(){return this.transform.worldTransform},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"localTransform",{get:function(){return this.transform.localTransform},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"position",{get:function(){return this.transform.position},set:function(t){this.transform.position.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"scale",{get:function(){return this.transform.scale},set:function(t){this.transform.scale.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"pivot",{get:function(){return this.transform.pivot},set:function(t){this.transform.pivot.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"skew",{get:function(){return this.transform.skew},set:function(t){this.transform.skew.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"rotation",{get:function(){return this.transform.rotation},set:function(t){this.transform.rotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"angle",{get:function(){return this.transform.rotation*e},set:function(t){this.transform.rotation=t*n},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"zIndex",{get:function(){return this._zIndex},set:function(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"worldVisible",{get:function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"mask",{get:function(){return this._mask},set:function(t){if(this._mask!==t){var i;if(this._mask)(i=this._mask.maskObject||this._mask)._maskRefCount--,0===i._maskRefCount&&(i.renderable=!0,i.isMask=!1);if(this._mask=t,this._mask)0===(i=this._mask.maskObject||this._mask)._maskRefCount&&(i.renderable=!1,i.isMask=!0),i._maskRefCount++}},enumerable:!1,configurable:!0}),s}(s),U=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.sortDirty=null,i}return l(i,t),i}(D);function C(t,i){return t.zIndex===i.zIndex?t._lastSortedIndex-i._lastSortedIndex:t.zIndex-i.zIndex}D.prototype.displayObjectUpdateTransform=D.prototype.updateTransform,function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"}(d||(d={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"}(_||(_={})),function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"}(p||(p={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"}(u||(u={})),function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(m||(m={})),function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(c||(c={})),function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(f||(f={})),function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT"}(E||(E={})),function(t){t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT"}(T||(T={})),function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"}(N||(N={})),function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(I||(I={})),function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL"}(R||(R={})),function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",t[t.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"}(A||(A={})),function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"}(O||(O={})),function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"}(y||(y={})),function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"}(b||(b={})),function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"}(P||(P={})),function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"}(x||(x={})),function(t){t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"}(L||(L={}));var v=function(i){function e(){var e=i.call(this)||this;return e.children=[],e.sortableChildren=t.SORTABLE_CHILDREN,e.sortDirty=!1,e}return l(e,i),e.prototype.onChildrenChange=function(t){},e.prototype.addChild=function(){for(var t=arguments,i=[],e=0;e<arguments.length;e++)i[e]=t[e];if(i.length>1)for(var n=0;n<i.length;n++)this.addChild(i[n]);else{var r=i[0];r.parent&&r.parent.removeChild(r),r.parent=this,this.sortDirty=!0,r.transform._parentID=-1,this.children.push(r),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",r,this,this.children.length-1),r.emit("added",this)}return i[0]},e.prototype.addChildAt=function(t,i){if(i<0||i>this.children.length)throw new Error(t+"addChildAt: The index "+i+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(i,0,t),this._boundsID++,this.onChildrenChange(i),t.emit("added",this),this.emit("childAdded",t,this,i),t},e.prototype.swapChildren=function(t,i){if(t!==i){var e=this.getChildIndex(t),n=this.getChildIndex(i);this.children[e]=i,this.children[n]=t,this.onChildrenChange(e<n?e:n)}},e.prototype.getChildIndex=function(t){var i=this.children.indexOf(t);if(-1===i)throw new Error("The supplied DisplayObject must be a child of the caller");return i},e.prototype.setChildIndex=function(t,i){if(i<0||i>=this.children.length)throw new Error("The index "+i+" supplied is out of bounds "+this.children.length);var e=this.getChildIndex(t);o(this.children,e,1),this.children.splice(i,0,t),this.onChildrenChange(i)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},e.prototype.removeChild=function(){for(var t=arguments,i=[],e=0;e<arguments.length;e++)i[e]=t[e];if(i.length>1)for(var n=0;n<i.length;n++)this.removeChild(i[n]);else{var r=i[0],s=this.children.indexOf(r);if(-1===s)return null;r.parent=null,r.transform._parentID=-1,o(this.children,s,1),this._boundsID++,this.onChildrenChange(s),r.emit("removed",this),this.emit("childRemoved",r,this,s)}return i[0]},e.prototype.removeChildAt=function(t){var i=this.getChildAt(t);return i.parent=null,i.transform._parentID=-1,o(this.children,t,1),this._boundsID++,this.onChildrenChange(t),i.emit("removed",this),this.emit("childRemoved",i,this,t),i},e.prototype.removeChildren=function(t,i){void 0===t&&(t=0),void 0===i&&(i=this.children.length);var e,n=t,r=i-n;if(r>0&&r<=i){e=this.children.splice(n,r);for(var s=0;s<e.length;++s)e[s].parent=null,e[s].transform&&(e[s].transform._parentID=-1);this._boundsID++,this.onChildrenChange(t);for(s=0;s<e.length;++s)e[s].emit("removed",this),this.emit("childRemoved",e[s],this,s);return e}if(0===r&&0===this.children.length)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},e.prototype.sortChildren=function(){for(var t=!1,i=0,e=this.children.length;i<e;++i){var n=this.children[i];n._lastSortedIndex=i,t||0===n.zIndex||(t=!0)}t&&this.children.length>1&&this.children.sort(C),this.sortDirty=!1},e.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,i=this.children.length;t<i;++t){var e=this.children[t];e.visible&&e.updateTransform()}},e.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var t=0;t<this.children.length;t++){var i=this.children[t];if(i.visible&&i.renderable)if(i.calculateBounds(),i._mask){var e=i._mask.maskObject||i._mask;e.calculateBounds(),this._bounds.addBoundsMask(i._bounds,e._bounds)}else i.filterArea?this._bounds.addBoundsArea(i._bounds,i.filterArea):this._bounds.addBounds(i._bounds)}this._bounds.updateID=this._boundsID},e.prototype.getLocalBounds=function(t,e){void 0===e&&(e=!1);var n=i.prototype.getLocalBounds.call(this,t);if(!e)for(var r=0,s=this.children.length;r<s;++r){var o=this.children[r];o.visible&&o.updateTransform()}return n},e.prototype._calculateBounds=function(){},e.prototype.render=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this.filters&&this.filters.length)this.renderAdvanced(t);else{this._render(t);for(var i=0,e=this.children.length;i<e;++i)this.children[i].render(t)}},e.prototype.renderAdvanced=function(t){var i=this.filters,e=this._mask;if(i){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var n=0;n<i.length;n++)i[n].enabled&&this._enabledFilters.push(i[n])}var r=i&&this._enabledFilters&&this._enabledFilters.length||e&&(!e.isMaskData||e.enabled&&(e.autoDetect||e.type!==P.NONE));r&&t.batch.flush(),i&&this._enabledFilters&&this._enabledFilters.length&&t.filter.push(this,this._enabledFilters),e&&t.mask.push(this,this._mask),this._render(t);n=0;for(var s=this.children.length;n<s;n++)this.children[n].render(t);r&&t.batch.flush(),e&&t.mask.pop(this),i&&this._enabledFilters&&this._enabledFilters.length&&t.filter.pop()},e.prototype._render=function(t){},e.prototype.destroy=function(t){i.prototype.destroy.call(this),this.sortDirty=!1;var e="boolean"==typeof t?t:t&&t.children,n=this.removeChildren(0,this.children.length);if(e)for(var r=0;r<n.length;++r)n[r].destroy(t)},Object.defineProperty(e.prototype,"width",{get:function(){return this.scale.x*this.getLocalBounds().width},set:function(t){var i=this.getLocalBounds().width;this.scale.x=0!==i?t/i:1,this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.scale.y*this.getLocalBounds().height},set:function(t){var i=this.getLocalBounds().height;this.scale.y=0!==i?t/i:1,this._height=t},enumerable:!1,configurable:!0}),e}(D);v.prototype.containerUpdateTransform=v.prototype.updateTransform;export{a as Bounds,v as Container,D as DisplayObject,U as TemporaryDisplayObject};
import{settings as t}from"@pixi/settings";import{Rectangle as i,RAD_TO_DEG as e,DEG_TO_RAD as n,Transform as r}from"@pixi/math";import{EventEmitter as s,removeItems as o}from"@pixi/utils";t.SORTABLE_CHILDREN=!1;var h=function(){function t(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},t.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?i.EMPTY:((t=t||new i(0,0,1,1)).x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},t.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},t.prototype.addPointMatrix=function(t,i){var e=t.a,n=t.b,r=t.c,s=t.d,o=t.tx,h=t.ty,a=e*i.x+r*i.y+o,l=n*i.x+s*i.y+h;this.minX=Math.min(this.minX,a),this.maxX=Math.max(this.maxX,a),this.minY=Math.min(this.minY,l),this.maxY=Math.max(this.maxY,l)},t.prototype.addQuad=function(t){var i=this.minX,e=this.minY,n=this.maxX,r=this.maxY,s=t[0],o=t[1];i=s<i?s:i,e=o<e?o:e,n=s>n?s:n,r=o>r?o:r,i=(s=t[2])<i?s:i,e=(o=t[3])<e?o:e,n=s>n?s:n,r=o>r?o:r,i=(s=t[4])<i?s:i,e=(o=t[5])<e?o:e,n=s>n?s:n,r=o>r?o:r,i=(s=t[6])<i?s:i,e=(o=t[7])<e?o:e,n=s>n?s:n,r=o>r?o:r,this.minX=i,this.minY=e,this.maxX=n,this.maxY=r},t.prototype.addFrame=function(t,i,e,n,r){this.addFrameMatrix(t.worldTransform,i,e,n,r)},t.prototype.addFrameMatrix=function(t,i,e,n,r){var s=t.a,o=t.b,h=t.c,a=t.d,l=t.tx,d=t.ty,u=this.minX,_=this.minY,p=this.maxX,m=this.maxY,c=s*i+h*e+l,f=o*i+a*e+d;u=c<u?c:u,_=f<_?f:_,p=c>p?c:p,m=f>m?f:m,u=(c=s*n+h*e+l)<u?c:u,_=(f=o*n+a*e+d)<_?f:_,p=c>p?c:p,m=f>m?f:m,u=(c=s*i+h*r+l)<u?c:u,_=(f=o*i+a*r+d)<_?f:_,p=c>p?c:p,m=f>m?f:m,u=(c=s*n+h*r+l)<u?c:u,_=(f=o*n+a*r+d)<_?f:_,p=c>p?c:p,m=f>m?f:m,this.minX=u,this.minY=_,this.maxX=p,this.maxY=m},t.prototype.addVertexData=function(t,i,e){for(var n=this.minX,r=this.minY,s=this.maxX,o=this.maxY,h=i;h<e;h+=2){var a=t[h],l=t[h+1];n=a<n?a:n,r=l<r?l:r,s=a>s?a:s,o=l>o?l:o}this.minX=n,this.minY=r,this.maxX=s,this.maxY=o},t.prototype.addVertices=function(t,i,e,n){this.addVerticesMatrix(t.worldTransform,i,e,n)},t.prototype.addVerticesMatrix=function(t,i,e,n,r,s){void 0===r&&(r=0),void 0===s&&(s=r);for(var o=t.a,h=t.b,a=t.c,l=t.d,d=t.tx,u=t.ty,_=this.minX,p=this.minY,m=this.maxX,c=this.maxY,f=e;f<n;f+=2){var E=i[f],T=i[f+1],N=o*E+a*T+d,I=l*T+h*E+u;_=Math.min(_,N-r),m=Math.max(m,N+r),p=Math.min(p,I-s),c=Math.max(c,I+s)}this.minX=_,this.minY=p,this.maxX=m,this.maxY=c},t.prototype.addBounds=function(t){var i=this.minX,e=this.minY,n=this.maxX,r=this.maxY;this.minX=t.minX<i?t.minX:i,this.minY=t.minY<e?t.minY:e,this.maxX=t.maxX>n?t.maxX:n,this.maxY=t.maxY>r?t.maxY:r},t.prototype.addBoundsMask=function(t,i){var e=t.minX>i.minX?t.minX:i.minX,n=t.minY>i.minY?t.minY:i.minY,r=t.maxX<i.maxX?t.maxX:i.maxX,s=t.maxY<i.maxY?t.maxY:i.maxY;if(e<=r&&n<=s){var o=this.minX,h=this.minY,a=this.maxX,l=this.maxY;this.minX=e<o?e:o,this.minY=n<h?n:h,this.maxX=r>a?r:a,this.maxY=s>l?s:l}},t.prototype.addBoundsMatrix=function(t,i){this.addFrameMatrix(i,t.minX,t.minY,t.maxX,t.maxY)},t.prototype.addBoundsArea=function(t,i){var e=t.minX>i.x?t.minX:i.x,n=t.minY>i.y?t.minY:i.y,r=t.maxX<i.x+i.width?t.maxX:i.x+i.width,s=t.maxY<i.y+i.height?t.maxY:i.y+i.height;if(e<=r&&n<=s){var o=this.minX,h=this.minY,a=this.maxX,l=this.maxY;this.minX=e<o?e:o,this.minY=n<h?n:h,this.maxX=r>a?r:a,this.maxY=s>l?s:l}},t.prototype.pad=function(t,i){void 0===t&&(t=0),void 0===i&&(i=t),this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=i,this.maxY+=i)},t.prototype.addFramePad=function(t,i,e,n,r,s){t-=r,i-=s,e+=r,n+=s,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>e?this.maxX:e,this.minY=this.minY<i?this.minY:i,this.maxY=this.maxY>n?this.maxY:n},t}(),a=function(t,i){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)};function l(t,i){function e(){this.constructor=t}a(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)}var d,u,_,p,m,c,f,E,T,N,I,R,A,O,y,b,x,P,L,D=function(t){function s(){var i=t.call(this)||this;return i.tempDisplayObjectParent=null,i.transform=new r,i.alpha=1,i.visible=!0,i.renderable=!0,i.cullable=!1,i.cullArea=null,i.parent=null,i.worldAlpha=1,i._lastSortedIndex=0,i._zIndex=0,i.filterArea=null,i.filters=null,i._enabledFilters=null,i._bounds=new h,i._localBounds=null,i._boundsID=0,i._boundsRect=null,i._localBoundsRect=null,i._mask=null,i._maskRefCount=0,i._destroyed=!1,i.isSprite=!1,i.isMask=!1,i}return l(s,t),s.mixin=function(t){for(var i=Object.keys(t),e=0;e<i.length;++e){var n=i[e];Object.defineProperty(s.prototype,n,Object.getOwnPropertyDescriptor(t,n))}},Object.defineProperty(s.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!1,configurable:!0}),s.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},s.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha},s.prototype.getBounds=function(t,e){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),e||(this._boundsRect||(this._boundsRect=new i),e=this._boundsRect),this._bounds.getRectangle(e)},s.prototype.getLocalBounds=function(t){t||(this._localBoundsRect||(this._localBoundsRect=new i),t=this._localBoundsRect),this._localBounds||(this._localBounds=new h);var e=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;var r=this._bounds,s=this._boundsID;this._bounds=this._localBounds;var o=this.getBounds(!1,t);return this.parent=n,this.transform=e,this._bounds=r,this._bounds.updateID+=this._boundsID-s,o},s.prototype.toGlobal=function(t,i,e){return void 0===e&&(e=!1),e||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,i)},s.prototype.toLocal=function(t,i,e,n){return i&&(t=i.toGlobal(t,e,n)),n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,e)},s.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},s.prototype.setTransform=function(t,i,e,n,r,s,o,h,a){return void 0===t&&(t=0),void 0===i&&(i=0),void 0===e&&(e=1),void 0===n&&(n=1),void 0===r&&(r=0),void 0===s&&(s=0),void 0===o&&(o=0),void 0===h&&(h=0),void 0===a&&(a=0),this.position.x=t,this.position.y=i,this.scale.x=e||1,this.scale.y=n||1,this.rotation=r,this.skew.x=s,this.skew.y=o,this.pivot.x=h,this.pivot.y=a,this},s.prototype.destroy=function(t){this.parent&&this.parent.removeChild(this),this.emit("destroyed"),this.removeAllListeners(),this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.interactive=!1,this.interactiveChildren=!1,this._destroyed=!0},Object.defineProperty(s.prototype,"_tempDisplayObjectParent",{get:function(){return null===this.tempDisplayObjectParent&&(this.tempDisplayObjectParent=new U),this.tempDisplayObjectParent},enumerable:!1,configurable:!0}),s.prototype.enableTempParent=function(){var t=this.parent;return this.parent=this._tempDisplayObjectParent,t},s.prototype.disableTempParent=function(t){this.parent=t},Object.defineProperty(s.prototype,"x",{get:function(){return this.position.x},set:function(t){this.transform.position.x=t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"y",{get:function(){return this.position.y},set:function(t){this.transform.position.y=t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"worldTransform",{get:function(){return this.transform.worldTransform},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"localTransform",{get:function(){return this.transform.localTransform},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"position",{get:function(){return this.transform.position},set:function(t){this.transform.position.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"scale",{get:function(){return this.transform.scale},set:function(t){this.transform.scale.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"pivot",{get:function(){return this.transform.pivot},set:function(t){this.transform.pivot.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"skew",{get:function(){return this.transform.skew},set:function(t){this.transform.skew.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"rotation",{get:function(){return this.transform.rotation},set:function(t){this.transform.rotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"angle",{get:function(){return this.transform.rotation*e},set:function(t){this.transform.rotation=t*n},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"zIndex",{get:function(){return this._zIndex},set:function(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"worldVisible",{get:function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"mask",{get:function(){return this._mask},set:function(t){if(this._mask!==t){var i;if(this._mask)(i=this._mask.maskObject||this._mask)._maskRefCount--,0===i._maskRefCount&&(i.renderable=!0,i.isMask=!1);if(this._mask=t,this._mask)0===(i=this._mask.maskObject||this._mask)._maskRefCount&&(i.renderable=!1,i.isMask=!0),i._maskRefCount++}},enumerable:!1,configurable:!0}),s}(s),U=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.sortDirty=null,i}return l(i,t),i}(D);function C(t,i){return t.zIndex===i.zIndex?t._lastSortedIndex-i._lastSortedIndex:t.zIndex-i.zIndex}D.prototype.displayObjectUpdateTransform=D.prototype.updateTransform,function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"}(d||(d={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"}(u||(u={})),function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"}(_||(_={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"}(p||(p={})),function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(m||(m={})),function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(c||(c={})),function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(f||(f={})),function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT"}(E||(E={})),function(t){t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT"}(T||(T={})),function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"}(N||(N={})),function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(I||(I={})),function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL"}(R||(R={})),function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",t[t.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"}(A||(A={})),function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"}(O||(O={})),function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"}(y||(y={})),function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"}(b||(b={})),function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"}(x||(x={})),function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"}(P||(P={})),function(t){t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"}(L||(L={}));var v=function(i){function e(){var e=i.call(this)||this;return e.children=[],e.sortableChildren=t.SORTABLE_CHILDREN,e.sortDirty=!1,e}return l(e,i),e.prototype.onChildrenChange=function(t){},e.prototype.addChild=function(){for(var t=arguments,i=[],e=0;e<arguments.length;e++)i[e]=t[e];if(i.length>1)for(var n=0;n<i.length;n++)this.addChild(i[n]);else{var r=i[0];r.parent&&r.parent.removeChild(r),r.parent=this,this.sortDirty=!0,r.transform._parentID=-1,this.children.push(r),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",r,this,this.children.length-1),r.emit("added",this)}return i[0]},e.prototype.addChildAt=function(t,i){if(i<0||i>this.children.length)throw new Error(t+"addChildAt: The index "+i+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(i,0,t),this._boundsID++,this.onChildrenChange(i),t.emit("added",this),this.emit("childAdded",t,this,i),t},e.prototype.swapChildren=function(t,i){if(t!==i){var e=this.getChildIndex(t),n=this.getChildIndex(i);this.children[e]=i,this.children[n]=t,this.onChildrenChange(e<n?e:n)}},e.prototype.getChildIndex=function(t){var i=this.children.indexOf(t);if(-1===i)throw new Error("The supplied DisplayObject must be a child of the caller");return i},e.prototype.setChildIndex=function(t,i){if(i<0||i>=this.children.length)throw new Error("The index "+i+" supplied is out of bounds "+this.children.length);var e=this.getChildIndex(t);o(this.children,e,1),this.children.splice(i,0,t),this.onChildrenChange(i)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},e.prototype.removeChild=function(){for(var t=arguments,i=[],e=0;e<arguments.length;e++)i[e]=t[e];if(i.length>1)for(var n=0;n<i.length;n++)this.removeChild(i[n]);else{var r=i[0],s=this.children.indexOf(r);if(-1===s)return null;r.parent=null,r.transform._parentID=-1,o(this.children,s,1),this._boundsID++,this.onChildrenChange(s),r.emit("removed",this),this.emit("childRemoved",r,this,s)}return i[0]},e.prototype.removeChildAt=function(t){var i=this.getChildAt(t);return i.parent=null,i.transform._parentID=-1,o(this.children,t,1),this._boundsID++,this.onChildrenChange(t),i.emit("removed",this),this.emit("childRemoved",i,this,t),i},e.prototype.removeChildren=function(t,i){void 0===t&&(t=0),void 0===i&&(i=this.children.length);var e,n=t,r=i-n;if(r>0&&r<=i){e=this.children.splice(n,r);for(var s=0;s<e.length;++s)e[s].parent=null,e[s].transform&&(e[s].transform._parentID=-1);this._boundsID++,this.onChildrenChange(t);for(s=0;s<e.length;++s)e[s].emit("removed",this),this.emit("childRemoved",e[s],this,s);return e}if(0===r&&0===this.children.length)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},e.prototype.sortChildren=function(){for(var t=!1,i=0,e=this.children.length;i<e;++i){var n=this.children[i];n._lastSortedIndex=i,t||0===n.zIndex||(t=!0)}t&&this.children.length>1&&this.children.sort(C),this.sortDirty=!1},e.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,i=this.children.length;t<i;++t){var e=this.children[t];e.visible&&e.updateTransform()}},e.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var t=0;t<this.children.length;t++){var i=this.children[t];if(i.visible&&i.renderable)if(i.calculateBounds(),i._mask){var e=i._mask.maskObject||i._mask;e.calculateBounds(),this._bounds.addBoundsMask(i._bounds,e._bounds)}else i.filterArea?this._bounds.addBoundsArea(i._bounds,i.filterArea):this._bounds.addBounds(i._bounds)}this._bounds.updateID=this._boundsID},e.prototype.getLocalBounds=function(t,e){void 0===e&&(e=!1);var n=i.prototype.getLocalBounds.call(this,t);if(!e)for(var r=0,s=this.children.length;r<s;++r){var o=this.children[r];o.visible&&o.updateTransform()}return n},e.prototype._calculateBounds=function(){},e.prototype._renderWithCulling=function(t){var i=t.renderTexture.sourceFrame;if(i.width>0&&i.height>0){var n,r;if(this.cullArea?(n=this.cullArea,r=this.worldTransform):this._render!==e.prototype._render&&(n=this.getBounds(!0)),n&&i.intersects(n,r))this._render(t);else if(this.cullArea)return;for(var s=0,o=this.children.length;s<o;++s){var h=this.children[s],a=h.cullable;h.cullable=a||!this.cullArea,h.render(t),h.cullable=a}}},e.prototype.render=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this.filters&&this.filters.length)this.renderAdvanced(t);else if(this.cullable)this._renderWithCulling(t);else{this._render(t);for(var i=0,e=this.children.length;i<e;++i)this.children[i].render(t)}},e.prototype.renderAdvanced=function(t){var i=this.filters,e=this._mask;if(i){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var n=0;n<i.length;n++)i[n].enabled&&this._enabledFilters.push(i[n])}var r=i&&this._enabledFilters&&this._enabledFilters.length||e&&(!e.isMaskData||e.enabled&&(e.autoDetect||e.type!==x.NONE));if(r&&t.batch.flush(),i&&this._enabledFilters&&this._enabledFilters.length&&t.filter.push(this,this._enabledFilters),e&&t.mask.push(this,this._mask),this.cullable)this._renderWithCulling(t);else{this._render(t);n=0;for(var s=this.children.length;n<s;++n)this.children[n].render(t)}r&&t.batch.flush(),e&&t.mask.pop(this),i&&this._enabledFilters&&this._enabledFilters.length&&t.filter.pop()},e.prototype._render=function(t){},e.prototype.destroy=function(t){i.prototype.destroy.call(this),this.sortDirty=!1;var e="boolean"==typeof t?t:t&&t.children,n=this.removeChildren(0,this.children.length);if(e)for(var r=0;r<n.length;++r)n[r].destroy(t)},Object.defineProperty(e.prototype,"width",{get:function(){return this.scale.x*this.getLocalBounds().width},set:function(t){var i=this.getLocalBounds().width;this.scale.x=0!==i?t/i:1,this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.scale.y*this.getLocalBounds().height},set:function(t){var i=this.getLocalBounds().height;this.scale.y=0!==i?t/i:1,this._height=t},enumerable:!1,configurable:!0}),e}(D);v.prototype.containerUpdateTransform=v.prototype.updateTransform;export{h as Bounds,v as Container,D as DisplayObject,U as TemporaryDisplayObject};
//# sourceMappingURL=display.min.js.map

@@ -21,11 +21,18 @@ /// <reference path="./global.d.ts" />

*
* @class
* @memberof PIXI
*/
export declare class Bounds {
/** @default Infinity */
minX: number;
/** @default Infinity */
minY: number;
/** @default -Infinity */
maxX: number;
/** @default -Infinity */
maxY: number;
rect: Rectangle;
/**
* It is updated to _boundsID of corresponding object to keep bounds in sync with content.
* Updated from outside, thus public modifier.
*/
updateID: number;

@@ -36,9 +43,6 @@ constructor();

*
* @return {boolean} True if empty.
* @return - True if empty.
*/
isEmpty(): boolean;
/**
* Clears the bounds and resets.
*
*/
/** Clears the bounds and resets. */
clear(): void;

@@ -49,4 +53,4 @@ /**

*
* @param {PIXI.Rectangle} rect - temporary object will be used if AABB is not empty
* @returns {PIXI.Rectangle} A rectangle of the bounds
* @param rect - Temporary object will be used if AABB is not empty
* @returns - A rectangle of the bounds
*/

@@ -57,11 +61,6 @@ getRectangle(rect?: Rectangle): Rectangle;

*
* @param {PIXI.IPointData} point - The point to add.
* @param point - The point to add.
*/
addPoint(point: IPointData): void;
/**
* Adds a point, after transformed. This should be inlined when its possible.
*
* @param matrix
* @param point
*/
/** Adds a point, after transformed. This should be inlined when its possible. */
addPointMatrix(matrix: Matrix, point: IPointData): void;

@@ -71,3 +70,3 @@ /**

*
* @param {Float32Array} vertices - The verts to add.
* @param vertices - The verts to add.
*/

@@ -78,7 +77,7 @@ addQuad(vertices: Float32Array): void;

*
* @param {PIXI.Transform} transform - transform to apply
* @param {number} x0 - left X of frame
* @param {number} y0 - top Y of frame
* @param {number} x1 - right X of frame
* @param {number} y1 - bottom Y of frame
* @param transform - transform to apply
* @param x0 - left X of frame
* @param y0 - top Y of frame
* @param x1 - right X of frame
* @param y1 - bottom Y of frame
*/

@@ -89,7 +88,7 @@ addFrame(transform: Transform, x0: number, y0: number, x1: number, y1: number): void;

*
* @param {PIXI.Matrix} matrix - matrix to apply
* @param {number} x0 - left X of frame
* @param {number} y0 - top Y of frame
* @param {number} x1 - right X of frame
* @param {number} y1 - bottom Y of frame
* @param matrix - matrix to apply
* @param x0 - left X of frame
* @param y0 - top Y of frame
* @param x1 - right X of frame
* @param y1 - bottom Y of frame
*/

@@ -100,5 +99,5 @@ addFrameMatrix(matrix: Matrix, x0: number, y0: number, x1: number, y1: number): void;

*
* @param {Float32Array} vertexData - calculated vertices
* @param {number} beginOffset - begin offset
* @param {number} endOffset - end offset, excluded
* @param vertexData - calculated vertices
* @param beginOffset - begin offset
* @param endOffset - end offset, excluded
*/

@@ -109,6 +108,6 @@ addVertexData(vertexData: Float32Array, beginOffset: number, endOffset: number): void;

*
* @param {PIXI.Transform} transform - mesh transform
* @param {Float32Array} vertices - mesh coordinates in array
* @param {number} beginOffset - begin offset
* @param {number} endOffset - end offset, excluded
* @param transform - mesh transform
* @param vertices - mesh coordinates in array
* @param beginOffset - begin offset
* @param endOffset - end offset, excluded
*/

@@ -119,14 +118,14 @@ addVertices(transform: Transform, vertices: Float32Array, beginOffset: number, endOffset: number): void;

*
* @param {PIXI.Matrix} matrix - mesh matrix
* @param {Float32Array} vertices - mesh coordinates in array
* @param {number} beginOffset - begin offset
* @param {number} endOffset - end offset, excluded
* @param {number} [padX=0] - x padding
* @param {number} [padY=0] - y padding
* @param matrix - mesh matrix
* @param vertices - mesh coordinates in array
* @param beginOffset - begin offset
* @param endOffset - end offset, excluded
* @param padX - x padding
* @param padY - y padding
*/
addVerticesMatrix(matrix: Matrix, vertices: Float32Array, beginOffset: number, endOffset: number, padX?: number, padY?: number): void;
/**
* Adds other Bounds.
* Adds other {@link Bounds}.
*
* @param {PIXI.Bounds} bounds - The Bounds to be added
* @param bounds - The Bounds to be added
*/

@@ -137,4 +136,4 @@ addBounds(bounds: Bounds): void;

*
* @param {PIXI.Bounds} bounds - The Bounds to be added.
* @param {PIXI.Bounds} mask - TODO
* @param bounds - The Bounds to be added.
* @param mask - TODO
*/

@@ -145,4 +144,4 @@ addBoundsMask(bounds: Bounds, mask: Bounds): void;

*
* @param {PIXI.Bounds} bounds - other bounds
* @param {PIXI.Matrix} matrix - multiplicator
* @param bounds - other bounds
* @param matrix - multiplicator
*/

@@ -153,4 +152,4 @@ addBoundsMatrix(bounds: Bounds, matrix: Matrix): void;

*
* @param {PIXI.Bounds} bounds - TODO
* @param {PIXI.Rectangle} area - TODO
* @param bounds - TODO
* @param area - TODO
*/

@@ -162,4 +161,4 @@ addBoundsArea(bounds: Bounds, area: Rectangle): void;

*
* @param {number} [paddingX=0] - The horizontal padding amount.
* @param {number} [paddingY=0] - The vertical padding amount.
* @param paddingX - The horizontal padding amount.
* @param paddingY - The vertical padding amount.
*/

@@ -170,8 +169,8 @@ pad(paddingX?: number, paddingY?: number): void;

*
* @param {number} x0 - left X of frame
* @param {number} y0 - top Y of frame
* @param {number} x1 - right X of frame
* @param {number} y1 - bottom Y of frame
* @param {number} padX - padding X
* @param {number} padY - padding Y
* @param x0 - left X of frame
* @param y0 - top Y of frame
* @param x1 - right X of frame
* @param y1 - bottom Y of frame
* @param padX - padding X
* @param padY - padding Y
*/

@@ -217,9 +216,30 @@ addFramePad(x0: number, y0: number, x1: number, y1: number, padX: number, padY: number): void;

*
* @class
* @extends PIXI.DisplayObject
* @memberof PIXI
*/
export declare class Container extends DisplayObject {
/**
* The array of children of this container.
*
* @readonly
*/
readonly children: DisplayObject[];
/**
* If set to true, the container will sort its children by zIndex value
* when updateTransform() is called, or manually if sortChildren() is called.
*
* This actually changes the order of elements in the array, so should be treated
* as a basic solution that is not performant compared to other solutions,
* such as @link https://github.com/pixijs/pixi-display
*
* Also be aware of that this may not work nicely with the addChildAt() function,
* as the zIndex sorting may cause the child to automatically sorted to another position.
*
* @see PIXI.settings.SORTABLE_CHILDREN
*/
sortableChildren: boolean;
/**
* Should children be sorted by zIndex at the next updateTransform call.
*
* Will get automatically set to true if a new child is added, or if a child's zIndex changes.
*/
sortDirty: boolean;

@@ -231,7 +251,3 @@ parent: Container;

constructor();
/**
* Overridable method that can be used by Container subclasses whenever the children array is modified
*
* @protected
*/
/** Overridable method that can be used by Container subclasses whenever the children array is modified. */
protected onChildrenChange(_length?: number): void;

@@ -244,3 +260,3 @@ /**

* @param {...PIXI.DisplayObject} children - The DisplayObject(s) to add to the container
* @return {PIXI.DisplayObject} The first child that was added.
* @return {PIXI.DisplayObject} - The first child that was added.
*/

@@ -259,4 +275,4 @@ addChild<T extends DisplayObject[]>(...children: T): T[0];

*
* @param {PIXI.DisplayObject} child - First display object to swap
* @param {PIXI.DisplayObject} child2 - Second display object to swap
* @param child - First display object to swap
* @param child2 - Second display object to swap
*/

@@ -267,4 +283,4 @@ swapChildren(child: DisplayObject, child2: DisplayObject): void;

*
* @param {PIXI.DisplayObject} child - The DisplayObject instance to identify
* @return {number} The index position of the child display object to identify
* @param child - The DisplayObject instance to identify
* @return - The index position of the child display object to identify
*/

@@ -275,4 +291,4 @@ getChildIndex(child: DisplayObject): number;

*
* @param {PIXI.DisplayObject} child - The child DisplayObject instance for which you want to change the index number
* @param {number} index - The resulting index number for the child display object
* @param child - The child DisplayObject instance for which you want to change the index number
* @param index - The resulting index number for the child display object
*/

@@ -283,4 +299,4 @@ setChildIndex(child: DisplayObject, index: number): void;

*
* @param {number} index - The index to get the child at
* @return {PIXI.DisplayObject} The child at the given index, if any.
* @param index - The index to get the child at
* @return - The child at the given index, if any.
*/

@@ -298,4 +314,4 @@ getChildAt(index: number): DisplayObject;

*
* @param {number} index - The index to get the child from
* @return {PIXI.DisplayObject} The child that was removed.
* @param index - The index to get the child from
* @return The child that was removed.
*/

@@ -306,14 +322,10 @@ removeChildAt(index: number): DisplayObject;

*
* @param {number} [beginIndex=0] - The beginning position.
* @param {number} [endIndex=this.children.length] - The ending position. Default value is size of the container.
* @returns {PIXI.DisplayObject[]} List of removed children
* @param beginIndex - The beginning position.
* @param endIndex - The ending position. Default value is size of the container.
* @returns - List of removed children
*/
removeChildren(beginIndex?: number, endIndex?: number): DisplayObject[];
/**
* Sorts children by zIndex. Previous order is maintained for 2 children with the same zIndex.
*/
/** Sorts children by zIndex. Previous order is maintained for 2 children with the same zIndex. */
sortChildren(): void;
/**
* Updates the transform on all children of this container for rendering
*/
/** Updates the transform on all children of this container for rendering. */
updateTransform(): void;

@@ -333,6 +345,6 @@ /**

*
* @param {PIXI.Rectangle} [rect] - Optional rectangle to store the result of the bounds calculation.
* @param {boolean} [skipChildrenUpdate=false] - Setting to `true` will stop re-calculation of children transforms,
* @param rect - Optional rectangle to store the result of the bounds calculation.
* @param skipChildrenUpdate - Setting to `true` will stop re-calculation of children transforms,
* it was default behaviour of pixi 4.0-5.2 and caused many problems to users.
* @return {PIXI.Rectangle} The rectangular bounding area.
* @return - The rectangular bounding area.
*/

@@ -348,2 +360,9 @@ getLocalBounds(rect?: Rectangle, skipChildrenUpdate?: boolean): Rectangle;

/**
* Renders this object and its children with culling.
*
* @protected
* @param {PIXI.Renderer} renderer - The renderer
*/
protected _renderWithCulling(renderer: Renderer): void;
/**
* Renders the object using the WebGL renderer.

@@ -355,10 +374,13 @@ *

*
* If `renderable` or `visible` is false or if `worldAlpha` is not positive, this implementation will entirely
* skip rendering. See {@link PIXI.DisplayObject} for choosing between `renderable` or `visible`. Generally,
* If `renderable` or `visible` is false or if `worldAlpha` is not positive or if `cullable` is true and
* the bounds of this object are out of frame, this implementation will entirely skip rendering.
* See {@link PIXI.DisplayObject} for choosing between `renderable` or `visible`. Generally,
* setting alpha to zero is not recommended for purely skipping rendering.
*
* When your scene becomes large (especially when it is larger than can be viewed in a single screen), it is
* advised to employ **culling** to automatically skip rendering objects outside of the current screen. The
* advised to employ **culling** to automatically skip rendering objects outside of the current screen.
* See [cullable]{@link PIXI.DisplayObject#cullable} and [cullArea]{@link PIXI.DisplayObject#cullArea}.
* Other culling methods might be better suited for a large number static objects; see
* [@pixi-essentials/cull]{@link https://www.npmjs.com/package/@pixi-essentials/cull} and
* [pixi-cull]{@link https://www.npmjs.com/package/pixi-cull} packages do this out of the box.
* [pixi-cull]{@link https://www.npmjs.com/package/pixi-cull}.
*

@@ -369,3 +391,3 @@ * The [renderAdvanced]{@link PIXI.Container#renderAdvanced} method is internally used when when masking or

*
* @param {PIXI.Renderer} renderer - The renderer
* @param renderer - The renderer
*/

@@ -376,4 +398,3 @@ render(renderer: Renderer): void;

*
* @protected
* @param {PIXI.Renderer} renderer - The renderer
* @param renderer - The renderer
*/

@@ -384,4 +405,3 @@ protected renderAdvanced(renderer: Renderer): void;

*
* @protected
* @param {PIXI.Renderer} renderer - The renderer
* @param renderer - The renderer
*/

@@ -393,3 +413,3 @@ protected _render(_renderer: Renderer): void;

*
* @param {object|boolean} [options] - Options parameter. A boolean will act as if all options
* @param options - Options parameter. A boolean will act as if all options
* have been set to that value

@@ -404,14 +424,6 @@ * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy

destroy(options?: IDestroyOptions | boolean): void;
/**
* The width of the Container, setting this will actually modify the scale to achieve the value set
*
* @member {number}
*/
/** The width of the Container, setting this will actually modify the scale to achieve the value set. */
get width(): number;
set width(value: number);
/**
* The height of the Container, setting this will actually modify the scale to achieve the value set
*
* @member {number}
*/
/** The height of the Container, setting this will actually modify the scale to achieve the value set. */
get height(): number;

@@ -608,4 +620,2 @@ set height(value: number);

*
* @class
* @extends PIXI.utils.EventEmitter
* @memberof PIXI

@@ -615,22 +625,100 @@ */

abstract sortDirty: boolean;
/** The display object container that contains this display object. */
parent: Container;
/**
* The multiplied alpha of the displayObject.
*
* @readonly
*/
worldAlpha: number;
/**
* World transform and local transform of this object.
* This will become read-only later, please do not assign anything there unless you know what are you doing.
*/
transform: Transform;
/** The opacity of the object. */
alpha: number;
/**
* The visibility of the object. If false the object will not be drawn, and
* the updateTransform function will not be called.
*
* Only affects recursive calls from parent. You can ask for bounds or call updateTransform manually.
*/
visible: boolean;
/**
* Can this object be rendered, if false the object will not be drawn but the updateTransform
* methods will still be called.
*
* Only affects recursive calls from parent. You can ask for bounds manually.
*/
renderable: boolean;
/**
* Should this object be rendered if the bounds of this object are out of frame?
*
* Culling has no effect on whether updateTransform is called.
*/
cullable: boolean;
/**
* If set, this shape is used for culling instead of the bounds of this object.
* It can improve the culling performance of objects with many children.
* The culling area is defined in local space.
*/
cullArea: Rectangle;
/**
* The area the filter is applied to. This is used as more of an optimization
* rather than figuring out the dimensions of the displayObject each frame you can set this rectangle.
*
* Also works as an interaction mask.
*/
filterArea: Rectangle;
/**
* Sets the filters for the displayObject.
* * IMPORTANT: This is a WebGL only feature and will be ignored by the canvas renderer.
* To remove filters simply set this property to `'null'`.
*/
filters: Filter[] | null;
/** Used to fast check if a sprite is.. a sprite! */
isSprite: boolean;
/** Does any other displayObject use this object as a mask? */
isMask: boolean;
/**
* Which index in the children array the display component was before the previous zIndex sort.
* Used by containers to help sort objects with the same zIndex, by using previous array index as the decider.
*
* @protected
*/
_lastSortedIndex: number;
/**
* The original, cached mask of the object.
*
* @protected
*/
_mask: Container | MaskData;
/** The bounds object, this is used to calculate and store the bounds of the displayObject. */
_bounds: Bounds;
/** Local bounds object, swapped with `_bounds` when using `getLocalBounds()`. */
_localBounds: Bounds;
/**
* The zIndex of the displayObject.
* A higher value will mean it will be rendered on top of other displayObjects within the same container.
*
* @protected
*/
protected _zIndex: number;
/**
* Currently enabled filters.
*
* @protected
*/
protected _enabledFilters: Filter[];
/** Flags the cached bounds as dirty. */
protected _boundsID: number;
/** Cache of this display-object's bounds-rectangle. */
protected _boundsRect: Rectangle;
/** Cache of this display-object's local-bounds rectangle. */
protected _localBoundsRect: Rectangle;
/** If the object has been destroyed via destroy(). If true, it should not be used. */
protected _destroyed: boolean;
/**
* The number of times this object is used as a mask by another object. */
private _maskRefCount;

@@ -642,3 +730,3 @@ private tempDisplayObjectParent;

*
* @param {object} source - The source of properties and methods to mix in.
* @param source - The source of properties and methods to mix in.
*/

@@ -667,9 +755,5 @@ static mixin(source: Dict<any>): void;

*/
/**
* Readonly flag for destroyed display objects.
*/
/** Readonly flag for destroyed display objects. */
get destroyed(): boolean;
/**
* Recalculates the bounds of the display object.
*/
/** Recalculates the bounds of the display object. */
abstract calculateBounds(): void;

@@ -680,3 +764,3 @@ abstract removeChild(child: DisplayObject): void;

*
* @param {PIXI.Renderer} renderer - The renderer.
* @param renderer - The renderer.
*/

@@ -724,7 +808,7 @@ abstract render(renderer: Renderer): void;

*
* @param {boolean} [skipUpdate] - Setting to `true` will stop the transforms of the scene graph from
* @param skipUpdate - Setting to `true` will stop the transforms of the scene graph from
* being updated. This means the calculation returned MAY be out of date BUT will give you a
* nice performance boost.
* @param {PIXI.Rectangle} [rect] - Optional rectangle to store the result of the bounds calculation.
* @return {PIXI.Rectangle} The minimum axis-aligned rectangle in world space that fits around this object.
* @param rect - Optional rectangle to store the result of the bounds calculation.
* @return - The minimum axis-aligned rectangle in world space that fits around this object.
*/

@@ -735,4 +819,4 @@ getBounds(skipUpdate?: boolean, rect?: Rectangle): Rectangle;

*
* @param {PIXI.Rectangle} [rect] - Optional rectangle to store the result of the bounds calculation.
* @return {PIXI.Rectangle} The rectangular bounding area.
* @param rect - Optional rectangle to store the result of the bounds calculation.
* @return - The rectangular bounding area.
*/

@@ -743,7 +827,7 @@ getLocalBounds(rect?: Rectangle): Rectangle;

*
* @param {PIXI.IPointData} position - The world origin to calculate from.
* @param {PIXI.Point} [point] - A Point object in which to store the value, optional
* @param position - The world origin to calculate from.
* @param point - A Point object in which to store the value, optional
* (otherwise will create a new Point).
* @param {boolean} [skipUpdate=false] - Should we skip the update transform.
* @return {PIXI.Point} A point object representing the position of this object.
* @param skipUpdate - Should we skip the update transform.
* @return - A point object representing the position of this object.
*/

@@ -754,8 +838,8 @@ toGlobal<P extends IPointData = Point>(position: IPointData, point?: P, skipUpdate?: boolean): P;

*
* @param {PIXI.IPointData} position - The world origin to calculate from.
* @param {PIXI.DisplayObject} [from] - The DisplayObject to calculate the global position from.
* @param {PIXI.Point} [point] - A Point object in which to store the value, optional
* @param position - The world origin to calculate from.
* @param from - The DisplayObject to calculate the global position from.
* @param point - A Point object in which to store the value, optional
* (otherwise will create a new Point).
* @param {boolean} [skipUpdate=false] - Should we skip the update transform
* @return {PIXI.Point} A point object representing the position of this object
* @param skipUpdate - Should we skip the update transform
* @return - A point object representing the position of this object
*/

@@ -766,4 +850,4 @@ toLocal<P extends IPointData = Point>(position: IPointData, from?: DisplayObject, point?: P, skipUpdate?: boolean): P;

*
* @param {PIXI.Container} container - The Container to add this DisplayObject to.
* @return {PIXI.Container} The Container that this DisplayObject was added to.
* @param container - The Container to add this DisplayObject to.
* @return - The Container that this DisplayObject was added to.
*/

@@ -774,12 +858,12 @@ setParent(container: Container): Container;

*
* @param {number} [x=0] - The X position
* @param {number} [y=0] - The Y position
* @param {number} [scaleX=1] - The X scale value
* @param {number} [scaleY=1] - The Y scale value
* @param {number} [rotation=0] - The rotation
* @param {number} [skewX=0] - The X skew value
* @param {number} [skewY=0] - The Y skew value
* @param {number} [pivotX=0] - The X pivot value
* @param {number} [pivotY=0] - The Y pivot value
* @return {PIXI.DisplayObject} The DisplayObject instance
* @param x - The X position
* @param y - The Y position
* @param scaleX - The X scale value
* @param scaleY - The Y scale value
* @param rotation - The rotation
* @param skewX - The X skew value
* @param skewY - The Y skew value
* @param pivotX - The X pivot value
* @param pivotY - The Y pivot value
* @return - The DisplayObject instance
*/

@@ -792,3 +876,2 @@ setTransform(x?: number, y?: number, scaleX?: number, scaleY?: number, rotation?: number, skewX?: number, skewY?: number, pivotX?: number, pivotY?: number): this;

* after calling `destroy()`.
*
*/

@@ -810,3 +893,3 @@ destroy(_options?: IDestroyOptions | boolean): void;

*
* @returns {PIXI.Container} current parent
* @returns - current parent
*/

@@ -817,3 +900,3 @@ enableTempParent(): Container;

*
* @param {PIXI.Container} cacheParent - Actual parent of element
* @param cacheParent - Actual parent of element
*/

@@ -824,4 +907,2 @@ disableTempParent(cacheParent: Container): void;

* An alias to position.x
*
* @member {number}
*/

@@ -833,4 +914,2 @@ get x(): number;

* An alias to position.y
*
* @member {number}
*/

@@ -842,3 +921,2 @@ get y(): number;

*
* @member {PIXI.Matrix}
* @readonly

@@ -850,3 +928,2 @@ */

*
* @member {PIXI.Matrix}
* @readonly

@@ -859,3 +936,2 @@ */

* @since PixiJS 4
* @member {PIXI.ObservablePoint}
*/

@@ -870,3 +946,2 @@ get position(): ObservablePoint;

* @since PixiJS 4
* @member {PIXI.ObservablePoint}
*/

@@ -882,3 +957,2 @@ get scale(): ObservablePoint;

* @since PixiJS 4
* @member {PIXI.ObservablePoint}
*/

@@ -891,3 +965,2 @@ get pivot(): ObservablePoint;

* @since PixiJS 4
* @member {PIXI.ObservablePoint}
*/

@@ -899,4 +972,2 @@ get skew(): ObservablePoint;

* 'rotation' and 'angle' have the same effect on a display object; rotation is in radians, angle is in degrees.
*
* @member {number}
*/

@@ -908,4 +979,2 @@ get rotation(): number;

* 'rotation' and 'angle' have the same effect on a display object; rotation is in radians, angle is in degrees.
*
* @member {number}
*/

@@ -921,3 +990,2 @@ get angle(): number;

*
* @member {number}
* @see PIXI.Container#sortableChildren

@@ -930,3 +998,2 @@ */

*
* @member {boolean}
* @readonly

@@ -953,3 +1020,2 @@ */

* @todo At the moment, PIXI.CanvasRenderer doesn't support PIXI.Sprite as mask.
* @member {PIXI.Container|PIXI.MaskData|null}
*/

@@ -956,0 +1022,0 @@ get mask(): Container | MaskData | null;

{
"name": "@pixi/display",
"version": "6.2.2",
"version": "6.3.0",
"main": "dist/cjs/display.js",

@@ -28,7 +28,7 @@ "module": "dist/esm/display.js",

"peerDependencies": {
"@pixi/math": "6.2.2",
"@pixi/settings": "6.2.2",
"@pixi/utils": "6.2.2"
"@pixi/math": "6.3.0",
"@pixi/settings": "6.3.0",
"@pixi/utils": "6.3.0"
},
"gitHead": "23c4599ad83dbb128d71a1010aa6c4fb96779270"
"gitHead": "dc311cdd7a28e6817556cdc674fd15ef71069467"
}

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

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

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