858 lines
407 KiB
JavaScript
858 lines
407 KiB
JavaScript
|
import{E as Vr}from"./eventemitter3.dc5195d7.js";import{e as Ns}from"./earcut.03899505.js";import{p as ba,f as xa,r as Ea}from"./url.1821b64b.js";/*!
|
||
|
* @pixi/constants - v6.5.8
|
||
|
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
||
|
*
|
||
|
* @pixi/constants is licensed under the MIT License.
|
||
|
* http://www.opensource.org/licenses/mit-license
|
||
|
*/var zt;(function(r){r[r.WEBGL_LEGACY=0]="WEBGL_LEGACY",r[r.WEBGL=1]="WEBGL",r[r.WEBGL2=2]="WEBGL2"})(zt||(zt={}));var Ye;(function(r){r[r.UNKNOWN=0]="UNKNOWN",r[r.WEBGL=1]="WEBGL",r[r.CANVAS=2]="CANVAS"})(Ye||(Ye={}));var Cr;(function(r){r[r.COLOR=16384]="COLOR",r[r.DEPTH=256]="DEPTH",r[r.STENCIL=1024]="STENCIL"})(Cr||(Cr={}));var B;(function(r){r[r.NORMAL=0]="NORMAL",r[r.ADD=1]="ADD",r[r.MULTIPLY=2]="MULTIPLY",r[r.SCREEN=3]="SCREEN",r[r.OVERLAY=4]="OVERLAY",r[r.DARKEN=5]="DARKEN",r[r.LIGHTEN=6]="LIGHTEN",r[r.COLOR_DODGE=7]="COLOR_DODGE",r[r.COLOR_BURN=8]="COLOR_BURN",r[r.HARD_LIGHT=9]="HARD_LIGHT",r[r.SOFT_LIGHT=10]="SOFT_LIGHT",r[r.DIFFERENCE=11]="DIFFERENCE",r[r.EXCLUSION=12]="EXCLUSION",r[r.HUE=13]="HUE",r[r.SATURATION=14]="SATURATION",r[r.COLOR=15]="COLOR",r[r.LUMINOSITY=16]="LUMINOSITY",r[r.NORMAL_NPM=17]="NORMAL_NPM",r[r.ADD_NPM=18]="ADD_NPM",r[r.SCREEN_NPM=19]="SCREEN_NPM",r[r.NONE=20]="NONE",r[r.SRC_OVER=0]="SRC_OVER",r[r.SRC_IN=21]="SRC_IN",r[r.SRC_OUT=22]="SRC_OUT",r[r.SRC_ATOP=23]="SRC_ATOP",r[r.DST_OVER=24]="DST_OVER",r[r.DST_IN=25]="DST_IN",r[r.DST_OUT=26]="DST_OUT",r[r.DST_ATOP=27]="DST_ATOP",r[r.ERASE=26]="ERASE",r[r.SUBTRACT=28]="SUBTRACT",r[r.XOR=29]="XOR"})(B||(B={}));var Tt;(function(r){r[r.POINTS=0]="POINTS",r[r.LINES=1]="LINES",r[r.LINE_LOOP=2]="LINE_LOOP",r[r.LINE_STRIP=3]="LINE_STRIP",r[r.TRIANGLES=4]="TRIANGLES",r[r.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",r[r.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(Tt||(Tt={}));var S;(function(r){r[r.RGBA=6408]="RGBA",r[r.RGB=6407]="RGB",r[r.RG=33319]="RG",r[r.RED=6403]="RED",r[r.RGBA_INTEGER=36249]="RGBA_INTEGER",r[r.RGB_INTEGER=36248]="RGB_INTEGER",r[r.RG_INTEGER=33320]="RG_INTEGER",r[r.RED_INTEGER=36244]="RED_INTEGER",r[r.ALPHA=6406]="ALPHA",r[r.LUMINANCE=6409]="LUMINANCE",r[r.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",r[r.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",r[r.DEPTH_STENCIL=34041]="DEPTH_STENCIL"})(S||(S={}));var pe;(function(r){r[r.TEXTURE_2D=3553]="TEXTURE_2D",r[r.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",r[r.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",r[r.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",r[r.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",r[r.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",r[r.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",r[r.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",r[r.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"})(pe||(pe={}));var M;(function(r){r[r.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",r[r.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",r[r.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",r[r.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",r[r.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",r[r.UNSIGNED_INT=5125]="UNSIGNED_INT",r[r.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",r[r.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",r[r.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",r[r.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",r[r.BYTE=5120]="BYTE",r[r.SHORT=5122]="SHORT",r[r.INT=5124]="INT",r[r.FLOAT=5126]="FLOAT",r[r.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",r[r.HALF_FLOAT=36193]="HALF_FLOAT"})(M||(M={}));var Ir;(function(r){r[r.FLOAT=0]="FLOAT",r[r.INT=1]="INT",r[r.UINT=2]="UINT"})(Ir||(Ir={}));var It;(function(r){r[r.NEAREST=0]="NEAREST",r[r.LINEAR=1]="LINEAR"})(It||(It={}));var Be;(function(r){r[r.CLAMP=33071]="CLAMP",r[r.REPEAT=10497]="REPEAT",r[r.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(Be||(Be={}));var ut;(function(r){r[r.OFF=0]="OFF",r[r.POW2=1]="POW2",r[r.ON=2]="ON",r[r.ON_MANUAL=3]="ON_MANUAL"})(ut||(ut={}));var ct;(function(r){r[r.NPM=0]="NPM",r[r.UNPACK=1]="UNPACK",r[r.PMA=2]="PMA",r[r.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",r[r.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",r[r.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",r[r.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"})(ct||(ct={}));var Qt;(function(r){r[r.NO=0]="NO",r[r.YES=1]="YES",r[r.AUTO=2]="AUTO",r[r.BLEND=0]="BLEND",r[r.CLEAR=1]="CLEAR",r[r.BLIT=2]="BL
|
||
|
* @pixi/settings - v6.5.8
|
||
|
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
||
|
*
|
||
|
* @pixi/settings is licensed under the MIT License.
|
||
|
* http://www.opensource.org/licenses/mit-license
|
||
|
*/var Ta={createCanvas:function(r,t){var e=document.createElement("canvas");return e.width=r,e.height=t,e},getWebGLRenderingContext:function(){return WebGLRenderingContext},getNavigator:function(){return navigator},getBaseUrl:function(){var r;return(r=document.baseURI)!==null&&r!==void 0?r:window.location.href},fetch:function(r,t){return fetch(r,t)}},Zr=/iPhone/i,Bn=/iPod/i,Mn=/iPad/i,Ln=/\biOS-universal(?:.+)Mac\b/i,Qr=/\bAndroid(?:.+)Mobile\b/i,Nn=/Android/i,Te=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,ar=/Silk/i,Nt=/Windows Phone/i,Fn=/\bWindows(?:.+)ARM\b/i,Dn=/BlackBerry/i,Un=/BB10/i,Gn=/Opera Mini/i,kn=/\b(CriOS|Chrome)(?:.+)Mobile/i,Xn=/Mobile(?:.+)Firefox\b/i,Hn=function(r){return typeof r!="undefined"&&r.platform==="MacIntel"&&typeof r.maxTouchPoints=="number"&&r.maxTouchPoints>1&&typeof MSStream=="undefined"};function wa(r){return function(t){return t.test(r)}}function Aa(r){var t={userAgent:"",platform:"",maxTouchPoints:0};!r&&typeof navigator!="undefined"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof r=="string"?t.userAgent=r:r&&r.userAgent&&(t={userAgent:r.userAgent,platform:r.platform,maxTouchPoints:r.maxTouchPoints||0});var e=t.userAgent,i=e.split("[FBAN");typeof i[1]!="undefined"&&(e=i[0]),i=e.split("Twitter"),typeof i[1]!="undefined"&&(e=i[0]);var n=wa(e),s={apple:{phone:n(Zr)&&!n(Nt),ipod:n(Bn),tablet:!n(Zr)&&(n(Mn)||Hn(t))&&!n(Nt),universal:n(Ln),device:(n(Zr)||n(Bn)||n(Mn)||n(Ln)||Hn(t))&&!n(Nt)},amazon:{phone:n(Te),tablet:!n(Te)&&n(ar),device:n(Te)||n(ar)},android:{phone:!n(Nt)&&n(Te)||!n(Nt)&&n(Qr),tablet:!n(Nt)&&!n(Te)&&!n(Qr)&&(n(ar)||n(Nn)),device:!n(Nt)&&(n(Te)||n(ar)||n(Qr)||n(Nn))||n(/\bokhttp\b/i)},windows:{phone:n(Nt),tablet:n(Fn),device:n(Nt)||n(Fn)},other:{blackberry:n(Dn),blackberry10:n(Un),opera:n(Gn),firefox:n(Xn),chrome:n(kn),device:n(Dn)||n(Un)||n(Gn)||n(Xn)||n(kn)},any:!1,phone:!1,tablet:!1};return s.any=s.apple.device||s.android.device||s.windows.device||s.other.device,s.phone=s.apple.phone||s.android.phone||s.windows.phone,s.tablet=s.apple.tablet||s.android.tablet||s.windows.tablet,s}var de=Aa(globalThis.navigator);function Sa(){return!de.apple.device}function Ra(r){var t=!0;if(de.tablet||de.phone){if(de.apple.device){var e=navigator.userAgent.match(/OS (\d+)_(\d+)?/);if(e){var i=parseInt(e[1],10);i<11&&(t=!1)}}if(de.android.device){var e=navigator.userAgent.match(/Android\s([0-9.]*)/);if(e){var i=parseInt(e[1],10);i<7&&(t=!1)}}}return t?r:4}var P={ADAPTER:Ta,MIPMAP_TEXTURES:ut.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:rt.NONE,SPRITE_MAX_TEXTURES:Ra(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,autoDensity:!1,backgroundColor:0,backgroundAlpha:1,useContextAlpha:!0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:Or.AUTO,GC_MAX_IDLE:60*60,GC_MAX_CHECK_COUNT:60*10,WRAP_MODE:Be.CLAMP,SCALE_MODE:It.LINEAR,PRECISION_VERTEX:pt.HIGH,PRECISION_FRAGMENT:de.apple.device?pt.HIGH:pt.MEDIUM,CAN_UPLOAD_SAME_BUFFER:Sa(),CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};/*!
|
||
|
* @pixi/utils - v6.5.8
|
||
|
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
||
|
*
|
||
|
* @pixi/utils is licensed under the MIT License.
|
||
|
* http://www.opensource.org/licenses/mit-license
|
||
|
*/var Pe={parse:ba,format:xa,resolve:Ea};function yt(r){if(typeof r!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(r))}function jn(r){var t=r.split("?")[0];return t.split("#")[0]}function Pa(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ca(r,t,e){return r.replace(new RegExp(Pa(t),"g"),e)}function Ia(r,t){for(var e="",i=0,n=-1,s=0,a,o=0;o<=r.length;++o){if(o<r.length)a=r.charCodeAt(o);else{if(a===47)break;a=47}if(a===47){if(!(n===o-1||s===1))if(n!==o-1&&s===2){if(e.length<2||i!==2||e.charCodeAt(e.length-1)!==46||e.charCodeAt(e.length-2)!==46){if(e.length>2){var h=e.lastIndexOf("/");if(h!==e.length-1){h===-1?(e="",i=0):(e=e.slice(0,h),i=e.length-1-e.lastIndexOf("/")),n=o,s=0;continue}}else if(e.length===2||e.length===1){e="",i=0,n=o,s=0;continue}}t&&(e.length>0?e+="/..":e="..",i=2)}else e.length>0?e+="/"+r.slice(n+1,o):e=r.slice(n+1,o),i=o-n-1;n=o,s=0}else a===46&&s!==-1?++s:s=-1}return e}var ht={toPosix:function(r){return Ca(r,"\\","/")},isUrl:function(r){return/^https?:/.test(this.toPosix(r))},isDataUrl:function(r){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(r)},hasProtocol:function(r){return/^[^/:]+:\//.test(this.toPosix(r))},getProtocol:function(r){yt(r),r=this.toPosix(r);var t="",e=/^file:\/\/\//.exec(r),i=/^[^/:]+:\/\//.exec(r),n=/^[^/:]+:\//.exec(r);if(e||i||n){var s=(e==null?void 0:e[0])||(i==null?void 0:i[0])||(n==null?void 0:n[0]);t=s,r=r.slice(s.length)}return t},toAbsolute:function(r,t,e){if(this.isDataUrl(r))return r;var i=jn(this.toPosix(t!=null?t:P.ADAPTER.getBaseUrl())),n=jn(this.toPosix(e!=null?e:this.rootname(i)));if(yt(r),r=this.toPosix(r),r.startsWith("/"))return ht.join(n,r.slice(1));var s=this.isAbsolute(r)?r:this.join(i,r);return s},normalize:function(r){if(r=this.toPosix(r),yt(r),r.length===0)return".";var t="",e=r.startsWith("/");this.hasProtocol(r)&&(t=this.rootname(r),r=r.slice(t.length));var i=r.endsWith("/");return r=Ia(r,!1),r.length>0&&i&&(r+="/"),e?"/"+r:t+r},isAbsolute:function(r){return yt(r),r=this.toPosix(r),this.hasProtocol(r)?!0:r.startsWith("/")},join:function(){for(var r=arguments,t,e=[],i=0;i<arguments.length;i++)e[i]=r[i];if(e.length===0)return".";for(var n,s=0;s<e.length;++s){var a=e[s];if(yt(a),a.length>0)if(n===void 0)n=a;else{var o=(t=e[s-1])!==null&&t!==void 0?t:"";this.extname(o)?n+="/../"+a:n+="/"+a}}return n===void 0?".":this.normalize(n)},dirname:function(r){if(yt(r),r.length===0)return".";r=this.toPosix(r);var t=r.charCodeAt(0),e=t===47,i=-1,n=!0,s=this.getProtocol(r),a=r;r=r.slice(s.length);for(var o=r.length-1;o>=1;--o)if(t=r.charCodeAt(o),t===47){if(!n){i=o;break}}else n=!1;return i===-1?e?"/":this.isUrl(a)?s+r:s:e&&i===1?"//":s+r.slice(0,i)},rootname:function(r){yt(r),r=this.toPosix(r);var t="";if(r.startsWith("/")?t="/":t=this.getProtocol(r),this.isUrl(r)){var e=r.indexOf("/",t.length);e!==-1?t=r.slice(0,e):t=r,t.endsWith("/")||(t+="/")}return t},basename:function(r,t){yt(r),t&&yt(t),r=this.toPosix(r);var e=0,i=-1,n=!0,s;if(t!==void 0&&t.length>0&&t.length<=r.length){if(t.length===r.length&&t===r)return"";var a=t.length-1,o=-1;for(s=r.length-1;s>=0;--s){var h=r.charCodeAt(s);if(h===47){if(!n){e=s+1;break}}else o===-1&&(n=!1,o=s+1),a>=0&&(h===t.charCodeAt(a)?--a===-1&&(i=s):(a=-1,i=o))}return e===i?i=o:i===-1&&(i=r.length),r.slice(e,i)}for(s=r.length-1;s>=0;--s)if(r.charCodeAt(s)===47){if(!n){e=s+1;break}}else i===-1&&(n=!1,i=s+1);return i===-1?"":r.slice(e,i)},extname:function(r){yt(r),r=this.toPosix(r);for(var t=-1,e=0,i=-1,n=!0,s=0,a=r.length-1;a>=0;--a){var o=r.charCodeAt(a);if(o===47){if(!n){e=a+1;break}continue}i===-1&&(n=!1,i=a+1),o===46?t===-1?t=a:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||i===-1||s===0||s===1&&t===i-1&&t===e+1?"":r.slice(t,i)},parse:function(r){yt(r);var t={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return t;r=this.toPosix(r);var e=r.charCodeAt(0),i=this.isAbsolute(r),n;t.root=this.rootname(r),i||this.hasProtocol(r)?n=1:n=0;for(var s=-1,a=0,o=-1,h=!0,u=r.length-1,l=0;u>=n;--u){if(e
|
||
|
%c %c %c PixiJS `+Vn+" - \u2730 "+r+` \u2730 %c %c http://www.pixijs.com/ %c %c \u2665%c\u2665%c\u2665
|
||
|
|
||
|
`,"background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(t=globalThis.console).log.apply(t,e)}else globalThis.console&&globalThis.console.log("PixiJS "+Vn+" - "+r+" - http://www.pixijs.com/");Wn=!0}}var Jr;function Ba(){return typeof Jr=="undefined"&&(Jr=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:P.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!P.ADAPTER.getWebGLRenderingContext())return!1;var e=P.ADAPTER.createCanvas(),i=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),n=!!(i&&i.getContextAttributes().stencil);if(i){var s=i.getExtension("WEBGL_lose_context");s&&s.loseContext()}return i=null,n}catch{return!1}}()),Jr}var Ma="#f0f8ff",La="#faebd7",Na="#00ffff",Fa="#7fffd4",Da="#f0ffff",Ua="#f5f5dc",Ga="#ffe4c4",ka="#000000",Xa="#ffebcd",Ha="#0000ff",ja="#8a2be2",Wa="#a52a2a",Va="#deb887",Ya="#5f9ea0",za="#7fff00",qa="#d2691e",$a="#ff7f50",Ka="#6495ed",Za="#fff8dc",Qa="#dc143c",Ja="#00ffff",to="#00008b",eo="#008b8b",ro="#b8860b",io="#a9a9a9",no="#006400",so="#a9a9a9",ao="#bdb76b",oo="#8b008b",ho="#556b2f",uo="#ff8c00",lo="#9932cc",fo="#8b0000",co="#e9967a",po="#8fbc8f",vo="#483d8b",_o="#2f4f4f",mo="#2f4f4f",go="#00ced1",yo="#9400d3",bo="#ff1493",xo="#00bfff",Eo="#696969",To="#696969",wo="#1e90ff",Ao="#b22222",So="#fffaf0",Ro="#228b22",Po="#ff00ff",Co="#dcdcdc",Io="#f8f8ff",Oo="#daa520",Bo="#ffd700",Mo="#808080",Lo="#008000",No="#adff2f",Fo="#808080",Do="#f0fff0",Uo="#ff69b4",Go="#cd5c5c",ko="#4b0082",Xo="#fffff0",Ho="#f0e68c",jo="#fff0f5",Wo="#e6e6fa",Vo="#7cfc00",Yo="#fffacd",zo="#add8e6",qo="#f08080",$o="#e0ffff",Ko="#fafad2",Zo="#d3d3d3",Qo="#90ee90",Jo="#d3d3d3",th="#ffb6c1",eh="#ffa07a",rh="#20b2aa",ih="#87cefa",nh="#778899",sh="#778899",ah="#b0c4de",oh="#ffffe0",hh="#00ff00",uh="#32cd32",lh="#faf0e6",fh="#ff00ff",ch="#800000",dh="#66cdaa",ph="#0000cd",vh="#ba55d3",_h="#9370db",mh="#3cb371",gh="#7b68ee",yh="#00fa9a",bh="#48d1cc",xh="#c71585",Eh="#191970",Th="#f5fffa",wh="#ffe4e1",Ah="#ffe4b5",Sh="#ffdead",Rh="#000080",Ph="#fdf5e6",Ch="#808000",Ih="#6b8e23",Oh="#ffa500",Bh="#ff4500",Mh="#da70d6",Lh="#eee8aa",Nh="#98fb98",Fh="#afeeee",Dh="#db7093",Uh="#ffefd5",Gh="#ffdab9",kh="#cd853f",Xh="#ffc0cb",Hh="#dda0dd",jh="#b0e0e6",Wh="#800080",Vh="#663399",Yh="#ff0000",zh="#bc8f8f",qh="#4169e1",$h="#8b4513",Kh="#fa8072",Zh="#f4a460",Qh="#2e8b57",Jh="#fff5ee",tu="#a0522d",eu="#c0c0c0",ru="#87ceeb",iu="#6a5acd",nu="#708090",su="#708090",au="#fffafa",ou="#00ff7f",hu="#4682b4",uu="#d2b48c",lu="#008080",fu="#d8bfd8",cu="#ff6347",du="#40e0d0",pu="#ee82ee",vu="#f5deb3",_u="#ffffff",mu="#f5f5f5",gu="#ffff00",yu="#9acd32",bu={aliceblue:Ma,antiquewhite:La,aqua:Na,aquamarine:Fa,azure:Da,beige:Ua,bisque:Ga,black:ka,blanchedalmond:Xa,blue:Ha,blueviolet:ja,brown:Wa,burlywood:Va,cadetblue:Ya,chartreuse:za,chocolate:qa,coral:$a,cornflowerblue:Ka,cornsilk:Za,crimson:Qa,cyan:Ja,darkblue:to,darkcyan:eo,darkgoldenrod:ro,darkgray:io,darkgreen:no,darkgrey:so,darkkhaki:ao,darkmagenta:oo,darkolivegreen:ho,darkorange:uo,darkorchid:lo,darkred:fo,darksalmon:co,darkseagreen:po,darkslateblue:vo,darkslategray:_o,darkslategrey:mo,darkturquoise:go,darkviolet:yo,deeppink:bo,deepskyblue:xo,dimgray:Eo,dimgrey:To,dodgerblue:wo,firebrick:Ao,floralwhite:So,forestgreen:Ro,fuchsia:Po,gainsboro:Co,ghostwhite:Io,goldenrod:Oo,gold:Bo,gray:Mo,green:Lo,greenyellow:No,grey:Fo,honeydew:Do,hotpink:Uo,indianred:Go,indigo:ko,ivory:Xo,khaki:Ho,lavenderblush:jo,lavender:Wo,lawngreen:Vo,lemonchiffon:Yo,lightblue:zo,lightcoral:qo,lightcyan:$o,lightgoldenrodyellow:Ko,lightgray:Zo,lightgreen:Qo,lightgrey:Jo,lightpink:th,lightsalmon:eh,lightseagreen:rh,lightskyblue:ih,lightslategray:nh,lightslategrey:sh,lightsteelblue:ah,lightyellow:oh,lime:hh,limegreen:uh,linen:lh,magenta:fh,maroon:ch,mediumaquamarine:dh,mediumblue:ph,med
|
||
|
Deprecated since v`+r):(i=i.split(`
|
||
|
`).splice(e).join(`
|
||
|
`),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",t+`
|
||
|
Deprecated since v`+r),console.warn(i),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",t+`
|
||
|
Deprecated since v`+r),console.warn(i))),qn[t]=!0}}var $n={},Ut=Object.create(null),ie=Object.create(null);(function(){function r(t,e,i){this.canvas=P.ADAPTER.createCanvas(),this.context=this.canvas.getContext("2d"),this.resolution=i||P.RESOLUTION,this.resize(t,e)}return r.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},r.prototype.resize=function(t,e){this.canvas.width=Math.round(t*this.resolution),this.canvas.height=Math.round(e*this.resolution)},r.prototype.destroy=function(){this.context=null,this.canvas=null},Object.defineProperty(r.prototype,"width",{get:function(){return this.canvas.width},set:function(t){this.canvas.width=Math.round(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"height",{get:function(){return this.canvas.height},set:function(t){this.canvas.height=Math.round(t)},enumerable:!1,configurable:!0}),r})();function Au(r){var t=r.width,e=r.height,i=r.getContext("2d",{willReadFrequently:!0}),n=i.getImageData(0,0,t,e),s=n.data,a=s.length,o={top:null,left:null,right:null,bottom:null},h=null,u,l,f;for(u=0;u<a;u+=4)s[u+3]!==0&&(l=u/4%t,f=~~(u/4/t),o.top===null&&(o.top=f),(o.left===null||l<o.left)&&(o.left=l),(o.right===null||o.right<l)&&(o.right=l+1),(o.bottom===null||o.bottom<f)&&(o.bottom=f));return o.top!==null&&(t=o.right-o.left,e=o.bottom-o.top+1,h=i.getImageData(o.left,o.top,t,e)),{height:e,width:t,data:h}}var or;function Su(r,t){if(t===void 0&&(t=globalThis.location),r.indexOf("data:")===0)return"";t=t||globalThis.location,or||(or=document.createElement("a")),or.href=r;var e=Pe.parse(or.href),i=!e.port&&t.port===""||e.port===t.port;return e.hostname!==t.hostname||!i||e.protocol!==t.protocol?"anonymous":""}function te(r,t){var e=P.RETINA_PREFIX.exec(r);return e?parseFloat(e[1]):t!==void 0?t:1}/*!
|
||
|
* @pixi/extensions - v6.5.8
|
||
|
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
||
|
*
|
||
|
* @pixi/extensions is licensed under the MIT License.
|
||
|
* http://www.opensource.org/licenses/mit-license
|
||
|
*//*! *****************************************************************************
|
||
|
Copyright (c) Microsoft Corporation.
|
||
|
|
||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
purpose with or without fee is hereby granted.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
***************************************************************************** */var We=function(){return We=Object.assign||function(t){for(var e=arguments,i,n=1,s=arguments.length;n<s;n++){i=e[n];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=i[a])}return t},We.apply(this,arguments)},F;(function(r){r.Application="application",r.RendererPlugin="renderer-webgl-plugin",r.CanvasRendererPlugin="renderer-canvas-plugin",r.Loader="loader",r.LoadParser="load-parser",r.ResolveParser="resolve-parser",r.CacheParser="cache-parser",r.DetectionParser="detection-parser"})(F||(F={}));var Kn=function(r){if(typeof r=="function"||typeof r=="object"&&r.extension){if(!r.extension)throw new Error("Extension class must have an extension object");var t=typeof r.extension!="object"?{type:r.extension}:r.extension;r=We(We({},t),{ref:r})}if(typeof r=="object")r=We({},r);else throw new Error("Invalid extension type");return typeof r.type=="string"&&(r.type=[r.type]),r},At={_addHandlers:null,_removeHandlers:null,_queue:{},remove:function(){for(var r=arguments,t=this,e=[],i=0;i<arguments.length;i++)e[i]=r[i];return e.map(Kn).forEach(function(n){n.type.forEach(function(s){var a,o;return(o=(a=t._removeHandlers)[s])===null||o===void 0?void 0:o.call(a,n)})}),this},add:function(){for(var r=arguments,t=this,e=[],i=0;i<arguments.length;i++)e[i]=r[i];return e.map(Kn).forEach(function(n){n.type.forEach(function(s){var a=t._addHandlers,o=t._queue;a[s]?a[s](n):(o[s]=o[s]||[],o[s].push(n))})}),this},handle:function(r,t,e){var i=this._addHandlers=this._addHandlers||{},n=this._removeHandlers=this._removeHandlers||{};if(i[r]||n[r])throw new Error("Extension type "+r+" already has a handler");i[r]=t,n[r]=e;var s=this._queue;return s[r]&&(s[r].forEach(function(a){return t(a)}),delete s[r]),this},handleByMap:function(r,t){return this.handle(r,function(e){t[e.name]=e.ref},function(e){delete t[e.name]})},handleByList:function(r,t){return this.handle(r,function(e){var i,n;t.push(e.ref),r===F.Loader&&((n=(i=e.ref).add)===null||n===void 0||n.call(i))},function(e){var i=t.indexOf(e.ref);i!==-1&&t.splice(i,1)})}};/*!
|
||
|
* @pixi/runner - v6.5.8
|
||
|
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
||
|
*
|
||
|
* @pixi/runner is licensed under the MIT License.
|
||
|
* http://www.opensource.org/licenses/mit-license
|
||
|
*/var ot=function(){function r(t){this.items=[],this._name=t,this._aliasCount=0}return r.prototype.emit=function(t,e,i,n,s,a,o,h){if(arguments.length>8)throw new Error("max arguments reached");var u=this,l=u.name,f=u.items;this._aliasCount++;for(var c=0,d=f.length;c<d;c++)f[c][l](t,e,i,n,s,a,o,h);return f===this.items&&this._aliasCount--,this},r.prototype.ensureNonAliasedItems=function(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},r.prototype.add=function(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this},r.prototype.remove=function(t){var e=this.items.indexOf(t);return e!==-1&&(this.ensureNonAliasedItems(),this.items.splice(e,1)),this},r.prototype.contains=function(t){return this.items.indexOf(t)!==-1},r.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},r.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(r.prototype,"empty",{get:function(){return this.items.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),r}();Object.defineProperties(ot.prototype,{dispatch:{value:ot.prototype.emit},run:{value:ot.prototype.emit}});/*!
|
||
|
* @pixi/ticker - v6.5.8
|
||
|
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
||
|
*
|
||
|
* @pixi/ticker is licensed under the MIT License.
|
||
|
* http://www.opensource.org/licenses/mit-license
|
||
|
*/P.TARGET_FPMS=.06;var $e;(function(r){r[r.INTERACTION=50]="INTERACTION",r[r.HIGH=25]="HIGH",r[r.NORMAL=0]="NORMAL",r[r.LOW=-25]="LOW",r[r.UTILITY=-50]="UTILITY"})($e||($e={}));var ti=function(){function r(t,e,i,n){e===void 0&&(e=null),i===void 0&&(i=0),n===void 0&&(n=!1),this.next=null,this.previous=null,this._destroyed=!1,this.fn=t,this.context=e,this.priority=i,this.once=n}return r.prototype.match=function(t,e){return e===void 0&&(e=null),this.fn===t&&this.context===e},r.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var e=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),e},r.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},r.prototype.destroy=function(t){t===void 0&&(t=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var e=this.next;return this.next=t?null:e,this.previous=null,e},r}(),Xt=function(){function r(){var t=this;this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new ti(null,null,1/0),this.deltaMS=1/P.TARGET_FPMS,this.elapsedMS=1/P.TARGET_FPMS,this._tick=function(e){t._requestId=null,t.started&&(t.update(e),t.started&&t._requestId===null&&t._head.next&&(t._requestId=requestAnimationFrame(t._tick)))}}return r.prototype._requestIfNeeded=function(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},r.prototype._cancelIfNeeded=function(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)},r.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},r.prototype.add=function(t,e,i){return i===void 0&&(i=$e.NORMAL),this._addListener(new ti(t,e,i))},r.prototype.addOnce=function(t,e,i){return i===void 0&&(i=$e.NORMAL),this._addListener(new ti(t,e,i,!0))},r.prototype._addListener=function(t){var e=this._head.next,i=this._head;if(!e)t.connect(i);else{for(;e;){if(t.priority>e.priority){t.connect(i);break}i=e,e=e.next}t.previous||t.connect(i)}return this._startIfPossible(),this},r.prototype.remove=function(t,e){for(var i=this._head.next;i;)i.match(t,e)?i=i.destroy():i=i.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(r.prototype,"count",{get:function(){if(!this._head)return 0;for(var t=0,e=this._head;e=e.next;)t++;return t},enumerable:!1,configurable:!0}),r.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},r.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},r.prototype.destroy=function(){if(!this._protected){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}},r.prototype.update=function(t){t===void 0&&(t=performance.now());var e;if(t>this.lastTime){if(e=this.elapsedMS=t-this.lastTime,e>this._maxElapsedMS&&(e=this._maxElapsedMS),e*=this.speed,this._minElapsedMS){var i=t-this._lastFrame|0;if(i<this._minElapsedMS)return;this._lastFrame=t-i%this._minElapsedMS}this.deltaMS=e,this.deltaTime=this.deltaMS*P.TARGET_FPMS;for(var n=this._head,s=n.next;s;)s=s.emit(this.deltaTime);n.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t},Object.defineProperty(r.prototype,"FPS",{get:function(){return 1e3/this.elapsedMS},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"minFPS",{get:function(){return 1e3/this._maxElapsedMS},set:function(t){var e=Math.min(this.maxFPS,t),i=Math.min(Math.max(0,e)/1e3,P.TARGET_FPMS);this._maxElapsedMS=1/i},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"maxFPS",{get:function(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0},set:function(t){if(t===0)this._minElapsedMS=0;else{var e=Math.max(this.minFPS,t);this._minElapsedMS=1/(e
|
||
|
* @pixi/math - v6.5.8
|
||
|
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
||
|
*
|
||
|
* @pixi/math is licensed under the MIT License.
|
||
|
* http://www.opensource.org/licenses/mit-license
|
||
|
*/var Mr=Math.PI*2,Ru=180/Math.PI,Pu=Math.PI/180,at;(function(r){r[r.POLY=0]="POLY",r[r.RECT=1]="RECT",r[r.CIRC=2]="CIRC",r[r.ELIP=3]="ELIP",r[r.RREC=4]="RREC"})(at||(at={}));var q=function(){function r(t,e){t===void 0&&(t=0),e===void 0&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}return r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.copyFrom=function(t){return this.set(t.x,t.y),this},r.prototype.copyTo=function(t){return t.set(this.x,this.y),t},r.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},r.prototype.set=function(t,e){return t===void 0&&(t=0),e===void 0&&(e=t),this.x=t,this.y=e,this},r.prototype.toString=function(){return"[@pixi/math:Point x="+this.x+" y="+this.y+"]"},r}(),hr=[new q,new q,new q,new q],W=function(){function r(t,e,i,n){t===void 0&&(t=0),e===void 0&&(e=0),i===void 0&&(i=0),n===void 0&&(n=0),this.x=Number(t),this.y=Number(e),this.width=Number(i),this.height=Number(n),this.type=at.RECT}return Object.defineProperty(r.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(r,"EMPTY",{get:function(){return new r(0,0,0,0)},enumerable:!1,configurable:!0}),r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copyFrom=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},r.prototype.copyTo=function(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t},r.prototype.contains=function(t,e){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&e>=this.y&&e<this.y+this.height},r.prototype.intersects=function(t,e){if(!e){var i=this.x<t.x?t.x:this.x,n=this.right>t.right?t.right:this.right;if(n<=i)return!1;var s=this.y<t.y?t.y:this.y,a=this.bottom>t.bottom?t.bottom:this.bottom;return a>s}var o=this.left,h=this.right,u=this.top,l=this.bottom;if(h<=o||l<=u)return!1;var f=hr[0].set(t.left,t.top),c=hr[1].set(t.left,t.bottom),d=hr[2].set(t.right,t.top),p=hr[3].set(t.right,t.bottom);if(d.x<=f.x||c.y<=f.y)return!1;var v=Math.sign(e.a*e.d-e.b*e.c);if(v===0||(e.apply(f,f),e.apply(c,c),e.apply(d,d),e.apply(p,p),Math.max(f.x,c.x,d.x,p.x)<=o||Math.min(f.x,c.x,d.x,p.x)>=h||Math.max(f.y,c.y,d.y,p.y)<=u||Math.min(f.y,c.y,d.y,p.y)>=l))return!1;var _=v*(c.y-f.y),m=v*(f.x-c.x),x=_*o+m*u,E=_*h+m*u,w=_*o+m*l,y=_*h+m*l;if(Math.max(x,E,w,y)<=_*f.x+m*f.y||Math.min(x,E,w,y)>=_*p.x+m*p.y)return!1;var b=v*(f.y-d.y),g=v*(d.x-f.x),A=b*o+g*u,T=b*h+g*u,R=b*o+g*l,O=b*h+g*l;return!(Math.max(A,T,R,O)<=b*f.x+g*f.y||Math.min(A,T,R,O)>=b*p.x+g*p.y)},r.prototype.pad=function(t,e){return t===void 0&&(t=0),e===void 0&&(e=t),this.x-=t,this.y-=e,this.width+=t*2,this.height+=e*2,this},r.prototype.fit=function(t){var e=Math.max(this.x,t.x),i=Math.min(this.x+this.width,t.x+t.width),n=Math.max(this.y,t.y),s=Math.min(this.y+this.height,t.y+t.height);return this.x=e,this.width=Math.max(i-e,0),this.y=n,this.height=Math.max(s-n,0),this},r.prototype.ceil=function(t,e){t===void 0&&(t=1),e===void 0&&(e=.001);var i=Math.ceil((this.x+this.width-e)*t)/t,n=Math.ceil((this.y+this.height-e)*t)/t;return this.x=Math.floor((this.x+e)*t)/t,this.y=Math.floor((this.y+e)*t)/t,this.width=i-this.x,this.height=n-this.y,this},r.prototype.enlarge=function(t){var e=Math.min(this.x,t.x),i=Math.max(this.x+this.width,t.x+t.width),n=Math.min(this.y,t.y),s=Math.max(this.y+this.height,t.y+t.height);return this.x=e,this.width=i-e,this.y=n,this.height=s-n,this},r.prototype.toString=function(){return"[@pixi/math:Rectangle x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+"]"},r}(),Cu=function(){function r(t,e,i){t===void 0&&(t=0),e===void 0&&(e=0),i===void 0&&(i=0),this.x=t,this.y=e,this.radius=i,this.type=at.CIRC}return r.prototype.clone=function(){return
|
||
|
* @pixi/core - v6.5.8
|
||
|
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
||
|
*
|
||
|
* @pixi/core is licensed under the MIT License.
|
||
|
* http://www.opensource.org/licenses/mit-license
|
||
|
*/P.PREFER_ENV=de.any?zt.WEBGL:zt.WEBGL2;P.STRICT_TEXTURE_CACHE=!1;var Ii=[];function Xs(r,t){if(!r)return null;var e="";if(typeof r=="string"){var i=/\.(\w{3,4})(?:$|\?|#)/i.exec(r);i&&(e=i[1].toLowerCase())}for(var n=Ii.length-1;n>=0;--n){var s=Ii[n];if(s.test&&s.test(r,e))return new s(r,t)}throw new Error("Unrecognized source type to auto-detect Resource")}/*! *****************************************************************************
|
||
|
Copyright (c) Microsoft Corporation.
|
||
|
|
||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
purpose with or without fee is hereby granted.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
***************************************************************************** */var Oi=function(r,t){return Oi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var n in i)i.hasOwnProperty(n)&&(e[n]=i[n])},Oi(r,t)};function Z(r,t){Oi(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var Bi=function(){return Bi=Object.assign||function(t){for(var e=arguments,i,n=1,s=arguments.length;n<s;n++){i=e[n];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=i[a])}return t},Bi.apply(this,arguments)};function Lu(r,t){var e={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&t.indexOf(i)<0&&(e[i]=r[i]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(r);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(r,i[n])&&(e[i[n]]=r[i[n]]);return e}var Ke=function(){function r(t,e){t===void 0&&(t=0),e===void 0&&(e=0),this._width=t,this._height=e,this.destroyed=!1,this.internal=!1,this.onResize=new ot("setRealSize"),this.onUpdate=new ot("update"),this.onError=new ot("onError")}return r.prototype.bind=function(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)},r.prototype.unbind=function(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)},r.prototype.resize=function(t,e){(t!==this._width||e!==this._height)&&(this._width=t,this._height=e,this.onResize.emit(t,e))},Object.defineProperty(r.prototype,"valid",{get:function(){return!!this._width&&!!this._height},enumerable:!1,configurable:!0}),r.prototype.update=function(){this.destroyed||this.onUpdate.emit()},r.prototype.load=function(){return Promise.resolve(this)},Object.defineProperty(r.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),r.prototype.style=function(t,e,i){return!1},r.prototype.dispose=function(){},r.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)},r.test=function(t,e){return!1},r}(),_e=function(r){Z(t,r);function t(e,i){var n=this,s=i||{},a=s.width,o=s.height;if(!a||!o)throw new Error("BufferResource width or height invalid");return n=r.call(this,a,o)||this,n.data=e,n}return t.prototype.upload=function(e,i,n){var s=e.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.alphaMode===ct.UNPACK);var a=i.realWidth,o=i.realHeight;return n.width===a&&n.height===o?s.texSubImage2D(i.target,0,0,0,a,o,i.format,n.type,this.data):(n.width=a,n.height=o,s.texImage2D(i.target,0,n.internalFormat,a,o,0,i.format,n.type,this.data)),!0},t.prototype.dispose=function(){this.data=null},t.test=function(e){return e instanceof Float32Array||e instanceof Uint8Array||e instanceof Uint32Array},t}(Ke),Nu={scaleMode:It.NEAREST,format:S.RGBA,alphaMode:ct.NPM},X=function(r){Z(t,r);function t(e,i){e===void 0&&(e=null),i===void 0&&(i=null);var n=r.call(this)||this;i=i||{};var s=i.alphaMode,a=i.mipmap,o=i.anisotropicLevel,h=i.scaleMode,u=i.width,l=i.height,f=i.wrapMode,c=i.format,d=i.type,p=i.target,v=i.resolution,_=i.resourceOptions;return e&&!(e instanceof Ke)&&(e=Xs(e,_),e.internal=!0),n.resolution=v||P.RESOLUTION,n.width=Math.round((u||0)*n.resolution)/n.resolution,n.height=Math.round((l||0)*n.resolution)/n.resolution,n._mipmap=a!==void 0?a:P.MIPMAP_TEXTURES,n.anisotropicLevel=o!==void 0?o:P.ANISOTROPIC_LEVEL,n._wrapMode=f||P.WRAP_MODE,n._scaleMode=h!==void 0?h:P.SCALE_MODE,n.format=c||S.RGBA,n.type=d||M.UNSIGNED_BYTE,n.target=p||pe.TEXTURE_2D,n.alphaMode=s!==void 0?s:ct.UNPACK,n.uid=qe(),n.touched=0,n.isPowerOfTwo=!1,n._refreshPOT(),n._glTextures={},n.dirtyId=0,n.dirtyStyleId=0,n.cacheId=null,n.valid=u>0&&l>0,n.textureCacheIds=[],n.destroyed=!1,n.resource=null,n._batchEnabled=0,n._batchLocati
|
||
|
`).map(function(u,l){return l+": "+u}),i=r.getShaderInfoLog(t),n=i.split(`
|
||
|
`),s={},a=n.map(function(u){return parseFloat(u.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))}).filter(function(u){return u&&!s[u]?(s[u]=!0,!0):!1}),o=[""];a.forEach(function(u){e[u-1]="%c"+e[u-1]+"%c",o.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});var h=e.join(`
|
||
|
`);o[0]=h,console.error(i),console.groupCollapsed("click to view full shader code"),console.warn.apply(console,o),console.groupEnd()}function al(r,t,e,i){r.getProgramParameter(t,r.LINK_STATUS)||(r.getShaderParameter(e,r.COMPILE_STATUS)||rs(r,e),r.getShaderParameter(i,r.COMPILE_STATUS)||rs(r,i),console.error("PixiJS Error: Could not initialize shader."),r.getProgramInfoLog(t)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",r.getProgramInfoLog(t)))}function ii(r){for(var t=new Array(r),e=0;e<t.length;e++)t[e]=!1;return t}function zs(r,t){switch(r){case"float":return 0;case"vec2":return new Float32Array(2*t);case"vec3":return new Float32Array(3*t);case"vec4":return new Float32Array(4*t);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*t);case"ivec3":return new Int32Array(3*t);case"ivec4":return new Int32Array(4*t);case"uvec2":return new Uint32Array(2*t);case"uvec3":return new Uint32Array(3*t);case"uvec4":return new Uint32Array(4*t);case"bool":return!1;case"bvec2":return ii(2*t);case"bvec3":return ii(3*t);case"bvec4":return ii(4*t);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}var qs={},Le=qs;function ol(){if(Le===qs||Le&&Le.isContextLost()){var r=P.ADAPTER.createCanvas(),t=void 0;P.PREFER_ENV>=zt.WEBGL2&&(t=r.getContext("webgl2",{})),t||(t=r.getContext("webgl",{})||r.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),Le=t}return Le}var cr;function hl(){if(!cr){cr=pt.MEDIUM;var r=ol();if(r&&r.getShaderPrecisionFormat){var t=r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT);cr=t.precision?pt.HIGH:pt.MEDIUM}}return cr}function is(r,t,e){if(r.substring(0,9)!=="precision"){var i=t;return t===pt.HIGH&&e!==pt.HIGH&&(i=pt.MEDIUM),"precision "+i+` float;
|
||
|
`+r}else if(e!==pt.HIGH&&r.substring(0,15)==="precision highp")return r.replace("precision highp","precision mediump");return r}var ul={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function $s(r){return ul[r]}var dr=null,ns={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function Ks(r,t){if(!dr){var e=Object.keys(ns);dr={};for(var i=0;i<e.length;++i){var n=e[i];dr[r[n]]=ns[n]}}return dr[t]}var Oe=[{test:function(r){return r.type==="float"&&r.size===1&&!r.isArray},code:function(r){return`
|
||
|
if(uv["`+r+'"] !== ud["'+r+`"].value)
|
||
|
{
|
||
|
ud["`+r+'"].value = uv["'+r+`"]
|
||
|
gl.uniform1f(ud["`+r+'"].location, uv["'+r+`"])
|
||
|
}
|
||
|
`}},{test:function(r,t){return(r.type==="sampler2D"||r.type==="samplerCube"||r.type==="sampler2DArray")&&r.size===1&&!r.isArray&&(t==null||t.castToBaseTexture!==void 0)},code:function(r){return`t = syncData.textureCount++;
|
||
|
|
||
|
renderer.texture.bind(uv["`+r+`"], t);
|
||
|
|
||
|
if(ud["`+r+`"].value !== t)
|
||
|
{
|
||
|
ud["`+r+`"].value = t;
|
||
|
gl.uniform1i(ud["`+r+`"].location, t);
|
||
|
; // eslint-disable-line max-len
|
||
|
}`}},{test:function(r,t){return r.type==="mat3"&&r.size===1&&!r.isArray&&t.a!==void 0},code:function(r){return`
|
||
|
gl.uniformMatrix3fv(ud["`+r+'"].location, false, uv["'+r+`"].toArray(true));
|
||
|
`},codeUbo:function(r){return`
|
||
|
var `+r+"_matrix = uv."+r+`.toArray(true);
|
||
|
|
||
|
data[offset] = `+r+`_matrix[0];
|
||
|
data[offset+1] = `+r+`_matrix[1];
|
||
|
data[offset+2] = `+r+`_matrix[2];
|
||
|
|
||
|
data[offset + 4] = `+r+`_matrix[3];
|
||
|
data[offset + 5] = `+r+`_matrix[4];
|
||
|
data[offset + 6] = `+r+`_matrix[5];
|
||
|
|
||
|
data[offset + 8] = `+r+`_matrix[6];
|
||
|
data[offset + 9] = `+r+`_matrix[7];
|
||
|
data[offset + 10] = `+r+`_matrix[8];
|
||
|
`}},{test:function(r,t){return r.type==="vec2"&&r.size===1&&!r.isArray&&t.x!==void 0},code:function(r){return`
|
||
|
cv = ud["`+r+`"].value;
|
||
|
v = uv["`+r+`"];
|
||
|
|
||
|
if(cv[0] !== v.x || cv[1] !== v.y)
|
||
|
{
|
||
|
cv[0] = v.x;
|
||
|
cv[1] = v.y;
|
||
|
gl.uniform2f(ud["`+r+`"].location, v.x, v.y);
|
||
|
}`},codeUbo:function(r){return`
|
||
|
v = uv.`+r+`;
|
||
|
|
||
|
data[offset] = v.x;
|
||
|
data[offset+1] = v.y;
|
||
|
`}},{test:function(r){return r.type==="vec2"&&r.size===1&&!r.isArray},code:function(r){return`
|
||
|
cv = ud["`+r+`"].value;
|
||
|
v = uv["`+r+`"];
|
||
|
|
||
|
if(cv[0] !== v[0] || cv[1] !== v[1])
|
||
|
{
|
||
|
cv[0] = v[0];
|
||
|
cv[1] = v[1];
|
||
|
gl.uniform2f(ud["`+r+`"].location, v[0], v[1]);
|
||
|
}
|
||
|
`}},{test:function(r,t){return r.type==="vec4"&&r.size===1&&!r.isArray&&t.width!==void 0},code:function(r){return`
|
||
|
cv = ud["`+r+`"].value;
|
||
|
v = uv["`+r+`"];
|
||
|
|
||
|
if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)
|
||
|
{
|
||
|
cv[0] = v.x;
|
||
|
cv[1] = v.y;
|
||
|
cv[2] = v.width;
|
||
|
cv[3] = v.height;
|
||
|
gl.uniform4f(ud["`+r+`"].location, v.x, v.y, v.width, v.height)
|
||
|
}`},codeUbo:function(r){return`
|
||
|
v = uv.`+r+`;
|
||
|
|
||
|
data[offset] = v.x;
|
||
|
data[offset+1] = v.y;
|
||
|
data[offset+2] = v.width;
|
||
|
data[offset+3] = v.height;
|
||
|
`}},{test:function(r){return r.type==="vec4"&&r.size===1&&!r.isArray},code:function(r){return`
|
||
|
cv = ud["`+r+`"].value;
|
||
|
v = uv["`+r+`"];
|
||
|
|
||
|
if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
|
||
|
{
|
||
|
cv[0] = v[0];
|
||
|
cv[1] = v[1];
|
||
|
cv[2] = v[2];
|
||
|
cv[3] = v[3];
|
||
|
|
||
|
gl.uniform4f(ud["`+r+`"].location, v[0], v[1], v[2], v[3])
|
||
|
}`}}],ll={float:`
|
||
|
if (cv !== v)
|
||
|
{
|
||
|
cu.value = v;
|
||
|
gl.uniform1f(location, v);
|
||
|
}`,vec2:`
|
||
|
if (cv[0] !== v[0] || cv[1] !== v[1])
|
||
|
{
|
||
|
cv[0] = v[0];
|
||
|
cv[1] = v[1];
|
||
|
|
||
|
gl.uniform2f(location, v[0], v[1])
|
||
|
}`,vec3:`
|
||
|
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
|
||
|
{
|
||
|
cv[0] = v[0];
|
||
|
cv[1] = v[1];
|
||
|
cv[2] = v[2];
|
||
|
|
||
|
gl.uniform3f(location, v[0], v[1], v[2])
|
||
|
}`,vec4:`
|
||
|
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
|
||
|
{
|
||
|
cv[0] = v[0];
|
||
|
cv[1] = v[1];
|
||
|
cv[2] = v[2];
|
||
|
cv[3] = v[3];
|
||
|
|
||
|
gl.uniform4f(location, v[0], v[1], v[2], v[3]);
|
||
|
}`,int:`
|
||
|
if (cv !== v)
|
||
|
{
|
||
|
cu.value = v;
|
||
|
|
||
|
gl.uniform1i(location, v);
|
||
|
}`,ivec2:`
|
||
|
if (cv[0] !== v[0] || cv[1] !== v[1])
|
||
|
{
|
||
|
cv[0] = v[0];
|
||
|
cv[1] = v[1];
|
||
|
|
||
|
gl.uniform2i(location, v[0], v[1]);
|
||
|
}`,ivec3:`
|
||
|
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
|
||
|
{
|
||
|
cv[0] = v[0];
|
||
|
cv[1] = v[1];
|
||
|
cv[2] = v[2];
|
||
|
|
||
|
gl.uniform3i(location, v[0], v[1], v[2]);
|
||
|
}`,ivec4:`
|
||
|
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
|
||
|
{
|
||
|
cv[0] = v[0];
|
||
|
cv[1] = v[1];
|
||
|
cv[2] = v[2];
|
||
|
cv[3] = v[3];
|
||
|
|
||
|
gl.uniform4i(location, v[0], v[1], v[2], v[3]);
|
||
|
}`,uint:`
|
||
|
if (cv !== v)
|
||
|
{
|
||
|
cu.value = v;
|
||
|
|
||
|
gl.uniform1ui(location, v);
|
||
|
}`,uvec2:`
|
||
|
if (cv[0] !== v[0] || cv[1] !== v[1])
|
||
|
{
|
||
|
cv[0] = v[0];
|
||
|
cv[1] = v[1];
|
||
|
|
||
|
gl.uniform2ui(location, v[0], v[1]);
|
||
|
}`,uvec3:`
|
||
|
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
|
||
|
{
|
||
|
cv[0] = v[0];
|
||
|
cv[1] = v[1];
|
||
|
cv[2] = v[2];
|
||
|
|
||
|
gl.uniform3ui(location, v[0], v[1], v[2]);
|
||
|
}`,uvec4:`
|
||
|
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
|
||
|
{
|
||
|
cv[0] = v[0];
|
||
|
cv[1] = v[1];
|
||
|
cv[2] = v[2];
|
||
|
cv[3] = v[3];
|
||
|
|
||
|
gl.uniform4ui(location, v[0], v[1], v[2], v[3]);
|
||
|
}`,bool:`
|
||
|
if (cv !== v)
|
||
|
{
|
||
|
cu.value = v;
|
||
|
gl.uniform1i(location, v);
|
||
|
}`,bvec2:`
|
||
|
if (cv[0] != v[0] || cv[1] != v[1])
|
||
|
{
|
||
|
cv[0] = v[0];
|
||
|
cv[1] = v[1];
|
||
|
|
||
|
gl.uniform2i(location, v[0], v[1]);
|
||
|
}`,bvec3:`
|
||
|
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
|
||
|
{
|
||
|
cv[0] = v[0];
|
||
|
cv[1] = v[1];
|
||
|
cv[2] = v[2];
|
||
|
|
||
|
gl.uniform3i(location, v[0], v[1], v[2]);
|
||
|
}`,bvec4:`
|
||
|
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
|
||
|
{
|
||
|
cv[0] = v[0];
|
||
|
cv[1] = v[1];
|
||
|
cv[2] = v[2];
|
||
|
cv[3] = v[3];
|
||
|
|
||
|
gl.uniform4i(location, v[0], v[1], v[2], v[3]);
|
||
|
}`,mat2:"gl.uniformMatrix2fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",sampler2D:`
|
||
|
if (cv !== v)
|
||
|
{
|
||
|
cu.value = v;
|
||
|
|
||
|
gl.uniform1i(location, v);
|
||
|
}`,samplerCube:`
|
||
|
if (cv !== v)
|
||
|
{
|
||
|
cu.value = v;
|
||
|
|
||
|
gl.uniform1i(location, v);
|
||
|
}`,sampler2DArray:`
|
||
|
if (cv !== v)
|
||
|
{
|
||
|
cu.value = v;
|
||
|
|
||
|
gl.uniform1i(location, v);
|
||
|
}`},fl={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function cl(r,t){var e,i=[`
|
||
|
var v = null;
|
||
|
var cv = null;
|
||
|
var cu = null;
|
||
|
var t = 0;
|
||
|
var gl = renderer.gl;
|
||
|
`];for(var n in r.uniforms){var s=t[n];if(!s){!((e=r.uniforms[n])===null||e===void 0)&&e.group&&(r.uniforms[n].ubo?i.push(`
|
||
|
renderer.shader.syncUniformBufferGroup(uv.`+n+", '"+n+`');
|
||
|
`):i.push(`
|
||
|
renderer.shader.syncUniformGroup(uv.`+n+`, syncData);
|
||
|
`));continue}for(var a=r.uniforms[n],o=!1,h=0;h<Oe.length;h++)if(Oe[h].test(s,a)){i.push(Oe[h].code(n,a)),o=!0;break}if(!o){var u=s.size===1&&!s.isArray?ll:fl,l=u[s.type].replace("location",'ud["'+n+'"].location');i.push(`
|
||
|
cu = ud["`+n+`"];
|
||
|
cv = cu.value;
|
||
|
v = uv["`+n+`"];
|
||
|
`+l+";")}}return new Function("ud","uv","renderer","syncData",i.join(`
|
||
|
`))}var dl=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
|
||
|
`);function pl(r){for(var t="",e=0;e<r;++e)e>0&&(t+=`
|
||
|
else `),e<r-1&&(t+="if(test == "+e+".0){}");return t}function vl(r,t){if(r===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");for(var e=t.createShader(t.FRAGMENT_SHADER);;){var i=dl.replace(/%forloop%/gi,pl(r));if(t.shaderSource(e,i),t.compileShader(e),!t.getShaderParameter(e,t.COMPILE_STATUS))r=r/2|0;else break}return r}var Ne;function _l(){if(typeof Ne=="boolean")return Ne;try{var r=new Function("param1","param2","param3","return param1[param2] === param3;");Ne=r({a:"b"},"a","b")===!0}catch{Ne=!1}return Ne}var ml=`varying vec2 vTextureCoord;
|
||
|
|
||
|
uniform sampler2D uSampler;
|
||
|
|
||
|
void main(void){
|
||
|
gl_FragColor *= texture2D(uSampler, vTextureCoord);
|
||
|
}`,gl=`attribute vec2 aVertexPosition;
|
||
|
attribute vec2 aTextureCoord;
|
||
|
|
||
|
uniform mat3 projectionMatrix;
|
||
|
|
||
|
varying vec2 vTextureCoord;
|
||
|
|
||
|
void main(void){
|
||
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
||
|
vTextureCoord = aTextureCoord;
|
||
|
}
|
||
|
`,yl=0,pr={},tr=function(){function r(t,e,i){i===void 0&&(i="pixi-shader"),this.id=yl++,this.vertexSrc=t||r.defaultVertexSrc,this.fragmentSrc=e||r.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.vertexSrc.substring(0,8)!=="#version"&&(i=i.replace(/\s+/g,"-"),pr[i]?(pr[i]++,i+="-"+pr[i]):pr[i]=1,this.vertexSrc="#define SHADER_NAME "+i+`
|
||
|
`+this.vertexSrc,this.fragmentSrc="#define SHADER_NAME "+i+`
|
||
|
`+this.fragmentSrc,this.vertexSrc=is(this.vertexSrc,P.PRECISION_VERTEX,pt.HIGH),this.fragmentSrc=is(this.fragmentSrc,P.PRECISION_FRAGMENT,hl())),this.glPrograms={},this.syncUniforms=null}return Object.defineProperty(r,"defaultVertexSrc",{get:function(){return gl},enumerable:!1,configurable:!0}),Object.defineProperty(r,"defaultFragmentSrc",{get:function(){return ml},enumerable:!1,configurable:!0}),r.from=function(t,e,i){var n=t+e,s=$n[n];return s||($n[n]=s=new r(t,e,i)),s},r}(),zr=function(){function r(t,e){this.uniformBindCount=0,this.program=t,e?e instanceof ve?this.uniformGroup=e:this.uniformGroup=new ve(e):this.uniformGroup=new ve({}),this.disposeRunner=new ot("disposeShader")}return r.prototype.checkUniformExists=function(t,e){if(e.uniforms[t])return!0;for(var i in e.uniforms){var n=e.uniforms[i];if(n.group&&this.checkUniformExists(t,n))return!0}return!1},r.prototype.destroy=function(){this.uniformGroup=null,this.disposeRunner.emit(this),this.disposeRunner.destroy()},Object.defineProperty(r.prototype,"uniforms",{get:function(){return this.uniformGroup.uniforms},enumerable:!1,configurable:!0}),r.from=function(t,e,i){var n=tr.from(t,e);return new r(n,i)},r}(),ni=0,si=1,ai=2,oi=3,hi=4,ui=5,er=function(){function r(){this.data=0,this.blendMode=B.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}return Object.defineProperty(r.prototype,"blend",{get:function(){return!!(this.data&1<<ni)},set:function(t){!!(this.data&1<<ni)!==t&&(this.data^=1<<ni)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"offsets",{get:function(){return!!(this.data&1<<si)},set:function(t){!!(this.data&1<<si)!==t&&(this.data^=1<<si)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"culling",{get:function(){return!!(this.data&1<<ai)},set:function(t){!!(this.data&1<<ai)!==t&&(this.data^=1<<ai)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"depthTest",{get:function(){return!!(this.data&1<<oi)},set:function(t){!!(this.data&1<<oi)!==t&&(this.data^=1<<oi)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"depthMask",{get:function(){return!!(this.data&1<<ui)},set:function(t){!!(this.data&1<<ui)!==t&&(this.data^=1<<ui)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"clockwiseFrontFace",{get:function(){return!!(this.data&1<<hi)},set:function(t){!!(this.data&1<<hi)!==t&&(this.data^=1<<hi)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"blendMode",{get:function(){return this._blendMode},set:function(t){this.blend=t!==B.NONE,this._blendMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"polygonOffset",{get:function(){return this._polygonOffset},set:function(t){this.offsets=!!t,this._polygonOffset=t},enumerable:!1,configurable:!0}),r.prototype.toString=function(){return"[@pixi/core:State "+("blendMode="+this.blendMode+" ")+("clockwiseFrontFace="+this.clockwiseFrontFace+" ")+("culling="+this.culling+" ")+("depthMask="+this.depthMask+" ")+("polygonOffset="+this.polygonOffset)+"]"},r.for2d=function(){var t=new r;return t.depthTest=!1,t.blend=!0,t},r}(),bl=`varying vec2 vTextureCoord;
|
||
|
|
||
|
uniform sampler2D uSampler;
|
||
|
|
||
|
void main(void){
|
||
|
gl_FragColor = texture2D(uSampler, vTextureCoord);
|
||
|
}
|
||
|
`,xl=`attribute vec2 aVertexPosition;
|
||
|
|
||
|
uniform mat3 projectionMatrix;
|
||
|
|
||
|
varying vec2 vTextureCoord;
|
||
|
|
||
|
uniform vec4 inputSize;
|
||
|
uniform vec4 outputFrame;
|
||
|
|
||
|
vec4 filterVertexPosition( void )
|
||
|
{
|
||
|
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
|
||
|
|
||
|
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
|
||
|
}
|
||
|
|
||
|
vec2 filterTextureCoord( void )
|
||
|
{
|
||
|
return aVertexPosition * (outputFrame.zw * inputSize.zw);
|
||
|
}
|
||
|
|
||
|
void main(void)
|
||
|
{
|
||
|
gl_Position = filterVertexPosition();
|
||
|
vTextureCoord = filterTextureCoord();
|
||
|
}
|
||
|
`,El=function(r){Z(t,r);function t(e,i,n){var s=this,a=tr.from(e||t.defaultVertexSrc,i||t.defaultFragmentSrc);return s=r.call(this,a,n)||this,s.padding=0,s.resolution=P.FILTER_RESOLUTION,s.multisample=P.FILTER_MULTISAMPLE,s.enabled=!0,s.autoFit=!0,s.state=new er,s}return t.prototype.apply=function(e,i,n,s,a){e.applyFilter(this,i,n,s)},Object.defineProperty(t.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(e){this.state.blendMode=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resolution",{get:function(){return this._resolution},set:function(e){this._resolution=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultVertexSrc",{get:function(){return xl},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultFragmentSrc",{get:function(){return bl},enumerable:!1,configurable:!0}),t}(zr),Tl=`attribute vec2 aVertexPosition;
|
||
|
attribute vec2 aTextureCoord;
|
||
|
|
||
|
uniform mat3 projectionMatrix;
|
||
|
uniform mat3 otherMatrix;
|
||
|
|
||
|
varying vec2 vMaskCoord;
|
||
|
varying vec2 vTextureCoord;
|
||
|
|
||
|
void main(void)
|
||
|
{
|
||
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
||
|
|
||
|
vTextureCoord = aTextureCoord;
|
||
|
vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;
|
||
|
}
|
||
|
`,wl=`varying vec2 vMaskCoord;
|
||
|
varying vec2 vTextureCoord;
|
||
|
|
||
|
uniform sampler2D uSampler;
|
||
|
uniform sampler2D mask;
|
||
|
uniform float alpha;
|
||
|
uniform float npmAlpha;
|
||
|
uniform vec4 maskClamp;
|
||
|
|
||
|
void main(void)
|
||
|
{
|
||
|
float clip = step(3.5,
|
||
|
step(maskClamp.x, vMaskCoord.x) +
|
||
|
step(maskClamp.y, vMaskCoord.y) +
|
||
|
step(vMaskCoord.x, maskClamp.z) +
|
||
|
step(vMaskCoord.y, maskClamp.w));
|
||
|
|
||
|
vec4 original = texture2D(uSampler, vTextureCoord);
|
||
|
vec4 masky = texture2D(mask, vMaskCoord);
|
||
|
float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);
|
||
|
|
||
|
original *= (alphaMul * masky.r * alpha * clip);
|
||
|
|
||
|
gl_FragColor = original;
|
||
|
}
|
||
|
`,ss=new dt,Zs=function(){function r(t,e){this._texture=t,this.mapCoord=new dt,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=typeof e=="undefined"?.5:e,this.isSimple=!1}return Object.defineProperty(r.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture=t,this._textureID=-1},enumerable:!1,configurable:!0}),r.prototype.multiplyUvs=function(t,e){e===void 0&&(e=t);for(var i=this.mapCoord,n=0;n<t.length;n+=2){var s=t[n],a=t[n+1];e[n]=s*i.a+a*i.c+i.tx,e[n+1]=s*i.b+a*i.d+i.ty}return e},r.prototype.update=function(t){var e=this._texture;if(!e||!e.valid||!t&&this._textureID===e._updateID)return!1;this._textureID=e._updateID,this._updateID++;var i=e._uvs;this.mapCoord.set(i.x1-i.x0,i.y1-i.y0,i.x3-i.x0,i.y3-i.y0,i.x0,i.y0);var n=e.orig,s=e.trim;s&&(ss.set(n.width/s.width,0,0,n.height/s.height,-s.x/s.width,-s.y/s.height),this.mapCoord.append(ss));var a=e.baseTexture,o=this.uClampFrame,h=this.clampMargin/a.resolution,u=this.clampOffset;return o[0]=(e._frame.x+h+u)/a.width,o[1]=(e._frame.y+h+u)/a.height,o[2]=(e._frame.x+e._frame.width-h+u)/a.width,o[3]=(e._frame.y+e._frame.height-h+u)/a.height,this.uClampOffset[0]=u/a.realWidth,this.uClampOffset[1]=u/a.realHeight,this.isSimple=e._frame.width===a.width&&e._frame.height===a.height&&e.rotate===0,!0},r}(),Al=function(r){Z(t,r);function t(e,i,n){var s=this,a=null;return typeof e!="string"&&i===void 0&&n===void 0&&(a=e,e=void 0,i=void 0,n=void 0),s=r.call(this,e||Tl,i||wl,n)||this,s.maskSprite=a,s.maskMatrix=new dt,s}return Object.defineProperty(t.prototype,"maskSprite",{get:function(){return this._maskSprite},set:function(e){this._maskSprite=e,this._maskSprite&&(this._maskSprite.renderable=!1)},enumerable:!1,configurable:!0}),t.prototype.apply=function(e,i,n,s){var a=this._maskSprite,o=a._texture;!o.valid||(o.uvMatrix||(o.uvMatrix=new Zs(o,0)),o.uvMatrix.update(),this.uniforms.npmAlpha=o.baseTexture.alphaMode?0:1,this.uniforms.mask=o,this.uniforms.otherMatrix=e.calculateSpriteMatrix(this.maskMatrix,a).prepend(o.uvMatrix.mapCoord),this.uniforms.alpha=a.worldAlpha,this.uniforms.maskClamp=o.uvMatrix.uClampFrame,e.applyFilter(this,i,n,s))},t}(El),Sl=function(){function r(t){this.renderer=t,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}return r.prototype.setMaskStack=function(t){this.maskStack=t,this.renderer.scissor.setMaskStack(t),this.renderer.stencil.setMaskStack(t)},r.prototype.push=function(t,e){var i=e;if(!i.isMaskData){var n=this.maskDataPool.pop()||new sl;n.pooled=!0,n.maskObject=e,i=n}var s=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(i.copyCountersOrReset(s),i._colorMask=s?s._colorMask:15,i.autoDetect&&this.detect(i),i._target=t,i.type!==nt.SPRITE&&this.maskStack.push(i),i.enabled)switch(i.type){case nt.SCISSOR:this.renderer.scissor.push(i);break;case nt.STENCIL:this.renderer.stencil.push(i);break;case nt.SPRITE:i.copyCountersOrReset(null),this.pushSpriteMask(i);break;case nt.COLOR:this.pushColorMask(i);break}i.type===nt.SPRITE&&this.maskStack.push(i)},r.prototype.pop=function(t){var e=this.maskStack.pop();if(!(!e||e._target!==t)){if(e.enabled)switch(e.type){case nt.SCISSOR:this.renderer.scissor.pop(e);break;case nt.STENCIL:this.renderer.stencil.pop(e.maskObject);break;case nt.SPRITE:this.popSpriteMask(e);break;case nt.COLOR:this.popColorMask(e);break}if(e.reset(),e.pooled&&this.maskDataPool.push(e),this.maskStack.length!==0){var i=this.maskStack[this.maskStack.length-1];i.type===nt.SPRITE&&i._filters&&(i._filters[0].maskSprite=i.maskObject)}}},r.prototype.detect=function(t){var e=t.maskObject;e?e.isSprite?t.type=nt.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(t)?t.type=nt.SCISSOR:t.type=nt.STENCIL:t.type=nt.COLOR},r.prototype.pushSpriteMask=function(t){var e,i,n=t.maskObject,s=t._target,a=t._filters;a||(a=this.alphaMaskPool[this.alphaMaskIndex],a||(a=this.alphaMaskPool[this.alphaMaskIndex]=[new Al]));var o=this.renderer,h=o.renderTexture,u,l;if(h
|
||
|
data[offset] = v;
|
||
|
`,vec2:`
|
||
|
data[offset] = v[0];
|
||
|
data[offset+1] = v[1];
|
||
|
`,vec3:`
|
||
|
data[offset] = v[0];
|
||
|
data[offset+1] = v[1];
|
||
|
data[offset+2] = v[2];
|
||
|
|
||
|
`,vec4:`
|
||
|
data[offset] = v[0];
|
||
|
data[offset+1] = v[1];
|
||
|
data[offset+2] = v[2];
|
||
|
data[offset+3] = v[3];
|
||
|
`,mat2:`
|
||
|
data[offset] = v[0];
|
||
|
data[offset+1] = v[1];
|
||
|
|
||
|
data[offset+4] = v[2];
|
||
|
data[offset+5] = v[3];
|
||
|
`,mat3:`
|
||
|
data[offset] = v[0];
|
||
|
data[offset+1] = v[1];
|
||
|
data[offset+2] = v[2];
|
||
|
|
||
|
data[offset + 4] = v[3];
|
||
|
data[offset + 5] = v[4];
|
||
|
data[offset + 6] = v[5];
|
||
|
|
||
|
data[offset + 8] = v[6];
|
||
|
data[offset + 9] = v[7];
|
||
|
data[offset + 10] = v[8];
|
||
|
`,mat4:`
|
||
|
for(var i = 0; i < 16; i++)
|
||
|
{
|
||
|
data[offset + i] = v[i];
|
||
|
}
|
||
|
`},Js={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:16*2,mat3:16*3,mat4:16*4};function Ml(r){for(var t=r.map(function(h){return{data:h,offset:0,dataLen:0,dirty:0}}),e=0,i=0,n=0,s=0;s<t.length;s++){var a=t[s];if(e=Js[a.data.type],a.data.size>1&&(e=Math.max(e,16)*a.data.size),a.dataLen=e,i%e!==0&&i<16){var o=i%e%16;i+=o,n+=o}i+e>16?(n=Math.ceil(n/16)*16,a.offset=n,n+=e,i=e):(a.offset=n,i+=e,n+=e)}return n=Math.ceil(n/16)*16,{uboElements:t,size:n}}function Ll(r,t){var e=[];for(var i in r)t[i]&&e.push(t[i]);return e.sort(function(n,s){return n.index-s.index}),e}function Nl(r,t){if(!r.autoManage)return{size:0,syncFunc:Ol};for(var e=Ll(r.uniforms,t),i=Ml(e),n=i.uboElements,s=i.size,a=[`
|
||
|
var v = null;
|
||
|
var v2 = null;
|
||
|
var cv = null;
|
||
|
var t = 0;
|
||
|
var gl = renderer.gl
|
||
|
var index = 0;
|
||
|
var data = buffer.data;
|
||
|
`],o=0;o<n.length;o++){for(var h=n[o],u=r.uniforms[h.data.name],l=h.data.name,f=!1,c=0;c<Oe.length;c++){var d=Oe[c];if(d.codeUbo&&d.test(h.data,u)){a.push("offset = "+h.offset/4+";",Oe[c].codeUbo(h.data.name,u)),f=!0;break}}if(!f)if(h.data.size>1){var p=$s(h.data.type),v=Math.max(Js[h.data.type]/16,1),_=p/v,m=(4-_%4)%4;a.push(`
|
||
|
cv = ud.`+l+`.value;
|
||
|
v = uv.`+l+`;
|
||
|
offset = `+h.offset/4+`;
|
||
|
|
||
|
t = 0;
|
||
|
|
||
|
for(var i=0; i < `+h.data.size*v+`; i++)
|
||
|
{
|
||
|
for(var j = 0; j < `+_+`; j++)
|
||
|
{
|
||
|
data[offset++] = v[t++];
|
||
|
}
|
||
|
offset += `+m+`;
|
||
|
}
|
||
|
|
||
|
`)}else{var x=Bl[h.data.type];a.push(`
|
||
|
cv = ud.`+l+`.value;
|
||
|
v = uv.`+l+`;
|
||
|
offset = `+h.offset/4+`;
|
||
|
`+x+`;
|
||
|
`)}}return a.push(`
|
||
|
renderer.buffer.update(buffer);
|
||
|
`),{size:s,syncFunc:new Function("ud","uv","renderer","syncData","buffer",a.join(`
|
||
|
`))}}var Fl=function(){function r(t,e){this.program=t,this.uniformData=e,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}return r.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null},r}();function Dl(r,t){for(var e={},i=t.getProgramParameter(r,t.ACTIVE_ATTRIBUTES),n=0;n<i;n++){var s=t.getActiveAttrib(r,n);if(s.name.indexOf("gl_")!==0){var a=Ks(t,s.type),o={type:a,name:s.name,size:$s(a),location:t.getAttribLocation(r,s.name)};e[s.name]=o}}return e}function Ul(r,t){for(var e={},i=t.getProgramParameter(r,t.ACTIVE_UNIFORMS),n=0;n<i;n++){var s=t.getActiveUniform(r,n),a=s.name.replace(/\[.*?\]$/,""),o=!!s.name.match(/\[.*?\]$/),h=Ks(t,s.type);e[a]={name:a,index:n,type:h,size:s.size,isArray:o,value:zs(h,s.size)}}return e}function Gl(r,t){var e=es(r,r.VERTEX_SHADER,t.vertexSrc),i=es(r,r.FRAGMENT_SHADER,t.fragmentSrc),n=r.createProgram();if(r.attachShader(n,e),r.attachShader(n,i),r.linkProgram(n),r.getProgramParameter(n,r.LINK_STATUS)||al(r,n,e,i),t.attributeData=Dl(n,r),t.uniformData=Ul(n,r),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(t.vertexSrc)){var s=Object.keys(t.attributeData);s.sort(function(l,f){return l>f?1:-1});for(var a=0;a<s.length;a++)t.attributeData[s[a]].location=a,r.bindAttribLocation(n,a,s[a]);r.linkProgram(n)}r.deleteShader(e),r.deleteShader(i);var o={};for(var a in t.uniformData){var h=t.uniformData[a];o[a]={location:r.getUniformLocation(n,a),value:zs(h.type,h.size)}}var u=new Fl(n,o);return u}var kl=0,vr={textureCount:0,uboCount:0},Xl=function(){function r(t){this.destroyed=!1,this.renderer=t,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=kl++}return r.prototype.systemCheck=function(){if(!_l())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")},r.prototype.contextChange=function(t){this.gl=t,this.reset()},r.prototype.bind=function(t,e){t.disposeRunner.add(this),t.uniforms.globals=this.renderer.globalUniforms;var i=t.program,n=i.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(t);return this.shader=t,this.program!==i&&(this.program=i,this.gl.useProgram(n.program)),e||(vr.textureCount=0,vr.uboCount=0,this.syncUniformGroup(t.uniformGroup,vr)),n},r.prototype.setUniforms=function(t){var e=this.shader.program,i=e.glPrograms[this.renderer.CONTEXT_UID];e.syncUniforms(i.uniformData,t,this.renderer)},r.prototype.syncUniformGroup=function(t,e){var i=this.getGlProgram();(!t.static||t.dirtyId!==i.uniformDirtyGroups[t.id])&&(i.uniformDirtyGroups[t.id]=t.dirtyId,this.syncUniforms(t,i,e))},r.prototype.syncUniforms=function(t,e,i){var n=t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t);n(e.uniformData,t.uniforms,this.renderer,i)},r.prototype.createSyncGroups=function(t){var e=this.getSignature(t,this.shader.program.uniformData,"u");return this.cache[e]||(this.cache[e]=cl(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[e],t.syncUniforms[this.shader.program.id]},r.prototype.syncUniformBufferGroup=function(t,e){var i=this.getGlProgram();if(!t.static||t.dirtyId!==0||!i.uniformGroups[t.id]){t.dirtyId=0;var n=i.uniformGroups[t.id]||this.createSyncBufferGroup(t,i,e);t.buffer.update(),n(i.uniformData,t.uniforms,this.renderer,vr,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,i.uniformBufferBindings[e])},r.prototype.createSyncBufferGroup=function(t,e,i){var n=this.renderer.gl;this.renderer.buffer.bind(t.buffer);var s=this.gl.getUniformBlockIndex(e.program,i);e.uniformBufferBindings[i]=this.shader.uniformBindCount,n.uniformBlockBinding(e.program,s,this.shader.uniformBindCount),this.shader.uniformBindCount++;var a=this.getSignature(t,this.shader.program.uniformData,"ubo"),o=this._uboCache[a];if(o||(o=this._uboCache[a]=Nl(t,this.shader.program.uniformData)),t.autoManage){var h=new Float32Array(o.size/4);t.buffer.update(h)}return e.uniformGroups[t.id]=o.syncFunc,e.uniformGroups[t.id]},r.prototype.g
|
||
|
`,e+=`
|
||
|
`;for(var i=0;i<t;i++)i>0&&(e+=`
|
||
|
else `),i<t-1&&(e+="if(vTextureId < "+i+".5)"),e+=`
|
||
|
{`,e+=`
|
||
|
color = texture2D(uSamplers[`+i+"], vTextureCoord);",e+=`
|
||
|
}`;return e+=`
|
||
|
`,e+=`
|
||
|
`,e},r}(),ea=function(r){Z(t,r);function t(e){e===void 0&&(e=!1);var i=r.call(this)||this;return i._buffer=new ft(null,e,!1),i._indexBuffer=new ft(null,e,!0),i.addAttribute("aVertexPosition",i._buffer,2,!1,M.FLOAT).addAttribute("aTextureCoord",i._buffer,2,!1,M.FLOAT).addAttribute("aColor",i._buffer,4,!0,M.UNSIGNED_BYTE).addAttribute("aTextureId",i._buffer,1,!0,M.FLOAT).addIndex(i._indexBuffer),i}return t}(Yr),hs=`precision highp float;
|
||
|
attribute vec2 aVertexPosition;
|
||
|
attribute vec2 aTextureCoord;
|
||
|
attribute vec4 aColor;
|
||
|
attribute float aTextureId;
|
||
|
|
||
|
uniform mat3 projectionMatrix;
|
||
|
uniform mat3 translationMatrix;
|
||
|
uniform vec4 tint;
|
||
|
|
||
|
varying vec2 vTextureCoord;
|
||
|
varying vec4 vColor;
|
||
|
varying float vTextureId;
|
||
|
|
||
|
void main(void){
|
||
|
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
||
|
|
||
|
vTextureCoord = aTextureCoord;
|
||
|
vTextureId = aTextureId;
|
||
|
vColor = aColor * tint;
|
||
|
}
|
||
|
`,us=`varying vec2 vTextureCoord;
|
||
|
varying vec4 vColor;
|
||
|
varying float vTextureId;
|
||
|
uniform sampler2D uSamplers[%count%];
|
||
|
|
||
|
void main(void){
|
||
|
vec4 color;
|
||
|
%forloop%
|
||
|
gl_FragColor = color * vColor;
|
||
|
}
|
||
|
`,af=function(){function r(){}return r.create=function(t){var e=Object.assign({vertex:hs,fragment:us,geometryClass:ea,vertexSize:6},t),i=e.vertex,n=e.fragment,s=e.vertexSize,a=e.geometryClass;return function(o){Z(h,o);function h(u){var l=o.call(this,u)||this;return l.shaderGenerator=new sf(i,n),l.geometryClass=a,l.vertexSize=s,l}return h}(nf)},Object.defineProperty(r,"defaultVertexSrc",{get:function(){return hs},enumerable:!1,configurable:!0}),Object.defineProperty(r,"defaultFragmentTemplate",{get:function(){return us},enumerable:!1,configurable:!0}),r}(),of=af.create();Object.assign(of,{extension:{name:"batch",type:F.RendererPlugin}});/*!
|
||
|
* @pixi/display - v6.5.8
|
||
|
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
||
|
*
|
||
|
* @pixi/display is licensed under the MIT License.
|
||
|
* http://www.opensource.org/licenses/mit-license
|
||
|
*/P.SORTABLE_CHILDREN=!1;var Lr=function(){function r(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return r.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},r.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},r.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?W.EMPTY:(t=t||new W(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},r.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)},r.prototype.addPointMatrix=function(t,e){var i=t.a,n=t.b,s=t.c,a=t.d,o=t.tx,h=t.ty,u=i*e.x+s*e.y+o,l=n*e.x+a*e.y+h;this.minX=Math.min(this.minX,u),this.maxX=Math.max(this.maxX,u),this.minY=Math.min(this.minY,l),this.maxY=Math.max(this.maxY,l)},r.prototype.addQuad=function(t){var e=this.minX,i=this.minY,n=this.maxX,s=this.maxY,a=t[0],o=t[1];e=a<e?a:e,i=o<i?o:i,n=a>n?a:n,s=o>s?o:s,a=t[2],o=t[3],e=a<e?a:e,i=o<i?o:i,n=a>n?a:n,s=o>s?o:s,a=t[4],o=t[5],e=a<e?a:e,i=o<i?o:i,n=a>n?a:n,s=o>s?o:s,a=t[6],o=t[7],e=a<e?a:e,i=o<i?o:i,n=a>n?a:n,s=o>s?o:s,this.minX=e,this.minY=i,this.maxX=n,this.maxY=s},r.prototype.addFrame=function(t,e,i,n,s){this.addFrameMatrix(t.worldTransform,e,i,n,s)},r.prototype.addFrameMatrix=function(t,e,i,n,s){var a=t.a,o=t.b,h=t.c,u=t.d,l=t.tx,f=t.ty,c=this.minX,d=this.minY,p=this.maxX,v=this.maxY,_=a*e+h*i+l,m=o*e+u*i+f;c=_<c?_:c,d=m<d?m:d,p=_>p?_:p,v=m>v?m:v,_=a*n+h*i+l,m=o*n+u*i+f,c=_<c?_:c,d=m<d?m:d,p=_>p?_:p,v=m>v?m:v,_=a*e+h*s+l,m=o*e+u*s+f,c=_<c?_:c,d=m<d?m:d,p=_>p?_:p,v=m>v?m:v,_=a*n+h*s+l,m=o*n+u*s+f,c=_<c?_:c,d=m<d?m:d,p=_>p?_:p,v=m>v?m:v,this.minX=c,this.minY=d,this.maxX=p,this.maxY=v},r.prototype.addVertexData=function(t,e,i){for(var n=this.minX,s=this.minY,a=this.maxX,o=this.maxY,h=e;h<i;h+=2){var u=t[h],l=t[h+1];n=u<n?u:n,s=l<s?l:s,a=u>a?u:a,o=l>o?l:o}this.minX=n,this.minY=s,this.maxX=a,this.maxY=o},r.prototype.addVertices=function(t,e,i,n){this.addVerticesMatrix(t.worldTransform,e,i,n)},r.prototype.addVerticesMatrix=function(t,e,i,n,s,a){s===void 0&&(s=0),a===void 0&&(a=s);for(var o=t.a,h=t.b,u=t.c,l=t.d,f=t.tx,c=t.ty,d=this.minX,p=this.minY,v=this.maxX,_=this.maxY,m=i;m<n;m+=2){var x=e[m],E=e[m+1],w=o*x+u*E+f,y=l*E+h*x+c;d=Math.min(d,w-s),v=Math.max(v,w+s),p=Math.min(p,y-a),_=Math.max(_,y+a)}this.minX=d,this.minY=p,this.maxX=v,this.maxY=_},r.prototype.addBounds=function(t){var e=this.minX,i=this.minY,n=this.maxX,s=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>s?t.maxY:s},r.prototype.addBoundsMask=function(t,e){var i=t.minX>e.minX?t.minX:e.minX,n=t.minY>e.minY?t.minY:e.minY,s=t.maxX<e.maxX?t.maxX:e.maxX,a=t.maxY<e.maxY?t.maxY:e.maxY;if(i<=s&&n<=a){var o=this.minX,h=this.minY,u=this.maxX,l=this.maxY;this.minX=i<o?i:o,this.minY=n<h?n:h,this.maxX=s>u?s:u,this.maxY=a>l?a:l}},r.prototype.addBoundsMatrix=function(t,e){this.addFrameMatrix(e,t.minX,t.minY,t.maxX,t.maxY)},r.prototype.addBoundsArea=function(t,e){var i=t.minX>e.x?t.minX:e.x,n=t.minY>e.y?t.minY:e.y,s=t.maxX<e.x+e.width?t.maxX:e.x+e.width,a=t.maxY<e.y+e.height?t.maxY:e.y+e.height;if(i<=s&&n<=a){var o=this.minX,h=this.minY,u=this.maxX,l=this.maxY;this.minX=i<o?i:o,this.minY=n<h?n:h,this.maxX=s>u?s:u,this.maxY=a>l?a:l}},r.prototype.pad=function(t,e){t===void 0&&(t=0),e===void 0&&(e=t),this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=e,this.maxY+=e)},r.prototype.addFramePad=function(t,e,i,n,s,a){t-=s,e-=a,i+=s,n+=a,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},r}();/*! *****************************************************************************
|
||
|
Copyright (c) Microsoft Corporation.
|
||
|
|
||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
purpose with or without fee is hereby granted.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
***************************************************************************** */var Ui=function(r,t){return Ui=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var n in i)i.hasOwnProperty(n)&&(e[n]=i[n])},Ui(r,t)};function Ki(r,t){Ui(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var Nr=function(r){Ki(t,r);function t(){var e=r.call(this)||this;return e.tempDisplayObjectParent=null,e.transform=new Mu,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 Lr,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 t.mixin=function(e){for(var i=Object.keys(e),n=0;n<i.length;++n){var s=i[n];Object.defineProperty(t.prototype,s,Object.getOwnPropertyDescriptor(e,s))}},Object.defineProperty(t.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!1,configurable:!0}),t.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},t.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha},t.prototype.getBounds=function(e,i){return e||(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 W),i=this._boundsRect),this._bounds.getRectangle(i)},t.prototype.getLocalBounds=function(e){e||(this._localBoundsRect||(this._localBoundsRect=new W),e=this._localBoundsRect),this._localBounds||(this._localBounds=new Lr);var i=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;var s=this._bounds,a=this._boundsID;this._bounds=this._localBounds;var o=this.getBounds(!1,e);return this.parent=n,this.transform=i,this._bounds=s,this._bounds.updateID+=this._boundsID-a,o},t.prototype.toGlobal=function(e,i,n){return n===void 0&&(n=!1),n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(e,i)},t.prototype.toLocal=function(e,i,n,s){return i&&(e=i.toGlobal(e,n,s)),s||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(e,n)},t.prototype.setParent=function(e){if(!e||!e.addChild)throw new Error("setParent: Argument must be a Container");return e.addChild(this),e},t.prototype.setTransform=function(e,i,n,s,a,o,h,u,l){return e===void 0&&(e=0),i===void 0&&(i=0),n===void 0&&(n=1),s===void 0&&(s=1),a===void 0&&(a=0),o===void 0&&(o=0),h===void 0&&(h=0),u===void 0&&(u=0),l===void 0&&(l=0),this.position.x=e,this.position.y=i,this.scale.x=n||1,this.scale.y=s||1,this.rotation=a,this.skew.x=o,this.skew.y=h,this.pivot.x=u,this.pivot.y=l,this},t.prototype.destroy=function(e){this.parent&&this.parent.removeChild(this),this._destroyed=!0,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.emit("destroyed"),this.removeAllListeners()},Object.defineProperty(t.prototype,"_tempDisplayObjectParent",{get:function(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new hf),this.tempDisplayObjectParent},enumerable:!1,configurable:!0}),t.prototype.enableTempParen
|
||
|
* @pixi/sprite - v6.5.8
|
||
|
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
||
|
*
|
||
|
* @pixi/sprite is licensed under the MIT License.
|
||
|
* http://www.opensource.org/licenses/mit-license
|
||
|
*//*! *****************************************************************************
|
||
|
Copyright (c) Microsoft Corporation.
|
||
|
|
||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
purpose with or without fee is hereby granted.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
***************************************************************************** */var Gi=function(r,t){return Gi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var n in i)i.hasOwnProperty(n)&&(e[n]=i[n])},Gi(r,t)};function lf(r,t){Gi(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var De=new q,ff=new Uint16Array([0,1,2,0,2,3]),ra=function(r){lf(t,r);function t(e){var i=r.call(this)||this;return i._anchor=new Ie(i._onAnchorUpdate,i,e?e.defaultAnchor.x:0,e?e.defaultAnchor.y:0),i._texture=null,i._width=0,i._height=0,i._tint=null,i._tintRGB=null,i.tint=16777215,i.blendMode=B.NORMAL,i._cachedTint=16777215,i.uvs=null,i.texture=e||k.EMPTY,i.vertexData=new Float32Array(8),i.vertexTrimmedData=null,i._transformID=-1,i._textureID=-1,i._transformTrimmedID=-1,i._textureTrimmedID=-1,i.indices=ff,i.pluginName="batch",i.isSprite=!0,i._roundPixels=P.ROUND_PIXELS,i}return t.prototype._onTextureUpdate=function(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=Ce(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=Ce(this.scale.y)*this._height/this._texture.orig.height)},t.prototype._onAnchorUpdate=function(){this._transformID=-1,this._transformTrimmedID=-1},t.prototype.calculateVertices=function(){var e=this._texture;if(!(this._transformID===this.transform._worldID&&this._textureID===e._updateID)){this._textureID!==e._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=e._updateID;var i=this.transform.worldTransform,n=i.a,s=i.b,a=i.c,o=i.d,h=i.tx,u=i.ty,l=this.vertexData,f=e.trim,c=e.orig,d=this._anchor,p=0,v=0,_=0,m=0;if(f?(v=f.x-d._x*c.width,p=v+f.width,m=f.y-d._y*c.height,_=m+f.height):(v=-d._x*c.width,p=v+c.width,m=-d._y*c.height,_=m+c.height),l[0]=n*v+a*m+h,l[1]=o*m+s*v+u,l[2]=n*p+a*m+h,l[3]=o*m+s*p+u,l[4]=n*p+a*_+h,l[5]=o*_+s*p+u,l[6]=n*v+a*_+h,l[7]=o*_+s*v+u,this._roundPixels)for(var x=P.RESOLUTION,E=0;E<l.length;++E)l[E]=Math.round((l[E]*x|0)/x)}},t.prototype.calculateTrimmedVertices=function(){if(!this.vertexTrimmedData)this.vertexTrimmedData=new Float32Array(8);else if(this._transformTrimmedID===this.transform._worldID&&this._textureTrimmedID===this._texture._updateID)return;this._transformTrimmedID=this.transform._worldID,this._textureTrimmedID=this._texture._updateID;var e=this._texture,i=this.vertexTrimmedData,n=e.orig,s=this._anchor,a=this.transform.worldTransform,o=a.a,h=a.b,u=a.c,l=a.d,f=a.tx,c=a.ty,d=-s._x*n.width,p=d+n.width,v=-s._y*n.height,_=v+n.height;i[0]=o*d+u*v+f,i[1]=l*v+h*d+c,i[2]=o*p+u*v+f,i[3]=l*v+h*p+c,i[4]=o*p+u*_+f,i[5]=l*_+h*p+c,i[6]=o*d+u*_+f,i[7]=l*_+h*d+c},t.prototype._render=function(e){this.calculateVertices(),e.batch.setObjectRenderer(e.plugins[this.pluginName]),e.plugins[this.pluginName].render(this)},t.prototype._calculateBounds=function(){var e=this._texture.trim,i=this._texture.orig;!e||e.width===i.width&&e.height===i.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))},t.prototype.getLocalBounds=function(e){return this.children.length===0?(this._localBounds||(this._localBounds=new Lr),this._localBounds.minX=this._texture.orig.width*-this._anchor._x,this._localBounds.minY=this._texture.orig.height*-this._anchor._y,this._localBounds.maxX=this._texture.orig.width*(1-this._anchor._x),this._localBounds.maxY=this._texture.orig.height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new W),e=this._localBoundsRect),this._localBounds.getRectangle(e)):r.prototype.getLocalBounds.call(this,e)},t.prototype.containsPoint=function(e){this.worldTransform.applyInverse(e,De);var i=this._texture.orig.width,n=this._texture.orig.height,s=-i*this.anchor.x,a=0;return De.x>=s&&De.x<s+i&&(a=-n*this.anchor.y,De.y>=a&&De.y<a+n)},t.prototype.destroy=function(e){r.prototype.destroy.call(this,e),this._texture.off("update",this._onTextureUpdate,this),this._anchor=nu
|
||
|
* @pixi/particle-emitter - v5.0.8
|
||
|
* Compiled Mon, 28 Nov 2022 04:01:38 UTC
|
||
|
*
|
||
|
* @pixi/particle-emitter is licensed under the MIT License.
|
||
|
* http://www.opensource.org/licenses/mit-license
|
||
|
*/class Ot{constructor(t,e,i){this.value=t,this.time=e,this.next=null,this.isStepped=!1,i?this.ease=typeof i=="function"?i:sa(i):this.ease=null}static createList(t){if("list"in t){const i=t.list;let n;const{value:s,time:a}=i[0],o=n=new Ot(typeof s=="string"?_r(s):s,a,t.ease);if(i.length>2||i.length===2&&i[1].value!==s)for(let h=1;h<i.length;++h){const{value:u,time:l}=i[h];n.next=new Ot(typeof u=="string"?_r(u):u,l),n=n.next}return o.isStepped=!!t.isStepped,o}const e=new Ot(typeof t.start=="string"?_r(t.start):t.start,0);return t.end!==t.start&&(e.next=new Ot(typeof t.end=="string"?_r(t.end):t.end,1)),e}}let Ze=k.from;const Ct=Math.PI/180;function Vt(r,t){if(!r)return;const e=Math.sin(r),i=Math.cos(r),n=t.x*i-t.y*e,s=t.x*e+t.y*i;t.x=n,t.y=s}function qr(r,t,e){return r<<16|t<<8|e}function ia(r){return Math.sqrt(r.x*r.x+r.y*r.y)}function cf(r){const t=1/ia(r);r.x*=t,r.y*=t}function na(r,t){r.x*=t,r.y*=t}function _r(r,t){t||(t={}),r.charAt(0)==="#"?r=r.substr(1):r.indexOf("0x")===0&&(r=r.substr(2));let e;return r.length===8&&(e=r.substr(0,2),r=r.substr(2)),t.r=parseInt(r.substr(0,2),16),t.g=parseInt(r.substr(2,2),16),t.b=parseInt(r.substr(4,2),16),e&&(t.a=parseInt(e,16)),t}function sa(r){const t=r.length,e=1/t;return function(i){const n=t*i|0,s=(i-n*e)*t,a=r[n]||r[t-1];return a.s+s*(2*(1-s)*(a.cp-a.s)+s*(a.e-a.s))}}function df(r){return r?(r=r.toUpperCase().replace(/ /g,"_"),B[r]||B.NORMAL):B.NORMAL}class ci extends ra{constructor(t){super(),this.prevChild=this.nextChild=null,this.emitter=t,this.config={},this.anchor.x=this.anchor.y=.5,this.maxLife=0,this.age=0,this.agePercent=0,this.oneOverLife=0,this.next=null,this.prev=null,this.init=this.init,this.kill=this.kill}init(t){this.maxLife=t,this.age=this.agePercent=0,this.rotation=0,this.position.x=this.position.y=0,this.scale.x=this.scale.y=1,this.tint=16777215,this.alpha=1,this.oneOverLife=1/this.maxLife,this.visible=!0}kill(){this.emitter.recycle(this)}destroy(){this.parent&&this.parent.removeChild(this),this.emitter=this.next=this.prev=null,super.destroy()}}var K;(function(r){r[r.Spawn=0]="Spawn",r[r.Normal=2]="Normal",r[r.Late=5]="Late"})(K||(K={}));const di=Xt.shared,se=Symbol("Position particle per emitter position");class ${constructor(t,e){this.initBehaviors=[],this.updateBehaviors=[],this.recycleBehaviors=[],this.minLifetime=0,this.maxLifetime=0,this.customEase=null,this._frequency=1,this.spawnChance=1,this.maxParticles=1e3,this.emitterLifetime=-1,this.spawnPos=new q,this.particlesPerWave=1,this.rotation=0,this.ownerPos=new q,this._prevEmitterPos=new q,this._prevPosIsValid=!1,this._posChanged=!1,this._parent=null,this.addAtBack=!1,this.particleCount=0,this._emit=!1,this._spawnTimer=0,this._emitterLife=-1,this._activeParticlesFirst=null,this._activeParticlesLast=null,this._poolFirst=null,this._origConfig=null,this._autoUpdate=!1,this._destroyWhenComplete=!1,this._completeCallback=null,this.parent=t,e&&this.init(e),this.recycle=this.recycle,this.update=this.update,this.rotate=this.rotate,this.updateSpawnPos=this.updateSpawnPos,this.updateOwnerPos=this.updateOwnerPos}static registerBehavior(t){$.knownBehaviors[t.type]=t}get frequency(){return this._frequency}set frequency(t){typeof t=="number"&&t>0?this._frequency=t:this._frequency=1}get parent(){return this._parent}set parent(t){this.cleanup(),this._parent=t}init(t){if(!t)return;this.cleanup(),this._origConfig=t,this.minLifetime=t.lifetime.min,this.maxLifetime=t.lifetime.max,t.ease?this.customEase=typeof t.ease=="function"?t.ease:sa(t.ease):this.customEase=null,this.particlesPerWave=1,t.particlesPerWave&&t.particlesPerWave>1&&(this.particlesPerWave=t.particlesPerWave),this.frequency=t.frequency,this.spawnChance=typeof t.spawnChance=="number"&&t.spawnChance>0?t.spawnChance:1,this.emitterLifetime=t.emitterLifetime||-1,this.maxParticles=t.maxParticles>0?t.maxParticles:1e3,this.addAtBack=!!t.addAtBack,this.rotation=0,this.ownerPos.set(0),t.pos?this.spawnPos.copyFrom(t.pos):this.spawnPos.set(0),this._prevEmitterPos.copyFrom(this.spawnPos),this._prevPosIsValid=!1,this._spawnTimer=0,this.emit=t.emit===void 0?!0:!!t.emit,thi
|
||
|
* @pixi/app - v6.5.8
|
||
|
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
||
|
*
|
||
|
* @pixi/app is licensed under the MIT License.
|
||
|
* http://www.opensource.org/licenses/mit-license
|
||
|
*/var Ef=function(){function r(){}return r.init=function(t){var e=this;Object.defineProperty(this,"resizeTo",{set:function(i){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=i,i&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get:function(){return this._resizeTo}}),this.queueResize=function(){!e._resizeTo||(e.cancelResize(),e._resizeId=requestAnimationFrame(function(){return e.resize()}))},this.cancelResize=function(){e._resizeId&&(cancelAnimationFrame(e._resizeId),e._resizeId=null)},this.resize=function(){if(!!e._resizeTo){e.cancelResize();var i,n;if(e._resizeTo===globalThis.window)i=globalThis.innerWidth,n=globalThis.innerHeight;else{var s=e._resizeTo,a=s.clientWidth,o=s.clientHeight;i=a,n=o}e.renderer.resize(i,n)}},this._resizeId=null,this._resizeTo=null,this.resizeTo=t.resizeTo||null},r.destroy=function(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null},r.extension=F.Application,r}(),Tf=function(){function r(t){var e=this;this.stage=new me,t=Object.assign({forceCanvas:!1},t),this.renderer=rf(t),r._plugins.forEach(function(i){i.init.call(e,t)})}return r.registerPlugin=function(t){Mt("6.5.0","Application.registerPlugin() is deprecated, use extensions.add()"),At.add({type:F.Application,ref:t})},r.prototype.render=function(){this.renderer.render(this.stage)},Object.defineProperty(r.prototype,"view",{get:function(){return this.renderer.view},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"screen",{get:function(){return this.renderer.screen},enumerable:!1,configurable:!0}),r.prototype.destroy=function(t,e){var i=this,n=r._plugins.slice(0);n.reverse(),n.forEach(function(s){s.destroy.call(i)}),this.stage.destroy(e),this.stage=null,this.renderer.destroy(t),this.renderer=null},r._plugins=[],r}();At.handleByList(F.Application,Tf._plugins);At.add(Ef);/*!
|
||
|
* @pixi/loaders - v6.5.8
|
||
|
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
||
|
*
|
||
|
* @pixi/loaders is licensed under the MIT License.
|
||
|
* http://www.opensource.org/licenses/mit-license
|
||
|
*/var mr=function(){function r(t,e,i){e===void 0&&(e=!1),this._fn=t,this._once=e,this._thisArg=i,this._next=this._prev=this._owner=null}return r.prototype.detach=function(){return this._owner===null?!1:(this._owner.detach(this),!0)},r}();function ls(r,t){return r._head?(r._tail._next=t,t._prev=r._tail,r._tail=t):(r._head=t,r._tail=t),t._owner=r,t}var jt=function(){function r(){this._head=this._tail=void 0}return r.prototype.handlers=function(t){t===void 0&&(t=!1);var e=this._head;if(t)return!!e;for(var i=[];e;)i.push(e),e=e._next;return i},r.prototype.has=function(t){if(!(t instanceof mr))throw new Error("MiniSignal#has(): First arg must be a SignalBinding object.");return t._owner===this},r.prototype.dispatch=function(){for(var t=arguments,e=[],i=0;i<arguments.length;i++)e[i]=t[i];var n=this._head;if(!n)return!1;for(;n;)n._once&&this.detach(n),n._fn.apply(n._thisArg,e),n=n._next;return!0},r.prototype.add=function(t,e){if(e===void 0&&(e=null),typeof t!="function")throw new Error("MiniSignal#add(): First arg must be a Function.");return ls(this,new mr(t,!1,e))},r.prototype.once=function(t,e){if(e===void 0&&(e=null),typeof t!="function")throw new Error("MiniSignal#once(): First arg must be a Function.");return ls(this,new mr(t,!0,e))},r.prototype.detach=function(t){if(!(t instanceof mr))throw new Error("MiniSignal#detach(): First arg must be a SignalBinding object.");return t._owner!==this?this:(t._prev&&(t._prev._next=t._next),t._next&&(t._next._prev=t._prev),t===this._head?(this._head=t._next,t._next===null&&(this._tail=null)):t===this._tail&&(this._tail=t._prev,this._tail._next=null),t._owner=null,this)},r.prototype.detachAll=function(){var t=this._head;if(!t)return this;for(this._head=this._tail=null;t;)t._owner=null,t=t._next;return this},r}();function ha(r,t){t=t||{};for(var e={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},i=e.parser[t.strictMode?"strict":"loose"].exec(r),n={},s=14;s--;)n[e.key[s]]=i[s]||"";return n[e.q.name]={},n[e.key[12]].replace(e.q.parser,function(a,o,h){o&&(n[e.q.name][o]=h)}),n}var pi,gr=null,wf=0,fs=200,Af=204,Sf=1223,Rf=2;function cs(){}function ds(r,t,e){t&&t.indexOf(".")===0&&(t=t.substring(1)),t&&(r[t]=e)}function vi(r){return r.toString().replace("object ","")}var J=function(){function r(t,e,i){if(this._dequeue=cs,this._onLoadBinding=null,this._elementTimer=0,this._boundComplete=null,this._boundOnError=null,this._boundOnProgress=null,this._boundOnTimeout=null,this._boundXhrOnError=null,this._boundXhrOnTimeout=null,this._boundXhrOnAbort=null,this._boundXhrOnLoad=null,typeof t!="string"||typeof e!="string")throw new Error("Both name and url are required for constructing a resource.");i=i||{},this._flags=0,this._setFlag(r.STATUS_FLAGS.DATA_URL,e.indexOf("data:")===0),this.name=t,this.url=e,this.extension=this._getExtension(),this.data=null,this.crossOrigin=i.crossOrigin===!0?"anonymous":i.crossOrigin,this.timeout=i.timeout||0,this.loadType=i.loadType||this._determineLoadType(),this.xhrType=i.xhrType,this.metadata=i.metadata||{},this.error=null,this.xhr=null,this.children=[],this.type=r.TYPE.UNKNOWN,this.progressChunk=0,this._dequeue=cs,this._onLoadBinding=null,this._elementTimer=0,this._boundComplete=this.complete.bind(this),this._boundOnError=this._onError.bind(this),this._boundOnProgress=this._onProgress.bind(this),this._boundOnTimeout=this._onTimeout.bind(this),this._boundXhrOnError=this._xhrOnError.bind(this),this._boundXhrOnTimeout=this._xhrOnTimeout.bind(this),this._boundXhrOnAbort=this._xhrOnAbort.bind(this),this._boundXhrOnLoad=this._xhrOnLoad.bind(this),this.onStart=new jt,this.onProgress=
|
||
|
* @pixi/spritesheet - v6.5.8
|
||
|
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
||
|
*
|
||
|
* @pixi/spritesheet is licensed under the MIT License.
|
||
|
* http://www.opensource.org/licenses/mit-license
|
||
|
*/var xn=function(){function r(t,e,i){i===void 0&&(i=null),this.linkedSheets=[],this._texture=t instanceof k?t:null,this.baseTexture=t instanceof X?t:this._texture.baseTexture,this.textures={},this.animations={},this.data=e;var n=this.baseTexture.resource;this.resolution=this._updateResolution(i||(n?n.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}return r.prototype._updateResolution=function(t){t===void 0&&(t=null);var e=this.data.meta.scale,i=te(t,null);return i===null&&(i=e!==void 0?parseFloat(e):1),i!==1&&this.baseTexture.setResolution(i),i},r.prototype.parse=function(t){var e=this;return t&&Mt("6.5.0","Spritesheet.parse callback is deprecated, use the return Promise instead."),new Promise(function(i){e._callback=function(n){t==null||t(n),i(n)},e._batchIndex=0,e._frameKeys.length<=r.BATCH_SIZE?(e._processFrames(0),e._processAnimations(),e._parseComplete()):e._nextBatch()})},r.prototype._processFrames=function(t){for(var e=t,i=r.BATCH_SIZE;e-t<i&&e<this._frameKeys.length;){var n=this._frameKeys[e],s=this._frames[n],a=s.frame;if(a){var o=null,h=null,u=s.trimmed!==!1&&s.sourceSize?s.sourceSize:s.frame,l=new W(0,0,Math.floor(u.w)/this.resolution,Math.floor(u.h)/this.resolution);s.rotated?o=new W(Math.floor(a.x)/this.resolution,Math.floor(a.y)/this.resolution,Math.floor(a.h)/this.resolution,Math.floor(a.w)/this.resolution):o=new W(Math.floor(a.x)/this.resolution,Math.floor(a.y)/this.resolution,Math.floor(a.w)/this.resolution,Math.floor(a.h)/this.resolution),s.trimmed!==!1&&s.spriteSourceSize&&(h=new W(Math.floor(s.spriteSourceSize.x)/this.resolution,Math.floor(s.spriteSourceSize.y)/this.resolution,Math.floor(a.w)/this.resolution,Math.floor(a.h)/this.resolution)),this.textures[n]=new k(this.baseTexture,o,l,h,s.rotated?2:0,s.anchor),k.addToCache(this.textures[n],n)}e++}},r.prototype._processAnimations=function(){var t=this.data.animations||{};for(var e in t){this.animations[e]=[];for(var i=0;i<t[e].length;i++){var n=t[e][i];this.animations[e].push(this.textures[n])}}},r.prototype._parseComplete=function(){var t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)},r.prototype._nextBatch=function(){var t=this;this._processFrames(this._batchIndex*r.BATCH_SIZE),this._batchIndex++,setTimeout(function(){t._batchIndex*r.BATCH_SIZE<t._frameKeys.length?t._nextBatch():(t._processAnimations(),t._parseComplete())},0)},r.prototype.destroy=function(t){var e;t===void 0&&(t=!1);for(var i in this.textures)this.textures[i].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&((e=this._texture)===null||e===void 0||e.destroy(),this.baseTexture.destroy()),this._texture=null,this.baseTexture=null,this.linkedSheets=[]},r.BATCH_SIZE=1e3,r}();(function(){function r(){}return r.use=function(t,e){var i,n,s=this,a=t.name+"_image";if(!t.data||t.type!==J.TYPE.JSON||!t.data.frames||s.resources[a]){e();return}var o=(n=(i=t.data)===null||i===void 0?void 0:i.meta)===null||n===void 0?void 0:n.related_multi_packs;if(Array.isArray(o))for(var h=function(p){if(typeof p!="string")return"continue";var v=p.replace(".json",""),_=Pe.resolve(t.url.replace(s.baseUrl,""),p);if(s.resources[v]||Object.values(s.resources).some(function(x){return Pe.format(Pe.parse(x.url))===_}))return"continue";var m={crossOrigin:t.crossOrigin,loadType:J.LOAD_TYPE.XHR,xhrType:J.XHR_RESPONSE_TYPE.JSON,parentResource:t,metadata:t.metadata};s.add(v,_,m)},u=0,l=o;u<l.length;u++){var f=l[u];h(f)}var c={crossOrigin:t.crossOrigin,metadata:t.metadata.imageMetadata,parentResource:t},d=r.getResourcePath(t,s.baseUrl);s.add(a,d,c,function(v){if(v.error){e(v.error);return}var _=new xn(v.texture,t.data,t.url);_.parse().then(function(){t.spritesheet=_,t.textures=_.textures,e()})})},r.getResourcePath=function(t,e){return t.isDataUrl?t.data.meta.image:Pe.resolve(t.url.replace(e,""),t.data.meta.image)},r.extension=F.Loader,r})();/*!
|
||
|
* @pixi/compressed-textures - v6.5.8
|
||
|
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
||
|
*
|
||
|
* @pixi/compressed-textures is licensed under the MIT License.
|
||
|
* http://www.opensource.org/licenses/mit-license
|
||
|
*/var z,L;(function(r){r[r.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",r[r.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",r[r.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",r[r.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",r[r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",r[r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",r[r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",r[r.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",r[r.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",r[r.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",r[r.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",r[r.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",r[r.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",r[r.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",r[r.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",r[r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",r[r.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",r[r.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",r[r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",r[r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",r[r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",r[r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",r[r.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",r[r.COMPRESSED_RGB_ATC_WEBGL=35986]="COMPRESSED_RGB_ATC_WEBGL",r[r.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=35986]="COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",r[r.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=34798]="COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL",r[r.COMPRESSED_RGBA_ASTC_4x4_KHR=37808]="COMPRESSED_RGBA_ASTC_4x4_KHR"})(L||(L={}));var Dr=(z={},z[L.COMPRESSED_RGB_S3TC_DXT1_EXT]=.5,z[L.COMPRESSED_RGBA_S3TC_DXT1_EXT]=.5,z[L.COMPRESSED_RGBA_S3TC_DXT3_EXT]=1,z[L.COMPRESSED_RGBA_S3TC_DXT5_EXT]=1,z[L.COMPRESSED_SRGB_S3TC_DXT1_EXT]=.5,z[L.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT]=.5,z[L.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT]=1,z[L.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT]=1,z[L.COMPRESSED_R11_EAC]=.5,z[L.COMPRESSED_SIGNED_R11_EAC]=.5,z[L.COMPRESSED_RG11_EAC]=1,z[L.COMPRESSED_SIGNED_RG11_EAC]=1,z[L.COMPRESSED_RGB8_ETC2]=.5,z[L.COMPRESSED_RGBA8_ETC2_EAC]=1,z[L.COMPRESSED_SRGB8_ETC2]=.5,z[L.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC]=1,z[L.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2]=.5,z[L.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2]=.5,z[L.COMPRESSED_RGB_PVRTC_4BPPV1_IMG]=.5,z[L.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG]=.5,z[L.COMPRESSED_RGB_PVRTC_2BPPV1_IMG]=.25,z[L.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG]=.25,z[L.COMPRESSED_RGB_ETC1_WEBGL]=.5,z[L.COMPRESSED_RGB_ATC_WEBGL]=.5,z[L.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL]=1,z[L.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL]=1,z[L.COMPRESSED_RGBA_ASTC_4x4_KHR]=1,z);/*! *****************************************************************************
|
||
|
Copyright (c) Microsoft Corporation.
|
||
|
|
||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
purpose with or without fee is hereby granted.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
***************************************************************************** */var ki=function(r,t){return ki=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var n in i)i.hasOwnProperty(n)&&(e[n]=i[n])},ki(r,t)};function ua(r,t){ki(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function Ff(r,t,e,i){function n(s){return s instanceof e?s:new e(function(a){a(s)})}return new(e||(e=Promise))(function(s,a){function o(l){try{u(i.next(l))}catch(f){a(f)}}function h(l){try{u(i.throw(l))}catch(f){a(f)}}function u(l){l.done?s(l.value):n(l.value).then(o,h)}u((i=i.apply(r,t||[])).next())})}function Df(r,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(u){return function(l){return h([u,l])}}function h(u){if(i)throw new TypeError("Generator is already executing.");for(;e;)try{if(i=1,n&&(s=u[0]&2?n.return:u[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,u[1])).done)return s;switch(n=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return e.label++,{value:u[1],done:!1};case 5:e.label++,n=u[1],u=[0];continue;case 7:u=e.ops.pop(),e.trys.pop();continue;default:if(s=e.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){e.label=u[1];break}if(u[0]===6&&e.label<s[1]){e.label=s[1],s=u;break}if(s&&e.label<s[2]){e.label=s[2],e.ops.push(u);break}s[2]&&e.ops.pop(),e.trys.pop();continue}u=t.call(r,e)}catch(l){u=[6,l],n=0}finally{i=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var Uf=function(r){ua(t,r);function t(e,i){i===void 0&&(i={width:1,height:1,autoLoad:!0});var n=this,s,a;return typeof e=="string"?(s=e,a=new Uint8Array):(s=null,a=e),n=r.call(this,a,i)||this,n.origin=s,n.buffer=a?new Di(a):null,n.origin&&i.autoLoad!==!1&&n.load(),a&&a.length&&(n.loaded=!0,n.onBlobLoaded(n.buffer.rawBinaryData)),n}return t.prototype.onBlobLoaded=function(e){},t.prototype.load=function(){return Ff(this,void 0,Promise,function(){var e,i,n;return Df(this,function(s){switch(s.label){case 0:return[4,fetch(this.origin)];case 1:return e=s.sent(),[4,e.blob()];case 2:return i=s.sent(),[4,i.arrayBuffer()];case 3:return n=s.sent(),this.data=new Uint32Array(n),this.buffer=new Di(n),this.loaded=!0,this.onBlobLoaded(n),this.update(),[2,this]}})})},t}(_e),ge=function(r){ua(t,r);function t(e,i){var n=r.call(this,e,i)||this;return n.format=i.format,n.levels=i.levels||1,n._width=i.width,n._height=i.height,n._extension=t._formatToExtension(n.format),(i.levelBuffers||n.buffer)&&(n._levelBuffers=i.levelBuffers||t._createLevelBuffers(e instanceof Uint8Array?e:n.buffer.uint8View,n.format,n.levels,4,4,n.width,n.height)),n}return t.prototype.upload=function(e,i,n){var s=e.gl,a=e.context.extensions[this._extension];if(!a)throw new Error(this._extension+" textures are not supported on the current machine");if(!this._levelBuffers)return!1;for(var o=0,h=this.levels;o<h;o++){var u=this._levelBuffers[o],l=u.levelID,f=u.levelWidth,c=u.levelHeight,d=u.levelBuffer;s.compressedTexImage2D(s.TEXTURE_2D,l,this.format,f,c,0,d)}return!0},t.prototype.onBlobLoaded=function(){this._levelBuffers=t._createLevelBuffers(this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height)},t._formatToExtension=function(e){if(e>=33776&&e<=33779)return"s3tc";if(e>=37488&&e<=37497)return"etc";if(e>=35840&&e<=35843)return"pvrtc";if(e>=36196)return"etc1";if(e>=35986&&e<=34798)return"atc";throw new Error("Invalid (compressed) texture format given!")},t._createLevelBuffers=function(e,i,n,s,a,o,h){for(var u=new Array(n),l=e.byteOffset,f=o,c=h,d=f+s-1&~(s-1),p=c+a-1&~(a-1),v=d*p*Dr[i],_=0;_<n;_++)u[_]={levelID:_,levelWidth:n>1?f:d,levelHeight:n>1?c:p,levelBuffer:new Uint8Array(e.buffer,l,v)},l+=v,f=f>>1||1,c=c>>1||1,d=f+s-1&~(s-1),p=c+a-1&~(a-1),v=d*p*Dr[i];return u},t}(Uf);(function(){function r(){}return r.use=function(t,
|
||
|
* @pixi/basis - v6.5.8
|
||
|
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
||
|
*
|
||
|
* @pixi/basis is licensed under the MIT License.
|
||
|
* http://www.opensource.org/licenses/mit-license
|
||
|
*//*! *****************************************************************************
|
||
|
Copyright (c) Microsoft Corporation.
|
||
|
|
||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
purpose with or without fee is hereby granted.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
***************************************************************************** */function Ur(r,t,e,i){function n(s){return s instanceof e?s:new e(function(a){a(s)})}return new(e||(e=Promise))(function(s,a){function o(l){try{u(i.next(l))}catch(f){a(f)}}function h(l){try{u(i.throw(l))}catch(f){a(f)}}function u(l){l.done?s(l.value):n(l.value).then(o,h)}u((i=i.apply(r,t||[])).next())})}function Gr(r,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(u){return function(l){return h([u,l])}}function h(u){if(i)throw new TypeError("Generator is already executing.");for(;e;)try{if(i=1,n&&(s=u[0]&2?n.return:u[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,u[1])).done)return s;switch(n=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return e.label++,{value:u[1],done:!1};case 5:e.label++,n=u[1],u=[0];continue;case 7:u=e.ops.pop(),e.trys.pop();continue;default:if(s=e.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){e.label=u[1];break}if(u[0]===6&&e.label<s[1]){e.label=s[1],s=u;break}if(s&&e.label<s[2]){e.label=s[2],e.ops.push(u);break}s[2]&&e.ops.pop(),e.trys.pop();continue}u=t.call(r,e)}catch(l){u=[6,l],n=0}finally{i=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var Dt,ke,Xe,st;(function(r){r[r.cTFETC1=0]="cTFETC1",r[r.cTFETC2=1]="cTFETC2",r[r.cTFBC1=2]="cTFBC1",r[r.cTFBC3=3]="cTFBC3",r[r.cTFBC4=4]="cTFBC4",r[r.cTFBC5=5]="cTFBC5",r[r.cTFBC7=6]="cTFBC7",r[r.cTFPVRTC1_4_RGB=8]="cTFPVRTC1_4_RGB",r[r.cTFPVRTC1_4_RGBA=9]="cTFPVRTC1_4_RGBA",r[r.cTFASTC_4x4=10]="cTFASTC_4x4",r[r.cTFATC_RGB=11]="cTFATC_RGB",r[r.cTFATC_RGBA_INTERPOLATED_ALPHA=12]="cTFATC_RGBA_INTERPOLATED_ALPHA",r[r.cTFRGBA32=13]="cTFRGBA32",r[r.cTFRGB565=14]="cTFRGB565",r[r.cTFBGR565=15]="cTFBGR565",r[r.cTFRGBA4444=16]="cTFRGBA4444"})(st||(st={}));var kr=(Dt={},Dt[st.cTFETC1]=L.COMPRESSED_RGB_ETC1_WEBGL,Dt[st.cTFBC1]=L.COMPRESSED_RGB_S3TC_DXT1_EXT,Dt[st.cTFBC3]=L.COMPRESSED_RGBA_S3TC_DXT5_EXT,Dt[st.cTFPVRTC1_4_RGB]=L.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,Dt[st.cTFPVRTC1_4_RGBA]=L.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,Dt[st.cTFATC_RGB]=L.COMPRESSED_RGB_ATC_WEBGL,Dt[st.cTFASTC_4x4]=L.COMPRESSED_RGBA_ASTC_4x4_KHR,Dt),da=(ke={},ke[st.cTFRGBA32]=M.UNSIGNED_BYTE,ke[st.cTFRGB565]=M.UNSIGNED_SHORT_5_6_5,ke[st.cTFRGBA4444]=M.UNSIGNED_SHORT_4_4_4_4,ke),oc=Object.keys(kr).map(function(r){return Number(r)}).reduce(function(r,t){return r[kr[t]]=t,r},{}),ms=(Xe={},Xe[st.cTFBC3]=!0,Xe[st.cTFPVRTC1_4_RGBA]=!0,Xe[st.cTFASTC_4x4]=!0,Xe);function hc(){var r,t={init:function(e){return self.BASIS?(self.BASIS({wasmBinary:e.wasmSource}).then(function(i){i.initializeBasis(),r=i,self.postMessage({type:"init",success:!0})}),null):(console.warn("jsSource was not prepended?"),{type:"init",success:!1})},transcode:function(e){var i=e.basisData,n=r,s=i,a=new n.BasisFile(s),o=a.getNumImages(),h=a.getHasAlpha(),u=h?e.rgbaFormat:e.rgbFormat,l=14,f=new Array(o),c=!1;if(!a.startTranscoding())return a.close(),a.delete(),{type:"transcode",requestID:e.requestID,success:!1,imageArray:null};for(var d=0;d<o;d++){for(var p=a.getNumLevels(d),v={imageID:d,levelArray:new Array,width:null,height:null},_=0;_<p;_++){var m=c?l:u,x=a.getImageWidth(d,_),E=a.getImageHeight(d,_),w=a.getImageTranscodedSizeInBytes(d,_,m),y=x+3&-4,b=E+3&-4;_===0&&(v.width=y,v.height=b);var g=new Uint8Array(w);if(!a.transcodeImage(g,d,_,m,!1,!1)){if(c)return console.error("Basis failed to transcode image "+d+", level "+_+"!"),{type:"transcode",requestID:e.requestID,success:!1};console.warn("Basis failed to transcode image "+d+", level "+_+"! Retrying to an uncompressed texture format!"),d=-1,c=!0;break}v.levelArray.push({levelID:_,levelWidth:x,levelHeight:E,levelBuffer:g})}f[d]=v}return a.close(),a.delete(),{type:"transcode",requestID:e.requestID,success:!0,basisFormat:c?l:u,imageArray:f}}};self.onmessage=function(e){var i=e.data,n=t[i.type](i);n&&self.postMessage(n)}}var Ve=functi
|
||
|
`+t),r._workerURL=URL.createObjectURL(new Blob([t]))}return r._workerURL},enumerable:!1,configurable:!0}),r.prototype.initAsync=function(){return this.initPromise},r.prototype.transcodeAsync=function(t,e,i){return Ur(this,void 0,Promise,function(){var n,s,a=this;return Gr(this,function(o){return++this.load,n=r._tempID++,s=new Promise(function(h,u){a.requests[n]={resolve:h,reject:u}}),this.worker.postMessage({requestID:n,basisData:t,rgbaFormat:e,rgbFormat:i,type:"transcode"}),[2,s]})})},r.loadTranscoder=function(t,e){var i=this,n=fetch(t).then(function(a){return a.text()}).then(function(a){r.jsSource=a}),s=fetch(e).then(function(a){return a.arrayBuffer()}).then(function(a){r.wasmSource=a});return Promise.all([n,s]).then(function(a){return i._onTranscoderInitializedResolve(),a})},r.setTranscoder=function(t,e){r.jsSource=t,r.wasmSource=e},r.onTranscoderInitialized=new Promise(function(t){r._onTranscoderInitializedResolve=t}),r._tempID=0,r}(),Ht=function(){function r(){}return r.transcode=function(t){return Ur(this,void 0,Promise,function(){var e;return Gr(this,function(i){switch(i.label){case 0:return typeof Worker!="undefined"&&r.TranscoderWorker.wasmSource?[4,r.transcodeAsync(t)]:[3,2];case 1:return e=i.sent(),[3,3];case 2:e=r.transcodeSync(t),i.label=3;case 3:return[2,e]}})})},r.transcodeAsync=function(t){return Ur(this,void 0,Promise,function(){var e,i,n,f,c,s,a,o,h,u,l,f,c;return Gr(this,function(d){switch(d.label){case 0:for(!r.defaultRGBAFormat&&!r.defaultRGBFormat&&r.autoDetectFormats(),e=r.workerPool,i=268435456,n=null,f=0,c=e.length;f<c;f++)e[f].load<i&&(n=e[f],i=n.load);return n||(n=new Ve,e.push(n)),[4,n.initAsync()];case 1:return d.sent(),[4,n.transcodeAsync(new Uint8Array(t),r.defaultRGBAFormat.basisFormat,r.defaultRGBFormat.basisFormat)];case 2:if(s=d.sent(),a=s.basisFormat,o=s.imageArray,h=a>12,h)u=o.map(function(p){return new _e(new Uint16Array(p.levelArray[0].levelBuffer.buffer),{width:p.width,height:p.height})});else for(l=kr[s.basisFormat],u=new Array(o.length),f=0,c=o.length;f<c;f++)u[f]=new ge(null,{format:l,width:o[f].width,height:o[f].height,levelBuffers:o[f].levelArray,levels:o[f].levelArray.length});return u.basisFormat=a,[2,u]}})})},r.transcodeSync=function(t){!r.defaultRGBAFormat&&!r.defaultRGBFormat&&r.autoDetectFormats();var e=r.basisBinding,i=new Uint8Array(t),n=new e.BasisFile(i),s=n.getNumImages(),a=n.getHasAlpha(),o=a?r.defaultRGBAFormat.basisFormat:r.defaultRGBFormat.basisFormat,h=st.cTFRGB565,u=new Array(s),l=r.fallbackMode;if(!n.startTranscoding())return console.error("Basis failed to start transcoding!"),n.close(),n.delete(),null;for(var f=0;f<s;f++){for(var c=l?1:n.getNumLevels(f),d=n.getImageWidth(f,0),p=n.getImageHeight(f,0),v=d+3&-4,_=p+3&-4,m=new Array(c),x=0;x<c;x++){var E=n.getImageWidth(f,x),w=n.getImageHeight(f,x),y=n.getImageTranscodedSizeInBytes(f,0,l?h:o);if(m[x]={levelID:x,levelBuffer:new Uint8Array(y),levelWidth:E,levelHeight:w},!n.transcodeImage(m[x].levelBuffer,f,0,l?h:o,!1,!1))if(l){console.error("Basis failed to transcode image "+f+", level "+0+"!");break}else{f=-1,l=!0,console.warn("Basis failed to transcode image "+f+", level "+0+" to a compressed texture format. Retrying to an uncompressed fallback format!");continue}}var b=void 0;l?b=new _e(new Uint16Array(m[0].levelBuffer.buffer),{width:d,height:p}):b=new ge(null,{format:kr[o],width:v,height:_,levelBuffers:m,levels:c}),u[f]=b}n.close(),n.delete();var g=u;return g.basisFormat=l?h:o,g},r.autoDetectFormats=function(t){if(!t){var e=P.ADAPTER.createCanvas(),i=e.getContext("webgl");if(!i){console.error("WebGL not available for BASIS transcoding. Silently failing.");return}t={s3tc:i.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:i.getExtension("WEBGL_compressed_texture_s3tc_srgb"),astc:i.getExtension("WEBGL_compressed_texture_astc"),etc:i.getExtension("WEBGL_compressed_texture_etc"),etc1:i.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:i.getExtension("WEBGL_compressed_texture_pvrtc")||i.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:i.getExtension("WEBGL_compressed_texture_atc")}}var n={};for(va
|
||
|
* @pixi/mesh - v6.5.8
|
||
|
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
||
|
*
|
||
|
* @pixi/mesh is licensed under the MIT License.
|
||
|
* http://www.opensource.org/licenses/mit-license
|
||
|
*//*! *****************************************************************************
|
||
|
Copyright (c) Microsoft Corporation.
|
||
|
|
||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
purpose with or without fee is hereby granted.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
***************************************************************************** */var ji=function(r,t){return ji=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var n in i)i.hasOwnProperty(n)&&(e[n]=i[n])},ji(r,t)};function En(r,t){ji(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var lc=function(){function r(t,e){this.uvBuffer=t,this.uvMatrix=e,this.data=null,this._bufferUpdateId=-1,this._textureUpdateId=-1,this._updateID=0}return r.prototype.update=function(t){if(!(!t&&this._bufferUpdateId===this.uvBuffer._updateID&&this._textureUpdateId===this.uvMatrix._updateID)){this._bufferUpdateId=this.uvBuffer._updateID,this._textureUpdateId=this.uvMatrix._updateID;var e=this.uvBuffer.data;(!this.data||this.data.length!==e.length)&&(this.data=new Float32Array(e.length)),this.uvMatrix.multiplyUvs(e,this.data),this._updateID++}},r}(),yi=new q,gs=new Sr,ys=function(r){En(t,r);function t(e,i,n,s){s===void 0&&(s=Tt.TRIANGLES);var a=r.call(this)||this;return a.geometry=e,a.shader=i,a.state=n||er.for2d(),a.drawMode=s,a.start=0,a.size=0,a.uvs=null,a.indices=null,a.vertexData=new Float32Array(1),a.vertexDirty=-1,a._transformID=-1,a._roundPixels=P.ROUND_PIXELS,a.batchUvs=null,a}return Object.defineProperty(t.prototype,"geometry",{get:function(){return this._geometry},set:function(e){this._geometry!==e&&(this._geometry&&(this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose()),this._geometry=e,this._geometry&&this._geometry.refCount++,this.vertexDirty=-1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"uvBuffer",{get:function(){return this.geometry.buffers[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticesBuffer",{get:function(){return this.geometry.buffers[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"material",{get:function(){return this.shader},set:function(e){this.shader=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(e){this.state.blendMode=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"roundPixels",{get:function(){return this._roundPixels},set:function(e){this._roundPixels!==e&&(this._transformID=-1),this._roundPixels=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tint",{get:function(){return"tint"in this.shader?this.shader.tint:null},set:function(e){this.shader.tint=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"texture",{get:function(){return"texture"in this.shader?this.shader.texture:null},set:function(e){this.shader.texture=e},enumerable:!1,configurable:!0}),t.prototype._render=function(e){var i=this.geometry.buffers[0].data,n=this.shader;n.batchable&&this.drawMode===Tt.TRIANGLES&&i.length<t.BATCHABLE_SIZE*2?this._renderToBatch(e):this._renderDefault(e)},t.prototype._renderDefault=function(e){var i=this.shader;i.alpha=this.worldAlpha,i.update&&i.update(),e.batch.flush(),i.uniforms.translationMatrix=this.transform.worldTransform.toArray(!0),e.shader.bind(i),e.state.set(this.state),e.geometry.bind(this.geometry,i),e.geometry.draw(this.drawMode,this.size,this.start,this.geometry.instanceCount)},t.prototype._renderToBatch=function(e){var i=this.geometry,n=this.shader;n.uvMatrix&&(n.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=i.indexBuffer.data,this._tintRGB=n._tintRGB,this._texture=n.texture;var s=this.material.pluginName;e.batch.setObjectRenderer(e.plugins[s]),e.plugins[s].render(this)},t.prototype.calculateVertices=function(){var e=this.geometry,i=e.buffers[0],n=i.data,s=i._updateID;if(!(s===this.vertexDirty&&this._transformID===this.transform._worldID)){this._transformID=this.transform._worldID,this.vertexData.length!==n.length&&(this.vertexData=new Float32Array(n.length));for(var a=this.transform.worldTransform,o=a.a,h=a.b,u=a.c,l=a.d,f=a.tx,c=a.ty,d=this.vertexData,p=0;p<d.length/2;p++){var v=n[p*2],_=n[p*2+1];d[p*2]=o*v+u*_+f,d[p*2
|
||
|
uniform vec4 uColor;
|
||
|
|
||
|
uniform sampler2D uSampler;
|
||
|
|
||
|
void main(void)
|
||
|
{
|
||
|
gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;
|
||
|
}
|
||
|
`,cc=`attribute vec2 aVertexPosition;
|
||
|
attribute vec2 aTextureCoord;
|
||
|
|
||
|
uniform mat3 projectionMatrix;
|
||
|
uniform mat3 translationMatrix;
|
||
|
uniform mat3 uTextureMatrix;
|
||
|
|
||
|
varying vec2 vTextureCoord;
|
||
|
|
||
|
void main(void)
|
||
|
{
|
||
|
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
||
|
|
||
|
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;
|
||
|
}
|
||
|
`,bs=function(r){En(t,r);function t(e,i){var n=this,s={uSampler:e,alpha:1,uTextureMatrix:dt.IDENTITY,uColor:new Float32Array([1,1,1,1])};return i=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},i),i.uniforms&&Object.assign(s,i.uniforms),n=r.call(this,i.program||tr.from(cc,fc),s)||this,n._colorDirty=!1,n.uvMatrix=new Zs(e),n.batchable=i.program===void 0,n.pluginName=i.pluginName,n.tint=i.tint,n.alpha=i.alpha,n}return Object.defineProperty(t.prototype,"texture",{get:function(){return this.uniforms.uSampler},set:function(e){this.uniforms.uSampler!==e&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!e.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=e,this.uvMatrix.texture=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alpha",{get:function(){return this._alpha},set:function(e){e!==this._alpha&&(this._alpha=e,this._colorDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tint",{get:function(){return this._tint},set:function(e){e!==this._tint&&(this._tint=e,this._tintRGB=(e>>16)+(e&65280)+((e&255)<<16),this._colorDirty=!0)},enumerable:!1,configurable:!0}),t.prototype.update=function(){if(this._colorDirty){this._colorDirty=!1;var e=this.texture.baseTexture;Tu(this._tint,this._alpha,this.uniforms.uColor,e.alphaMode)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)},t}(zr),dc=function(r){En(t,r);function t(e,i,n){var s=r.call(this)||this,a=new ft(e),o=new ft(i,!0),h=new ft(n,!0,!0);return s.addAttribute("aVertexPosition",a,2,!1,M.FLOAT).addAttribute("aTextureCoord",o,2,!1,M.FLOAT).addIndex(h),s._updateId=-1,s}return Object.defineProperty(t.prototype,"vertexDirtyId",{get:function(){return this.buffers[0]._updateID},enumerable:!1,configurable:!0}),t}(Yr);/*!
|
||
|
* @pixi/text - v6.5.8
|
||
|
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
||
|
*
|
||
|
* @pixi/text is licensed under the MIT License.
|
||
|
* http://www.opensource.org/licenses/mit-license
|
||
|
*//*! *****************************************************************************
|
||
|
Copyright (c) Microsoft Corporation.
|
||
|
|
||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
purpose with or without fee is hereby granted.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
***************************************************************************** */var Wi=function(r,t){return Wi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var n in i)i.hasOwnProperty(n)&&(e[n]=i[n])},Wi(r,t)};function pc(r,t){Wi(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var Qe;(function(r){r[r.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",r[r.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL"})(Qe||(Qe={}));var bi={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:Qe.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},vc=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Xr=function(){function r(t){this.styleID=0,this.reset(),Ei(this,t,t)}return r.prototype.clone=function(){var t={};return Ei(t,this,bi),new r(t)},r.prototype.reset=function(){Ei(this,bi,bi)},Object.defineProperty(r.prototype,"align",{get:function(){return this._align},set:function(t){this._align!==t&&(this._align=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"breakWords",{get:function(){return this._breakWords},set:function(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"dropShadow",{get:function(){return this._dropShadow},set:function(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"dropShadowAlpha",{get:function(){return this._dropShadowAlpha},set:function(t){this._dropShadowAlpha!==t&&(this._dropShadowAlpha=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"dropShadowAngle",{get:function(){return this._dropShadowAngle},set:function(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"dropShadowBlur",{get:function(){return this._dropShadowBlur},set:function(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"dropShadowColor",{get:function(){return this._dropShadowColor},set:function(t){var e=xi(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"dropShadowDistance",{get:function(){return this._dropShadowDistance},set:function(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"fill",{get:function(){return this._fill},set:function(t){var e=xi(t);this._fill!==e&&(this._fill=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"fillGradientType",{get:function(){return this._fillGradientType},set:function(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"fillGradientStops",{get:function(){return this._fillGradientStops},set:function(t){_c(this._fillGradientStops,t)||(this._fillGradientStops=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"fontFamily",{get:function(){return this._fontFamily},set:function(t){this.fontFamily!==t&&(this._fontFamily=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"fontSize",{get:function(){return this._fontSize},set:function(t){this._fontSize!==t&&(this._fontSize=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"fontStyle",{get:function(){return this._fontStyle},set:function(t){this._fontStyle!==t&&(this._fontStyle=
|
||
|
`:t,t},r.getFromCache=function(t,e,i,n){var s=i[t];if(typeof s!="number"){var a=t.length*e;s=n.measureText(t).width+a,i[t]=s}return s},r.collapseSpaces=function(t){return t==="normal"||t==="pre-line"},r.collapseNewlines=function(t){return t==="normal"},r.trimRight=function(t){if(typeof t!="string")return"";for(var e=t.length-1;e>=0;e--){var i=t[e];if(!r.isBreakingSpace(i))break;t=t.slice(0,-1)}return t},r.isNewline=function(t){return typeof t!="string"?!1:r._newlines.indexOf(t.charCodeAt(0))>=0},r.isBreakingSpace=function(t,e){return typeof t!="string"?!1:r._breakingSpaces.indexOf(t.charCodeAt(0))>=0},r.tokenize=function(t){var e=[],i="";if(typeof t!="string")return e;for(var n=0;n<t.length;n++){var s=t[n],a=t[n+1];if(r.isBreakingSpace(s,a)||r.isNewline(s)){i!==""&&(e.push(i),i=""),e.push(s);continue}i+=s}return i!==""&&e.push(i),e},r.canBreakWords=function(t,e){return e},r.canBreakChars=function(t,e,i,n,s){return!0},r.wordWrapSplit=function(t){return t.split("")},r.measureFont=function(t){if(r._fonts[t])return r._fonts[t];var e={ascent:0,descent:0,fontSize:0},i=r._canvas,n=r._context;n.font=t;var s=r.METRICS_STRING+r.BASELINE_SYMBOL,a=Math.ceil(n.measureText(s).width),o=Math.ceil(n.measureText(r.BASELINE_SYMBOL).width),h=Math.ceil(r.HEIGHT_MULTIPLIER*o);o=o*r.BASELINE_MULTIPLIER|0,i.width=a,i.height=h,n.fillStyle="#f00",n.fillRect(0,0,a,h),n.font=t,n.textBaseline="alphabetic",n.fillStyle="#000",n.fillText(s,0,o);var u=n.getImageData(0,0,a,h).data,l=u.length,f=a*4,c=0,d=0,p=!1;for(c=0;c<o;++c){for(var v=0;v<f;v+=4)if(u[d+v]!==255){p=!0;break}if(!p)d+=f;else break}for(e.ascent=o-c,d=l-f,p=!1,c=h;c>o;--c){for(var v=0;v<f;v+=4)if(u[d+v]!==255){p=!0;break}if(!p)d-=f;else break}return e.descent=c-o,e.fontSize=e.ascent+e.descent,r._fonts[t]=e,e},r.clearMetrics=function(t){t===void 0&&(t=""),t?delete r._fonts[t]:r._fonts={}},Object.defineProperty(r,"_canvas",{get:function(){if(!r.__canvas){var t=void 0;try{var e=new OffscreenCanvas(0,0),i=e.getContext("2d",Er);if(i&&i.measureText)return r.__canvas=e,e;t=P.ADAPTER.createCanvas()}catch{t=P.ADAPTER.createCanvas()}t.width=t.height=10,r.__canvas=t}return r.__canvas},enumerable:!1,configurable:!0}),Object.defineProperty(r,"_context",{get:function(){return r.__context||(r.__context=r._canvas.getContext("2d",Er)),r.__context},enumerable:!1,configurable:!0}),r}();$t._fonts={};$t.METRICS_STRING="|\xC9q\xC5";$t.BASELINE_SYMBOL="M";$t.BASELINE_MULTIPLIER=1.4;$t.HEIGHT_MULTIPLIER=2;$t._newlines=[10,13];$t._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];var mc={texture:!0,children:!1,baseTexture:!0};(function(r){pc(t,r);function t(e,i,n){var s=this,a=!1;n||(n=P.ADAPTER.createCanvas(),a=!0),n.width=3,n.height=3;var o=k.from(n);return o.orig=new W,o.trim=new W,s=r.call(this,o)||this,s._ownCanvas=a,s.canvas=n,s.context=n.getContext("2d",{willReadFrequently:!0}),s._resolution=P.RESOLUTION,s._autoResolution=!0,s._text=null,s._style=null,s._styleListener=null,s._font="",s.text=e,s.style=i,s.localStyleID=-1,s}return t.prototype.updateText=function(e){var i=this._style;if(this.localStyleID!==i.styleID&&(this.dirty=!0,this.localStyleID=i.styleID),!(!this.dirty&&e)){this._font=this._style.toFontString();var n=this.context,s=$t.measureText(this._text||" ",this._style,this._style.wordWrap,this.canvas),a=s.width,o=s.height,h=s.lines,u=s.lineHeight,l=s.lineWidths,f=s.maxLineWidth,c=s.fontProperties;this.canvas.width=Math.ceil(Math.ceil(Math.max(1,a)+i.padding*2)*this._resolution),this.canvas.height=Math.ceil(Math.ceil(Math.max(1,o)+i.padding*2)*this._resolution),n.scale(this._resolution,this._resolution),n.clearRect(0,0,this.canvas.width,this.canvas.height),n.font=this._font,n.lineWidth=i.strokeThickness,n.textBaseline=i.textBaseline,n.lineJoin=i.lineJoin,n.miterLimit=i.miterLimit;for(var d,p,v=i.dropShadow?2:1,_=0;_<v;++_){var m=i.dropShadow&&_===0,x=m?Math.ceil(Math.max(1,o)+i.padding*2):0,E=x*this._resolution;if(m){n.fillStyle="black",n.strokeStyle="black";var w=i.dropShadowColor,y=ze(typeof w=="number"?w:Ds(w)),b=i.dropShadowBlur*this._resolution,g=i.dropShadowDist
|
||
|
* @pixi/text-bitmap - v6.5.8
|
||
|
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
||
|
*
|
||
|
* @pixi/text-bitmap is licensed under the MIT License.
|
||
|
* http://www.opensource.org/licenses/mit-license
|
||
|
*//*! *****************************************************************************
|
||
|
Copyright (c) Microsoft Corporation.
|
||
|
|
||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
purpose with or without fee is hereby granted.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
***************************************************************************** */var Vi=function(r,t){return Vi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var n in i)i.hasOwnProperty(n)&&(e[n]=i[n])},Vi(r,t)};function gc(r,t){Vi(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var Hr=function(){function r(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}return r}(),Rr=function(){function r(){}return r.test=function(t){return typeof t=="string"&&t.indexOf("info face=")===0},r.parse=function(t){var e=t.match(/^[a-z]+\s+.+$/gm),i={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(var n in e){var s=e[n].match(/^[a-z]+/gm)[0],a=e[n].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),o={};for(var h in a){var u=a[h].split("="),l=u[0],f=u[1].replace(/"/gm,""),c=parseFloat(f),d=isNaN(c)?f:c;o[l]=d}i[s].push(o)}var p=new Hr;return i.info.forEach(function(v){return p.info.push({face:v.face,size:parseInt(v.size,10)})}),i.common.forEach(function(v){return p.common.push({lineHeight:parseInt(v.lineHeight,10)})}),i.page.forEach(function(v){return p.page.push({id:parseInt(v.id,10),file:v.file})}),i.char.forEach(function(v){return p.char.push({id:parseInt(v.id,10),page:parseInt(v.page,10),x:parseInt(v.x,10),y:parseInt(v.y,10),width:parseInt(v.width,10),height:parseInt(v.height,10),xoffset:parseInt(v.xoffset,10),yoffset:parseInt(v.yoffset,10),xadvance:parseInt(v.xadvance,10)})}),i.kerning.forEach(function(v){return p.kerning.push({first:parseInt(v.first,10),second:parseInt(v.second,10),amount:parseInt(v.amount,10)})}),i.distanceField.forEach(function(v){return p.distanceField.push({distanceRange:parseInt(v.distanceRange,10),fieldType:v.fieldType})}),p},r}(),Yi=function(){function r(){}return r.test=function(t){return t instanceof XMLDocument&&t.getElementsByTagName("page").length&&t.getElementsByTagName("info")[0].getAttribute("face")!==null},r.parse=function(t){for(var e=new Hr,i=t.getElementsByTagName("info"),n=t.getElementsByTagName("common"),s=t.getElementsByTagName("page"),a=t.getElementsByTagName("char"),o=t.getElementsByTagName("kerning"),h=t.getElementsByTagName("distanceField"),u=0;u<i.length;u++)e.info.push({face:i[u].getAttribute("face"),size:parseInt(i[u].getAttribute("size"),10)});for(var u=0;u<n.length;u++)e.common.push({lineHeight:parseInt(n[u].getAttribute("lineHeight"),10)});for(var u=0;u<s.length;u++)e.page.push({id:parseInt(s[u].getAttribute("id"),10)||0,file:s[u].getAttribute("file")});for(var u=0;u<a.length;u++){var l=a[u];e.char.push({id:parseInt(l.getAttribute("id"),10),page:parseInt(l.getAttribute("page"),10)||0,x:parseInt(l.getAttribute("x"),10),y:parseInt(l.getAttribute("y"),10),width:parseInt(l.getAttribute("width"),10),height:parseInt(l.getAttribute("height"),10),xoffset:parseInt(l.getAttribute("xoffset"),10),yoffset:parseInt(l.getAttribute("yoffset"),10),xadvance:parseInt(l.getAttribute("xadvance"),10)})}for(var u=0;u<o.length;u++)e.kerning.push({first:parseInt(o[u].getAttribute("first"),10),second:parseInt(o[u].getAttribute("second"),10),amount:parseInt(o[u].getAttribute("amount"),10)});for(var u=0;u<h.length;u++)e.distanceField.push({fieldType:h[u].getAttribute("fieldType"),distanceRange:parseInt(h[u].getAttribute("distanceRange"),10)});return e},r}(),zi=function(){function r(){}return r.test=function(t){if(typeof t=="string"&&t.indexOf("<font>")>-1){var e=new globalThis.DOMParser().parseFromString(t,"text/xml");return Yi.test(e)}return!1},r.parse=function(t){var e=new globalThis.DOMParser().parseFromString(t,"text/xml");return Yi.parse(e)},r}(),Ti=[Rr,Yi,zi];function pa(r){for(var t=0;t<Ti.length;t++)if(Ti[t].test(r))return Ti[t];return null}function yc(r,t,e,i,n,s){var a=e.fill;if(Array.isArray(a)){if(a.length===1)return a[0]}else return a;var o,h=e.dropShadow?e.dropShadowDistance:0,u=e.padding||0,l=r.width/i-h-u*2,f=r.height/i-h-u*2,c=a.slice(),d=e.fillGradientStops.slice();if(!d.length)for(var p=c.length+1,v=1;v<p;++
|
||
|
varying vec2 vTextureCoord;\r
|
||
|
uniform sampler2D uSampler;\r
|
||
|
\r
|
||
|
// Tint\r
|
||
|
uniform vec4 uColor;\r
|
||
|
\r
|
||
|
// on 2D applications fwidth is screenScale / glyphAtlasScale * distanceFieldRange\r
|
||
|
uniform float uFWidth;\r
|
||
|
\r
|
||
|
void main(void) {\r
|
||
|
\r
|
||
|
// To stack MSDF and SDF we need a non-pre-multiplied-alpha texture.\r
|
||
|
vec4 texColor = texture2D(uSampler, vTextureCoord);\r
|
||
|
\r
|
||
|
// MSDF\r
|
||
|
float median = texColor.r + texColor.g + texColor.b -\r
|
||
|
min(texColor.r, min(texColor.g, texColor.b)) -\r
|
||
|
max(texColor.r, max(texColor.g, texColor.b));\r
|
||
|
// SDF\r
|
||
|
median = min(median, texColor.a);\r
|
||
|
\r
|
||
|
float screenPxDistance = uFWidth * (median - 0.5);\r
|
||
|
float alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);\r
|
||
|
if (median < 0.01) {\r
|
||
|
alpha = 0.0;\r
|
||
|
} else if (median > 0.99) {\r
|
||
|
alpha = 1.0;\r
|
||
|
}\r
|
||
|
\r
|
||
|
// NPM Textures, NPM outputs\r
|
||
|
gl_FragColor = vec4(uColor.rgb, uColor.a * alpha);\r
|
||
|
\r
|
||
|
}\r
|
||
|
`,Tc=`// Mesh material default fragment\r
|
||
|
attribute vec2 aVertexPosition;\r
|
||
|
attribute vec2 aTextureCoord;\r
|
||
|
\r
|
||
|
uniform mat3 projectionMatrix;\r
|
||
|
uniform mat3 translationMatrix;\r
|
||
|
uniform mat3 uTextureMatrix;\r
|
||
|
\r
|
||
|
varying vec2 vTextureCoord;\r
|
||
|
\r
|
||
|
void main(void)\r
|
||
|
{\r
|
||
|
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r
|
||
|
\r
|
||
|
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\r
|
||
|
}\r
|
||
|
`,Es=[],Ts=[],ws=[];(function(r){gc(t,r);function t(e,i){i===void 0&&(i={});var n=r.call(this)||this;n._tint=16777215;var s=Object.assign({},t.styleDefaults,i),a=s.align,o=s.tint,h=s.maxWidth,u=s.letterSpacing,l=s.fontName,f=s.fontSize;if(!kt.available[l])throw new Error('Missing BitmapFont "'+l+'"');return n._activePagesMeshData=[],n._textWidth=0,n._textHeight=0,n._align=a,n._tint=o,n._font=void 0,n._fontName=l,n._fontSize=f,n.text=e,n._maxWidth=h,n._maxLineHeight=0,n._letterSpacing=u,n._anchor=new Ie(function(){n.dirty=!0},n,0,0),n._roundPixels=P.ROUND_PIXELS,n.dirty=!0,n._resolution=P.RESOLUTION,n._autoResolution=!0,n._textureCache={},n}return t.prototype.updateText=function(){for(var e,i=kt.available[this._fontName],n=this.fontSize,s=n/i.size,a=new q,o=[],h=[],u=[],l=this._text.replace(/(?:\r\n|\r)/g,`
|
||
|
`)||" ",f=va(l),c=this._maxWidth*i.size/n,d=i.distanceFieldType==="none"?Es:Ts,p=null,v=0,_=0,m=0,x=-1,E=0,w=0,y=0,b=0,g=0;g<f.length;g++){var A=f[g],T=Pr(A);if(/(?:\s)/.test(A)&&(x=g,E=v,b++),A==="\r"||A===`
|
||
|
`){h.push(v),u.push(-1),_=Math.max(_,v),++m,++w,a.x=0,a.y+=i.lineHeight,p=null,b=0;continue}var R=i.chars[T];if(!!R){p&&R.kerning[p]&&(a.x+=R.kerning[p]);var O=ws.pop()||{texture:k.EMPTY,line:0,charCode:0,prevSpaces:0,position:new q};O.texture=R.texture,O.line=m,O.charCode=T,O.position.x=a.x+R.xOffset+this._letterSpacing/2,O.position.y=a.y+R.yOffset,O.prevSpaces=b,o.push(O),v=O.position.x+Math.max(R.xAdvance-R.xOffset,R.texture.orig.width),a.x+=R.xAdvance+this._letterSpacing,y=Math.max(y,R.yOffset+R.texture.height),p=T,x!==-1&&c>0&&a.x>c&&(++w,je(o,1+x-w,1+g-x),g=x,x=-1,h.push(E),u.push(o.length>0?o[o.length-1].prevSpaces:0),_=Math.max(_,E),m++,a.x=0,a.y+=i.lineHeight,p=null,b=0)}}var D=f[f.length-1];D!=="\r"&&D!==`
|
||
|
`&&(/(?:\s)/.test(D)&&(v=E),h.push(v),_=Math.max(_,v),u.push(-1));for(var j=[],g=0;g<=m;g++){var et=0;this._align==="right"?et=_-h[g]:this._align==="center"?et=(_-h[g])/2:this._align==="justify"&&(et=u[g]<0?0:(_-h[g])/u[g]),j.push(et)}var C=o.length,I={},H=[],lt=this._activePagesMeshData;d.push.apply(d,lt);for(var g=0;g<C;g++){var V=o[g].texture,it=V.baseTexture.uid;if(!I[it]){var N=d.pop();if(!N){var nr=new dc,Kt=void 0,Lt=void 0;i.distanceFieldType==="none"?(Kt=new bs(k.EMPTY),Lt=B.NORMAL):(Kt=new bs(k.EMPTY,{program:tr.from(Tc,Ec),uniforms:{uFWidth:0}}),Lt=B.NORMAL_NPM);var Me=new ys(nr,Kt);Me.blendMode=Lt,N={index:0,indexCount:0,vertexCount:0,uvsCount:0,total:0,mesh:Me,vertices:null,uvs:null,indices:null}}N.index=0,N.indexCount=0,N.vertexCount=0,N.uvsCount=0,N.total=0;var ye=this._textureCache;ye[it]=ye[it]||new k(V.baseTexture),N.mesh.texture=ye[it],N.mesh.tint=this._tint,H.push(N),I[it]=N}I[it].total++}for(var g=0;g<lt.length;g++)H.indexOf(lt[g])===-1&&this.removeChild(lt[g].mesh);for(var g=0;g<H.length;g++)H[g].mesh.parent!==this&&this.addChild(H[g].mesh);this._activePagesMeshData=H;for(var g in I){var N=I[g],St=N.total;if(!(((e=N.indices)===null||e===void 0?void 0:e.length)>6*St)||N.vertices.length<ys.BATCHABLE_SIZE*2)N.vertices=new Float32Array(4*2*St),N.uvs=new Float32Array(4*2*St),N.indices=new Uint16Array(6*St);else for(var be=N.total,xe=N.vertices,mt=be*4*2;mt<xe.length;mt++)xe[mt]=0;N.mesh.size=6*St}for(var g=0;g<C;g++){var A=o[g],gt=A.position.x+j[A.line]*(this._align==="justify"?A.prevSpaces:1);this._roundPixels&&(gt=Math.round(gt));var vt=gt*s,_t=A.position.y*s,V=A.texture,Q=I[V.baseTexture.uid],re=V.frame,Rt=V._uvs,Y=Q.index++;Q.indices[Y*6+0]=0+Y*4,Q.indices[Y*6+1]=1+Y*4,Q.indices[Y*6+2]=2+Y*4,Q.indices[Y*6+3]=0+Y*4,Q.indices[Y*6+4]=2+Y*4,Q.indices[Y*6+5]=3+Y*4,Q.vertices[Y*8+0]=vt,Q.vertices[Y*8+1]=_t,Q.vertices[Y*8+2]=vt+re.width*s,Q.vertices[Y*8+3]=_t,Q.vertices[Y*8+4]=vt+re.width*s,Q.vertices[Y*8+5]=_t+re.height*s,Q.vertices[Y*8+6]=vt,Q.vertices[Y*8+7]=_t+re.height*s,Q.uvs[Y*8+0]=Rt.x0,Q.uvs[Y*8+1]=Rt.y0,Q.uvs[Y*8+2]=Rt.x1,Q.uvs[Y*8+3]=Rt.y1,Q.uvs[Y*8+4]=Rt.x2,Q.uvs[Y*8+5]=Rt.y2,Q.uvs[Y*8+6]=Rt.x3,Q.uvs[Y*8+7]=Rt.y3}this._textWidth=_*s,this._textHeight=(a.y+i.lineHeight)*s;for(var g in I){var N=I[g];if(this.anchor.x!==0||this.anchor.y!==0)for(var Pt=0,Ee=this._textWidth*this.anchor.x,sr=this._textHeight*this.anchor.y,Rn=0;Rn<N.total;Rn++)N.vertices[Pt++]-=Ee,N.vertices[Pt++]-=sr,N.vertices[Pt++]-=Ee,N.vertices[Pt++]-=sr,N.vertices[Pt++]-=Ee,N.vertices[Pt++]-=sr,N.vertices[Pt++]-=Ee,N.vertices[Pt++]-=sr;this._maxLineHeight=y*s;var Pn=N.mesh.geometry.getBuffer("aVertexPosition"),Cn=N.mesh.geometry.getBuffer("aTextureCoord"),In=N.mesh.geometry.getIndex();Pn.data=N.vertices,Cn.data=N.uvs,In.data=N.indices,Pn.update(),Cn.update(),In.update()}for(var g=0;g<o.length;g++)ws.push(o[g]);this._font=i,this.dirty=!1},t.prototype.updateTransform=function(){this.validate(),this.containerUpdateTransform()},t.prototype._render=function(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0);var i=kt.available[this._fontName],n=i.distanceFieldRange,s=i.distanceFieldType,a=i.size;if(s!=="none")for(var o=this.worldTransform,h=o.a,u=o.b,l=o.c,f=o.d,c=Math.sqrt(h*h+u*u),d=Math.sqrt(l*l+f*f),p=(Math.abs(c)+Math.abs(d))/2,v=this.fontSize/a,_=0,m=this._activePagesMeshData;_<m.length;_++){var x=m[_];x.mesh.shader.uniforms.uFWidth=p*n*v*this._resolution}r.prototype._render.call(this,e)},t.prototype.getLocalBounds=function(){return this.validate(),r.prototype.getLocalBounds.call(this)},t.prototype.validate=function(){var e=kt.available[this._fontName];if(!e)throw new Error('Missing BitmapFont "'+this._fontName+'"');this._font!==e&&(this.dirty=!0),this.dirty&&this.updateText()},Object.defineProperty(t.prototype,"tint",{get:function(){return this._tint},set:function(e){if(this._tint!==e){this._tint=e;for(var i=0;i<this._activePagesMeshData.length;i++)this._activePagesMeshData[i].mesh.tint=e}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"align",{get:function(
|
||
|
* @pixi/assets - v6.5.8
|
||
|
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
||
|
*
|
||
|
* @pixi/assets is licensed under the MIT License.
|
||
|
* http://www.opensource.org/licenses/mit-license
|
||
|
*//*! *****************************************************************************
|
||
|
Copyright (c) Microsoft Corporation.
|
||
|
|
||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
purpose with or without fee is hereby granted.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
***************************************************************************** */var qt=function(){return qt=Object.assign||function(t){for(var e=arguments,i,n=1,s=arguments.length;n<s;n++){i=e[n];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=i[a])}return t},qt.apply(this,arguments)};function U(r,t,e,i){function n(s){return s instanceof e?s:new e(function(a){a(s)})}return new(e||(e=Promise))(function(s,a){function o(l){try{u(i.next(l))}catch(f){a(f)}}function h(l){try{u(i.throw(l))}catch(f){a(f)}}function u(l){l.done?s(l.value):n(l.value).then(o,h)}u((i=i.apply(r,t||[])).next())})}function G(r,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(u){return function(l){return h([u,l])}}function h(u){if(i)throw new TypeError("Generator is already executing.");for(;e;)try{if(i=1,n&&(s=u[0]&2?n.return:u[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,u[1])).done)return s;switch(n=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return e.label++,{value:u[1],done:!1};case 5:e.label++,n=u[1],u=[0];continue;case 7:u=e.ops.pop(),e.trys.pop();continue;default:if(s=e.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){e.label=u[1];break}if(u[0]===6&&e.label<s[1]){e.label=s[1],s=u;break}if(s&&e.label<s[2]){e.label=s[2],e.ops.push(u);break}s[2]&&e.ops.pop(),e.trys.pop();continue}u=t.call(r,e)}catch(l){u=[6,l],n=0}finally{i=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var wc=function(){function r(t,e){e===void 0&&(e=!1),this._loader=t,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=e}return r.prototype.add=function(t){var e=this;t.forEach(function(i){e._assetList.push(i)}),this.verbose&&console.log("[BackgroundLoader] assets: ",this._assetList),this._isActive&&!this._isLoading&&this._next()},r.prototype._next=function(){return U(this,void 0,Promise,function(){var t,e,i;return G(this,function(n){switch(n.label){case 0:if(!(this._assetList.length&&this._isActive))return[3,2];for(this._isLoading=!0,t=[],e=Math.min(this._assetList.length,this._maxConcurrent),i=0;i<e;i++)t.push(this._assetList.pop());return[4,this._loader.load(t)];case 1:n.sent(),this._isLoading=!1,this._next(),n.label=2;case 2:return[2]}})})},Object.defineProperty(r.prototype,"active",{get:function(){return this._isActive},set:function(t){this._isActive!==t&&(this._isActive=t,t&&!this._isLoading&&this._next())},enumerable:!1,configurable:!0}),r}(),Yt=function(r,t){return Array.isArray(r)||(r=[r]),t?r.map(function(e){return typeof e=="string"?t(e):e}):r};function _a(r,t,e,i,n){for(var s=t[e],a=0;a<s.length;a++){var o=s[a];e<t.length-1?_a(r.replace(i[e],o),t,e+1,i,n):n.push(r.replace(i[e],o))}}function Ac(r){var t=/\{(.*?)\}/g,e=r.match(t),i=[];if(e){var n=[];e.forEach(function(s){var a=s.substring(1,s.length-1).split(",");n.push(a)}),_a(r,n,0,e,i)}else i.push(r);return i}var jr=function(r){return!Array.isArray(r)},Sc=function(){function r(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}return r.prototype.reset=function(){this._cacheMap.clear(),this._cache.clear()},r.prototype.has=function(t){return this._cache.has(t)},r.prototype.get=function(t){var e=this._cache.get(t);return e||console.warn("[Assets] Asset id "+t+" was not found in the Cache"),e},r.prototype.set=function(t,e){for(var i=this,n=Yt(t),s,a=0;a<this.parsers.length;a++){var o=this.parsers[a];if(o.test(e)){s=o.getCacheableAssets(n,e);break}}s||(s={},n.forEach(function(f){s[f]=e}));var h=Object.keys(s),u={cacheKeys:h,keys:n};if(n.forEach(function(f){i._cacheMap.set(f,u)}),h.forEach(function(f){i._cache.has(f)&&i._cache.get(f)!==e&&console.warn("[Cache] already has key:",f),i._cache.set(f,s[f])}),e instanceof k){var l=e;n.forEach(function(f){l.baseTexture!==k.EMPTY.baseTexture&&X.addToCache(l.baseTexture,f),k.addToCache(l,f)})}},r.prototype.remove=function(t){var e=this;if(this._cacheMa
|
||
|
async function checkImageBitmap()
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
if (typeof createImageBitmap !== 'function') return false;
|
||
|
|
||
|
const response = await fetch('`+kc+`');
|
||
|
const imageBlob = await response.blob();
|
||
|
const imageBitmap = await createImageBitmap(imageBlob);
|
||
|
|
||
|
return imageBitmap.width === 1 && imageBitmap.height === 1;
|
||
|
}
|
||
|
catch (e)
|
||
|
{
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
checkImageBitmap().then((result) => { self.postMessage(result); });
|
||
|
`},Hc={id:"loadImageBitmap",code:`
|
||
|
async function loadImageBitmap(url)
|
||
|
{
|
||
|
const response = await fetch(url);
|
||
|
|
||
|
if (!response.ok)
|
||
|
{
|
||
|
throw new Error(\`[WorkerManager.loadImageBitmap] Failed to fetch \${url}: \`
|
||
|
+ \`\${response.status} \${response.statusText}\`);
|
||
|
}
|
||
|
|
||
|
const imageBlob = await response.blob();
|
||
|
const imageBitmap = await createImageBitmap(imageBlob);
|
||
|
|
||
|
return imageBitmap;
|
||
|
}
|
||
|
self.onmessage = async (event) =>
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
const imageBitmap = await loadImageBitmap(event.data.data[0]);
|
||
|
|
||
|
self.postMessage({
|
||
|
data: imageBitmap,
|
||
|
uuid: event.data.uuid,
|
||
|
id: event.data.id,
|
||
|
}, [imageBitmap]);
|
||
|
}
|
||
|
catch(e)
|
||
|
{
|
||
|
self.postMessage({
|
||
|
error: e,
|
||
|
uuid: event.data.uuid,
|
||
|
id: event.data.id,
|
||
|
});
|
||
|
}
|
||
|
};`},Ai,jc=function(){function r(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}return r.prototype.isImageBitmapSupported=function(){return this._isImageBitmapSupported!==void 0?this._isImageBitmapSupported:(this._isImageBitmapSupported=new Promise(function(t){var e=URL.createObjectURL(new Blob([Xc.code],{type:"application/javascript"})),i=new Worker(e);i.addEventListener("message",function(n){i.terminate(),URL.revokeObjectURL(e),t(n.data)})}),this._isImageBitmapSupported)},r.prototype.loadImageBitmap=function(t){return this._run("loadImageBitmap",[t])},r.prototype._initWorkers=function(){return U(this,void 0,void 0,function(){return G(this,function(t){return this._initialized?[2]:(this._initialized=!0,[2])})})},r.prototype.getWorker=function(){var t=this;wi===void 0&&(wi=navigator.hardwareConcurrency||4);var e=this.workerPool.pop();return!e&&this._createdWorkers<wi&&(Ai||(Ai=URL.createObjectURL(new Blob([Hc.code],{type:"application/javascript"}))),this._createdWorkers++,e=new Worker(Ai),e.addEventListener("message",function(i){t.complete(i.data),t.returnWorker(i.target),t.next()})),e},r.prototype.returnWorker=function(t){this.workerPool.push(t)},r.prototype.complete=function(t){t.error!==void 0?this.resolveHash[t.uuid].reject(t.error):this.resolveHash[t.uuid].resolve(t.data),this.resolveHash[t.uuid]=null},r.prototype._run=function(t,e){return U(this,void 0,Promise,function(){var i,n=this;return G(this,function(s){switch(s.label){case 0:return[4,this._initWorkers()];case 1:return s.sent(),i=new Promise(function(a,o){n.queue.push({id:t,arguments:e,resolve:a,reject:o})}),this.next(),[2,i]}})})},r.prototype.next=function(){if(!!this.queue.length){var t=this.getWorker();if(!!t){var e=this.queue.pop(),i=e.id;this.resolveHash[Ss]={resolve:e.resolve,reject:e.reject},t.postMessage({data:e.arguments,uuid:Ss++,id:i})}}},r}(),Rs=new jc,Si=[".jpg",".png",".jpeg",".avif",".webp"];function Wc(r){return U(this,void 0,Promise,function(){var t,e,i;return G(this,function(n){switch(n.label){case 0:return[4,P.ADAPTER.fetch(r)];case 1:if(t=n.sent(),!t.ok)throw new Error("[loadImageBitmap] Failed to fetch "+r+": "+(t.status+" "+t.statusText));return[4,t.blob()];case 2:return e=n.sent(),[4,createImageBitmap(e)];case 3:return i=n.sent(),[2,i]}})})}var An={extension:F.LoadParser,config:{preferWorkers:!0},test:function(r){for(var t=!1,e=0;e<Si.length;e++)if(r.indexOf("data:image/"+Si[e].slice(1))===0){t=!0;break}return t||Kr(r,Si)},load:function(r,t,e){return U(this,void 0,Promise,function(){var i,n,s;return G(this,function(a){switch(a.label){case 0:return i=null,window.createImageBitmap?(n=this.config.preferWorkers,n?[4,Rs.isImageBitmapSupported()]:[3,2]):[3,7];case 1:n=a.sent(),a.label=2;case 2:return n?[4,Rs.loadImageBitmap(r)]:[3,4];case 3:return i=a.sent(),[3,6];case 4:return[4,Wc(r)];case 5:i=a.sent(),a.label=6;case 6:return[3,9];case 7:return[4,new Promise(function(o){i=new Image,i.crossOrigin="anonymous",i.src=r,i.complete?o(i):i.onload=function(){o(i)}})];case 8:i=a.sent(),a.label=9;case 9:return s=new X(i,qt({resolution:te(r)},t.data)),s.resource.src=r,[2,ir(s,e,r)]}})})},unload:function(r){r.destroy(!0)}},Vc={extension:F.LoadParser,test:function(r){return ht.extname(r).includes(".svg")},testParse:function(r){return U(this,void 0,Promise,function(){return G(this,function(t){return[2,Mi.test(r)]})})},parse:function(r,t,e){var i,n,s;return U(this,void 0,Promise,function(){var a,o,h;return G(this,function(u){switch(u.label){case 0:return a=new Mi(r,(i=t==null?void 0:t.data)===null||i===void 0?void 0:i.resourceOptions),o=new X(a,qt({resolution:te(r)},t==null?void 0:t.data)),o.resource.src=r,h=ir(o,e,r),!((s=(n=t==null?void 0:t.data)===null||n===void 0?void 0:n.resourceOptions)===null||s===void 0)&&s.autoLoad?[3,2]:[4,a.load()];case 1:u.sent(),u.label=2;case 2:return[2,h]}})})},load:function(r,t){return U(this,void 0,Promise,function(){var e;return G(this,function(i){switch(i.label){case 0:return[4,P.ADAPTER.fetch(r)];case 1:return e=i.sent(),[2,e.text()]}})})},unload:An.unload},Yc=fun
|
||
|
`+v);case 4:return[2]}})})}),[4,Promise.all(h)];case 1:return l.sent(),[2,s?n[a[0].src]:n]}})})},r.prototype.unload=function(t){return U(this,void 0,Promise,function(){var e,i,n=this;return G(this,function(s){switch(s.label){case 0:return e=Yt(t,function(a){return{src:a}}),i=e.map(function(a){return U(n,void 0,void 0,function(){var o,h,u,l,f;return G(this,function(c){switch(c.label){case 0:return o=ht.toAbsolute(a.src),h=this.promiseCache[o],h?[4,h.promise]:[3,2];case 1:u=c.sent(),(f=(l=h.parser)===null||l===void 0?void 0:l.unload)===null||f===void 0||f.call(l,u,a,this),delete this.promiseCache[o],c.label=2;case 2:return[2]}})})}),[4,Promise.all(i)];case 1:return s.sent(),[2]}})})},Object.defineProperty(r.prototype,"parsers",{get:function(){return this._parsers},enumerable:!1,configurable:!0}),r}(),zc=["jpg","png","jpeg","avif","webp"],qc={extension:F.ResolveParser,test:function(r){var t=r.split("?")[0],e=t.split("."),i=e.pop(),n=e.pop();return i==="json"&&zc.includes(n)},parse:function(r){var t,e,i=r.split(".");return{resolution:parseFloat((e=(t=P.RETINA_PREFIX.exec(r))===null||t===void 0?void 0:t[1])!==null&&e!==void 0?e:"1"),format:i[i.length-2],src:r}}},$c={extension:F.ResolveParser,test:An.test,parse:function(r){var t,e;return{resolution:parseFloat((e=(t=P.RETINA_PREFIX.exec(r))===null||t===void 0?void 0:t[1])!==null&&e!==void 0?e:"1"),format:r.split(".").pop(),src:r}}};F.ResolveParser;var Kc=function(){function r(){this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}return r.prototype.prefer=function(){for(var t=arguments,e=this,i=[],n=0;n<arguments.length;n++)i[n]=t[n];i.forEach(function(s){e._preferredOrder.push(s),s.priority||(s.priority=Object.keys(s.params))}),this._resolverHash={}},Object.defineProperty(r.prototype,"basePath",{get:function(){return this._basePath},set:function(t){this._basePath=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"rootPath",{get:function(){return this._rootPath},set:function(t){this._rootPath=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"parsers",{get:function(){return this._parsers},enumerable:!1,configurable:!0}),r.prototype.reset=function(){this._preferredOrder=[],this._resolverHash={},this._assetMap={},this._rootPath=null,this._basePath=null,this._manifest=null},r.prototype.addManifest=function(t){var e=this;this._manifest&&console.warn("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=t,t.bundles.forEach(function(i){e.addBundle(i.name,i.assets)})},r.prototype.addBundle=function(t,e){var i=this,n=[];Array.isArray(e)?e.forEach(function(s){typeof s.name=="string"?n.push(s.name):n.push.apply(n,s.name),i.add(s.name,s.srcs)}):Object.keys(e).forEach(function(s){n.push(s),i.add(s,e[s])}),this._bundles[t]=n},r.prototype.add=function(t,e,i){var n=this,s=Yt(t);s.forEach(function(o){n._assetMap[o]&&console.warn("[Resolver] already has key: "+o+" overwriting")}),Array.isArray(e)||(typeof e=="string"?e=Ac(e):e=[e]);var a=e.map(function(o){var h,u=o;if(typeof o=="string"){for(var l=!1,f=0;f<n._parsers.length;f++){var c=n._parsers[f];if(c.test(o)){u=c.parse(o),l=!0;break}}l||(u={src:o})}return u.format||(u.format=u.src.split(".").pop()),u.alias||(u.alias=s),(n._basePath||n._rootPath)&&(u.src=ht.toAbsolute(u.src,n._basePath,n._rootPath)),u.data=(h=u.data)!==null&&h!==void 0?h:i,u});s.forEach(function(o){n._assetMap[o]=a})},r.prototype.resolveBundle=function(t){var e=this,i=jr(t);t=Yt(t);var n={};return t.forEach(function(s){var a=e._bundles[s];a&&(n[s]=e.resolve(a))}),i?n[t[0]]:n},r.prototype.resolveUrl=function(t){var e=this.resolve(t);if(typeof t!="string"){var i={};for(var n in e)i[n]=e[n].src;return i}return e.src},r.prototype.resolve=function(t){var e=this,i=jr(t);t=Yt(t);var n={};return t.forEach(function(s){var a;if(!e._resolverHash[s])if(e._assetMap[s]){var o=e._assetMap[s],h=e._getPreferredOrder(o),u=o[0];h==null||h.priority.forEach(function(f){h.params[f].forEach(function(c){var d=o.filter(function(p){return p[f]?p[f]===c:!1});d.length&&(o=d)})}),e._resolverHash[s
|
||
|
* @pixi/graphics - v6.5.8
|
||
|
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
||
|
*
|
||
|
* @pixi/graphics is licensed under the MIT License.
|
||
|
* http://www.opensource.org/licenses/mit-license
|
||
|
*/var Wt;(function(r){r.MITER="miter",r.BEVEL="bevel",r.ROUND="round"})(Wt||(Wt={}));var Jt;(function(r){r.BUTT="butt",r.ROUND="round",r.SQUARE="square"})(Jt||(Jt={}));var Je={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount:function(r,t){if(t===void 0&&(t=20),!this.adaptive||!r||isNaN(r))return t;var e=Math.ceil(r/this.maxLength);return e<this.minSegments?e=this.minSegments:e>this.maxSegments&&(e=this.maxSegments),e}},ga=function(){function r(){this.color=16777215,this.alpha=1,this.texture=k.WHITE,this.matrix=null,this.visible=!1,this.reset()}return r.prototype.clone=function(){var t=new r;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t},r.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=k.WHITE,this.matrix=null,this.visible=!1},r.prototype.destroy=function(){this.texture=null,this.matrix=null},r}();/*! *****************************************************************************
|
||
|
Copyright (c) Microsoft Corporation.
|
||
|
|
||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
purpose with or without fee is hereby granted.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
***************************************************************************** */var qi=function(r,t){return qi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var n in i)i.hasOwnProperty(n)&&(e[n]=i[n])},qi(r,t)};function Sn(r,t){qi(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function Ps(r,t){var e,i;t===void 0&&(t=!1);var n=r.length;if(!(n<6)){for(var s=0,a=0,o=r[n-2],h=r[n-1];a<n;a+=2){var u=r[a],l=r[a+1];s+=(u-o)*(l+h),o=u,h=l}if(!t&&s>0||t&&s<=0)for(var f=n/2,a=f+f%2;a<n;a+=2){var c=n-a-2,d=n-a-1,p=a,v=a+1;e=[r[p],r[c]],r[c]=e[0],r[p]=e[1],i=[r[v],r[d]],r[d]=i[0],r[v]=i[1]}}}var ya={build:function(r){r.points=r.shape.points.slice()},triangulate:function(r,t){var e=r.points,i=r.holes,n=t.points,s=t.indices;if(e.length>=6){Ps(e,!1);for(var a=[],o=0;o<i.length;o++){var h=i[o];Ps(h.points,!0),a.push(e.length/2),e=e.concat(h.points)}var u=Ns(e,a,2);if(!u)return;for(var l=n.length/2,o=0;o<u.length;o+=3)s.push(u[o]+l),s.push(u[o+1]+l),s.push(u[o+2]+l);for(var o=0;o<e.length;o++)n.push(e[o])}}},Wr={build:function(r){var t=r.points,e,i,n,s,a,o;if(r.type===at.CIRC){var h=r.shape;e=h.x,i=h.y,a=o=h.radius,n=s=0}else if(r.type===at.ELIP){var u=r.shape;e=u.x,i=u.y,a=u.width,o=u.height,n=s=0}else{var l=r.shape,f=l.width/2,c=l.height/2;e=l.x+f,i=l.y+c,a=o=Math.max(0,Math.min(l.radius,Math.min(f,c))),n=f-a,s=c-o}if(!(a>=0&&o>=0&&n>=0&&s>=0)){t.length=0;return}var d=Math.ceil(2.3*Math.sqrt(a+o)),p=d*8+(n?4:0)+(s?4:0);if(t.length=p,p!==0){if(d===0){t.length=8,t[0]=t[6]=e+n,t[1]=t[3]=i+s,t[2]=t[4]=e-n,t[5]=t[7]=i-s;return}var v=0,_=d*4+(n?2:0)+2,m=_,x=p;{var E=n+a,w=s,y=e+E,b=e-E,g=i+w;if(t[v++]=y,t[v++]=g,t[--_]=g,t[--_]=b,s){var A=i-w;t[m++]=b,t[m++]=A,t[--x]=A,t[--x]=y}}for(var T=1;T<d;T++){var R=Math.PI/2*(T/d),E=n+Math.cos(R)*a,w=s+Math.sin(R)*o,y=e+E,b=e-E,g=i+w,A=i-w;t[v++]=y,t[v++]=g,t[--_]=g,t[--_]=b,t[m++]=b,t[m++]=A,t[--x]=A,t[--x]=y}{var E=n,w=s+o,y=e+E,b=e-E,g=i+w,A=i-w;t[v++]=y,t[v++]=g,t[--x]=A,t[--x]=y,n&&(t[v++]=b,t[v++]=g,t[--x]=A,t[--x]=b)}}},triangulate:function(r,t){var e=r.points,i=t.points,n=t.indices;if(e.length!==0){var s=i.length/2,a=s,o,h;if(r.type!==at.RREC){var u=r.shape;o=u.x,h=u.y}else{var l=r.shape;o=l.x+l.width/2,h=l.y+l.height/2}var f=r.matrix;i.push(r.matrix?f.a*o+f.c*h+f.tx:o,r.matrix?f.b*o+f.d*h+f.ty:h),s++,i.push(e[0],e[1]);for(var c=2;c<e.length;c+=2)i.push(e[c],e[c+1]),n.push(s++,a,s);n.push(a+1,a,s)}}},Qc={build:function(r){var t=r.shape,e=t.x,i=t.y,n=t.width,s=t.height,a=r.points;a.length=0,a.push(e,i,e+n,i,e+n,i+s,e,i+s)},triangulate:function(r,t){var e=r.points,i=t.points,n=i.length/2;i.push(e[0],e[1],e[2],e[3],e[6],e[7],e[4],e[5]),t.indices.push(n,n+1,n+2,n+1,n+2,n+3)}};function Ae(r,t,e){var i=t-r;return r+i*e}function wr(r,t,e,i,n,s,a){a===void 0&&(a=[]);for(var o=20,h=a,u=0,l=0,f=0,c=0,d=0,p=0,v=0,_=0;v<=o;++v)_=v/o,u=Ae(r,e,_),l=Ae(t,i,_),f=Ae(e,n,_),c=Ae(i,s,_),d=Ae(u,f,_),p=Ae(l,c,_),!(v===0&&h[h.length-2]===d&&h[h.length-1]===p)&&h.push(d,p);return h}var Jc={build:function(r){if(Ls.nextRoundedRectBehavior){Wr.build(r);return}var t=r.shape,e=r.points,i=t.x,n=t.y,s=t.width,a=t.height,o=Math.max(0,Math.min(t.radius,Math.min(s,a)/2));e.length=0,o?(wr(i,n+o,i,n,i+o,n,e),wr(i+s-o,n,i+s,n,i+s,n+o,e),wr(i+s,n+a-o,i+s,n+a,i+s-o,n+a,e),wr(i+o,n+a,i,n+a,i,n+a-o,e)):e.push(i,n,i+s,n,i+s,n+a,i,n+a)},triangulate:function(r,t){if(Ls.nextRoundedRectBehavior){Wr.triangulate(r,t);return}for(var e=r.points,i=t.points,n=t.indices,s=i.length/2,a=Ns(e,null,2),o=0,h=a.length;o<h;o+=3)n.push(a[o]+s),n.push(a[o+1]+s),n.push(a[o+2]+s);for(var o=0,h=e.length;o<h;o++)i.push(e[o],e[++o])}};function Cs(r,t,e,i,n,s,a,o){var h=r-e*n,u=t-i*n,l=r+e*s,f=t+i*s,c,d;a?(c=i,d=-e):(c=-i,d=e);var p=h+c,v=u+d,_=l+c,m=f+d;return o.push(p,v),o.push(_,m),2}function oe(r,t,e,i,n,s,a,o){var h=e-r,u=i-t,l=Math.atan2(h,u),f=Math.atan2(n-r,s-t);o&&l<f?l+=Math.PI*2:!o&&l>f&&(f+=Math.PI*2);var c=l,d=f-l,p=Math.abs(d),v=Math.sqrt(h*h+u*u),_=(15*p*Math.sqrt(v)/Math.PI>>0)+1,m=d/_;if(c+=m,o){a.push(r,t),a.push(e,i);for(var
|