diff --git a/README.md b/README.md index afdb606..1f4bacf 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,35 @@ # Token Magic FX - Update v0.4.3-alpha -*New effects :* +*News :* - Polymorph effect : - Allow image transition between a source image (token, tile, etc.) and a target image of your choice. - 9 types of transition are provided : - Morphing, waterdrop, waving, twisting, take off/put on your disguise!, tvnoise, hologram, wind and basic alpha transition. - Properties to reduce or enlarge the target image. - XFire effect : - - A new fire filter with advanced properties, designed to be easily colorizable. + - A fire filter with advanced properties, designed to be easily colorizable. - specific blend modes that do not alter the visual quality of the filter depending on the brightness and intensity of the source image. - An advanced mode allows you to choose up to 4 colors to compose your perfect fire. - An inlay mode to create new effects, like superfrost or superheat. - A chromatic mode. - Adjustable scale on the x and y axis. - New macros have been added to the TMFX compendium (+ new presets for main library and templates) +- Added two new `animType` : + - `halfCosOscillation` and `halfSinOscillation` : + - The half of the given oscillation in one loop. + - A tutorial is provided in the following macro : "36 - T01 - Turn into Mystery Man (polymorph)" -*Improvements :* +*Updates :* - Rank your effects : - The order in which you put your filters is important. - A new property called `rank` allow you to force the ordering of filters on a given target. - Filters with lowest rank are executed first, etc. - - If you do not specify a rank, TMFX will automatically assign rank within its reserved range (which start at 10000, to 20000). + - If you do not specify a rank, TMFX will automatically assign rank within its reserved range (10000 to 20000). - This system is the default mode and an alternative to the zOrder option, you can use either. - Transform filter : - The twist and bulge/pinch filters have been reengineered and put in the transform filter : - with better performance and the elimination of flicker. - -*New animtypes :* -- Added two new `animType` : - - `halfCosOscillation` and `halfSinOscillation` : - - The half of the given oscillation in one loop. - - A tutorial is provided in the following macro : "36 - T01 - Turn into Mystery Man (polymorph)" +- Updated PIXI libs *Deprecated :* - Twist and Bulge/Pinch effects : diff --git a/tokenmagic/fx/Anime.js b/tokenmagic/fx/Anime.js index 7219be9..9c4ab63 100644 --- a/tokenmagic/fx/Anime.js +++ b/tokenmagic/fx/Anime.js @@ -110,9 +110,10 @@ export class Anime { } async persistTerminatedEffect(effect) { + if (!(this.puppet.filterOwner === game.data.userId)) { return; } + let animeInfo; let doInit = true; - let flag = this.puppet.targetPlaceable.getFlag("tokenmagic", "animeInfo"); if (flag) { diff --git a/tokenmagic/fx/glsl/fragmentshaders/polymorph.js b/tokenmagic/fx/glsl/fragmentshaders/polymorph.js index 58c1eff..faaea65 100644 --- a/tokenmagic/fx/glsl/fragmentshaders/polymorph.js +++ b/tokenmagic/fx/glsl/fragmentshaders/polymorph.js @@ -189,6 +189,17 @@ void main() { uvExtra *= mat2(scale,0.,0.,scale); uvExtra += vec2(0.5); + // shortcut to prevent a lot of computation if progress is equal to 0 or 1 + if (progress == 1.) { + gl_FragColor = getToColor(uvExtra); + return; + } + + if (progress == 0.) { + gl_FragColor = getFromColor(vTextureCoord); + return; + } + if (type <= 1 || type >= 10) { result = transition(vTextureCoord, uvExtra); } else if (type == 2) { diff --git a/tokenmagic/libs/filters/pixi-filters.js b/tokenmagic/libs/filters/pixi-filters.js index 09bf4bf..0e9a5eb 100644 --- a/tokenmagic/libs/filters/pixi-filters.js +++ b/tokenmagic/libs/filters/pixi-filters.js @@ -1,9 +1,9 @@ /*! - * pixi-filters - v3.0.3 - * Compiled Wed, 29 May 2019 03:04:05 UTC + * pixi-filters - v3.1.0 + * Compiled Wed, 11 Mar 2020 20:38:18 UTC * * pixi-filters is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */ -var __filters=function(e,t,n,r,o,i,l,s){"use strict";var a="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",u="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float gamma;\nuniform float contrast;\nuniform float saturation;\nuniform float brightness;\nuniform float red;\nuniform float green;\nuniform float blue;\nuniform float alpha;\n\nvoid main(void)\n{\n vec4 c = texture2D(uSampler, vTextureCoord);\n\n if (c.a > 0.0) {\n c.rgb /= c.a;\n\n vec3 rgb = pow(c.rgb, vec3(1. / gamma));\n rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, saturation), contrast);\n rgb.r *= red;\n rgb.g *= green;\n rgb.b *= blue;\n c.rgb = rgb * brightness;\n\n c.rgb *= c.a;\n }\n\n gl_FragColor = c * alpha;\n}\n",c=function(e){function t(t){e.call(this,a,u),Object.assign(this,{gamma:1,saturation:1,contrast:1,brightness:1,red:1,green:1,blue:1,alpha:1},t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e,t,n,r){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,e.applyFilter(this,t,n,r)},t}(t.Filter),f=a,h="\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec2 uOffset;\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n\n // Sample top left pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y));\n\n // Sample top right pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y));\n\n // Sample bottom right pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y));\n\n // Sample bottom left pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y));\n\n // Average\n color *= 0.25;\n\n gl_FragColor = color;\n}",p="\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec2 uOffset;\nuniform vec4 filterClamp;\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n\n // Sample top left pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Sample top right pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Sample bottom right pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Sample bottom left pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Average\n color *= 0.25;\n\n gl_FragColor = color;\n}\n",d=function(e){function t(t,r,o){void 0===t&&(t=4),void 0===r&&(r=3),void 0===o&&(o=!1),e.call(this,f,o?p:h),this.uniforms.uOffset=new Float32Array(2),this._pixelSize=new n.Point,this.pixelSize=1,this._clamp=o,this._kernels=null,Array.isArray(t)?this.kernels=t:(this._blur=t,this.quality=r)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={kernels:{configurable:!0},clamp:{configurable:!0},pixelSize:{configurable:!0},quality:{configurable:!0},blur:{configurable:!0}};return t.prototype.apply=function(e,t,n,r){var o,i=this.pixelSize.x/t._frame.width,l=this.pixelSize.y/t._frame.height;if(1===this._quality||0===this._blur)o=this._kernels[0]+.5,this.uniforms.uOffset[0]=o*i,this.uniforms.uOffset[1]=o*l,e.applyFilter(this,t,n,r);else{for(var s,a=e.getFilterTexture(),u=t,c=a,f=this._quality-1,h=0;h0)for(var r=e,o=e/t,i=1;i0?(this._kernels=e,this._quality=e.length,this._blur=Math.max.apply(Math,e)):(this._kernels=[0],this._quality=1)},r.clamp.get=function(){return this._clamp},r.pixelSize.set=function(e){"number"==typeof e?(this._pixelSize.x=e,this._pixelSize.y=e):Array.isArray(e)?(this._pixelSize.x=e[0],this._pixelSize.y=e[1]):e instanceof n.Point?(this._pixelSize.x=e.x,this._pixelSize.y=e.y):(this._pixelSize.x=1,this._pixelSize.y=1)},r.pixelSize.get=function(){return this._pixelSize},r.quality.get=function(){return this._quality},r.quality.set=function(e){this._quality=Math.max(1,Math.round(e)),this._generateKernels()},r.blur.get=function(){return this._blur},r.blur.set=function(e){this._blur=e,this._generateKernels()},Object.defineProperties(t.prototype,r),t}(t.Filter),m=a,g="\nuniform sampler2D uSampler;\nvarying vec2 vTextureCoord;\n\nuniform float threshold;\n\nvoid main() {\n vec4 color = texture2D(uSampler, vTextureCoord);\n\n // A simple & fast algorithm for getting brightness.\n // It's inaccuracy , but good enought for this feature.\n float _max = max(max(color.r, color.g), color.b);\n float _min = min(min(color.r, color.g), color.b);\n float brightness = (_max + _min) * 0.5;\n\n if(brightness > threshold) {\n gl_FragColor = color;\n } else {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n}\n",v=function(e){function t(t){void 0===t&&(t=.5),e.call(this,m,g),this.threshold=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={threshold:{configurable:!0}};return n.threshold.get=function(){return this.uniforms.threshold},n.threshold.set=function(e){this.uniforms.threshold=e},Object.defineProperties(t.prototype,n),t}(t.Filter),x="uniform sampler2D uSampler;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D bloomTexture;\nuniform float bloomScale;\nuniform float brightness;\n\nvoid main() {\n vec4 color = texture2D(uSampler, vTextureCoord);\n color.rgb *= brightness;\n vec4 bloomColor = vec4(texture2D(bloomTexture, vTextureCoord).rgb, 0.0);\n bloomColor.rgb *= bloomScale;\n gl_FragColor = color + bloomColor;\n}\n",y=function(e){function t(t){e.call(this,m,x),"number"==typeof t&&(t={threshold:t}),t=Object.assign({threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:r.settings.RESOLUTION},t),this.bloomScale=t.bloomScale,this.brightness=t.brightness;var n=t.kernels,o=t.blur,i=t.quality,l=t.pixelSize,s=t.resolution;this._extractFilter=new v(t.threshold),this._extractFilter.resolution=s,this._blurFilter=n?new d(n):new d(o,i),this.pixelSize=l,this.resolution=s}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={resolution:{configurable:!0},threshold:{configurable:!0},kernels:{configurable:!0},blur:{configurable:!0},quality:{configurable:!0},pixelSize:{configurable:!0}};return t.prototype.apply=function(e,t,n,r,o){var i=e.getFilterTexture();this._extractFilter.apply(e,t,i,!0,o);var l=e.getFilterTexture();this._blurFilter.apply(e,i,l,!0,o),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=l,e.applyFilter(this,t,n,r),e.returnFilterTexture(l),e.returnFilterTexture(i)},n.resolution.get=function(){return this._resolution},n.resolution.set=function(e){this._resolution=e,this._extractFilter&&(this._extractFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)},n.threshold.get=function(){return this._extractFilter.threshold},n.threshold.set=function(e){this._extractFilter.threshold=e},n.kernels.get=function(){return this._blurFilter.kernels},n.kernels.set=function(e){this._blurFilter.kernels=e},n.blur.get=function(){return this._blurFilter.blur},n.blur.set=function(e){this._blurFilter.blur=e},n.quality.get=function(){return this._blurFilter.quality},n.quality.set=function(e){this._blurFilter.quality=e},n.pixelSize.get=function(){return this._blurFilter.pixelSize},n.pixelSize.set=function(e){this._blurFilter.pixelSize=e},Object.defineProperties(t.prototype,n),t}(t.Filter),b=a,_="varying vec2 vTextureCoord;\n\nuniform vec4 filterArea;\nuniform float pixelSize;\nuniform sampler2D uSampler;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvec2 pixelate(vec2 coord, vec2 size)\n{\n return floor( coord / size ) * size;\n}\n\nvec2 getMod(vec2 coord, vec2 size)\n{\n return mod( coord , size) / size;\n}\n\nfloat character(float n, vec2 p)\n{\n p = floor(p*vec2(4.0, -4.0) + 2.5);\n\n if (clamp(p.x, 0.0, 4.0) == p.x)\n {\n if (clamp(p.y, 0.0, 4.0) == p.y)\n {\n if (int(mod(n/exp2(p.x + 5.0*p.y), 2.0)) == 1) return 1.0;\n }\n }\n return 0.0;\n}\n\nvoid main()\n{\n vec2 coord = mapCoord(vTextureCoord);\n\n // get the rounded color..\n vec2 pixCoord = pixelate(coord, vec2(pixelSize));\n pixCoord = unmapCoord(pixCoord);\n\n vec4 color = texture2D(uSampler, pixCoord);\n\n // determine the character to use\n float gray = (color.r + color.g + color.b) / 3.0;\n\n float n = 65536.0; // .\n if (gray > 0.2) n = 65600.0; // :\n if (gray > 0.3) n = 332772.0; // *\n if (gray > 0.4) n = 15255086.0; // o\n if (gray > 0.5) n = 23385164.0; // &\n if (gray > 0.6) n = 15252014.0; // 8\n if (gray > 0.7) n = 13199452.0; // @\n if (gray > 0.8) n = 11512810.0; // #\n\n // get the mod..\n vec2 modd = getMod(coord, vec2(pixelSize));\n\n gl_FragColor = color * character( n, vec2(-1.0) + modd * 2.0);\n\n}\n",C=function(e){function t(t){void 0===t&&(t=8),e.call(this,b,_),this.size=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={size:{configurable:!0}};return n.size.get=function(){return this.uniforms.pixelSize},n.size.set=function(e){this.uniforms.pixelSize=e},Object.defineProperties(t.prototype,n),t}(t.Filter),S=a,F="precision mediump float;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\nuniform float transformX;\nuniform float transformY;\nuniform vec3 lightColor;\nuniform float lightAlpha;\nuniform vec3 shadowColor;\nuniform float shadowAlpha;\n\nvoid main(void) {\n vec2 transform = vec2(1.0 / filterArea) * vec2(transformX, transformY);\n vec4 color = texture2D(uSampler, vTextureCoord);\n float light = texture2D(uSampler, vTextureCoord - transform).a;\n float shadow = texture2D(uSampler, vTextureCoord + transform).a;\n\n color.rgb = mix(color.rgb, lightColor, clamp((color.a - light) * lightAlpha, 0.0, 1.0));\n color.rgb = mix(color.rgb, shadowColor, clamp((color.a - shadow) * shadowAlpha, 0.0, 1.0));\n gl_FragColor = vec4(color.rgb * color.a, color.a);\n}\n",z=function(e){function t(t){void 0===t&&(t={}),e.call(this,S,F),this.uniforms.lightColor=new Float32Array(3),this.uniforms.shadowColor=new Float32Array(3),t=Object.assign({rotation:45,thickness:2,lightColor:16777215,lightAlpha:.7,shadowColor:0,shadowAlpha:.7},t),this.rotation=t.rotation,this.thickness=t.thickness,this.lightColor=t.lightColor,this.lightAlpha=t.lightAlpha,this.shadowColor=t.shadowColor,this.shadowAlpha=t.shadowAlpha}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={rotation:{configurable:!0},thickness:{configurable:!0},lightColor:{configurable:!0},lightAlpha:{configurable:!0},shadowColor:{configurable:!0},shadowAlpha:{configurable:!0}};return t.prototype._updateTransform=function(){this.uniforms.transformX=this._thickness*Math.cos(this._angle),this.uniforms.transformY=this._thickness*Math.sin(this._angle)},r.rotation.get=function(){return this._angle/n.DEG_TO_RAD},r.rotation.set=function(e){this._angle=e*n.DEG_TO_RAD,this._updateTransform()},r.thickness.get=function(){return this._thickness},r.thickness.set=function(e){this._thickness=e,this._updateTransform()},r.lightColor.get=function(){return o.rgb2hex(this.uniforms.lightColor)},r.lightColor.set=function(e){o.hex2rgb(e,this.uniforms.lightColor)},r.lightAlpha.get=function(){return this.uniforms.lightAlpha},r.lightAlpha.set=function(e){this.uniforms.lightAlpha=e},r.shadowColor.get=function(){return o.rgb2hex(this.uniforms.shadowColor)},r.shadowColor.set=function(e){o.hex2rgb(e,this.uniforms.shadowColor)},r.shadowAlpha.get=function(){return this.uniforms.shadowAlpha},r.shadowAlpha.set=function(e){this.uniforms.shadowAlpha=e},Object.defineProperties(t.prototype,r),t}(t.Filter),A=function(e){function t(t,o,a,u){var c,f;void 0===t&&(t=2),void 0===o&&(o=4),void 0===a&&(a=r.settings.RESOLUTION),void 0===u&&(u=5),e.call(this),"number"==typeof t?(c=t,f=t):t instanceof n.Point?(c=t.x,f=t.y):Array.isArray(t)&&(c=t[0],f=t[1]),this.blurXFilter=new s.BlurFilterPass(!0,c,o,a,u),this.blurYFilter=new s.BlurFilterPass(!1,f,o,a,u),this.blurYFilter.blendMode=i.BLEND_MODES.SCREEN,this.defaultFilter=new l.AlphaFilter}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var o={blur:{configurable:!0},blurX:{configurable:!0},blurY:{configurable:!0}};return t.prototype.apply=function(e,t,n){var r=e.getFilterTexture(!0);this.defaultFilter.apply(e,t,n),this.blurXFilter.apply(e,t,r),this.blurYFilter.apply(e,r,n),e.returnFilterTexture(r)},o.blur.get=function(){return this.blurXFilter.blur},o.blur.set=function(e){this.blurXFilter.blur=this.blurYFilter.blur=e},o.blurX.get=function(){return this.blurXFilter.blur},o.blurX.set=function(e){this.blurXFilter.blur=e},o.blurY.get=function(){return this.blurYFilter.blur},o.blurY.set=function(e){this.blurYFilter.blur=e},Object.defineProperties(t.prototype,o),t}(t.Filter),w=a,T="uniform float radius;\nuniform float strength;\nuniform vec2 center;\nuniform sampler2D uSampler;\nvarying vec2 vTextureCoord;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\n\nvoid main()\n{\n vec2 coord = vTextureCoord * filterArea.xy;\n coord -= center * dimensions.xy;\n float distance = length(coord);\n if (distance < radius) {\n float percent = distance / radius;\n if (strength > 0.0) {\n coord *= mix(1.0, smoothstep(0.0, radius / distance, percent), strength * 0.75);\n } else {\n coord *= mix(1.0, pow(percent, 1.0 + strength * 0.75) * radius / distance, 1.0 - percent);\n }\n }\n coord += center * dimensions.xy;\n coord /= filterArea.xy;\n vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw);\n vec4 color = texture2D(uSampler, clampedCoord);\n if (coord != clampedCoord) {\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\n }\n\n gl_FragColor = color;\n}\n",D=function(e){function t(t,n,r){e.call(this,w,T),this.uniforms.dimensions=new Float32Array(2),this.center=t||[.5,.5],this.radius="number"==typeof n?n:100,this.strength="number"==typeof r?r:1}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={radius:{configurable:!0},strength:{configurable:!0},center:{configurable:!0}};return t.prototype.apply=function(e,t,n,r){this.uniforms.dimensions[0]=t.filterFrame.width,this.uniforms.dimensions[1]=t.filterFrame.height,e.applyFilter(this,t,n,r)},n.radius.get=function(){return this.uniforms.radius},n.radius.set=function(e){this.uniforms.radius=e},n.strength.get=function(){return this.uniforms.strength},n.strength.set=function(e){this.uniforms.strength=e},n.center.get=function(){return this.uniforms.center},n.center.set=function(e){this.uniforms.center=e},Object.defineProperties(t.prototype,n),t}(t.Filter),O=a,P="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform sampler2D colorMap;\nuniform float _mix;\nuniform float _size;\nuniform float _sliceSize;\nuniform float _slicePixelSize;\nuniform float _sliceInnerSize;\nvoid main() {\n vec4 color = texture2D(uSampler, vTextureCoord.xy);\n\n vec4 adjusted;\n if (color.a > 0.0) {\n color.rgb /= color.a;\n float innerWidth = _size - 1.0;\n float zSlice0 = min(floor(color.b * innerWidth), innerWidth);\n float zSlice1 = min(zSlice0 + 1.0, innerWidth);\n float xOffset = _slicePixelSize * 0.5 + color.r * _sliceInnerSize;\n float s0 = xOffset + (zSlice0 * _sliceSize);\n float s1 = xOffset + (zSlice1 * _sliceSize);\n float yOffset = _sliceSize * 0.5 + color.g * (1.0 - _sliceSize);\n vec4 slice0Color = texture2D(colorMap, vec2(s0,yOffset));\n vec4 slice1Color = texture2D(colorMap, vec2(s1,yOffset));\n float zOffset = fract(color.b * innerWidth);\n adjusted = mix(slice0Color, slice1Color, zOffset);\n\n color.rgb *= color.a;\n }\n gl_FragColor = vec4(mix(color, adjusted, _mix).rgb, color.a);\n\n}",M=function(e){function n(t,n,r){void 0===n&&(n=!1),void 0===r&&(r=1),e.call(this,O,P),this._size=0,this._sliceSize=0,this._slicePixelSize=0,this._sliceInnerSize=0,this._scaleMode=null,this._nearest=!1,this.nearest=n,this.mix=r,this.colorMap=t}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var r={colorSize:{configurable:!0},colorMap:{configurable:!0},nearest:{configurable:!0}};return n.prototype.apply=function(e,t,n,r){this.uniforms._mix=this.mix,e.applyFilter(this,t,n,r)},r.colorSize.get=function(){return this._size},r.colorMap.get=function(){return this._colorMap},r.colorMap.set=function(e){e instanceof t.Texture||(e=t.Texture.from(e)),e&&e.baseTexture&&(e.baseTexture.scaleMode=this._scaleMode,e.baseTexture.mipmap=!1,this._size=e.height,this._sliceSize=1/this._size,this._slicePixelSize=this._sliceSize/this._size,this._sliceInnerSize=this._slicePixelSize*(this._size-1),this.uniforms._size=this._size,this.uniforms._sliceSize=this._sliceSize,this.uniforms._slicePixelSize=this._slicePixelSize,this.uniforms._sliceInnerSize=this._sliceInnerSize,this.uniforms.colorMap=e),this._colorMap=e},r.nearest.get=function(){return this._nearest},r.nearest.set=function(e){this._nearest=e,this._scaleMode=e?i.SCALE_MODES.NEAREST:i.SCALE_MODES.LINEAR;var t=this._colorMap;t&&t.baseTexture&&(t.baseTexture._glTextures={},t.baseTexture.scaleMode=this._scaleMode,t.baseTexture.mipmap=!1,t._updateID++,t.baseTexture.emit("update",t.baseTexture))},n.prototype.updateColorMap=function(){var e=this._colorMap;e&&e.baseTexture&&(e._updateID++,e.baseTexture.emit("update",e.baseTexture),this.colorMap=e)},n.prototype.destroy=function(t){this._colorMap&&this._colorMap.destroy(t),e.prototype.destroy.call(this)},Object.defineProperties(n.prototype,r),n}(t.Filter),R=a,j="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec3 originalColor;\nuniform vec3 newColor;\nuniform float epsilon;\nvoid main(void) {\n vec4 currentColor = texture2D(uSampler, vTextureCoord);\n vec3 colorDiff = originalColor - (currentColor.rgb / max(currentColor.a, 0.0000000001));\n float colorDistance = length(colorDiff);\n float doReplace = step(colorDistance, epsilon);\n gl_FragColor = vec4(mix(currentColor.rgb, (newColor + colorDiff) * currentColor.a, doReplace), currentColor.a);\n}\n",k=function(e){function t(t,n,r){void 0===t&&(t=16711680),void 0===n&&(n=0),void 0===r&&(r=.4),e.call(this,R,j),this.uniforms.originalColor=new Float32Array(3),this.uniforms.newColor=new Float32Array(3),this.originalColor=t,this.newColor=n,this.epsilon=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={originalColor:{configurable:!0},newColor:{configurable:!0},epsilon:{configurable:!0}};return n.originalColor.set=function(e){var t=this.uniforms.originalColor;"number"==typeof e?(o.hex2rgb(e,t),this._originalColor=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],this._originalColor=o.rgb2hex(t))},n.originalColor.get=function(){return this._originalColor},n.newColor.set=function(e){var t=this.uniforms.newColor;"number"==typeof e?(o.hex2rgb(e,t),this._newColor=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],this._newColor=o.rgb2hex(t))},n.newColor.get=function(){return this._newColor},n.epsilon.set=function(e){this.uniforms.epsilon=e},n.epsilon.get=function(){return this.uniforms.epsilon},Object.defineProperties(t.prototype,n),t}(t.Filter),L=a,I="precision mediump float;\n\nvarying mediump vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec2 texelSize;\nuniform float matrix[9];\n\nvoid main(void)\n{\n vec4 c11 = texture2D(uSampler, vTextureCoord - texelSize); // top left\n vec4 c12 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - texelSize.y)); // top center\n vec4 c13 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y - texelSize.y)); // top right\n\n vec4 c21 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y)); // mid left\n vec4 c22 = texture2D(uSampler, vTextureCoord); // mid center\n vec4 c23 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y)); // mid right\n\n vec4 c31 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y + texelSize.y)); // bottom left\n vec4 c32 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + texelSize.y)); // bottom center\n vec4 c33 = texture2D(uSampler, vTextureCoord + texelSize); // bottom right\n\n gl_FragColor =\n c11 * matrix[0] + c12 * matrix[1] + c13 * matrix[2] +\n c21 * matrix[3] + c22 * matrix[4] + c23 * matrix[5] +\n c31 * matrix[6] + c32 * matrix[7] + c33 * matrix[8];\n\n gl_FragColor.a = c22.a;\n}\n",E=function(e){function t(t,n,r){void 0===n&&(n=200),void 0===r&&(r=200),e.call(this,L,I),this.uniforms.texelSize=new Float32Array(2),this.uniforms.matrix=new Float32Array(9),void 0!==t&&(this.matrix=t),this.width=n,this.height=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={matrix:{configurable:!0},width:{configurable:!0},height:{configurable:!0}};return n.matrix.get=function(){return this.uniforms.matrix},n.matrix.set=function(e){var t=this;e.forEach(function(e,n){return t.uniforms.matrix[n]=e})},n.width.get=function(){return 1/this.uniforms.texelSize[0]},n.width.set=function(e){this.uniforms.texelSize[0]=1/e},n.height.get=function(){return 1/this.uniforms.texelSize[1]},n.height.set=function(e){this.uniforms.texelSize[1]=1/e},Object.defineProperties(t.prototype,n),t}(t.Filter),B=a,X="precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n float lum = length(texture2D(uSampler, vTextureCoord.xy).rgb);\n\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n\n if (lum < 1.00)\n {\n if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.75)\n {\n if (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.50)\n {\n if (mod(gl_FragCoord.x + gl_FragCoord.y - 5.0, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.3)\n {\n if (mod(gl_FragCoord.x - gl_FragCoord.y - 5.0, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n}\n",N=function(e){function t(){e.call(this,B,X)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(t.Filter),q=a,W="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\nuniform vec2 dimensions;\n\nconst float SQRT_2 = 1.414213;\n\nconst float light = 1.0;\n\nuniform float curvature;\nuniform float lineWidth;\nuniform float lineContrast;\nuniform bool verticalLine;\nuniform float noise;\nuniform float noiseSize;\n\nuniform float vignetting;\nuniform float vignettingAlpha;\nuniform float vignettingBlur;\n\nuniform float seed;\nuniform float time;\n\nfloat rand(vec2 co) {\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main(void)\n{\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\n vec2 coord = pixelCoord / dimensions;\n\n vec2 dir = vec2(coord - vec2(0.5, 0.5));\n\n float _c = curvature > 0. ? curvature : 1.;\n float k = curvature > 0. ?(length(dir * dir) * 0.25 * _c * _c + 0.935 * _c) : 1.;\n vec2 uv = dir * k;\n\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n vec3 rgb = gl_FragColor.rgb;\n\n\n if (noise > 0.0 && noiseSize > 0.0)\n {\n pixelCoord.x = floor(pixelCoord.x / noiseSize);\n pixelCoord.y = floor(pixelCoord.y / noiseSize);\n float _noise = rand(pixelCoord * noiseSize * seed) - 0.5;\n rgb += _noise * noise;\n }\n\n if (lineWidth > 0.0) {\n float v = (verticalLine ? uv.x * dimensions.x : uv.y * dimensions.y) * min(1.0, 2.0 / lineWidth ) / _c;\n float j = 1. + cos(v * 1.2 - time) * 0.5 * lineContrast;\n rgb *= j;\n float segment = verticalLine ? mod((dir.x + .5) * dimensions.x, 4.) : mod((dir.y + .5) * dimensions.y, 4.);\n rgb *= 0.99 + ceil(segment) * 0.015;\n }\n\n if (vignetting > 0.0)\n {\n float outter = SQRT_2 - vignetting * SQRT_2;\n float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0);\n rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha);\n }\n\n gl_FragColor.rgb = rgb;\n}\n",K=function(e){function t(t){e.call(this,q,W),this.uniforms.dimensions=new Float32Array(2),this.time=0,this.seed=0,Object.assign(this,{curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0},t)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={curvature:{configurable:!0},lineWidth:{configurable:!0},lineContrast:{configurable:!0},verticalLine:{configurable:!0},noise:{configurable:!0},noiseSize:{configurable:!0},vignetting:{configurable:!0},vignettingAlpha:{configurable:!0},vignettingBlur:{configurable:!0}};return t.prototype.apply=function(e,t,n,r){this.uniforms.dimensions[0]=t.filterFrame.width,this.uniforms.dimensions[1]=t.filterFrame.height,this.uniforms.seed=this.seed,this.uniforms.time=this.time,e.applyFilter(this,t,n,r)},n.curvature.set=function(e){this.uniforms.curvature=e},n.curvature.get=function(){return this.uniforms.curvature},n.lineWidth.set=function(e){this.uniforms.lineWidth=e},n.lineWidth.get=function(){return this.uniforms.lineWidth},n.lineContrast.set=function(e){this.uniforms.lineContrast=e},n.lineContrast.get=function(){return this.uniforms.lineContrast},n.verticalLine.set=function(e){this.uniforms.verticalLine=e},n.verticalLine.get=function(){return this.uniforms.verticalLine},n.noise.set=function(e){this.uniforms.noise=e},n.noise.get=function(){return this.uniforms.noise},n.noiseSize.set=function(e){this.uniforms.noiseSize=e},n.noiseSize.get=function(){return this.uniforms.noiseSize},n.vignetting.set=function(e){this.uniforms.vignetting=e},n.vignetting.get=function(){return this.uniforms.vignetting},n.vignettingAlpha.set=function(e){this.uniforms.vignettingAlpha=e},n.vignettingAlpha.get=function(){return this.uniforms.vignettingAlpha},n.vignettingBlur.set=function(e){this.uniforms.vignettingBlur=e},n.vignettingBlur.get=function(){return this.uniforms.vignettingBlur},Object.defineProperties(t.prototype,n),t}(t.Filter),Y=a,G="precision mediump float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform vec4 filterArea;\nuniform sampler2D uSampler;\n\nuniform float angle;\nuniform float scale;\n\nfloat pattern()\n{\n float s = sin(angle), c = cos(angle);\n vec2 tex = vTextureCoord * filterArea.xy;\n vec2 point = vec2(\n c * tex.x - s * tex.y,\n s * tex.x + c * tex.y\n ) * scale;\n return (sin(point.x) * sin(point.y)) * 4.0;\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float average = (color.r + color.g + color.b) / 3.0;\n gl_FragColor = vec4(vec3(average * 10.0 - 5.0 + pattern()), color.a);\n}\n",Q=function(e){function t(t,n){void 0===t&&(t=1),void 0===n&&(n=5),e.call(this,Y,G),this.scale=t,this.angle=n}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={scale:{configurable:!0},angle:{configurable:!0}};return n.scale.get=function(){return this.uniforms.scale},n.scale.set=function(e){this.uniforms.scale=e},n.angle.get=function(){return this.uniforms.angle},n.angle.set=function(e){this.uniforms.angle=e},Object.defineProperties(t.prototype,n),t}(t.Filter),U=a,Z="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float alpha;\nuniform vec3 color;\n\nuniform vec2 shift;\nuniform vec4 inputSize;\n\nvoid main(void){\n vec4 sample = texture2D(uSampler, vTextureCoord - shift * inputSize.zw);\n\n // Un-premultiply alpha before applying the color\n if (sample.a > 0.0) {\n sample.rgb /= sample.a;\n }\n\n // Premultiply alpha again\n sample.rgb = color.rgb * sample.a;\n\n // alpha user alpha\n sample *= alpha;\n\n gl_FragColor = sample;\n}",V=function(e){function t(t){t&&t.constructor!==Object&&(console.warn("DropShadowFilter now uses options instead of (rotation, distance, blur, color, alpha)"),t={rotation:t},void 0!==arguments[1]&&(t.distance=arguments[1]),void 0!==arguments[2]&&(t.blur=arguments[2]),void 0!==arguments[3]&&(t.color=arguments[3]),void 0!==arguments[4]&&(t.alpha=arguments[4])),t=Object.assign({rotation:45,distance:5,color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:r.settings.RESOLUTION},t),e.call(this);var o=t.kernels,i=t.blur,l=t.quality,s=t.pixelSize,a=t.resolution;this._tintFilter=new e(U,Z),this._tintFilter.uniforms.color=new Float32Array(4),this._tintFilter.uniforms.shift=new n.Point,this._tintFilter.resolution=a,this._blurFilter=o?new d(o):new d(i,l),this.pixelSize=s,this.resolution=a;var u=t.shadowOnly,c=t.rotation,f=t.distance,h=t.alpha,p=t.color;this.shadowOnly=u,this.rotation=c,this.distance=f,this.alpha=h,this.color=p,this._updatePadding()}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={resolution:{configurable:!0},distance:{configurable:!0},rotation:{configurable:!0},alpha:{configurable:!0},color:{configurable:!0},kernels:{configurable:!0},blur:{configurable:!0},quality:{configurable:!0},pixelSize:{configurable:!0}};return t.prototype.apply=function(e,t,n,r){var o=e.getFilterTexture();this._tintFilter.apply(e,t,o,!0),this._blurFilter.apply(e,o,n,r),!0!==this.shadowOnly&&e.applyFilter(this,t,n,!1),e.returnFilterTexture(o)},t.prototype._updatePadding=function(){this.padding=this.distance+2*this.blur},t.prototype._updateShift=function(){this._tintFilter.uniforms.shift.set(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle))},i.resolution.get=function(){return this._resolution},i.resolution.set=function(e){this._resolution=e,this._tintFilter&&(this._tintFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)},i.distance.get=function(){return this._distance},i.distance.set=function(e){this._distance=e,this._updatePadding(),this._updateShift()},i.rotation.get=function(){return this.angle/n.DEG_TO_RAD},i.rotation.set=function(e){this.angle=e*n.DEG_TO_RAD,this._updateShift()},i.alpha.get=function(){return this._tintFilter.uniforms.alpha},i.alpha.set=function(e){this._tintFilter.uniforms.alpha=e},i.color.get=function(){return o.rgb2hex(this._tintFilter.uniforms.color)},i.color.set=function(e){o.hex2rgb(e,this._tintFilter.uniforms.color)},i.kernels.get=function(){return this._blurFilter.kernels},i.kernels.set=function(e){this._blurFilter.kernels=e},i.blur.get=function(){return this._blurFilter.blur},i.blur.set=function(e){this._blurFilter.blur=e,this._updatePadding()},i.quality.get=function(){return this._blurFilter.quality},i.quality.set=function(e){this._blurFilter.quality=e},i.pixelSize.get=function(){return this._blurFilter.pixelSize},i.pixelSize.set=function(e){this._blurFilter.pixelSize=e},Object.defineProperties(t.prototype,i),t}(t.Filter),H=a,$="precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float strength;\nuniform vec4 filterArea;\n\n\nvoid main(void)\n{\n\tvec2 onePixel = vec2(1.0 / filterArea);\n\n\tvec4 color;\n\n\tcolor.rgb = vec3(0.5);\n\n\tcolor -= texture2D(uSampler, vTextureCoord - onePixel) * strength;\n\tcolor += texture2D(uSampler, vTextureCoord + onePixel) * strength;\n\n\tcolor.rgb = vec3((color.r + color.g + color.b) / 3.0);\n\n\tfloat alpha = texture2D(uSampler, vTextureCoord).a;\n\n\tgl_FragColor = vec4(color.rgb * alpha, alpha);\n}\n",J=function(e){function t(t){void 0===t&&(t=5),e.call(this,H,$),this.strength=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={strength:{configurable:!0}};return n.strength.get=function(){return this.uniforms.strength},n.strength.set=function(e){this.uniforms.strength=e},Object.defineProperties(t.prototype,n),t}(t.Filter),ee=a,te="// precision highp float;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\nuniform float aspect;\n\nuniform sampler2D displacementMap;\nuniform float offset;\nuniform float sinDir;\nuniform float cosDir;\nuniform int fillMode;\n\nuniform float seed;\nuniform vec2 red;\nuniform vec2 green;\nuniform vec2 blue;\n\nconst int TRANSPARENT = 0;\nconst int ORIGINAL = 1;\nconst int LOOP = 2;\nconst int CLAMP = 3;\nconst int MIRROR = 4;\n\nvoid main(void)\n{\n vec2 coord = (vTextureCoord * filterArea.xy) / dimensions;\n\n if (coord.x > 1.0 || coord.y > 1.0) {\n return;\n }\n\n float cx = coord.x - 0.5;\n float cy = (coord.y - 0.5) * aspect;\n float ny = (-sinDir * cx + cosDir * cy) / aspect + 0.5;\n\n // displacementMap: repeat\n // ny = ny > 1.0 ? ny - 1.0 : (ny < 0.0 ? 1.0 + ny : ny);\n\n // displacementMap: mirror\n ny = ny > 1.0 ? 2.0 - ny : (ny < 0.0 ? -ny : ny);\n\n vec4 dc = texture2D(displacementMap, vec2(0.5, ny));\n\n float displacement = (dc.r - dc.g) * (offset / filterArea.x);\n\n coord = vTextureCoord + vec2(cosDir * displacement, sinDir * displacement * aspect);\n\n if (fillMode == CLAMP) {\n coord = clamp(coord, filterClamp.xy, filterClamp.zw);\n } else {\n if( coord.x > filterClamp.z ) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.x -= filterClamp.z;\n } else if (fillMode == MIRROR) {\n coord.x = filterClamp.z * 2.0 - coord.x;\n }\n } else if( coord.x < filterClamp.x ) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.x += filterClamp.z;\n } else if (fillMode == MIRROR) {\n coord.x *= -filterClamp.z;\n }\n }\n\n if( coord.y > filterClamp.w ) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.y -= filterClamp.w;\n } else if (fillMode == MIRROR) {\n coord.y = filterClamp.w * 2.0 - coord.y;\n }\n } else if( coord.y < filterClamp.y ) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.y += filterClamp.w;\n } else if (fillMode == MIRROR) {\n coord.y *= -filterClamp.w;\n }\n }\n }\n\n gl_FragColor.r = texture2D(uSampler, coord + red * (1.0 - seed * 0.4) / filterArea.xy).r;\n gl_FragColor.g = texture2D(uSampler, coord + green * (1.0 - seed * 0.3) / filterArea.xy).g;\n gl_FragColor.b = texture2D(uSampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b;\n gl_FragColor.a = texture2D(uSampler, coord).a;\n}\n",ne=function(e){function r(n){void 0===n&&(n={}),e.call(this,ee,te),this.uniforms.dimensions=new Float32Array(2),n=Object.assign({slices:5,offset:100,direction:0,fillMode:0,average:!1,seed:0,red:[0,0],green:[0,0],blue:[0,0],minSize:8,sampleSize:512},n),this.direction=n.direction,this.red=n.red,this.green=n.green,this.blue=n.blue,this.offset=n.offset,this.fillMode=n.fillMode,this.average=n.average,this.seed=n.seed,this.minSize=n.minSize,this.sampleSize=n.sampleSize,this._canvas=document.createElement("canvas"),this._canvas.width=4,this._canvas.height=this.sampleSize,this.texture=t.Texture.from(this._canvas,{scaleMode:i.SCALE_MODES.NEAREST}),this._slices=0,this.slices=n.slices}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var o={sizes:{configurable:!0},offsets:{configurable:!0},slices:{configurable:!0},direction:{configurable:!0},red:{configurable:!0},green:{configurable:!0},blue:{configurable:!0}};return r.prototype.apply=function(e,t,n,r){var o=t.filterFrame.width,i=t.filterFrame.height;this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=i,this.uniforms.aspect=i/o,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,e.applyFilter(this,t,n,r)},r.prototype._randomizeSizes=function(){var e=this._sizes,t=this._slices-1,n=this.sampleSize,r=Math.min(this.minSize/n,.9/this._slices);if(this.average){for(var o=this._slices,i=1,l=0;l0;t--){var n=Math.random()*t>>0,r=e[t];e[t]=e[n],e[n]=r}},r.prototype._randomizeOffsets=function(){for(var e=0;e0?e:0,a=e<0?-e:0;r.fillStyle="rgba("+s+", "+a+", 0, 1)",r.fillRect(0,o>>0,t,l+1>>0),o+=l}n.baseTexture.update(),this.uniforms.displacementMap=n},o.sizes.set=function(e){for(var t=Math.min(this._slices,e.length),n=0;nthis._maxColors)throw"Length of replacements ("+r+") exceeds the maximum colors length ("+this._maxColors+")";t[3*r]=-1;for(var i=0;i 0.5) then: 1 - 2 * (1 - dst) * (1 - src)\n return vec3((dst.x <= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - dst.x) * (1.0 - src.x)),\n (dst.y <= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - dst.y) * (1.0 - src.y)),\n (dst.z <= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - dst.z) * (1.0 - src.z)));\n}\n\n\nvoid main()\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n vec3 color = gl_FragColor.rgb;\n\n if (sepia > 0.0)\n {\n float gray = (color.x + color.y + color.z) / 3.0;\n vec3 grayscale = vec3(gray);\n\n color = Overlay(SEPIA_RGB, grayscale);\n\n color = grayscale + sepia * (color - grayscale);\n }\n\n vec2 coord = vTextureCoord * filterArea.xy / dimensions.xy;\n\n if (vignetting > 0.0)\n {\n float outter = SQRT_2 - vignetting * SQRT_2;\n vec2 dir = vec2(vec2(0.5, 0.5) - coord);\n dir.y *= dimensions.y / dimensions.x;\n float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0);\n color.rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha);\n }\n\n if (scratchDensity > seed && scratch != 0.0)\n {\n float phase = seed * 256.0;\n float s = mod(floor(phase), 2.0);\n float dist = 1.0 / scratchDensity;\n float d = distance(coord, vec2(seed * dist, abs(s - seed * dist)));\n if (d < seed * 0.6 + 0.4)\n {\n highp float period = scratchDensity * 10.0;\n\n float xx = coord.x * period + phase;\n float aa = abs(mod(xx, 0.5) * 4.0);\n float bb = mod(floor(xx / 0.5), 2.0);\n float yy = (1.0 - bb) * aa + bb * (2.0 - aa);\n\n float kk = 2.0 * period;\n float dw = scratchWidth / dimensions.x * (0.75 + seed);\n float dh = dw * kk;\n\n float tine = (yy - (2.0 - dh));\n\n if (tine > 0.0) {\n float _sign = sign(scratch);\n\n tine = s * tine / period + scratch + 0.1;\n tine = clamp(tine + 1.0, 0.5 + _sign * 0.5, 1.5 + _sign * 0.5);\n\n color.rgb *= tine;\n }\n }\n }\n\n if (noise > 0.0 && noiseSize > 0.0)\n {\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\n pixelCoord.x = floor(pixelCoord.x / noiseSize);\n pixelCoord.y = floor(pixelCoord.y / noiseSize);\n // vec2 d = pixelCoord * noiseSize * vec2(1024.0 + seed * 512.0, 1024.0 - seed * 512.0);\n // float _noise = snoise(d) * 0.5;\n float _noise = rand(pixelCoord * noiseSize * seed) - 0.5;\n color += _noise * noise;\n }\n\n gl_FragColor.rgb = color;\n}\n",xe=function(e){function t(t,n){void 0===n&&(n=0),e.call(this,ge,ve),this.uniforms.dimensions=new Float32Array(2),"number"==typeof t?(this.seed=t,t=null):this.seed=n,Object.assign(this,{sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3},t)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={sepia:{configurable:!0},noise:{configurable:!0},noiseSize:{configurable:!0},scratch:{configurable:!0},scratchDensity:{configurable:!0},scratchWidth:{configurable:!0},vignetting:{configurable:!0},vignettingAlpha:{configurable:!0},vignettingBlur:{configurable:!0}};return t.prototype.apply=function(e,t,n,r){this.uniforms.dimensions[0]=t.filterFrame.width,this.uniforms.dimensions[1]=t.filterFrame.height,this.uniforms.seed=this.seed,e.applyFilter(this,t,n,r)},n.sepia.set=function(e){this.uniforms.sepia=e},n.sepia.get=function(){return this.uniforms.sepia},n.noise.set=function(e){this.uniforms.noise=e},n.noise.get=function(){return this.uniforms.noise},n.noiseSize.set=function(e){this.uniforms.noiseSize=e},n.noiseSize.get=function(){return this.uniforms.noiseSize},n.scratch.set=function(e){this.uniforms.scratch=e},n.scratch.get=function(){return this.uniforms.scratch},n.scratchDensity.set=function(e){this.uniforms.scratchDensity=e},n.scratchDensity.get=function(){return this.uniforms.scratchDensity},n.scratchWidth.set=function(e){this.uniforms.scratchWidth=e},n.scratchWidth.get=function(){return this.uniforms.scratchWidth},n.vignetting.set=function(e){this.uniforms.vignetting=e},n.vignetting.get=function(){return this.uniforms.vignetting},n.vignettingAlpha.set=function(e){this.uniforms.vignettingAlpha=e},n.vignettingAlpha.get=function(){return this.uniforms.vignettingAlpha},n.vignettingBlur.set=function(e){this.uniforms.vignettingBlur=e},n.vignettingBlur.get=function(){return this.uniforms.vignettingBlur},Object.defineProperties(t.prototype,n),t}(t.Filter),ye=a,be="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec2 thickness;\nuniform vec4 outlineColor;\nuniform vec4 filterClamp;\n\nconst float DOUBLE_PI = 3.14159265358979323846264 * 2.;\n\nvoid main(void) {\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\n vec4 curColor;\n float maxAlpha = 0.;\n vec2 displaced;\n for (float angle = 0.; angle <= DOUBLE_PI; angle += ${angleStep}) {\n displaced.x = vTextureCoord.x + thickness.x * cos(angle);\n displaced.y = vTextureCoord.y + thickness.y * sin(angle);\n curColor = texture2D(uSampler, clamp(displaced, filterClamp.xy, filterClamp.zw));\n maxAlpha = max(maxAlpha, curColor.a);\n }\n float resultAlpha = max(maxAlpha, ownColor.a);\n gl_FragColor = vec4((ownColor.rgb + outlineColor.rgb * (1. - ownColor.a)) * resultAlpha, resultAlpha);\n}\n",_e=function(e){function t(n,r,o){void 0===n&&(n=1),void 0===r&&(r=0),void 0===o&&(o=.1);var i=Math.max(o*t.MAX_SAMPLES,t.MIN_SAMPLES),l=(2*Math.PI/i).toFixed(7);e.call(this,ye,be.replace(/\$\{angleStep\}/,l)),this.uniforms.thickness=new Float32Array([0,0]),this.thickness=n,this.uniforms.outlineColor=new Float32Array([0,0,0,1]),this.color=r,this.quality=o}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={color:{configurable:!0}};return t.prototype.apply=function(e,t,n,r){this.uniforms.thickness[0]=this.thickness/t._frame.width,this.uniforms.thickness[1]=this.thickness/t._frame.height,e.applyFilter(this,t,n,r)},n.color.get=function(){return o.rgb2hex(this.uniforms.outlineColor)},n.color.set=function(e){o.hex2rgb(e,this.uniforms.outlineColor)},Object.defineProperties(t.prototype,n),t}(t.Filter);_e.MIN_SAMPLES=1,_e.MAX_SAMPLES=100;var Ce=a,Se="precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform vec2 size;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvec2 pixelate(vec2 coord, vec2 size)\n{\n\treturn floor( coord / size ) * size;\n}\n\nvoid main(void)\n{\n vec2 coord = mapCoord(vTextureCoord);\n\n coord = pixelate(coord, size);\n\n coord = unmapCoord(coord);\n\n gl_FragColor = texture2D(uSampler, coord);\n}\n",Fe=function(e){function t(t){void 0===t&&(t=10),e.call(this,Ce,Se),this.size=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={size:{configurable:!0}};return n.size.get=function(){return this.uniforms.size},n.size.set=function(e){"number"==typeof e&&(e=[e,e]),this.uniforms.size=e},Object.defineProperties(t.prototype,n),t}(t.Filter),ze=a,Ae="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\nuniform float uRadian;\nuniform vec2 uCenter;\nuniform float uRadius;\nuniform int uKernelSize;\n\nconst int MAX_KERNEL_SIZE = 2048;\n\nvoid main(void)\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n\n if (uKernelSize == 0)\n {\n gl_FragColor = color;\n return;\n }\n\n float aspect = filterArea.y / filterArea.x;\n vec2 center = uCenter.xy / filterArea.xy;\n float gradient = uRadius / filterArea.x * 0.3;\n float radius = uRadius / filterArea.x - gradient * 0.5;\n int k = uKernelSize - 1;\n\n vec2 coord = vTextureCoord;\n vec2 dir = vec2(center - coord);\n float dist = length(vec2(dir.x, dir.y * aspect));\n\n float radianStep = uRadian;\n if (radius >= 0.0 && dist > radius) {\n float delta = dist - radius;\n float gap = gradient;\n float scale = 1.0 - abs(delta / gap);\n if (scale <= 0.0) {\n gl_FragColor = color;\n return;\n }\n radianStep *= scale;\n }\n radianStep /= float(k);\n\n float s = sin(radianStep);\n float c = cos(radianStep);\n mat2 rotationMatrix = mat2(vec2(c, -s), vec2(s, c));\n\n for(int i = 0; i < MAX_KERNEL_SIZE - 1; i++) {\n if (i == k) {\n break;\n }\n\n coord -= center;\n coord.y *= aspect;\n coord = rotationMatrix * coord;\n coord.y /= aspect;\n coord += center;\n\n vec4 sample = texture2D(uSampler, coord);\n\n // switch to pre-multiplied alpha to correctly blur transparent images\n // sample.rgb *= sample.a;\n\n color += sample;\n }\n\n gl_FragColor = color / float(uKernelSize);\n}\n",we=function(e){function t(t,n,r,o){void 0===t&&(t=0),void 0===n&&(n=[0,0]),void 0===r&&(r=5),void 0===o&&(o=-1),e.call(this,ze,Ae),this._angle=0,this.angle=t,this.center=n,this.kernelSize=r,this.radius=o}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={angle:{configurable:!0},center:{configurable:!0},radius:{configurable:!0}};return t.prototype.apply=function(e,t,n,r){this.uniforms.uKernelSize=0!==this._angle?this.kernelSize:0,e.applyFilter(this,t,n,r)},n.angle.set=function(e){this._angle=e,this.uniforms.uRadian=e*Math.PI/180},n.angle.get=function(){return this._angle},n.center.get=function(){return this.uniforms.uCenter},n.center.set=function(e){this.uniforms.uCenter=e},n.radius.get=function(){return this.uniforms.uRadius},n.radius.set=function(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e},Object.defineProperties(t.prototype,n),t}(t.Filter),Te=a,De="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\n\nuniform bool mirror;\nuniform float boundary;\nuniform vec2 amplitude;\nuniform vec2 waveLength;\nuniform vec2 alpha;\nuniform float time;\n\nfloat rand(vec2 co) {\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main(void)\n{\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\n vec2 coord = pixelCoord / dimensions;\n\n if (coord.y < boundary) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n\n float k = (coord.y - boundary) / (1. - boundary + 0.0001);\n float areaY = boundary * dimensions.y / filterArea.y;\n float v = areaY + areaY - vTextureCoord.y;\n float y = mirror ? v : vTextureCoord.y;\n\n float _amplitude = ((amplitude.y - amplitude.x) * k + amplitude.x ) / filterArea.x;\n float _waveLength = ((waveLength.y - waveLength.x) * k + waveLength.x) / filterArea.y;\n float _alpha = (alpha.y - alpha.x) * k + alpha.x;\n\n float x = vTextureCoord.x + cos(v * 6.28 / _waveLength - time) * _amplitude;\n x = clamp(x, filterClamp.x, filterClamp.z);\n\n vec4 color = texture2D(uSampler, vec2(x, y));\n\n gl_FragColor = color * _alpha;\n}\n",Oe=function(e){function t(t){e.call(this,Te,De),this.uniforms.amplitude=new Float32Array(2),this.uniforms.waveLength=new Float32Array(2),this.uniforms.alpha=new Float32Array(2),this.uniforms.dimensions=new Float32Array(2),Object.assign(this,{mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0},t)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={mirror:{configurable:!0},boundary:{configurable:!0},amplitude:{configurable:!0},waveLength:{configurable:!0},alpha:{configurable:!0}};return t.prototype.apply=function(e,t,n,r){this.uniforms.dimensions[0]=t.filterFrame.width,this.uniforms.dimensions[1]=t.filterFrame.height,this.uniforms.time=this.time,e.applyFilter(this,t,n,r)},n.mirror.set=function(e){this.uniforms.mirror=e},n.mirror.get=function(){return this.uniforms.mirror},n.boundary.set=function(e){this.uniforms.boundary=e},n.boundary.get=function(){return this.uniforms.boundary},n.amplitude.set=function(e){this.uniforms.amplitude[0]=e[0],this.uniforms.amplitude[1]=e[1]},n.amplitude.get=function(){return this.uniforms.amplitude},n.waveLength.set=function(e){this.uniforms.waveLength[0]=e[0],this.uniforms.waveLength[1]=e[1]},n.waveLength.get=function(){return this.uniforms.waveLength},n.alpha.set=function(e){this.uniforms.alpha[0]=e[0],this.uniforms.alpha[1]=e[1]},n.alpha.get=function(){return this.uniforms.alpha},Object.defineProperties(t.prototype,n),t}(t.Filter),Pe=a,Me="precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec2 red;\nuniform vec2 green;\nuniform vec2 blue;\n\nvoid main(void)\n{\n gl_FragColor.r = texture2D(uSampler, vTextureCoord + red/filterArea.xy).r;\n gl_FragColor.g = texture2D(uSampler, vTextureCoord + green/filterArea.xy).g;\n gl_FragColor.b = texture2D(uSampler, vTextureCoord + blue/filterArea.xy).b;\n gl_FragColor.a = texture2D(uSampler, vTextureCoord).a;\n}\n",Re=function(e){function t(t,n,r){void 0===t&&(t=[-10,0]),void 0===n&&(n=[0,10]),void 0===r&&(r=[0,0]),e.call(this,Pe,Me),this.red=t,this.green=n,this.blue=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={red:{configurable:!0},green:{configurable:!0},blue:{configurable:!0}};return n.red.get=function(){return this.uniforms.red},n.red.set=function(e){this.uniforms.red=e},n.green.get=function(){return this.uniforms.green},n.green.set=function(e){this.uniforms.green=e},n.blue.get=function(){return this.uniforms.blue},n.blue.set=function(e){this.uniforms.blue=e},Object.defineProperties(t.prototype,n),t}(t.Filter),je=a,ke="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\n\nuniform vec2 center;\n\nuniform float amplitude;\nuniform float wavelength;\n// uniform float power;\nuniform float brightness;\nuniform float speed;\nuniform float radius;\n\nuniform float time;\n\nconst float PI = 3.14159;\n\nvoid main()\n{\n float halfWavelength = wavelength * 0.5 / filterArea.x;\n float maxRadius = radius / filterArea.x;\n float currentRadius = time * speed / filterArea.x;\n\n float fade = 1.0;\n\n if (maxRadius > 0.0) {\n if (currentRadius > maxRadius) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n fade = 1.0 - pow(currentRadius / maxRadius, 2.0);\n }\n\n vec2 dir = vec2(vTextureCoord - center / filterArea.xy);\n dir.y *= filterArea.y / filterArea.x;\n float dist = length(dir);\n\n if (dist <= 0.0 || dist < currentRadius - halfWavelength || dist > currentRadius + halfWavelength) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n\n vec2 diffUV = normalize(dir);\n\n float diff = (dist - currentRadius) / halfWavelength;\n\n float p = 1.0 - pow(abs(diff), 2.0);\n\n // float powDiff = diff * pow(p, 2.0) * ( amplitude * fade );\n float powDiff = 1.25 * sin(diff * PI) * p * ( amplitude * fade );\n\n vec2 offset = diffUV * powDiff / filterArea.xy;\n\n // Do clamp :\n vec2 coord = vTextureCoord + offset;\n vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw);\n vec4 color = texture2D(uSampler, clampedCoord);\n if (coord != clampedCoord) {\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\n }\n\n // No clamp :\n // gl_FragColor = texture2D(uSampler, vTextureCoord + offset);\n\n color.rgb *= 1.0 + (brightness - 1.0) * p * fade;\n\n gl_FragColor = color;\n}\n",Le=function(e){function t(t,n,r){void 0===t&&(t=[0,0]),void 0===n&&(n={}),void 0===r&&(r=0),e.call(this,je,ke),this.center=t,Array.isArray(n)&&(console.warn("Deprecated Warning: ShockwaveFilter params Array has been changed to options Object."),n={}),n=Object.assign({amplitude:30,wavelength:160,brightness:1,speed:500,radius:-1},n),this.amplitude=n.amplitude,this.wavelength=n.wavelength,this.brightness=n.brightness,this.speed=n.speed,this.radius=n.radius,this.time=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={center:{configurable:!0},amplitude:{configurable:!0},wavelength:{configurable:!0},brightness:{configurable:!0},speed:{configurable:!0},radius:{configurable:!0}};return t.prototype.apply=function(e,t,n,r){this.uniforms.time=this.time,e.applyFilter(this,t,n,r)},n.center.get=function(){return this.uniforms.center},n.center.set=function(e){this.uniforms.center=e},n.amplitude.get=function(){return this.uniforms.amplitude},n.amplitude.set=function(e){this.uniforms.amplitude=e},n.wavelength.get=function(){return this.uniforms.wavelength},n.wavelength.set=function(e){this.uniforms.wavelength=e},n.brightness.get=function(){return this.uniforms.brightness},n.brightness.set=function(e){this.uniforms.brightness=e},n.speed.get=function(){return this.uniforms.speed},n.speed.set=function(e){this.uniforms.speed=e},n.radius.get=function(){return this.uniforms.radius},n.radius.set=function(e){this.uniforms.radius=e},Object.defineProperties(t.prototype,n),t}(t.Filter),Ie=a,Ee="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform sampler2D uLightmap;\nuniform vec4 filterArea;\nuniform vec2 dimensions;\nuniform vec4 ambientColor;\nvoid main() {\n vec4 diffuseColor = texture2D(uSampler, vTextureCoord);\n vec2 lightCoord = (vTextureCoord * filterArea.xy) / dimensions;\n vec4 light = texture2D(uLightmap, lightCoord);\n vec3 ambient = ambientColor.rgb * ambientColor.a;\n vec3 intensity = ambient + light.rgb;\n vec3 finalColor = diffuseColor.rgb * intensity;\n gl_FragColor = vec4(finalColor, diffuseColor.a);\n}\n",Be=function(e){function t(t,n,r){void 0===n&&(n=0),void 0===r&&(r=1),e.call(this,Ie,Ee),this.uniforms.dimensions=new Float32Array(2),this.uniforms.ambientColor=new Float32Array([0,0,0,r]),this.texture=t,this.color=n}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={texture:{configurable:!0},color:{configurable:!0},alpha:{configurable:!0}};return t.prototype.apply=function(e,t,n,r){this.uniforms.dimensions[0]=t.filterFrame.width,this.uniforms.dimensions[1]=t.filterFrame.height,e.applyFilter(this,t,n,r)},n.texture.get=function(){return this.uniforms.uLightmap},n.texture.set=function(e){this.uniforms.uLightmap=e},n.color.set=function(e){var t=this.uniforms.ambientColor;"number"==typeof e?(o.hex2rgb(e,t),this._color=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],this._color=o.rgb2hex(t))},n.color.get=function(){return this._color},n.alpha.get=function(){return this.uniforms.ambientColor[3]},n.alpha.set=function(e){this.uniforms.ambientColor[3]=e},Object.defineProperties(t.prototype,n),t}(t.Filter),Xe=a,Ne="varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float blur;\nuniform float gradientBlur;\nuniform vec2 start;\nuniform vec2 end;\nuniform vec2 delta;\nuniform vec2 texSize;\n\nfloat random(vec3 scale, float seed)\n{\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n}\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vTextureCoord * texSize - start, normal)) / gradientBlur) * blur;\n\n for (float t = -30.0; t <= 30.0; t++)\n {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 sample = texture2D(uSampler, vTextureCoord + delta / texSize * percent * radius);\n sample.rgb *= sample.a;\n color += sample * weight;\n total += weight;\n }\n\n color /= total;\n color.rgb /= color.a + 0.00001;\n\n gl_FragColor = color;\n}\n",qe=function(e){function t(t,r,o,i){void 0===t&&(t=100),void 0===r&&(r=600),void 0===o&&(o=null),void 0===i&&(i=null),e.call(this,Xe,Ne),this.uniforms.blur=t,this.uniforms.gradientBlur=r,this.uniforms.start=o||new n.Point(0,window.innerHeight/2),this.uniforms.end=i||new n.Point(600,window.innerHeight/2),this.uniforms.delta=new n.Point(30,30),this.uniforms.texSize=new n.Point(window.innerWidth,window.innerHeight),this.updateDelta()}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={blur:{configurable:!0},gradientBlur:{configurable:!0},start:{configurable:!0},end:{configurable:!0}};return t.prototype.updateDelta=function(){this.uniforms.delta.x=0,this.uniforms.delta.y=0},r.blur.get=function(){return this.uniforms.blur},r.blur.set=function(e){this.uniforms.blur=e},r.gradientBlur.get=function(){return this.uniforms.gradientBlur},r.gradientBlur.set=function(e){this.uniforms.gradientBlur=e},r.start.get=function(){return this.uniforms.start},r.start.set=function(e){this.uniforms.start=e,this.updateDelta()},r.end.get=function(){return this.uniforms.end},r.end.set=function(e){this.uniforms.end=e,this.updateDelta()},Object.defineProperties(t.prototype,r),t}(t.Filter),We=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.updateDelta=function(){var e=this.uniforms.end.x-this.uniforms.start.x,t=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(e*e+t*t);this.uniforms.delta.x=e/n,this.uniforms.delta.y=t/n},t}(qe),Ke=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.updateDelta=function(){var e=this.uniforms.end.x-this.uniforms.start.x,t=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(e*e+t*t);this.uniforms.delta.x=-t/n,this.uniforms.delta.y=e/n},t}(qe),Ye=function(e){function t(t,n,r,o){void 0===t&&(t=100),void 0===n&&(n=600),void 0===r&&(r=null),void 0===o&&(o=null),e.call(this),this.tiltShiftXFilter=new We(t,n,r,o),this.tiltShiftYFilter=new Ke(t,n,r,o)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={blur:{configurable:!0},gradientBlur:{configurable:!0},start:{configurable:!0},end:{configurable:!0}};return t.prototype.apply=function(e,t,n){var r=e.getFilterTexture();this.tiltShiftXFilter.apply(e,t,r),this.tiltShiftYFilter.apply(e,r,n),e.returnFilterTexture(r)},n.blur.get=function(){return this.tiltShiftXFilter.blur},n.blur.set=function(e){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=e},n.gradientBlur.get=function(){return this.tiltShiftXFilter.gradientBlur},n.gradientBlur.set=function(e){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=e},n.start.get=function(){return this.tiltShiftXFilter.start},n.start.set=function(e){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=e},n.end.get=function(){return this.tiltShiftXFilter.end},n.end.set=function(e){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=e},Object.defineProperties(t.prototype,n),t}(t.Filter),Ge=a,Qe="varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float radius;\nuniform float angle;\nuniform vec2 offset;\nuniform vec4 filterArea;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvec2 twist(vec2 coord)\n{\n coord -= offset;\n\n float dist = length(coord);\n\n if (dist < radius)\n {\n float ratioDist = (radius - dist) / radius;\n float angleMod = ratioDist * ratioDist * angle;\n float s = sin(angleMod);\n float c = cos(angleMod);\n coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c);\n }\n\n coord += offset;\n\n return coord;\n}\n\nvoid main(void)\n{\n\n vec2 coord = mapCoord(vTextureCoord);\n\n coord = twist(coord);\n\n coord = unmapCoord(coord);\n\n gl_FragColor = texture2D(uSampler, coord );\n\n}\n",Ue=function(e){function t(t,n,r){void 0===t&&(t=200),void 0===n&&(n=4),void 0===r&&(r=20),e.call(this,Ge,Qe),this.radius=t,this.angle=n,this.padding=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={offset:{configurable:!0},radius:{configurable:!0},angle:{configurable:!0}};return n.offset.get=function(){return this.uniforms.offset},n.offset.set=function(e){this.uniforms.offset=e},n.radius.get=function(){return this.uniforms.radius},n.radius.set=function(e){this.uniforms.radius=e},n.angle.get=function(){return this.uniforms.angle},n.angle.set=function(e){this.uniforms.angle=e},Object.defineProperties(t.prototype,n),t}(t.Filter),Ze=a,Ve="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\nuniform vec2 uCenter;\nuniform float uStrength;\nuniform float uInnerRadius;\nuniform float uRadius;\n\nconst float MAX_KERNEL_SIZE = 32.0;\n\n// author: http://byteblacksmith.com/improvements-to-the-canonical-one-liner-glsl-rand-for-opengl-es-2-0/\nhighp float rand(vec2 co, float seed) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot(co + seed, vec2(a, b)), sn = mod(dt, 3.14159);\n return fract(sin(sn) * c + seed);\n}\n\nvoid main() {\n\n float minGradient = uInnerRadius * 0.3;\n float innerRadius = (uInnerRadius + minGradient * 0.5) / filterArea.x;\n\n float gradient = uRadius * 0.3;\n float radius = (uRadius - gradient * 0.5) / filterArea.x;\n\n float countLimit = MAX_KERNEL_SIZE;\n\n vec2 dir = vec2(uCenter.xy / filterArea.xy - vTextureCoord);\n float dist = length(vec2(dir.x, dir.y * filterArea.y / filterArea.x));\n\n float strength = uStrength;\n\n float delta = 0.0;\n float gap;\n if (dist < innerRadius) {\n delta = innerRadius - dist;\n gap = minGradient;\n } else if (radius >= 0.0 && dist > radius) { // radius < 0 means it's infinity\n delta = dist - radius;\n gap = gradient;\n }\n\n if (delta > 0.0) {\n float normalCount = gap / filterArea.x;\n delta = (normalCount - delta) / normalCount;\n countLimit *= delta;\n strength *= delta;\n if (countLimit < 1.0)\n {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n }\n\n // randomize the lookup values to hide the fixed number of samples\n float offset = rand(vTextureCoord, 0.0);\n\n float total = 0.0;\n vec4 color = vec4(0.0);\n\n dir *= strength;\n\n for (float t = 0.0; t < MAX_KERNEL_SIZE; t++) {\n float percent = (t + offset) / MAX_KERNEL_SIZE;\n float weight = 4.0 * (percent - percent * percent);\n vec2 p = vTextureCoord + dir * percent;\n vec4 sample = texture2D(uSampler, p);\n\n // switch to pre-multiplied alpha to correctly blur transparent images\n // sample.rgb *= sample.a;\n\n color += sample * weight;\n total += weight;\n\n if (t > countLimit){\n break;\n }\n }\n\n color /= total;\n // switch back from pre-multiplied alpha\n // color.rgb /= color.a + 0.00001;\n\n gl_FragColor = color;\n}\n",He=function(e){function t(t,n,r,o){void 0===t&&(t=.1),void 0===n&&(n=[0,0]),void 0===r&&(r=0),void 0===o&&(o=-1),e.call(this,Ze,Ve),this.center=n,this.strength=t,this.innerRadius=r,this.radius=o}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={center:{configurable:!0},strength:{configurable:!0},innerRadius:{configurable:!0},radius:{configurable:!0}};return n.center.get=function(){return this.uniforms.uCenter},n.center.set=function(e){this.uniforms.uCenter=e},n.strength.get=function(){return this.uniforms.uStrength},n.strength.set=function(e){this.uniforms.uStrength=e},n.innerRadius.get=function(){return this.uniforms.uInnerRadius},n.innerRadius.set=function(e){this.uniforms.uInnerRadius=e},n.radius.get=function(){return this.uniforms.uRadius},n.radius.set=function(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e},Object.defineProperties(t.prototype,n),t}(t.Filter);return e.AdjustmentFilter=c,e.AdvancedBloomFilter=y,e.AsciiFilter=C,e.BevelFilter=z,e.BloomFilter=A,e.BulgePinchFilter=D,e.CRTFilter=K,e.ColorMapFilter=M,e.ColorReplaceFilter=k,e.ConvolutionFilter=E,e.CrossHatchFilter=N,e.DotFilter=Q,e.DropShadowFilter=V,e.EmbossFilter=J,e.GlitchFilter=ne,e.GlowFilter=ie,e.GodrayFilter=ue,e.KawaseBlurFilter=d,e.MotionBlurFilter=he,e.MultiColorReplaceFilter=me,e.OldFilmFilter=xe,e.OutlineFilter=_e,e.PixelateFilter=Fe,e.RGBSplitFilter=Re,e.RadialBlurFilter=we,e.ReflectionFilter=Oe,e.ShockwaveFilter=Le,e.SimpleLightmapFilter=Be,e.TiltShiftAxisFilter=qe,e.TiltShiftFilter=Ye,e.TiltShiftXFilter=We,e.TiltShiftYFilter=Ke,e.TwistFilter=Ue,e.ZoomBlurFilter=He,e}({},PIXI,PIXI,PIXI,PIXI.utils,PIXI,PIXI.filters,PIXI.filters);Object.assign(PIXI.filters,__filters); +var __filters=function(e,t,n,r,o,i,l,s){"use strict";var a="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",u="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float gamma;\nuniform float contrast;\nuniform float saturation;\nuniform float brightness;\nuniform float red;\nuniform float green;\nuniform float blue;\nuniform float alpha;\n\nvoid main(void)\n{\n vec4 c = texture2D(uSampler, vTextureCoord);\n\n if (c.a > 0.0) {\n c.rgb /= c.a;\n\n vec3 rgb = pow(c.rgb, vec3(1. / gamma));\n rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, saturation), contrast);\n rgb.r *= red;\n rgb.g *= green;\n rgb.b *= blue;\n c.rgb = rgb * brightness;\n\n c.rgb *= c.a;\n }\n\n gl_FragColor = c * alpha;\n}\n",c=function(e){function t(t){e.call(this,a,u),Object.assign(this,{gamma:1,saturation:1,contrast:1,brightness:1,red:1,green:1,blue:1,alpha:1},t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e,t,n,r){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,e.applyFilter(this,t,n,r)},t}(t.Filter),f=a,h="\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec2 uOffset;\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n\n // Sample top left pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y));\n\n // Sample top right pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y));\n\n // Sample bottom right pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y));\n\n // Sample bottom left pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y));\n\n // Average\n color *= 0.25;\n\n gl_FragColor = color;\n}",p="\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec2 uOffset;\nuniform vec4 filterClamp;\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n\n // Sample top left pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Sample top right pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Sample bottom right pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Sample bottom left pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Average\n color *= 0.25;\n\n gl_FragColor = color;\n}\n",d=function(e){function t(t,r,o){void 0===t&&(t=4),void 0===r&&(r=3),void 0===o&&(o=!1),e.call(this,f,o?p:h),this.uniforms.uOffset=new Float32Array(2),this._pixelSize=new n.Point,this.pixelSize=1,this._clamp=o,this._kernels=null,Array.isArray(t)?this.kernels=t:(this._blur=t,this.quality=r)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={kernels:{configurable:!0},clamp:{configurable:!0},pixelSize:{configurable:!0},quality:{configurable:!0},blur:{configurable:!0}};return t.prototype.apply=function(e,t,n,r){var o,i=this.pixelSize.x/t._frame.width,l=this.pixelSize.y/t._frame.height;if(1===this._quality||0===this._blur)o=this._kernels[0]+.5,this.uniforms.uOffset[0]=o*i,this.uniforms.uOffset[1]=o*l,e.applyFilter(this,t,n,r);else{for(var s,a=e.getFilterTexture(),u=t,c=a,f=this._quality-1,h=0;h0)for(var r=e,o=e/t,i=1;i0?(this._kernels=e,this._quality=e.length,this._blur=Math.max.apply(Math,e)):(this._kernels=[0],this._quality=1)},r.clamp.get=function(){return this._clamp},r.pixelSize.set=function(e){"number"==typeof e?(this._pixelSize.x=e,this._pixelSize.y=e):Array.isArray(e)?(this._pixelSize.x=e[0],this._pixelSize.y=e[1]):e instanceof n.Point?(this._pixelSize.x=e.x,this._pixelSize.y=e.y):(this._pixelSize.x=1,this._pixelSize.y=1)},r.pixelSize.get=function(){return this._pixelSize},r.quality.get=function(){return this._quality},r.quality.set=function(e){this._quality=Math.max(1,Math.round(e)),this._generateKernels()},r.blur.get=function(){return this._blur},r.blur.set=function(e){this._blur=e,this._generateKernels()},Object.defineProperties(t.prototype,r),t}(t.Filter),m=a,g="\nuniform sampler2D uSampler;\nvarying vec2 vTextureCoord;\n\nuniform float threshold;\n\nvoid main() {\n vec4 color = texture2D(uSampler, vTextureCoord);\n\n // A simple & fast algorithm for getting brightness.\n // It's inaccuracy , but good enought for this feature.\n float _max = max(max(color.r, color.g), color.b);\n float _min = min(min(color.r, color.g), color.b);\n float brightness = (_max + _min) * 0.5;\n\n if(brightness > threshold) {\n gl_FragColor = color;\n } else {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n}\n",v=function(e){function t(t){void 0===t&&(t=.5),e.call(this,m,g),this.threshold=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={threshold:{configurable:!0}};return n.threshold.get=function(){return this.uniforms.threshold},n.threshold.set=function(e){this.uniforms.threshold=e},Object.defineProperties(t.prototype,n),t}(t.Filter),x="uniform sampler2D uSampler;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D bloomTexture;\nuniform float bloomScale;\nuniform float brightness;\n\nvoid main() {\n vec4 color = texture2D(uSampler, vTextureCoord);\n color.rgb *= brightness;\n vec4 bloomColor = vec4(texture2D(bloomTexture, vTextureCoord).rgb, 0.0);\n bloomColor.rgb *= bloomScale;\n gl_FragColor = color + bloomColor;\n}\n",y=function(e){function t(t){e.call(this,m,x),"number"==typeof t&&(t={threshold:t}),t=Object.assign({threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:r.settings.RESOLUTION},t),this.bloomScale=t.bloomScale,this.brightness=t.brightness;var n=t.kernels,o=t.blur,i=t.quality,l=t.pixelSize,s=t.resolution;this._extractFilter=new v(t.threshold),this._extractFilter.resolution=s,this._blurFilter=n?new d(n):new d(o,i),this.pixelSize=l,this.resolution=s}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={resolution:{configurable:!0},threshold:{configurable:!0},kernels:{configurable:!0},blur:{configurable:!0},quality:{configurable:!0},pixelSize:{configurable:!0}};return t.prototype.apply=function(e,t,n,r,o){var i=e.getFilterTexture();this._extractFilter.apply(e,t,i,1,o);var l=e.getFilterTexture();this._blurFilter.apply(e,i,l,1,o),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=l,e.applyFilter(this,t,n,r),e.returnFilterTexture(l),e.returnFilterTexture(i)},n.resolution.get=function(){return this._resolution},n.resolution.set=function(e){this._resolution=e,this._extractFilter&&(this._extractFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)},n.threshold.get=function(){return this._extractFilter.threshold},n.threshold.set=function(e){this._extractFilter.threshold=e},n.kernels.get=function(){return this._blurFilter.kernels},n.kernels.set=function(e){this._blurFilter.kernels=e},n.blur.get=function(){return this._blurFilter.blur},n.blur.set=function(e){this._blurFilter.blur=e},n.quality.get=function(){return this._blurFilter.quality},n.quality.set=function(e){this._blurFilter.quality=e},n.pixelSize.get=function(){return this._blurFilter.pixelSize},n.pixelSize.set=function(e){this._blurFilter.pixelSize=e},Object.defineProperties(t.prototype,n),t}(t.Filter),_=a,b="varying vec2 vTextureCoord;\n\nuniform vec4 filterArea;\nuniform float pixelSize;\nuniform sampler2D uSampler;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvec2 pixelate(vec2 coord, vec2 size)\n{\n return floor( coord / size ) * size;\n}\n\nvec2 getMod(vec2 coord, vec2 size)\n{\n return mod( coord , size) / size;\n}\n\nfloat character(float n, vec2 p)\n{\n p = floor(p*vec2(4.0, -4.0) + 2.5);\n\n if (clamp(p.x, 0.0, 4.0) == p.x)\n {\n if (clamp(p.y, 0.0, 4.0) == p.y)\n {\n if (int(mod(n/exp2(p.x + 5.0*p.y), 2.0)) == 1) return 1.0;\n }\n }\n return 0.0;\n}\n\nvoid main()\n{\n vec2 coord = mapCoord(vTextureCoord);\n\n // get the rounded color..\n vec2 pixCoord = pixelate(coord, vec2(pixelSize));\n pixCoord = unmapCoord(pixCoord);\n\n vec4 color = texture2D(uSampler, pixCoord);\n\n // determine the character to use\n float gray = (color.r + color.g + color.b) / 3.0;\n\n float n = 65536.0; // .\n if (gray > 0.2) n = 65600.0; // :\n if (gray > 0.3) n = 332772.0; // *\n if (gray > 0.4) n = 15255086.0; // o\n if (gray > 0.5) n = 23385164.0; // &\n if (gray > 0.6) n = 15252014.0; // 8\n if (gray > 0.7) n = 13199452.0; // @\n if (gray > 0.8) n = 11512810.0; // #\n\n // get the mod..\n vec2 modd = getMod(coord, vec2(pixelSize));\n\n gl_FragColor = color * character( n, vec2(-1.0) + modd * 2.0);\n\n}\n",C=function(e){function t(t){void 0===t&&(t=8),e.call(this,_,b),this.size=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={size:{configurable:!0}};return n.size.get=function(){return this.uniforms.pixelSize},n.size.set=function(e){this.uniforms.pixelSize=e},Object.defineProperties(t.prototype,n),t}(t.Filter),S=a,F="precision mediump float;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\nuniform float transformX;\nuniform float transformY;\nuniform vec3 lightColor;\nuniform float lightAlpha;\nuniform vec3 shadowColor;\nuniform float shadowAlpha;\n\nvoid main(void) {\n vec2 transform = vec2(1.0 / filterArea) * vec2(transformX, transformY);\n vec4 color = texture2D(uSampler, vTextureCoord);\n float light = texture2D(uSampler, vTextureCoord - transform).a;\n float shadow = texture2D(uSampler, vTextureCoord + transform).a;\n\n color.rgb = mix(color.rgb, lightColor, clamp((color.a - light) * lightAlpha, 0.0, 1.0));\n color.rgb = mix(color.rgb, shadowColor, clamp((color.a - shadow) * shadowAlpha, 0.0, 1.0));\n gl_FragColor = vec4(color.rgb * color.a, color.a);\n}\n",z=function(e){function t(t){void 0===t&&(t={}),e.call(this,S,F),this.uniforms.lightColor=new Float32Array(3),this.uniforms.shadowColor=new Float32Array(3),t=Object.assign({rotation:45,thickness:2,lightColor:16777215,lightAlpha:.7,shadowColor:0,shadowAlpha:.7},t),this.rotation=t.rotation,this.thickness=t.thickness,this.lightColor=t.lightColor,this.lightAlpha=t.lightAlpha,this.shadowColor=t.shadowColor,this.shadowAlpha=t.shadowAlpha}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={rotation:{configurable:!0},thickness:{configurable:!0},lightColor:{configurable:!0},lightAlpha:{configurable:!0},shadowColor:{configurable:!0},shadowAlpha:{configurable:!0}};return t.prototype._updateTransform=function(){this.uniforms.transformX=this._thickness*Math.cos(this._angle),this.uniforms.transformY=this._thickness*Math.sin(this._angle)},r.rotation.get=function(){return this._angle/n.DEG_TO_RAD},r.rotation.set=function(e){this._angle=e*n.DEG_TO_RAD,this._updateTransform()},r.thickness.get=function(){return this._thickness},r.thickness.set=function(e){this._thickness=e,this._updateTransform()},r.lightColor.get=function(){return o.rgb2hex(this.uniforms.lightColor)},r.lightColor.set=function(e){o.hex2rgb(e,this.uniforms.lightColor)},r.lightAlpha.get=function(){return this.uniforms.lightAlpha},r.lightAlpha.set=function(e){this.uniforms.lightAlpha=e},r.shadowColor.get=function(){return o.rgb2hex(this.uniforms.shadowColor)},r.shadowColor.set=function(e){o.hex2rgb(e,this.uniforms.shadowColor)},r.shadowAlpha.get=function(){return this.uniforms.shadowAlpha},r.shadowAlpha.set=function(e){this.uniforms.shadowAlpha=e},Object.defineProperties(t.prototype,r),t}(t.Filter),A=function(e){function t(t,o,a,u){var c,f;void 0===t&&(t=2),void 0===o&&(o=4),void 0===a&&(a=r.settings.RESOLUTION),void 0===u&&(u=5),e.call(this),"number"==typeof t?(c=t,f=t):t instanceof n.Point?(c=t.x,f=t.y):Array.isArray(t)&&(c=t[0],f=t[1]),this.blurXFilter=new s.BlurFilterPass(!0,c,o,a,u),this.blurYFilter=new s.BlurFilterPass(!1,f,o,a,u),this.blurYFilter.blendMode=i.BLEND_MODES.SCREEN,this.defaultFilter=new l.AlphaFilter}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var o={blur:{configurable:!0},blurX:{configurable:!0},blurY:{configurable:!0}};return t.prototype.apply=function(e,t,n){var r=e.getFilterTexture(!0);this.defaultFilter.apply(e,t,n),this.blurXFilter.apply(e,t,r),this.blurYFilter.apply(e,r,n),e.returnFilterTexture(r)},o.blur.get=function(){return this.blurXFilter.blur},o.blur.set=function(e){this.blurXFilter.blur=this.blurYFilter.blur=e},o.blurX.get=function(){return this.blurXFilter.blur},o.blurX.set=function(e){this.blurXFilter.blur=e},o.blurY.get=function(){return this.blurYFilter.blur},o.blurY.set=function(e){this.blurYFilter.blur=e},Object.defineProperties(t.prototype,o),t}(t.Filter),w=a,T="uniform float radius;\nuniform float strength;\nuniform vec2 center;\nuniform sampler2D uSampler;\nvarying vec2 vTextureCoord;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\n\nvoid main()\n{\n vec2 coord = vTextureCoord * filterArea.xy;\n coord -= center * dimensions.xy;\n float distance = length(coord);\n if (distance < radius) {\n float percent = distance / radius;\n if (strength > 0.0) {\n coord *= mix(1.0, smoothstep(0.0, radius / distance, percent), strength * 0.75);\n } else {\n coord *= mix(1.0, pow(percent, 1.0 + strength * 0.75) * radius / distance, 1.0 - percent);\n }\n }\n coord += center * dimensions.xy;\n coord /= filterArea.xy;\n vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw);\n vec4 color = texture2D(uSampler, clampedCoord);\n if (coord != clampedCoord) {\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\n }\n\n gl_FragColor = color;\n}\n",O=function(e){function t(t){if(e.call(this,w,T),"object"!=typeof t){var n=arguments[0],r=arguments[1],o=arguments[2];t={},void 0!==n&&(t.center=n),void 0!==r&&(t.radius=r),void 0!==o&&(t.strength=o)}this.uniforms.dimensions=new Float32Array(2),Object.assign(this,{center:[.5,.5],radius:100,strength:1},t)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={radius:{configurable:!0},strength:{configurable:!0},center:{configurable:!0}};return t.prototype.apply=function(e,t,n,r){this.uniforms.dimensions[0]=t.filterFrame.width,this.uniforms.dimensions[1]=t.filterFrame.height,e.applyFilter(this,t,n,r)},n.radius.get=function(){return this.uniforms.radius},n.radius.set=function(e){this.uniforms.radius=e},n.strength.get=function(){return this.uniforms.strength},n.strength.set=function(e){this.uniforms.strength=e},n.center.get=function(){return this.uniforms.center},n.center.set=function(e){this.uniforms.center=e},Object.defineProperties(t.prototype,n),t}(t.Filter),D=a,P="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform sampler2D colorMap;\nuniform float _mix;\nuniform float _size;\nuniform float _sliceSize;\nuniform float _slicePixelSize;\nuniform float _sliceInnerSize;\nvoid main() {\n vec4 color = texture2D(uSampler, vTextureCoord.xy);\n\n vec4 adjusted;\n if (color.a > 0.0) {\n color.rgb /= color.a;\n float innerWidth = _size - 1.0;\n float zSlice0 = min(floor(color.b * innerWidth), innerWidth);\n float zSlice1 = min(zSlice0 + 1.0, innerWidth);\n float xOffset = _slicePixelSize * 0.5 + color.r * _sliceInnerSize;\n float s0 = xOffset + (zSlice0 * _sliceSize);\n float s1 = xOffset + (zSlice1 * _sliceSize);\n float yOffset = _sliceSize * 0.5 + color.g * (1.0 - _sliceSize);\n vec4 slice0Color = texture2D(colorMap, vec2(s0,yOffset));\n vec4 slice1Color = texture2D(colorMap, vec2(s1,yOffset));\n float zOffset = fract(color.b * innerWidth);\n adjusted = mix(slice0Color, slice1Color, zOffset);\n\n color.rgb *= color.a;\n }\n gl_FragColor = vec4(mix(color, adjusted, _mix).rgb, color.a);\n\n}",M=function(e){function n(t,n,r){void 0===n&&(n=!1),void 0===r&&(r=1),e.call(this,D,P),this._size=0,this._sliceSize=0,this._slicePixelSize=0,this._sliceInnerSize=0,this._scaleMode=null,this._nearest=!1,this.nearest=n,this.mix=r,this.colorMap=t}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var r={colorSize:{configurable:!0},colorMap:{configurable:!0},nearest:{configurable:!0}};return n.prototype.apply=function(e,t,n,r){this.uniforms._mix=this.mix,e.applyFilter(this,t,n,r)},r.colorSize.get=function(){return this._size},r.colorMap.get=function(){return this._colorMap},r.colorMap.set=function(e){e instanceof t.Texture||(e=t.Texture.from(e)),e&&e.baseTexture&&(e.baseTexture.scaleMode=this._scaleMode,e.baseTexture.mipmap=!1,this._size=e.height,this._sliceSize=1/this._size,this._slicePixelSize=this._sliceSize/this._size,this._sliceInnerSize=this._slicePixelSize*(this._size-1),this.uniforms._size=this._size,this.uniforms._sliceSize=this._sliceSize,this.uniforms._slicePixelSize=this._slicePixelSize,this.uniforms._sliceInnerSize=this._sliceInnerSize,this.uniforms.colorMap=e),this._colorMap=e},r.nearest.get=function(){return this._nearest},r.nearest.set=function(e){this._nearest=e,this._scaleMode=e?i.SCALE_MODES.NEAREST:i.SCALE_MODES.LINEAR;var t=this._colorMap;t&&t.baseTexture&&(t.baseTexture._glTextures={},t.baseTexture.scaleMode=this._scaleMode,t.baseTexture.mipmap=!1,t._updateID++,t.baseTexture.emit("update",t.baseTexture))},n.prototype.updateColorMap=function(){var e=this._colorMap;e&&e.baseTexture&&(e._updateID++,e.baseTexture.emit("update",e.baseTexture),this.colorMap=e)},n.prototype.destroy=function(t){this._colorMap&&this._colorMap.destroy(t),e.prototype.destroy.call(this)},Object.defineProperties(n.prototype,r),n}(t.Filter),R=a,k="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec3 color;\nvoid main(void) {\n vec4 currentColor = texture2D(uSampler, vTextureCoord);\n vec3 colorOverlay = color * currentColor.a;\n gl_FragColor = vec4(colorOverlay.r, colorOverlay.g, colorOverlay.b, currentColor.a);\n}\n",j=function(e){function t(t){void 0===t&&(t=0),e.call(this,R,k),this.uniforms.color=new Float32Array(3),this.color=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={color:{configurable:!0}};return n.color.set=function(e){var t=this.uniforms.color;"number"==typeof e?(o.hex2rgb(e,t),this._color=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],this._color=o.rgb2hex(t))},n.color.get=function(){return this._color},Object.defineProperties(t.prototype,n),t}(t.Filter),E=a,L="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec3 originalColor;\nuniform vec3 newColor;\nuniform float epsilon;\nvoid main(void) {\n vec4 currentColor = texture2D(uSampler, vTextureCoord);\n vec3 colorDiff = originalColor - (currentColor.rgb / max(currentColor.a, 0.0000000001));\n float colorDistance = length(colorDiff);\n float doReplace = step(colorDistance, epsilon);\n gl_FragColor = vec4(mix(currentColor.rgb, (newColor + colorDiff) * currentColor.a, doReplace), currentColor.a);\n}\n",I=function(e){function t(t,n,r){void 0===t&&(t=16711680),void 0===n&&(n=0),void 0===r&&(r=.4),e.call(this,E,L),this.uniforms.originalColor=new Float32Array(3),this.uniforms.newColor=new Float32Array(3),this.originalColor=t,this.newColor=n,this.epsilon=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={originalColor:{configurable:!0},newColor:{configurable:!0},epsilon:{configurable:!0}};return n.originalColor.set=function(e){var t=this.uniforms.originalColor;"number"==typeof e?(o.hex2rgb(e,t),this._originalColor=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],this._originalColor=o.rgb2hex(t))},n.originalColor.get=function(){return this._originalColor},n.newColor.set=function(e){var t=this.uniforms.newColor;"number"==typeof e?(o.hex2rgb(e,t),this._newColor=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],this._newColor=o.rgb2hex(t))},n.newColor.get=function(){return this._newColor},n.epsilon.set=function(e){this.uniforms.epsilon=e},n.epsilon.get=function(){return this.uniforms.epsilon},Object.defineProperties(t.prototype,n),t}(t.Filter),X=a,B="precision mediump float;\n\nvarying mediump vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec2 texelSize;\nuniform float matrix[9];\n\nvoid main(void)\n{\n vec4 c11 = texture2D(uSampler, vTextureCoord - texelSize); // top left\n vec4 c12 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - texelSize.y)); // top center\n vec4 c13 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y - texelSize.y)); // top right\n\n vec4 c21 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y)); // mid left\n vec4 c22 = texture2D(uSampler, vTextureCoord); // mid center\n vec4 c23 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y)); // mid right\n\n vec4 c31 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y + texelSize.y)); // bottom left\n vec4 c32 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + texelSize.y)); // bottom center\n vec4 c33 = texture2D(uSampler, vTextureCoord + texelSize); // bottom right\n\n gl_FragColor =\n c11 * matrix[0] + c12 * matrix[1] + c13 * matrix[2] +\n c21 * matrix[3] + c22 * matrix[4] + c23 * matrix[5] +\n c31 * matrix[6] + c32 * matrix[7] + c33 * matrix[8];\n\n gl_FragColor.a = c22.a;\n}\n",N=function(e){function t(t,n,r){void 0===n&&(n=200),void 0===r&&(r=200),e.call(this,X,B),this.uniforms.texelSize=new Float32Array(2),this.uniforms.matrix=new Float32Array(9),void 0!==t&&(this.matrix=t),this.width=n,this.height=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={matrix:{configurable:!0},width:{configurable:!0},height:{configurable:!0}};return n.matrix.get=function(){return this.uniforms.matrix},n.matrix.set=function(e){var t=this;e.forEach(function(e,n){return t.uniforms.matrix[n]=e})},n.width.get=function(){return 1/this.uniforms.texelSize[0]},n.width.set=function(e){this.uniforms.texelSize[0]=1/e},n.height.get=function(){return 1/this.uniforms.texelSize[1]},n.height.set=function(e){this.uniforms.texelSize[1]=1/e},Object.defineProperties(t.prototype,n),t}(t.Filter),G=a,q="precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n float lum = length(texture2D(uSampler, vTextureCoord.xy).rgb);\n\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n\n if (lum < 1.00)\n {\n if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.75)\n {\n if (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.50)\n {\n if (mod(gl_FragCoord.x + gl_FragCoord.y - 5.0, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.3)\n {\n if (mod(gl_FragCoord.x - gl_FragCoord.y - 5.0, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n}\n",W=function(e){function t(){e.call(this,G,q)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(t.Filter),K=a,Y="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\nuniform vec2 dimensions;\n\nconst float SQRT_2 = 1.414213;\n\nconst float light = 1.0;\n\nuniform float curvature;\nuniform float lineWidth;\nuniform float lineContrast;\nuniform bool verticalLine;\nuniform float noise;\nuniform float noiseSize;\n\nuniform float vignetting;\nuniform float vignettingAlpha;\nuniform float vignettingBlur;\n\nuniform float seed;\nuniform float time;\n\nfloat rand(vec2 co) {\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main(void)\n{\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\n vec2 coord = pixelCoord / dimensions;\n\n vec2 dir = vec2(coord - vec2(0.5, 0.5));\n\n float _c = curvature > 0. ? curvature : 1.;\n float k = curvature > 0. ?(length(dir * dir) * 0.25 * _c * _c + 0.935 * _c) : 1.;\n vec2 uv = dir * k;\n\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n vec3 rgb = gl_FragColor.rgb;\n\n\n if (noise > 0.0 && noiseSize > 0.0)\n {\n pixelCoord.x = floor(pixelCoord.x / noiseSize);\n pixelCoord.y = floor(pixelCoord.y / noiseSize);\n float _noise = rand(pixelCoord * noiseSize * seed) - 0.5;\n rgb += _noise * noise;\n }\n\n if (lineWidth > 0.0) {\n float v = (verticalLine ? uv.x * dimensions.x : uv.y * dimensions.y) * min(1.0, 2.0 / lineWidth ) / _c;\n float j = 1. + cos(v * 1.2 - time) * 0.5 * lineContrast;\n rgb *= j;\n float segment = verticalLine ? mod((dir.x + .5) * dimensions.x, 4.) : mod((dir.y + .5) * dimensions.y, 4.);\n rgb *= 0.99 + ceil(segment) * 0.015;\n }\n\n if (vignetting > 0.0)\n {\n float outter = SQRT_2 - vignetting * SQRT_2;\n float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0);\n rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha);\n }\n\n gl_FragColor.rgb = rgb;\n}\n",Z=function(e){function t(t){e.call(this,K,Y),this.uniforms.dimensions=new Float32Array(2),this.time=0,this.seed=0,Object.assign(this,{curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0},t)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={curvature:{configurable:!0},lineWidth:{configurable:!0},lineContrast:{configurable:!0},verticalLine:{configurable:!0},noise:{configurable:!0},noiseSize:{configurable:!0},vignetting:{configurable:!0},vignettingAlpha:{configurable:!0},vignettingBlur:{configurable:!0}};return t.prototype.apply=function(e,t,n,r){this.uniforms.dimensions[0]=t.filterFrame.width,this.uniforms.dimensions[1]=t.filterFrame.height,this.uniforms.seed=this.seed,this.uniforms.time=this.time,e.applyFilter(this,t,n,r)},n.curvature.set=function(e){this.uniforms.curvature=e},n.curvature.get=function(){return this.uniforms.curvature},n.lineWidth.set=function(e){this.uniforms.lineWidth=e},n.lineWidth.get=function(){return this.uniforms.lineWidth},n.lineContrast.set=function(e){this.uniforms.lineContrast=e},n.lineContrast.get=function(){return this.uniforms.lineContrast},n.verticalLine.set=function(e){this.uniforms.verticalLine=e},n.verticalLine.get=function(){return this.uniforms.verticalLine},n.noise.set=function(e){this.uniforms.noise=e},n.noise.get=function(){return this.uniforms.noise},n.noiseSize.set=function(e){this.uniforms.noiseSize=e},n.noiseSize.get=function(){return this.uniforms.noiseSize},n.vignetting.set=function(e){this.uniforms.vignetting=e},n.vignetting.get=function(){return this.uniforms.vignetting},n.vignettingAlpha.set=function(e){this.uniforms.vignettingAlpha=e},n.vignettingAlpha.get=function(){return this.uniforms.vignettingAlpha},n.vignettingBlur.set=function(e){this.uniforms.vignettingBlur=e},n.vignettingBlur.get=function(){return this.uniforms.vignettingBlur},Object.defineProperties(t.prototype,n),t}(t.Filter),Q=a,U="precision mediump float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform vec4 filterArea;\nuniform sampler2D uSampler;\n\nuniform float angle;\nuniform float scale;\n\nfloat pattern()\n{\n float s = sin(angle), c = cos(angle);\n vec2 tex = vTextureCoord * filterArea.xy;\n vec2 point = vec2(\n c * tex.x - s * tex.y,\n s * tex.x + c * tex.y\n ) * scale;\n return (sin(point.x) * sin(point.y)) * 4.0;\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float average = (color.r + color.g + color.b) / 3.0;\n gl_FragColor = vec4(vec3(average * 10.0 - 5.0 + pattern()), color.a);\n}\n",V=function(e){function t(t,n){void 0===t&&(t=1),void 0===n&&(n=5),e.call(this,Q,U),this.scale=t,this.angle=n}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={scale:{configurable:!0},angle:{configurable:!0}};return n.scale.get=function(){return this.uniforms.scale},n.scale.set=function(e){this.uniforms.scale=e},n.angle.get=function(){return this.uniforms.angle},n.angle.set=function(e){this.uniforms.angle=e},Object.defineProperties(t.prototype,n),t}(t.Filter),H=a,$="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float alpha;\nuniform vec3 color;\n\nuniform vec2 shift;\nuniform vec4 inputSize;\n\nvoid main(void){\n vec4 sample = texture2D(uSampler, vTextureCoord - shift * inputSize.zw);\n\n // Premultiply alpha\n sample.rgb = color.rgb * sample.a;\n\n // alpha user alpha\n sample *= alpha;\n\n gl_FragColor = sample;\n}",J=function(e){function t(t){t&&t.constructor!==Object&&(console.warn("DropShadowFilter now uses options instead of (rotation, distance, blur, color, alpha)"),t={rotation:t},void 0!==arguments[1]&&(t.distance=arguments[1]),void 0!==arguments[2]&&(t.blur=arguments[2]),void 0!==arguments[3]&&(t.color=arguments[3]),void 0!==arguments[4]&&(t.alpha=arguments[4])),t=Object.assign({rotation:45,distance:5,color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:r.settings.RESOLUTION},t),e.call(this);var o=t.kernels,i=t.blur,l=t.quality,s=t.pixelSize,a=t.resolution;this._tintFilter=new e(H,$),this._tintFilter.uniforms.color=new Float32Array(4),this._tintFilter.uniforms.shift=new n.Point,this._tintFilter.resolution=a,this._blurFilter=o?new d(o):new d(i,l),this.pixelSize=s,this.resolution=a;var u=t.shadowOnly,c=t.rotation,f=t.distance,h=t.alpha,p=t.color;this.shadowOnly=u,this.rotation=c,this.distance=f,this.alpha=h,this.color=p,this._updatePadding()}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={resolution:{configurable:!0},distance:{configurable:!0},rotation:{configurable:!0},alpha:{configurable:!0},color:{configurable:!0},kernels:{configurable:!0},blur:{configurable:!0},quality:{configurable:!0},pixelSize:{configurable:!0}};return t.prototype.apply=function(e,t,n,r){var o=e.getFilterTexture();this._tintFilter.apply(e,t,o,1),this._blurFilter.apply(e,o,n,r),!0!==this.shadowOnly&&e.applyFilter(this,t,n,0),e.returnFilterTexture(o)},t.prototype._updatePadding=function(){this.padding=this.distance+2*this.blur},t.prototype._updateShift=function(){this._tintFilter.uniforms.shift.set(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle))},i.resolution.get=function(){return this._resolution},i.resolution.set=function(e){this._resolution=e,this._tintFilter&&(this._tintFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)},i.distance.get=function(){return this._distance},i.distance.set=function(e){this._distance=e,this._updatePadding(),this._updateShift()},i.rotation.get=function(){return this.angle/n.DEG_TO_RAD},i.rotation.set=function(e){this.angle=e*n.DEG_TO_RAD,this._updateShift()},i.alpha.get=function(){return this._tintFilter.uniforms.alpha},i.alpha.set=function(e){this._tintFilter.uniforms.alpha=e},i.color.get=function(){return o.rgb2hex(this._tintFilter.uniforms.color)},i.color.set=function(e){o.hex2rgb(e,this._tintFilter.uniforms.color)},i.kernels.get=function(){return this._blurFilter.kernels},i.kernels.set=function(e){this._blurFilter.kernels=e},i.blur.get=function(){return this._blurFilter.blur},i.blur.set=function(e){this._blurFilter.blur=e,this._updatePadding()},i.quality.get=function(){return this._blurFilter.quality},i.quality.set=function(e){this._blurFilter.quality=e},i.pixelSize.get=function(){return this._blurFilter.pixelSize},i.pixelSize.set=function(e){this._blurFilter.pixelSize=e},Object.defineProperties(t.prototype,i),t}(t.Filter),ee=a,te="precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float strength;\nuniform vec4 filterArea;\n\n\nvoid main(void)\n{\n\tvec2 onePixel = vec2(1.0 / filterArea);\n\n\tvec4 color;\n\n\tcolor.rgb = vec3(0.5);\n\n\tcolor -= texture2D(uSampler, vTextureCoord - onePixel) * strength;\n\tcolor += texture2D(uSampler, vTextureCoord + onePixel) * strength;\n\n\tcolor.rgb = vec3((color.r + color.g + color.b) / 3.0);\n\n\tfloat alpha = texture2D(uSampler, vTextureCoord).a;\n\n\tgl_FragColor = vec4(color.rgb * alpha, alpha);\n}\n",ne=function(e){function t(t){void 0===t&&(t=5),e.call(this,ee,te),this.strength=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={strength:{configurable:!0}};return n.strength.get=function(){return this.uniforms.strength},n.strength.set=function(e){this.uniforms.strength=e},Object.defineProperties(t.prototype,n),t}(t.Filter),re=a,oe="// precision highp float;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\nuniform float aspect;\n\nuniform sampler2D displacementMap;\nuniform float offset;\nuniform float sinDir;\nuniform float cosDir;\nuniform int fillMode;\n\nuniform float seed;\nuniform vec2 red;\nuniform vec2 green;\nuniform vec2 blue;\n\nconst int TRANSPARENT = 0;\nconst int ORIGINAL = 1;\nconst int LOOP = 2;\nconst int CLAMP = 3;\nconst int MIRROR = 4;\n\nvoid main(void)\n{\n vec2 coord = (vTextureCoord * filterArea.xy) / dimensions;\n\n if (coord.x > 1.0 || coord.y > 1.0) {\n return;\n }\n\n float cx = coord.x - 0.5;\n float cy = (coord.y - 0.5) * aspect;\n float ny = (-sinDir * cx + cosDir * cy) / aspect + 0.5;\n\n // displacementMap: repeat\n // ny = ny > 1.0 ? ny - 1.0 : (ny < 0.0 ? 1.0 + ny : ny);\n\n // displacementMap: mirror\n ny = ny > 1.0 ? 2.0 - ny : (ny < 0.0 ? -ny : ny);\n\n vec4 dc = texture2D(displacementMap, vec2(0.5, ny));\n\n float displacement = (dc.r - dc.g) * (offset / filterArea.x);\n\n coord = vTextureCoord + vec2(cosDir * displacement, sinDir * displacement * aspect);\n\n if (fillMode == CLAMP) {\n coord = clamp(coord, filterClamp.xy, filterClamp.zw);\n } else {\n if( coord.x > filterClamp.z ) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.x -= filterClamp.z;\n } else if (fillMode == MIRROR) {\n coord.x = filterClamp.z * 2.0 - coord.x;\n }\n } else if( coord.x < filterClamp.x ) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.x += filterClamp.z;\n } else if (fillMode == MIRROR) {\n coord.x *= -filterClamp.z;\n }\n }\n\n if( coord.y > filterClamp.w ) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.y -= filterClamp.w;\n } else if (fillMode == MIRROR) {\n coord.y = filterClamp.w * 2.0 - coord.y;\n }\n } else if( coord.y < filterClamp.y ) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.y += filterClamp.w;\n } else if (fillMode == MIRROR) {\n coord.y *= -filterClamp.w;\n }\n }\n }\n\n gl_FragColor.r = texture2D(uSampler, coord + red * (1.0 - seed * 0.4) / filterArea.xy).r;\n gl_FragColor.g = texture2D(uSampler, coord + green * (1.0 - seed * 0.3) / filterArea.xy).g;\n gl_FragColor.b = texture2D(uSampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b;\n gl_FragColor.a = texture2D(uSampler, coord).a;\n}\n",ie=function(e){function r(n){void 0===n&&(n={}),e.call(this,re,oe),this.uniforms.dimensions=new Float32Array(2),n=Object.assign({slices:5,offset:100,direction:0,fillMode:0,average:!1,seed:0,red:[0,0],green:[0,0],blue:[0,0],minSize:8,sampleSize:512},n),this.direction=n.direction,this.red=n.red,this.green=n.green,this.blue=n.blue,this.offset=n.offset,this.fillMode=n.fillMode,this.average=n.average,this.seed=n.seed,this.minSize=n.minSize,this.sampleSize=n.sampleSize,this._canvas=document.createElement("canvas"),this._canvas.width=4,this._canvas.height=this.sampleSize,this.texture=t.Texture.from(this._canvas,{scaleMode:i.SCALE_MODES.NEAREST}),this._slices=0,this.slices=n.slices}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var o={sizes:{configurable:!0},offsets:{configurable:!0},slices:{configurable:!0},direction:{configurable:!0},red:{configurable:!0},green:{configurable:!0},blue:{configurable:!0}};return r.prototype.apply=function(e,t,n,r){var o=t.filterFrame.width,i=t.filterFrame.height;this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=i,this.uniforms.aspect=i/o,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,e.applyFilter(this,t,n,r)},r.prototype._randomizeSizes=function(){var e=this._sizes,t=this._slices-1,n=this.sampleSize,r=Math.min(this.minSize/n,.9/this._slices);if(this.average){for(var o=this._slices,i=1,l=0;l0;t--){var n=Math.random()*t>>0,r=e[t];e[t]=e[n],e[n]=r}},r.prototype._randomizeOffsets=function(){for(var e=0;e0?e:0,a=e<0?-e:0;r.fillStyle="rgba("+s+", "+a+", 0, 1)",r.fillRect(0,o>>0,t,l+1>>0),o+=l}n.baseTexture.update(),this.uniforms.displacementMap=n},o.sizes.set=function(e){for(var t=Math.min(this._slices,e.length),n=0;nthis._maxColors)throw"Length of replacements ("+r+") exceeds the maximum colors length ("+this._maxColors+")";t[3*r]=-1;for(var i=0;i 0.5) then: 1 - 2 * (1 - dst) * (1 - src)\n return vec3((dst.x <= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - dst.x) * (1.0 - src.x)),\n (dst.y <= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - dst.y) * (1.0 - src.y)),\n (dst.z <= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - dst.z) * (1.0 - src.z)));\n}\n\n\nvoid main()\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n vec3 color = gl_FragColor.rgb;\n\n if (sepia > 0.0)\n {\n float gray = (color.x + color.y + color.z) / 3.0;\n vec3 grayscale = vec3(gray);\n\n color = Overlay(SEPIA_RGB, grayscale);\n\n color = grayscale + sepia * (color - grayscale);\n }\n\n vec2 coord = vTextureCoord * filterArea.xy / dimensions.xy;\n\n if (vignetting > 0.0)\n {\n float outter = SQRT_2 - vignetting * SQRT_2;\n vec2 dir = vec2(vec2(0.5, 0.5) - coord);\n dir.y *= dimensions.y / dimensions.x;\n float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0);\n color.rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha);\n }\n\n if (scratchDensity > seed && scratch != 0.0)\n {\n float phase = seed * 256.0;\n float s = mod(floor(phase), 2.0);\n float dist = 1.0 / scratchDensity;\n float d = distance(coord, vec2(seed * dist, abs(s - seed * dist)));\n if (d < seed * 0.6 + 0.4)\n {\n highp float period = scratchDensity * 10.0;\n\n float xx = coord.x * period + phase;\n float aa = abs(mod(xx, 0.5) * 4.0);\n float bb = mod(floor(xx / 0.5), 2.0);\n float yy = (1.0 - bb) * aa + bb * (2.0 - aa);\n\n float kk = 2.0 * period;\n float dw = scratchWidth / dimensions.x * (0.75 + seed);\n float dh = dw * kk;\n\n float tine = (yy - (2.0 - dh));\n\n if (tine > 0.0) {\n float _sign = sign(scratch);\n\n tine = s * tine / period + scratch + 0.1;\n tine = clamp(tine + 1.0, 0.5 + _sign * 0.5, 1.5 + _sign * 0.5);\n\n color.rgb *= tine;\n }\n }\n }\n\n if (noise > 0.0 && noiseSize > 0.0)\n {\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\n pixelCoord.x = floor(pixelCoord.x / noiseSize);\n pixelCoord.y = floor(pixelCoord.y / noiseSize);\n // vec2 d = pixelCoord * noiseSize * vec2(1024.0 + seed * 512.0, 1024.0 - seed * 512.0);\n // float _noise = snoise(d) * 0.5;\n float _noise = rand(pixelCoord * noiseSize * seed) - 0.5;\n color += _noise * noise;\n }\n\n gl_FragColor.rgb = color;\n}\n",be=function(e){function t(t,n){void 0===n&&(n=0),e.call(this,ye,_e),this.uniforms.dimensions=new Float32Array(2),"number"==typeof t?(this.seed=t,t=null):this.seed=n,Object.assign(this,{sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3},t)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={sepia:{configurable:!0},noise:{configurable:!0},noiseSize:{configurable:!0},scratch:{configurable:!0},scratchDensity:{configurable:!0},scratchWidth:{configurable:!0},vignetting:{configurable:!0},vignettingAlpha:{configurable:!0},vignettingBlur:{configurable:!0}};return t.prototype.apply=function(e,t,n,r){this.uniforms.dimensions[0]=t.filterFrame.width,this.uniforms.dimensions[1]=t.filterFrame.height,this.uniforms.seed=this.seed,e.applyFilter(this,t,n,r)},n.sepia.set=function(e){this.uniforms.sepia=e},n.sepia.get=function(){return this.uniforms.sepia},n.noise.set=function(e){this.uniforms.noise=e},n.noise.get=function(){return this.uniforms.noise},n.noiseSize.set=function(e){this.uniforms.noiseSize=e},n.noiseSize.get=function(){return this.uniforms.noiseSize},n.scratch.set=function(e){this.uniforms.scratch=e},n.scratch.get=function(){return this.uniforms.scratch},n.scratchDensity.set=function(e){this.uniforms.scratchDensity=e},n.scratchDensity.get=function(){return this.uniforms.scratchDensity},n.scratchWidth.set=function(e){this.uniforms.scratchWidth=e},n.scratchWidth.get=function(){return this.uniforms.scratchWidth},n.vignetting.set=function(e){this.uniforms.vignetting=e},n.vignetting.get=function(){return this.uniforms.vignetting},n.vignettingAlpha.set=function(e){this.uniforms.vignettingAlpha=e},n.vignettingAlpha.get=function(){return this.uniforms.vignettingAlpha},n.vignettingBlur.set=function(e){this.uniforms.vignettingBlur=e},n.vignettingBlur.get=function(){return this.uniforms.vignettingBlur},Object.defineProperties(t.prototype,n),t}(t.Filter),Ce=a,Se="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec2 thickness;\nuniform vec4 outlineColor;\nuniform vec4 filterClamp;\n\nconst float DOUBLE_PI = 3.14159265358979323846264 * 2.;\n\nvoid main(void) {\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\n vec4 curColor;\n float maxAlpha = 0.;\n vec2 displaced;\n for (float angle = 0.; angle <= DOUBLE_PI; angle += ${angleStep}) {\n displaced.x = vTextureCoord.x + thickness.x * cos(angle);\n displaced.y = vTextureCoord.y + thickness.y * sin(angle);\n curColor = texture2D(uSampler, clamp(displaced, filterClamp.xy, filterClamp.zw));\n maxAlpha = max(maxAlpha, curColor.a);\n }\n float resultAlpha = max(maxAlpha, ownColor.a);\n gl_FragColor = vec4((ownColor.rgb + outlineColor.rgb * (1. - ownColor.a)) * resultAlpha, resultAlpha);\n}\n",Fe=function(e){function t(n,r,o){void 0===n&&(n=1),void 0===r&&(r=0),void 0===o&&(o=.1);var i=Math.max(o*t.MAX_SAMPLES,t.MIN_SAMPLES),l=(2*Math.PI/i).toFixed(7);e.call(this,Ce,Se.replace(/\$\{angleStep\}/,l)),this.uniforms.thickness=new Float32Array([0,0]),this.thickness=n,this.uniforms.outlineColor=new Float32Array([0,0,0,1]),this.color=r,this.quality=o}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={color:{configurable:!0}};return t.prototype.apply=function(e,t,n,r){this.uniforms.thickness[0]=this.thickness/t._frame.width,this.uniforms.thickness[1]=this.thickness/t._frame.height,e.applyFilter(this,t,n,r)},n.color.get=function(){return o.rgb2hex(this.uniforms.outlineColor)},n.color.set=function(e){o.hex2rgb(e,this.uniforms.outlineColor)},Object.defineProperties(t.prototype,n),t}(t.Filter);Fe.MIN_SAMPLES=1,Fe.MAX_SAMPLES=100;var ze=a,Ae="precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform vec2 size;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvec2 pixelate(vec2 coord, vec2 size)\n{\n\treturn floor( coord / size ) * size;\n}\n\nvoid main(void)\n{\n vec2 coord = mapCoord(vTextureCoord);\n\n coord = pixelate(coord, size);\n\n coord = unmapCoord(coord);\n\n gl_FragColor = texture2D(uSampler, coord);\n}\n",we=function(e){function t(t){void 0===t&&(t=10),e.call(this,ze,Ae),this.size=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={size:{configurable:!0}};return n.size.get=function(){return this.uniforms.size},n.size.set=function(e){"number"==typeof e&&(e=[e,e]),this.uniforms.size=e},Object.defineProperties(t.prototype,n),t}(t.Filter),Te=a,Oe="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\nuniform float uRadian;\nuniform vec2 uCenter;\nuniform float uRadius;\nuniform int uKernelSize;\n\nconst int MAX_KERNEL_SIZE = 2048;\n\nvoid main(void)\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n\n if (uKernelSize == 0)\n {\n gl_FragColor = color;\n return;\n }\n\n float aspect = filterArea.y / filterArea.x;\n vec2 center = uCenter.xy / filterArea.xy;\n float gradient = uRadius / filterArea.x * 0.3;\n float radius = uRadius / filterArea.x - gradient * 0.5;\n int k = uKernelSize - 1;\n\n vec2 coord = vTextureCoord;\n vec2 dir = vec2(center - coord);\n float dist = length(vec2(dir.x, dir.y * aspect));\n\n float radianStep = uRadian;\n if (radius >= 0.0 && dist > radius) {\n float delta = dist - radius;\n float gap = gradient;\n float scale = 1.0 - abs(delta / gap);\n if (scale <= 0.0) {\n gl_FragColor = color;\n return;\n }\n radianStep *= scale;\n }\n radianStep /= float(k);\n\n float s = sin(radianStep);\n float c = cos(radianStep);\n mat2 rotationMatrix = mat2(vec2(c, -s), vec2(s, c));\n\n for(int i = 0; i < MAX_KERNEL_SIZE - 1; i++) {\n if (i == k) {\n break;\n }\n\n coord -= center;\n coord.y *= aspect;\n coord = rotationMatrix * coord;\n coord.y /= aspect;\n coord += center;\n\n vec4 sample = texture2D(uSampler, coord);\n\n // switch to pre-multiplied alpha to correctly blur transparent images\n // sample.rgb *= sample.a;\n\n color += sample;\n }\n\n gl_FragColor = color / float(uKernelSize);\n}\n",De=function(e){function t(t,n,r,o){void 0===t&&(t=0),void 0===n&&(n=[0,0]),void 0===r&&(r=5),void 0===o&&(o=-1),e.call(this,Te,Oe),this._angle=0,this.angle=t,this.center=n,this.kernelSize=r,this.radius=o}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={angle:{configurable:!0},center:{configurable:!0},radius:{configurable:!0}};return t.prototype.apply=function(e,t,n,r){this.uniforms.uKernelSize=0!==this._angle?this.kernelSize:0,e.applyFilter(this,t,n,r)},n.angle.set=function(e){this._angle=e,this.uniforms.uRadian=e*Math.PI/180},n.angle.get=function(){return this._angle},n.center.get=function(){return this.uniforms.uCenter},n.center.set=function(e){this.uniforms.uCenter=e},n.radius.get=function(){return this.uniforms.uRadius},n.radius.set=function(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e},Object.defineProperties(t.prototype,n),t}(t.Filter),Pe=a,Me="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\n\nuniform bool mirror;\nuniform float boundary;\nuniform vec2 amplitude;\nuniform vec2 waveLength;\nuniform vec2 alpha;\nuniform float time;\n\nfloat rand(vec2 co) {\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main(void)\n{\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\n vec2 coord = pixelCoord / dimensions;\n\n if (coord.y < boundary) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n\n float k = (coord.y - boundary) / (1. - boundary + 0.0001);\n float areaY = boundary * dimensions.y / filterArea.y;\n float v = areaY + areaY - vTextureCoord.y;\n float y = mirror ? v : vTextureCoord.y;\n\n float _amplitude = ((amplitude.y - amplitude.x) * k + amplitude.x ) / filterArea.x;\n float _waveLength = ((waveLength.y - waveLength.x) * k + waveLength.x) / filterArea.y;\n float _alpha = (alpha.y - alpha.x) * k + alpha.x;\n\n float x = vTextureCoord.x + cos(v * 6.28 / _waveLength - time) * _amplitude;\n x = clamp(x, filterClamp.x, filterClamp.z);\n\n vec4 color = texture2D(uSampler, vec2(x, y));\n\n gl_FragColor = color * _alpha;\n}\n",Re=function(e){function t(t){e.call(this,Pe,Me),this.uniforms.amplitude=new Float32Array(2),this.uniforms.waveLength=new Float32Array(2),this.uniforms.alpha=new Float32Array(2),this.uniforms.dimensions=new Float32Array(2),Object.assign(this,{mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0},t)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={mirror:{configurable:!0},boundary:{configurable:!0},amplitude:{configurable:!0},waveLength:{configurable:!0},alpha:{configurable:!0}};return t.prototype.apply=function(e,t,n,r){this.uniforms.dimensions[0]=t.filterFrame.width,this.uniforms.dimensions[1]=t.filterFrame.height,this.uniforms.time=this.time,e.applyFilter(this,t,n,r)},n.mirror.set=function(e){this.uniforms.mirror=e},n.mirror.get=function(){return this.uniforms.mirror},n.boundary.set=function(e){this.uniforms.boundary=e},n.boundary.get=function(){return this.uniforms.boundary},n.amplitude.set=function(e){this.uniforms.amplitude[0]=e[0],this.uniforms.amplitude[1]=e[1]},n.amplitude.get=function(){return this.uniforms.amplitude},n.waveLength.set=function(e){this.uniforms.waveLength[0]=e[0],this.uniforms.waveLength[1]=e[1]},n.waveLength.get=function(){return this.uniforms.waveLength},n.alpha.set=function(e){this.uniforms.alpha[0]=e[0],this.uniforms.alpha[1]=e[1]},n.alpha.get=function(){return this.uniforms.alpha},Object.defineProperties(t.prototype,n),t}(t.Filter),ke=a,je="precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec2 red;\nuniform vec2 green;\nuniform vec2 blue;\n\nvoid main(void)\n{\n gl_FragColor.r = texture2D(uSampler, vTextureCoord + red/filterArea.xy).r;\n gl_FragColor.g = texture2D(uSampler, vTextureCoord + green/filterArea.xy).g;\n gl_FragColor.b = texture2D(uSampler, vTextureCoord + blue/filterArea.xy).b;\n gl_FragColor.a = texture2D(uSampler, vTextureCoord).a;\n}\n",Ee=function(e){function t(t,n,r){void 0===t&&(t=[-10,0]),void 0===n&&(n=[0,10]),void 0===r&&(r=[0,0]),e.call(this,ke,je),this.red=t,this.green=n,this.blue=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={red:{configurable:!0},green:{configurable:!0},blue:{configurable:!0}};return n.red.get=function(){return this.uniforms.red},n.red.set=function(e){this.uniforms.red=e},n.green.get=function(){return this.uniforms.green},n.green.set=function(e){this.uniforms.green=e},n.blue.get=function(){return this.uniforms.blue},n.blue.set=function(e){this.uniforms.blue=e},Object.defineProperties(t.prototype,n),t}(t.Filter),Le=a,Ie="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\n\nuniform vec2 center;\n\nuniform float amplitude;\nuniform float wavelength;\n// uniform float power;\nuniform float brightness;\nuniform float speed;\nuniform float radius;\n\nuniform float time;\n\nconst float PI = 3.14159;\n\nvoid main()\n{\n float halfWavelength = wavelength * 0.5 / filterArea.x;\n float maxRadius = radius / filterArea.x;\n float currentRadius = time * speed / filterArea.x;\n\n float fade = 1.0;\n\n if (maxRadius > 0.0) {\n if (currentRadius > maxRadius) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n fade = 1.0 - pow(currentRadius / maxRadius, 2.0);\n }\n\n vec2 dir = vec2(vTextureCoord - center / filterArea.xy);\n dir.y *= filterArea.y / filterArea.x;\n float dist = length(dir);\n\n if (dist <= 0.0 || dist < currentRadius - halfWavelength || dist > currentRadius + halfWavelength) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n\n vec2 diffUV = normalize(dir);\n\n float diff = (dist - currentRadius) / halfWavelength;\n\n float p = 1.0 - pow(abs(diff), 2.0);\n\n // float powDiff = diff * pow(p, 2.0) * ( amplitude * fade );\n float powDiff = 1.25 * sin(diff * PI) * p * ( amplitude * fade );\n\n vec2 offset = diffUV * powDiff / filterArea.xy;\n\n // Do clamp :\n vec2 coord = vTextureCoord + offset;\n vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw);\n vec4 color = texture2D(uSampler, clampedCoord);\n if (coord != clampedCoord) {\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\n }\n\n // No clamp :\n // gl_FragColor = texture2D(uSampler, vTextureCoord + offset);\n\n color.rgb *= 1.0 + (brightness - 1.0) * p * fade;\n\n gl_FragColor = color;\n}\n",Xe=function(e){function t(t,n,r){void 0===t&&(t=[0,0]),void 0===n&&(n={}),void 0===r&&(r=0),e.call(this,Le,Ie),this.center=t,Array.isArray(n)&&(console.warn("Deprecated Warning: ShockwaveFilter params Array has been changed to options Object."),n={}),n=Object.assign({amplitude:30,wavelength:160,brightness:1,speed:500,radius:-1},n),this.amplitude=n.amplitude,this.wavelength=n.wavelength,this.brightness=n.brightness,this.speed=n.speed,this.radius=n.radius,this.time=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={center:{configurable:!0},amplitude:{configurable:!0},wavelength:{configurable:!0},brightness:{configurable:!0},speed:{configurable:!0},radius:{configurable:!0}};return t.prototype.apply=function(e,t,n,r){this.uniforms.time=this.time,e.applyFilter(this,t,n,r)},n.center.get=function(){return this.uniforms.center},n.center.set=function(e){this.uniforms.center=e},n.amplitude.get=function(){return this.uniforms.amplitude},n.amplitude.set=function(e){this.uniforms.amplitude=e},n.wavelength.get=function(){return this.uniforms.wavelength},n.wavelength.set=function(e){this.uniforms.wavelength=e},n.brightness.get=function(){return this.uniforms.brightness},n.brightness.set=function(e){this.uniforms.brightness=e},n.speed.get=function(){return this.uniforms.speed},n.speed.set=function(e){this.uniforms.speed=e},n.radius.get=function(){return this.uniforms.radius},n.radius.set=function(e){this.uniforms.radius=e},Object.defineProperties(t.prototype,n),t}(t.Filter),Be=a,Ne="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform sampler2D uLightmap;\nuniform vec4 filterArea;\nuniform vec2 dimensions;\nuniform vec4 ambientColor;\nvoid main() {\n vec4 diffuseColor = texture2D(uSampler, vTextureCoord);\n vec2 lightCoord = (vTextureCoord * filterArea.xy) / dimensions;\n vec4 light = texture2D(uLightmap, lightCoord);\n vec3 ambient = ambientColor.rgb * ambientColor.a;\n vec3 intensity = ambient + light.rgb;\n vec3 finalColor = diffuseColor.rgb * intensity;\n gl_FragColor = vec4(finalColor, diffuseColor.a);\n}\n",Ge=function(e){function t(t,n,r){void 0===n&&(n=0),void 0===r&&(r=1),e.call(this,Be,Ne),this.uniforms.dimensions=new Float32Array(2),this.uniforms.ambientColor=new Float32Array([0,0,0,r]),this.texture=t,this.color=n}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={texture:{configurable:!0},color:{configurable:!0},alpha:{configurable:!0}};return t.prototype.apply=function(e,t,n,r){this.uniforms.dimensions[0]=t.filterFrame.width,this.uniforms.dimensions[1]=t.filterFrame.height,e.applyFilter(this,t,n,r)},n.texture.get=function(){return this.uniforms.uLightmap},n.texture.set=function(e){this.uniforms.uLightmap=e},n.color.set=function(e){var t=this.uniforms.ambientColor;"number"==typeof e?(o.hex2rgb(e,t),this._color=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],this._color=o.rgb2hex(t))},n.color.get=function(){return this._color},n.alpha.get=function(){return this.uniforms.ambientColor[3]},n.alpha.set=function(e){this.uniforms.ambientColor[3]=e},Object.defineProperties(t.prototype,n),t}(t.Filter),qe=a,We="varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float blur;\nuniform float gradientBlur;\nuniform vec2 start;\nuniform vec2 end;\nuniform vec2 delta;\nuniform vec2 texSize;\n\nfloat random(vec3 scale, float seed)\n{\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n}\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vTextureCoord * texSize - start, normal)) / gradientBlur) * blur;\n\n for (float t = -30.0; t <= 30.0; t++)\n {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 sample = texture2D(uSampler, vTextureCoord + delta / texSize * percent * radius);\n sample.rgb *= sample.a;\n color += sample * weight;\n total += weight;\n }\n\n color /= total;\n color.rgb /= color.a + 0.00001;\n\n gl_FragColor = color;\n}\n",Ke=function(e){function t(t,r,o,i){void 0===t&&(t=100),void 0===r&&(r=600),void 0===o&&(o=null),void 0===i&&(i=null),e.call(this,qe,We),this.uniforms.blur=t,this.uniforms.gradientBlur=r,this.uniforms.start=o||new n.Point(0,window.innerHeight/2),this.uniforms.end=i||new n.Point(600,window.innerHeight/2),this.uniforms.delta=new n.Point(30,30),this.uniforms.texSize=new n.Point(window.innerWidth,window.innerHeight),this.updateDelta()}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={blur:{configurable:!0},gradientBlur:{configurable:!0},start:{configurable:!0},end:{configurable:!0}};return t.prototype.updateDelta=function(){this.uniforms.delta.x=0,this.uniforms.delta.y=0},r.blur.get=function(){return this.uniforms.blur},r.blur.set=function(e){this.uniforms.blur=e},r.gradientBlur.get=function(){return this.uniforms.gradientBlur},r.gradientBlur.set=function(e){this.uniforms.gradientBlur=e},r.start.get=function(){return this.uniforms.start},r.start.set=function(e){this.uniforms.start=e,this.updateDelta()},r.end.get=function(){return this.uniforms.end},r.end.set=function(e){this.uniforms.end=e,this.updateDelta()},Object.defineProperties(t.prototype,r),t}(t.Filter),Ye=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.updateDelta=function(){var e=this.uniforms.end.x-this.uniforms.start.x,t=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(e*e+t*t);this.uniforms.delta.x=e/n,this.uniforms.delta.y=t/n},t}(Ke),Ze=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.updateDelta=function(){var e=this.uniforms.end.x-this.uniforms.start.x,t=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(e*e+t*t);this.uniforms.delta.x=-t/n,this.uniforms.delta.y=e/n},t}(Ke),Qe=function(e){function t(t,n,r,o){void 0===t&&(t=100),void 0===n&&(n=600),void 0===r&&(r=null),void 0===o&&(o=null),e.call(this),this.tiltShiftXFilter=new Ye(t,n,r,o),this.tiltShiftYFilter=new Ze(t,n,r,o)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={blur:{configurable:!0},gradientBlur:{configurable:!0},start:{configurable:!0},end:{configurable:!0}};return t.prototype.apply=function(e,t,n){var r=e.getFilterTexture();this.tiltShiftXFilter.apply(e,t,r),this.tiltShiftYFilter.apply(e,r,n),e.returnFilterTexture(r)},n.blur.get=function(){return this.tiltShiftXFilter.blur},n.blur.set=function(e){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=e},n.gradientBlur.get=function(){return this.tiltShiftXFilter.gradientBlur},n.gradientBlur.set=function(e){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=e},n.start.get=function(){return this.tiltShiftXFilter.start},n.start.set=function(e){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=e},n.end.get=function(){return this.tiltShiftXFilter.end},n.end.set=function(e){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=e},Object.defineProperties(t.prototype,n),t}(t.Filter),Ue=a,Ve="varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float radius;\nuniform float angle;\nuniform vec2 offset;\nuniform vec4 filterArea;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvec2 twist(vec2 coord)\n{\n coord -= offset;\n\n float dist = length(coord);\n\n if (dist < radius)\n {\n float ratioDist = (radius - dist) / radius;\n float angleMod = ratioDist * ratioDist * angle;\n float s = sin(angleMod);\n float c = cos(angleMod);\n coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c);\n }\n\n coord += offset;\n\n return coord;\n}\n\nvoid main(void)\n{\n\n vec2 coord = mapCoord(vTextureCoord);\n\n coord = twist(coord);\n\n coord = unmapCoord(coord);\n\n gl_FragColor = texture2D(uSampler, coord );\n\n}\n",He=function(e){function t(t,n,r){void 0===t&&(t=200),void 0===n&&(n=4),void 0===r&&(r=20),e.call(this,Ue,Ve),this.radius=t,this.angle=n,this.padding=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={offset:{configurable:!0},radius:{configurable:!0},angle:{configurable:!0}};return n.offset.get=function(){return this.uniforms.offset},n.offset.set=function(e){this.uniforms.offset=e},n.radius.get=function(){return this.uniforms.radius},n.radius.set=function(e){this.uniforms.radius=e},n.angle.get=function(){return this.uniforms.angle},n.angle.set=function(e){this.uniforms.angle=e},Object.defineProperties(t.prototype,n),t}(t.Filter),$e=a,Je="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\nuniform vec2 uCenter;\nuniform float uStrength;\nuniform float uInnerRadius;\nuniform float uRadius;\n\nconst float MAX_KERNEL_SIZE = 32.0;\n\n// author: http://byteblacksmith.com/improvements-to-the-canonical-one-liner-glsl-rand-for-opengl-es-2-0/\nhighp float rand(vec2 co, float seed) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot(co + seed, vec2(a, b)), sn = mod(dt, 3.14159);\n return fract(sin(sn) * c + seed);\n}\n\nvoid main() {\n\n float minGradient = uInnerRadius * 0.3;\n float innerRadius = (uInnerRadius + minGradient * 0.5) / filterArea.x;\n\n float gradient = uRadius * 0.3;\n float radius = (uRadius - gradient * 0.5) / filterArea.x;\n\n float countLimit = MAX_KERNEL_SIZE;\n\n vec2 dir = vec2(uCenter.xy / filterArea.xy - vTextureCoord);\n float dist = length(vec2(dir.x, dir.y * filterArea.y / filterArea.x));\n\n float strength = uStrength;\n\n float delta = 0.0;\n float gap;\n if (dist < innerRadius) {\n delta = innerRadius - dist;\n gap = minGradient;\n } else if (radius >= 0.0 && dist > radius) { // radius < 0 means it's infinity\n delta = dist - radius;\n gap = gradient;\n }\n\n if (delta > 0.0) {\n float normalCount = gap / filterArea.x;\n delta = (normalCount - delta) / normalCount;\n countLimit *= delta;\n strength *= delta;\n if (countLimit < 1.0)\n {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n }\n\n // randomize the lookup values to hide the fixed number of samples\n float offset = rand(vTextureCoord, 0.0);\n\n float total = 0.0;\n vec4 color = vec4(0.0);\n\n dir *= strength;\n\n for (float t = 0.0; t < MAX_KERNEL_SIZE; t++) {\n float percent = (t + offset) / MAX_KERNEL_SIZE;\n float weight = 4.0 * (percent - percent * percent);\n vec2 p = vTextureCoord + dir * percent;\n vec4 sample = texture2D(uSampler, p);\n\n // switch to pre-multiplied alpha to correctly blur transparent images\n // sample.rgb *= sample.a;\n\n color += sample * weight;\n total += weight;\n\n if (t > countLimit){\n break;\n }\n }\n\n color /= total;\n // switch back from pre-multiplied alpha\n // color.rgb /= color.a + 0.00001;\n\n gl_FragColor = color;\n}\n",et=function(e){function t(t){if(e.call(this,$e,Je),"object"!=typeof t){var n=arguments[0],r=arguments[1],o=arguments[2],i=arguments[3];t={},void 0!==n&&(t.strength=n),void 0!==r&&(t.center=r),void 0!==o&&(t.innerRadius=o),void 0!==i&&(t.radius=i)}Object.assign(this,{strength:.1,center:[0,0],innerRadius:0,radius:-1},t)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={center:{configurable:!0},strength:{configurable:!0},innerRadius:{configurable:!0},radius:{configurable:!0}};return n.center.get=function(){return this.uniforms.uCenter},n.center.set=function(e){this.uniforms.uCenter=e},n.strength.get=function(){return this.uniforms.uStrength},n.strength.set=function(e){this.uniforms.uStrength=e},n.innerRadius.get=function(){return this.uniforms.uInnerRadius},n.innerRadius.set=function(e){this.uniforms.uInnerRadius=e},n.radius.get=function(){return this.uniforms.uRadius},n.radius.set=function(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e},Object.defineProperties(t.prototype,n),t}(t.Filter);return e.AdjustmentFilter=c,e.AdvancedBloomFilter=y,e.AsciiFilter=C,e.BevelFilter=z,e.BloomFilter=A,e.BulgePinchFilter=O,e.CRTFilter=Z,e.ColorMapFilter=M,e.ColorOverlayFilter=j,e.ColorReplaceFilter=I,e.ConvolutionFilter=N,e.CrossHatchFilter=W,e.DotFilter=V,e.DropShadowFilter=J,e.EmbossFilter=ne,e.GlitchFilter=ie,e.GlowFilter=ae,e.GodrayFilter=he,e.KawaseBlurFilter=d,e.MotionBlurFilter=me,e.MultiColorReplaceFilter=xe,e.OldFilmFilter=be,e.OutlineFilter=Fe,e.PixelateFilter=we,e.RGBSplitFilter=Ee,e.RadialBlurFilter=De,e.ReflectionFilter=Re,e.ShockwaveFilter=Xe,e.SimpleLightmapFilter=Ge,e.TiltShiftAxisFilter=Ke,e.TiltShiftFilter=Qe,e.TiltShiftXFilter=Ye,e.TiltShiftYFilter=Ze,e.TwistFilter=He,e.ZoomBlurFilter=et,e}({},PIXI,PIXI,PIXI,PIXI.utils,PIXI,PIXI.filters,PIXI.filters);Object.assign(PIXI.filters,__filters); //# sourceMappingURL=pixi-filters.js.map diff --git a/tokenmagic/libs/filters/pixi-filters.js.map b/tokenmagic/libs/filters/pixi-filters.js.map index 4b269da..65cf4ce 100644 --- a/tokenmagic/libs/filters/pixi-filters.js.map +++ b/tokenmagic/libs/filters/pixi-filters.js.map @@ -1 +1 @@ -{"version":3,"file":"pixi-filters.js","sources":["../../filters/adjustment/lib/filter-adjustment.esm.js","../../filters/kawase-blur/lib/filter-kawase-blur.esm.js","../../filters/advanced-bloom/lib/filter-advanced-bloom.esm.js","../../filters/ascii/lib/filter-ascii.esm.js","../../filters/bevel/lib/filter-bevel.esm.js","../../filters/bloom/lib/filter-bloom.esm.js","../../filters/bulge-pinch/lib/filter-bulge-pinch.esm.js","../../filters/color-map/lib/filter-color-map.esm.js","../../filters/color-replace/lib/filter-color-replace.esm.js","../../filters/convolution/lib/filter-convolution.esm.js","../../filters/cross-hatch/lib/filter-cross-hatch.esm.js","../../filters/crt/lib/filter-crt.esm.js","../../filters/dot/lib/filter-dot.esm.js","../../filters/drop-shadow/lib/filter-drop-shadow.esm.js","../../filters/emboss/lib/filter-emboss.esm.js","../../filters/glitch/lib/filter-glitch.esm.js","../../filters/glow/lib/filter-glow.esm.js","../../filters/godray/lib/filter-godray.esm.js","../../filters/motion-blur/lib/filter-motion-blur.esm.js","../../filters/multi-color-replace/lib/filter-multi-color-replace.esm.js","../../filters/old-film/lib/filter-old-film.esm.js","../../filters/outline/lib/filter-outline.esm.js","../../filters/pixelate/lib/filter-pixelate.esm.js","../../filters/radial-blur/lib/filter-radial-blur.esm.js","../../filters/reflection/lib/filter-reflection.esm.js","../../filters/rgb-split/lib/filter-rgb-split.esm.js","../../filters/shockwave/lib/filter-shockwave.esm.js","../../filters/simple-lightmap/lib/filter-simple-lightmap.esm.js","../../filters/tilt-shift/lib/filter-tilt-shift.esm.js","../../filters/twist/lib/filter-twist.esm.js","../../filters/zoom-blur/lib/filter-zoom-blur.esm.js"],"sourcesContent":["/*!\n * @pixi/filter-adjustment - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-adjustment is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform float gamma;\\nuniform float contrast;\\nuniform float saturation;\\nuniform float brightness;\\nuniform float red;\\nuniform float green;\\nuniform float blue;\\nuniform float alpha;\\n\\nvoid main(void)\\n{\\n vec4 c = texture2D(uSampler, vTextureCoord);\\n\\n if (c.a > 0.0) {\\n c.rgb /= c.a;\\n\\n vec3 rgb = pow(c.rgb, vec3(1. / gamma));\\n rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, saturation), contrast);\\n rgb.r *= red;\\n rgb.g *= green;\\n rgb.b *= blue;\\n c.rgb = rgb * brightness;\\n\\n c.rgb *= c.a;\\n }\\n\\n gl_FragColor = c * alpha;\\n}\\n\";\n\n/**\n * The ability to adjust gamma, contrast, saturation, brightness, alpha or color-channel shift. This is a faster\n * and much simpler to use than {@link http://pixijs.download/release/docs/PIXI.filters.ColorMatrixFilter.html ColorMatrixFilter}\n * because it does not use a matrix.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/adjustment.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-adjustment|@pixi/filter-adjustment}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n *\n * @param {object|number} [options] - The optional parameters of the filter.\n * @param {number} [options.gamma=1] - The amount of luminance\n * @param {number} [options.saturation=1] - The amount of color saturation\n * @param {number} [options.contrast=1] - The amount of contrast\n * @param {number} [options.brightness=1] - The overall brightness\n * @param {number} [options.red=1] - The multipled red channel\n * @param {number} [options.green=1] - The multipled green channel\n * @param {number} [options.blue=1] - The multipled blue channel\n * @param {number} [options.alpha=1] - The overall alpha amount\n */\nvar AdjustmentFilter = /*@__PURE__*/(function (Filter) {\n function AdjustmentFilter(options) {\n Filter.call(this, vertex, fragment);\n\n Object.assign(this, {\n /**\n * The amount of luminance\n * @member {number}\n * @memberof PIXI.filters.AdjustmentFilter#\n * @default 1\n */\n gamma: 1,\n\n /**\n * The amount of saturation\n * @member {number}\n * @memberof PIXI.filters.AdjustmentFilter#\n * @default 1\n */\n saturation: 1,\n\n /**\n * The amount of contrast\n * @member {number}\n * @memberof PIXI.filters.AdjustmentFilter#\n * @default 1\n */\n contrast: 1,\n\n /**\n * The amount of brightness\n * @member {number}\n * @memberof PIXI.filters.AdjustmentFilter#\n * @default 1\n */\n brightness: 1,\n\n /**\n * The amount of red channel\n * @member {number}\n * @memberof PIXI.filters.AdjustmentFilter#\n * @default 1\n */\n red: 1,\n\n /**\n * The amount of green channel\n * @member {number}\n * @memberof PIXI.filters.AdjustmentFilter#\n * @default 1\n */\n green: 1,\n\n /**\n * The amount of blue channel\n * @member {number}\n * @memberof PIXI.filters.AdjustmentFilter#\n * @default 1\n */\n blue: 1,\n\n /**\n * The amount of alpha channel\n * @member {number}\n * @memberof PIXI.filters.AdjustmentFilter#\n * @default 1\n */\n alpha: 1,\n }, options);\n }\n\n if ( Filter ) AdjustmentFilter.__proto__ = Filter;\n AdjustmentFilter.prototype = Object.create( Filter && Filter.prototype );\n AdjustmentFilter.prototype.constructor = AdjustmentFilter;\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n AdjustmentFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n this.uniforms.gamma = Math.max(this.gamma, 0.0001);\n this.uniforms.saturation = this.saturation;\n this.uniforms.contrast = this.contrast;\n this.uniforms.brightness = this.brightness;\n this.uniforms.red = this.red;\n this.uniforms.green = this.green;\n this.uniforms.blue = this.blue;\n this.uniforms.alpha = this.alpha;\n\n filterManager.applyFilter(this, input, output, clear);\n };\n\n return AdjustmentFilter;\n}(Filter));\n\nexport { AdjustmentFilter };\n//# sourceMappingURL=filter-adjustment.esm.js.map\n","/*!\n * @pixi/filter-kawase-blur - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-kawase-blur is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { Point } from '@pixi/math';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"\\nvarying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec2 uOffset;\\n\\nvoid main(void)\\n{\\n vec4 color = vec4(0.0);\\n\\n // Sample top left pixel\\n color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y));\\n\\n // Sample top right pixel\\n color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y));\\n\\n // Sample bottom right pixel\\n color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y));\\n\\n // Sample bottom left pixel\\n color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y));\\n\\n // Average\\n color *= 0.25;\\n\\n gl_FragColor = color;\\n}\";\n\nvar fragmentClamp = \"\\nvarying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec2 uOffset;\\nuniform vec4 filterClamp;\\n\\nvoid main(void)\\n{\\n vec4 color = vec4(0.0);\\n\\n // Sample top left pixel\\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw));\\n\\n // Sample top right pixel\\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw));\\n\\n // Sample bottom right pixel\\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw));\\n\\n // Sample bottom left pixel\\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw));\\n\\n // Average\\n color *= 0.25;\\n\\n gl_FragColor = color;\\n}\\n\";\n\n/**\n * A much faster blur than Gaussian blur, but more complicated to use.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/kawase-blur.png)\n *\n * @see https://software.intel.com/en-us/blogs/2014/07/15/an-investigation-of-fast-real-time-gpu-based-image-blur-algorithms\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-kawase-blur|@pixi/filter-kawase-blur}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {number|number[]} [blur=4] - The blur of the filter. Should be greater than `0`. If\n * value is an Array, setting kernels.\n * @param {number} [quality=3] - The quality of the filter. Should be an integer greater than `1`.\n * @param {boolean} [clamp=false] - Clamp edges, useful for removing dark edges\n * from fullscreen filters or bleeding to the edge of filterArea.\n */\nvar KawaseBlurFilter = /*@__PURE__*/(function (Filter) {\n function KawaseBlurFilter(blur, quality, clamp) {\n if ( blur === void 0 ) blur = 4;\n if ( quality === void 0 ) quality = 3;\n if ( clamp === void 0 ) clamp = false;\n\n Filter.call(this, vertex, clamp ? fragmentClamp : fragment);\n this.uniforms.uOffset = new Float32Array(2);\n\n this._pixelSize = new Point();\n this.pixelSize = 1;\n this._clamp = clamp;\n this._kernels = null;\n\n // if `blur` is array , as kernels\n if (Array.isArray(blur)) {\n this.kernels = blur;\n }\n else {\n this._blur = blur;\n this.quality = quality;\n }\n }\n\n if ( Filter ) KawaseBlurFilter.__proto__ = Filter;\n KawaseBlurFilter.prototype = Object.create( Filter && Filter.prototype );\n KawaseBlurFilter.prototype.constructor = KawaseBlurFilter;\n\n var prototypeAccessors = { kernels: { configurable: true },clamp: { configurable: true },pixelSize: { configurable: true },quality: { configurable: true },blur: { configurable: true } };\n\n /**\n * Overrides apply\n * @private\n */\n KawaseBlurFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n var uvX = this.pixelSize.x / input._frame.width;\n var uvY = this.pixelSize.y / input._frame.height;\n var offset;\n\n if (this._quality === 1 || this._blur === 0) {\n offset = this._kernels[0] + 0.5;\n this.uniforms.uOffset[0] = offset * uvX;\n this.uniforms.uOffset[1] = offset * uvY;\n filterManager.applyFilter(this, input, output, clear);\n }\n else {\n var renderTarget = filterManager.getFilterTexture();\n\n var source = input;\n var target = renderTarget;\n var tmp;\n\n var last = this._quality - 1;\n\n for (var i = 0; i < last; i++) {\n offset = this._kernels[i] + 0.5;\n this.uniforms.uOffset[0] = offset * uvX;\n this.uniforms.uOffset[1] = offset * uvY;\n filterManager.applyFilter(this, source, target, true);\n\n tmp = source;\n source = target;\n target = tmp;\n }\n offset = this._kernels[last] + 0.5;\n this.uniforms.uOffset[0] = offset * uvX;\n this.uniforms.uOffset[1] = offset * uvY;\n filterManager.applyFilter(this, source, output, clear);\n\n filterManager.returnFilterTexture(renderTarget);\n }\n };\n\n /**\n * Auto generate kernels by blur & quality\n * @private\n */\n KawaseBlurFilter.prototype._generateKernels = function _generateKernels () {\n var blur = this._blur;\n var quality = this._quality;\n var kernels = [ blur ];\n\n if (blur > 0) {\n var k = blur;\n var step = blur / quality;\n\n for (var i = 1; i < quality; i++) {\n k -= step;\n kernels.push(k);\n }\n }\n\n this._kernels = kernels;\n };\n\n /**\n * The kernel size of the blur filter, for advanced usage.\n *\n * @member {number[]}\n * @default [0]\n */\n prototypeAccessors.kernels.get = function () {\n return this._kernels;\n };\n prototypeAccessors.kernels.set = function (value) {\n if (Array.isArray(value) && value.length > 0) {\n this._kernels = value;\n this._quality = value.length;\n this._blur = Math.max.apply(Math, value);\n }\n else {\n // if value is invalid , set default value\n this._kernels = [0];\n this._quality = 1;\n }\n };\n\n /**\n * Get the if the filter is clampped.\n *\n * @readonly\n * @member {boolean}\n * @default false\n */\n prototypeAccessors.clamp.get = function () {\n return this._clamp;\n };\n\n /**\n * Sets the pixel size of the filter. Large size is blurrier. For advanced usage.\n *\n * @member {PIXI.Point|number[]}\n * @default [1, 1]\n */\n prototypeAccessors.pixelSize.set = function (value) {\n if (typeof value === 'number') {\n this._pixelSize.x = value;\n this._pixelSize.y = value;\n }\n else if (Array.isArray(value)) {\n this._pixelSize.x = value[0];\n this._pixelSize.y = value[1];\n }\n else if (value instanceof Point) {\n this._pixelSize.x = value.x;\n this._pixelSize.y = value.y;\n }\n else {\n // if value is invalid , set default value\n this._pixelSize.x = 1;\n this._pixelSize.y = 1;\n }\n };\n prototypeAccessors.pixelSize.get = function () {\n return this._pixelSize;\n };\n\n /**\n * The quality of the filter, integer greater than `1`.\n *\n * @member {number}\n * @default 3\n */\n prototypeAccessors.quality.get = function () {\n return this._quality;\n };\n prototypeAccessors.quality.set = function (value) {\n this._quality = Math.max(1, Math.round(value));\n this._generateKernels();\n };\n\n /**\n * The amount of blur, value greater than `0`.\n *\n * @member {number}\n * @default 4\n */\n prototypeAccessors.blur.get = function () {\n return this._blur;\n };\n prototypeAccessors.blur.set = function (value) {\n this._blur = value;\n this._generateKernels();\n };\n\n Object.defineProperties( KawaseBlurFilter.prototype, prototypeAccessors );\n\n return KawaseBlurFilter;\n}(Filter));\n\nexport { KawaseBlurFilter };\n//# sourceMappingURL=filter-kawase-blur.esm.js.map\n","/*!\n * @pixi/filter-advanced-bloom - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-advanced-bloom is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { KawaseBlurFilter } from '@pixi/filter-kawase-blur';\nimport { settings } from '@pixi/settings';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"\\nuniform sampler2D uSampler;\\nvarying vec2 vTextureCoord;\\n\\nuniform float threshold;\\n\\nvoid main() {\\n vec4 color = texture2D(uSampler, vTextureCoord);\\n\\n // A simple & fast algorithm for getting brightness.\\n // It's inaccuracy , but good enought for this feature.\\n float _max = max(max(color.r, color.g), color.b);\\n float _min = min(min(color.r, color.g), color.b);\\n float brightness = (_max + _min) * 0.5;\\n\\n if(brightness > threshold) {\\n gl_FragColor = color;\\n } else {\\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\\n }\\n}\\n\";\n\n/**\n * Internal filter for AdvancedBloomFilter to get brightness.\n * @class\n * @private\n * @param {number} [threshold=0.5] Defines how bright a color needs to be extracted.\n */\nvar ExtractBrightnessFilter = /*@__PURE__*/(function (Filter) {\n function ExtractBrightnessFilter(threshold) {\n if ( threshold === void 0 ) threshold = 0.5;\n\n Filter.call(this, vertex, fragment);\n\n this.threshold = threshold;\n }\n\n if ( Filter ) ExtractBrightnessFilter.__proto__ = Filter;\n ExtractBrightnessFilter.prototype = Object.create( Filter && Filter.prototype );\n ExtractBrightnessFilter.prototype.constructor = ExtractBrightnessFilter;\n\n var prototypeAccessors = { threshold: { configurable: true } };\n\n /**\n * Defines how bright a color needs to be extracted.\n *\n * @member {number}\n * @default 0.5\n */\n prototypeAccessors.threshold.get = function () {\n return this.uniforms.threshold;\n };\n prototypeAccessors.threshold.set = function (value) {\n this.uniforms.threshold = value;\n };\n\n Object.defineProperties( ExtractBrightnessFilter.prototype, prototypeAccessors );\n\n return ExtractBrightnessFilter;\n}(Filter));\n\nvar fragment$1 = \"uniform sampler2D uSampler;\\nvarying vec2 vTextureCoord;\\n\\nuniform sampler2D bloomTexture;\\nuniform float bloomScale;\\nuniform float brightness;\\n\\nvoid main() {\\n vec4 color = texture2D(uSampler, vTextureCoord);\\n color.rgb *= brightness;\\n vec4 bloomColor = vec4(texture2D(bloomTexture, vTextureCoord).rgb, 0.0);\\n bloomColor.rgb *= bloomScale;\\n gl_FragColor = color + bloomColor;\\n}\\n\";\n\n/**\n * The AdvancedBloomFilter applies a Bloom Effect to an object. Unlike the normal BloomFilter\n * this had some advanced controls for adjusting the look of the bloom. Note: this filter\n * is slower than normal BloomFilter.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/advanced-bloom.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-advanced-bloom|@pixi/filter-advanced-bloom}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n *\n * @param {object|number} [options] - The optional parameters of advanced bloom filter.\n * When options is a number , it will be `options.threshold`.\n * @param {number} [options.threshold=0.5] - Defines how bright a color needs to be to affect bloom.\n * @param {number} [options.bloomScale=1.0] - To adjust the strength of the bloom. Higher values is more intense brightness.\n * @param {number} [options.brightness=1.0] - The brightness, lower value is more subtle brightness, higher value is blown-out.\n * @param {number} [options.blur=8] - Sets the strength of the Blur properties simultaneously\n * @param {number} [options.quality=4] - The quality of the Blur filter.\n * @param {number[]} [options.kernels=null] - The kernels of the Blur filter.\n * @param {number|number[]|PIXI.Point} [options.pixelSize=1] - the pixelSize of the Blur filter.\n * @param {number} [options.resolution=PIXI.settings.RESOLUTION] - The resolution of the Blur filter.\n */\nvar AdvancedBloomFilter = /*@__PURE__*/(function (Filter) {\n function AdvancedBloomFilter(options) {\n\n Filter.call(this, vertex, fragment$1);\n\n if (typeof options === 'number') {\n options = { threshold: options };\n }\n\n options = Object.assign({\n threshold: 0.5,\n bloomScale: 1.0,\n brightness: 1.0,\n kernels: null,\n blur: 8,\n quality: 4,\n pixelSize: 1,\n resolution: settings.RESOLUTION,\n }, options);\n\n /**\n * To adjust the strength of the bloom. Higher values is more intense brightness.\n *\n * @member {number}\n * @default 1.0\n */\n this.bloomScale = options.bloomScale;\n\n /**\n * The brightness, lower value is more subtle brightness, higher value is blown-out.\n *\n * @member {number}\n * @default 1.0\n */\n this.brightness = options.brightness;\n\n var kernels = options.kernels;\n var blur = options.blur;\n var quality = options.quality;\n var pixelSize = options.pixelSize;\n var resolution = options.resolution;\n\n this._extractFilter = new ExtractBrightnessFilter(options.threshold);\n this._extractFilter.resolution = resolution;\n this._blurFilter = kernels ?\n new KawaseBlurFilter(kernels) :\n new KawaseBlurFilter(blur, quality);\n this.pixelSize = pixelSize;\n this.resolution = resolution;\n }\n\n if ( Filter ) AdvancedBloomFilter.__proto__ = Filter;\n AdvancedBloomFilter.prototype = Object.create( Filter && Filter.prototype );\n AdvancedBloomFilter.prototype.constructor = AdvancedBloomFilter;\n\n var prototypeAccessors = { resolution: { configurable: true },threshold: { configurable: true },kernels: { configurable: true },blur: { configurable: true },quality: { configurable: true },pixelSize: { configurable: true } };\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n AdvancedBloomFilter.prototype.apply = function apply (filterManager, input, output, clear, currentState) {\n\n var brightTarget = filterManager.getFilterTexture();\n\n this._extractFilter.apply(filterManager, input, brightTarget, true, currentState);\n\n var bloomTarget = filterManager.getFilterTexture();\n\n this._blurFilter.apply(filterManager, brightTarget, bloomTarget, true, currentState);\n\n this.uniforms.bloomScale = this.bloomScale;\n this.uniforms.brightness = this.brightness;\n this.uniforms.bloomTexture = bloomTarget;\n\n filterManager.applyFilter(this, input, output, clear);\n\n filterManager.returnFilterTexture(bloomTarget);\n filterManager.returnFilterTexture(brightTarget);\n };\n\n /**\n * The resolution of the filter.\n *\n * @member {number}\n */\n prototypeAccessors.resolution.get = function () {\n return this._resolution;\n };\n prototypeAccessors.resolution.set = function (value) {\n this._resolution = value;\n\n if (this._extractFilter) {\n this._extractFilter.resolution = value;\n }\n if (this._blurFilter) {\n this._blurFilter.resolution = value;\n }\n };\n\n /**\n * Defines how bright a color needs to be to affect bloom.\n *\n * @member {number}\n * @default 0.5\n */\n prototypeAccessors.threshold.get = function () {\n return this._extractFilter.threshold;\n };\n prototypeAccessors.threshold.set = function (value) {\n this._extractFilter.threshold = value;\n };\n\n /**\n * Sets the kernels of the Blur Filter\n *\n * @member {number}\n * @default 4\n */\n prototypeAccessors.kernels.get = function () {\n return this._blurFilter.kernels;\n };\n prototypeAccessors.kernels.set = function (value) {\n this._blurFilter.kernels = value;\n };\n\n /**\n * Sets the strength of the Blur properties simultaneously\n *\n * @member {number}\n * @default 2\n */\n prototypeAccessors.blur.get = function () {\n return this._blurFilter.blur;\n };\n prototypeAccessors.blur.set = function (value) {\n this._blurFilter.blur = value;\n };\n\n /**\n * Sets the quality of the Blur Filter\n *\n * @member {number}\n * @default 4\n */\n prototypeAccessors.quality.get = function () {\n return this._blurFilter.quality;\n };\n prototypeAccessors.quality.set = function (value) {\n this._blurFilter.quality = value;\n };\n\n /**\n * Sets the pixelSize of the Kawase Blur filter\n *\n * @member {number|number[]|PIXI.Point}\n * @default 1\n */\n prototypeAccessors.pixelSize.get = function () {\n return this._blurFilter.pixelSize;\n };\n prototypeAccessors.pixelSize.set = function (value) {\n this._blurFilter.pixelSize = value;\n };\n\n Object.defineProperties( AdvancedBloomFilter.prototype, prototypeAccessors );\n\n return AdvancedBloomFilter;\n}(Filter));\n\nexport { AdvancedBloomFilter };\n//# sourceMappingURL=filter-advanced-bloom.esm.js.map\n","/*!\n * @pixi/filter-ascii - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-ascii is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\n\\nuniform vec4 filterArea;\\nuniform float pixelSize;\\nuniform sampler2D uSampler;\\n\\nvec2 mapCoord( vec2 coord )\\n{\\n coord *= filterArea.xy;\\n coord += filterArea.zw;\\n\\n return coord;\\n}\\n\\nvec2 unmapCoord( vec2 coord )\\n{\\n coord -= filterArea.zw;\\n coord /= filterArea.xy;\\n\\n return coord;\\n}\\n\\nvec2 pixelate(vec2 coord, vec2 size)\\n{\\n return floor( coord / size ) * size;\\n}\\n\\nvec2 getMod(vec2 coord, vec2 size)\\n{\\n return mod( coord , size) / size;\\n}\\n\\nfloat character(float n, vec2 p)\\n{\\n p = floor(p*vec2(4.0, -4.0) + 2.5);\\n\\n if (clamp(p.x, 0.0, 4.0) == p.x)\\n {\\n if (clamp(p.y, 0.0, 4.0) == p.y)\\n {\\n if (int(mod(n/exp2(p.x + 5.0*p.y), 2.0)) == 1) return 1.0;\\n }\\n }\\n return 0.0;\\n}\\n\\nvoid main()\\n{\\n vec2 coord = mapCoord(vTextureCoord);\\n\\n // get the rounded color..\\n vec2 pixCoord = pixelate(coord, vec2(pixelSize));\\n pixCoord = unmapCoord(pixCoord);\\n\\n vec4 color = texture2D(uSampler, pixCoord);\\n\\n // determine the character to use\\n float gray = (color.r + color.g + color.b) / 3.0;\\n\\n float n = 65536.0; // .\\n if (gray > 0.2) n = 65600.0; // :\\n if (gray > 0.3) n = 332772.0; // *\\n if (gray > 0.4) n = 15255086.0; // o\\n if (gray > 0.5) n = 23385164.0; // &\\n if (gray > 0.6) n = 15252014.0; // 8\\n if (gray > 0.7) n = 13199452.0; // @\\n if (gray > 0.8) n = 11512810.0; // #\\n\\n // get the mod..\\n vec2 modd = getMod(coord, vec2(pixelSize));\\n\\n gl_FragColor = color * character( n, vec2(-1.0) + modd * 2.0);\\n\\n}\\n\";\n\n// TODO (cengler) - The Y is flipped in this shader for some reason.\n\n/**\n * @author Vico @vicocotea\n * original shader : https://www.shadertoy.com/view/lssGDj by @movAX13h\n */\n\n/**\n * An ASCII filter.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/ascii.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-ascii|@pixi/filter-ascii}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {number} [size=8] Size of the font\n */\nvar AsciiFilter = /*@__PURE__*/(function (Filter) {\n function AsciiFilter(size) {\n if ( size === void 0 ) size = 8;\n\n Filter.call(this, vertex, fragment);\n this.size = size;\n }\n\n if ( Filter ) AsciiFilter.__proto__ = Filter;\n AsciiFilter.prototype = Object.create( Filter && Filter.prototype );\n AsciiFilter.prototype.constructor = AsciiFilter;\n\n var prototypeAccessors = { size: { configurable: true } };\n\n /**\n * The pixel size used by the filter.\n *\n * @member {number}\n */\n prototypeAccessors.size.get = function () {\n return this.uniforms.pixelSize;\n };\n prototypeAccessors.size.set = function (value) {\n this.uniforms.pixelSize = value;\n };\n\n Object.defineProperties( AsciiFilter.prototype, prototypeAccessors );\n\n return AsciiFilter;\n}(Filter));\n\nexport { AsciiFilter };\n//# sourceMappingURL=filter-ascii.esm.js.map\n","/*!\n * @pixi/filter-bevel - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-bevel is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { DEG_TO_RAD } from '@pixi/math';\nimport { rgb2hex, hex2rgb } from '@pixi/utils';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"precision mediump float;\\n\\nvarying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec4 filterArea;\\n\\nuniform float transformX;\\nuniform float transformY;\\nuniform vec3 lightColor;\\nuniform float lightAlpha;\\nuniform vec3 shadowColor;\\nuniform float shadowAlpha;\\n\\nvoid main(void) {\\n vec2 transform = vec2(1.0 / filterArea) * vec2(transformX, transformY);\\n vec4 color = texture2D(uSampler, vTextureCoord);\\n float light = texture2D(uSampler, vTextureCoord - transform).a;\\n float shadow = texture2D(uSampler, vTextureCoord + transform).a;\\n\\n color.rgb = mix(color.rgb, lightColor, clamp((color.a - light) * lightAlpha, 0.0, 1.0));\\n color.rgb = mix(color.rgb, shadowColor, clamp((color.a - shadow) * shadowAlpha, 0.0, 1.0));\\n gl_FragColor = vec4(color.rgb * color.a, color.a);\\n}\\n\";\n\n/**\n * Bevel Filter.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/bevel.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-bevel|@pixi/filter-bevel}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {object} [options] - The optional parameters of the filter.\n * @param {number} [options.rotation = 45] - The angle of the light in degrees.\n * @param {number} [options.thickness = 2] - The tickness of the bevel.\n * @param {number} [options.lightColor = 0xffffff] - Color of the light.\n * @param {number} [options.lightAlpha = 0.7] - Alpha of the light.\n * @param {number} [options.shadowColor = 0x000000] - Color of the shadow.\n * @param {number} [options.shadowAlpha = 0.7] - Alpha of the shadow.\n */\nvar BevelFilter = /*@__PURE__*/(function (Filter) {\n function BevelFilter(options) {\n if ( options === void 0 ) options = {};\n\n Filter.call(this, vertex, fragment);\n\n this.uniforms.lightColor = new Float32Array(3);\n this.uniforms.shadowColor = new Float32Array(3);\n\n options = Object.assign({\n rotation: 45,\n thickness: 2,\n lightColor: 0xffffff,\n lightAlpha: 0.7,\n shadowColor: 0x000000,\n shadowAlpha: 0.7,\n }, options);\n\n /**\n * The angle of the light in degrees.\n * @member {number}\n * @default 45\n */\n this.rotation = options.rotation;\n\n /**\n * The tickness of the bevel.\n * @member {number}\n * @default 2\n */\n this.thickness = options.thickness;\n\n /**\n * Color of the light.\n * @member {number}\n * @default 0xffffff\n */\n this.lightColor = options.lightColor;\n\n /**\n * Alpha of the light.\n * @member {number}\n * @default 0.7\n */\n this.lightAlpha = options.lightAlpha;\n\n /**\n * Color of the shadow.\n * @member {number}\n * @default 0x000000\n */\n this.shadowColor = options.shadowColor;\n\n /**\n * Alpha of the shadow.\n * @member {number}\n * @default 0.7\n */\n this.shadowAlpha = options.shadowAlpha;\n\n }\n\n if ( Filter ) BevelFilter.__proto__ = Filter;\n BevelFilter.prototype = Object.create( Filter && Filter.prototype );\n BevelFilter.prototype.constructor = BevelFilter;\n\n var prototypeAccessors = { rotation: { configurable: true },thickness: { configurable: true },lightColor: { configurable: true },lightAlpha: { configurable: true },shadowColor: { configurable: true },shadowAlpha: { configurable: true } };\n\n /**\n * Update the transform matrix of offset angle.\n * @private\n */\n BevelFilter.prototype._updateTransform = function _updateTransform () {\n this.uniforms.transformX = this._thickness * Math.cos(this._angle);\n this.uniforms.transformY = this._thickness * Math.sin(this._angle);\n };\n\n prototypeAccessors.rotation.get = function () {\n return this._angle / DEG_TO_RAD;\n };\n prototypeAccessors.rotation.set = function (value) {\n this._angle = value * DEG_TO_RAD;\n this._updateTransform();\n };\n\n prototypeAccessors.thickness.get = function () {\n return this._thickness;\n };\n prototypeAccessors.thickness.set = function (value) {\n this._thickness = value;\n this._updateTransform();\n };\n\n prototypeAccessors.lightColor.get = function () {\n return rgb2hex(this.uniforms.lightColor);\n };\n prototypeAccessors.lightColor.set = function (value) {\n hex2rgb(value, this.uniforms.lightColor);\n };\n\n prototypeAccessors.lightAlpha.get = function () {\n return this.uniforms.lightAlpha;\n };\n prototypeAccessors.lightAlpha.set = function (value) {\n this.uniforms.lightAlpha = value;\n };\n\n prototypeAccessors.shadowColor.get = function () {\n return rgb2hex(this.uniforms.shadowColor);\n };\n prototypeAccessors.shadowColor.set = function (value) {\n hex2rgb(value, this.uniforms.shadowColor);\n };\n\n prototypeAccessors.shadowAlpha.get = function () {\n return this.uniforms.shadowAlpha;\n };\n prototypeAccessors.shadowAlpha.set = function (value) {\n this.uniforms.shadowAlpha = value;\n };\n\n Object.defineProperties( BevelFilter.prototype, prototypeAccessors );\n\n return BevelFilter;\n}(Filter));\n\nexport { BevelFilter };\n//# sourceMappingURL=filter-bevel.esm.js.map\n","/*!\n * @pixi/filter-bloom - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-bloom is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { BLEND_MODES } from '@pixi/constants';\nimport { AlphaFilter } from '@pixi/filter-alpha';\nimport { BlurFilterPass } from '@pixi/filter-blur';\nimport { settings } from '@pixi/settings';\nimport { Point } from '@pixi/math';\n\n/**\n * The BloomFilter applies a Gaussian blur to an object.\n * The strength of the blur can be set for x- and y-axis separately.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/bloom.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-bloom|@pixi/filter-bloom}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {number|PIXI.Point|number[]} [blur=2] Sets the strength of both the blurX and blurY properties simultaneously\n * @param {number} [quality=4] The quality of the blurX & blurY filter.\n * @param {number} [resolution=PIXI.settings.RESOLUTION] The resolution of the blurX & blurY filter.\n * @param {number} [kernelSize=5] The kernelSize of the blurX & blurY filter.Options: 5, 7, 9, 11, 13, 15.\n */\nvar BloomFilter = /*@__PURE__*/(function (Filter) {\n function BloomFilter(blur, quality, resolution, kernelSize) {\n if ( blur === void 0 ) blur = 2;\n if ( quality === void 0 ) quality = 4;\n if ( resolution === void 0 ) resolution = settings.RESOLUTION;\n if ( kernelSize === void 0 ) kernelSize = 5;\n\n Filter.call(this);\n\n var blurX;\n var blurY;\n\n if (typeof blur === 'number') {\n blurX = blur;\n blurY = blur;\n }\n else if (blur instanceof Point) {\n blurX = blur.x;\n blurY = blur.y;\n }\n else if (Array.isArray(blur)) {\n blurX = blur[0];\n blurY = blur[1];\n }\n\n this.blurXFilter = new BlurFilterPass(true, blurX, quality, resolution, kernelSize);\n this.blurYFilter = new BlurFilterPass(false, blurY, quality, resolution, kernelSize);\n this.blurYFilter.blendMode = BLEND_MODES.SCREEN;\n this.defaultFilter = new AlphaFilter();\n }\n\n if ( Filter ) BloomFilter.__proto__ = Filter;\n BloomFilter.prototype = Object.create( Filter && Filter.prototype );\n BloomFilter.prototype.constructor = BloomFilter;\n\n var prototypeAccessors = { blur: { configurable: true },blurX: { configurable: true },blurY: { configurable: true } };\n\n BloomFilter.prototype.apply = function apply (filterManager, input, output) {\n var renderTarget = filterManager.getFilterTexture(true);\n\n //TODO - copyTexSubImage2D could be used here?\n this.defaultFilter.apply(filterManager, input, output);\n\n this.blurXFilter.apply(filterManager, input, renderTarget);\n this.blurYFilter.apply(filterManager, renderTarget, output);\n\n filterManager.returnFilterTexture(renderTarget);\n };\n\n /**\n * Sets the strength of both the blurX and blurY properties simultaneously\n *\n * @member {number}\n * @default 2\n */\n prototypeAccessors.blur.get = function () {\n return this.blurXFilter.blur;\n };\n prototypeAccessors.blur.set = function (value) {\n this.blurXFilter.blur = this.blurYFilter.blur = value;\n };\n\n /**\n * Sets the strength of the blurX property\n *\n * @member {number}\n * @default 2\n */\n prototypeAccessors.blurX.get = function () {\n return this.blurXFilter.blur;\n };\n prototypeAccessors.blurX.set = function (value) {\n this.blurXFilter.blur = value;\n };\n\n /**\n * Sets the strength of the blurY property\n *\n * @member {number}\n * @default 2\n */\n prototypeAccessors.blurY.get = function () {\n return this.blurYFilter.blur;\n };\n prototypeAccessors.blurY.set = function (value) {\n this.blurYFilter.blur = value;\n };\n\n Object.defineProperties( BloomFilter.prototype, prototypeAccessors );\n\n return BloomFilter;\n}(Filter));\n\nexport { BloomFilter };\n//# sourceMappingURL=filter-bloom.esm.js.map\n","/*!\n * @pixi/filter-bulge-pinch - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-bulge-pinch is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"uniform float radius;\\nuniform float strength;\\nuniform vec2 center;\\nuniform sampler2D uSampler;\\nvarying vec2 vTextureCoord;\\n\\nuniform vec4 filterArea;\\nuniform vec4 filterClamp;\\nuniform vec2 dimensions;\\n\\nvoid main()\\n{\\n vec2 coord = vTextureCoord * filterArea.xy;\\n coord -= center * dimensions.xy;\\n float distance = length(coord);\\n if (distance < radius) {\\n float percent = distance / radius;\\n if (strength > 0.0) {\\n coord *= mix(1.0, smoothstep(0.0, radius / distance, percent), strength * 0.75);\\n } else {\\n coord *= mix(1.0, pow(percent, 1.0 + strength * 0.75) * radius / distance, 1.0 - percent);\\n }\\n }\\n coord += center * dimensions.xy;\\n coord /= filterArea.xy;\\n vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw);\\n vec4 color = texture2D(uSampler, clampedCoord);\\n if (coord != clampedCoord) {\\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\\n }\\n\\n gl_FragColor = color;\\n}\\n\";\n\n/**\n * @author Julien CLEREL @JuloxRox\n * original filter https://github.com/evanw/glfx.js/blob/master/src/filters/warp/bulgepinch.js by Evan Wallace : http://madebyevan.com/\n */\n\n/**\n * Bulges or pinches the image in a circle.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/bulge-pinch.gif)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-bulge-pinch|@pixi/filter-bulge-pinch}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {PIXI.Point|Array} [center=[0,0]] The x and y coordinates of the center of the circle of effect.\n * @param {number} [radius=100] The radius of the circle of effect.\n * @param {number} [strength=1] -1 to 1 (-1 is strong pinch, 0 is no effect, 1 is strong bulge)\n */\nvar BulgePinchFilter = /*@__PURE__*/(function (Filter) {\n function BulgePinchFilter(center, radius, strength) {\n Filter.call(this, vertex, fragment);\n this.uniforms.dimensions = new Float32Array(2);\n this.center = center || [0.5, 0.5];\n this.radius = (typeof radius === 'number') ? radius : 100; // allow 0 to be passed\n this.strength = (typeof strength === 'number') ? strength : 1; // allow 0 to be passed\n }\n\n if ( Filter ) BulgePinchFilter.__proto__ = Filter;\n BulgePinchFilter.prototype = Object.create( Filter && Filter.prototype );\n BulgePinchFilter.prototype.constructor = BulgePinchFilter;\n\n var prototypeAccessors = { radius: { configurable: true },strength: { configurable: true },center: { configurable: true } };\n\n BulgePinchFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n this.uniforms.dimensions[0] = input.filterFrame.width;\n this.uniforms.dimensions[1] = input.filterFrame.height;\n filterManager.applyFilter(this, input, output, clear);\n };\n\n /**\n * The radius of the circle of effect.\n *\n * @member {number}\n */\n prototypeAccessors.radius.get = function () {\n return this.uniforms.radius;\n };\n prototypeAccessors.radius.set = function (value) {\n this.uniforms.radius = value;\n };\n\n /**\n * The strength of the effect. -1 to 1 (-1 is strong pinch, 0 is no effect, 1 is strong bulge)\n *\n * @member {number}\n */\n prototypeAccessors.strength.get = function () {\n return this.uniforms.strength;\n };\n prototypeAccessors.strength.set = function (value) {\n this.uniforms.strength = value;\n };\n\n /**\n * The x and y coordinates of the center of the circle of effect.\n *\n * @member {PIXI.Point}\n */\n prototypeAccessors.center.get = function () {\n return this.uniforms.center;\n };\n prototypeAccessors.center.set = function (value) {\n this.uniforms.center = value;\n };\n\n Object.defineProperties( BulgePinchFilter.prototype, prototypeAccessors );\n\n return BulgePinchFilter;\n}(Filter));\n\nexport { BulgePinchFilter };\n//# sourceMappingURL=filter-bulge-pinch.esm.js.map\n","/*!\n * @pixi/filter-color-map - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-color-map is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Texture, Filter } from '@pixi/core';\nimport { SCALE_MODES } from '@pixi/constants';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform sampler2D colorMap;\\nuniform float _mix;\\nuniform float _size;\\nuniform float _sliceSize;\\nuniform float _slicePixelSize;\\nuniform float _sliceInnerSize;\\nvoid main() {\\n vec4 color = texture2D(uSampler, vTextureCoord.xy);\\n\\n vec4 adjusted;\\n if (color.a > 0.0) {\\n color.rgb /= color.a;\\n float innerWidth = _size - 1.0;\\n float zSlice0 = min(floor(color.b * innerWidth), innerWidth);\\n float zSlice1 = min(zSlice0 + 1.0, innerWidth);\\n float xOffset = _slicePixelSize * 0.5 + color.r * _sliceInnerSize;\\n float s0 = xOffset + (zSlice0 * _sliceSize);\\n float s1 = xOffset + (zSlice1 * _sliceSize);\\n float yOffset = _sliceSize * 0.5 + color.g * (1.0 - _sliceSize);\\n vec4 slice0Color = texture2D(colorMap, vec2(s0,yOffset));\\n vec4 slice1Color = texture2D(colorMap, vec2(s1,yOffset));\\n float zOffset = fract(color.b * innerWidth);\\n adjusted = mix(slice0Color, slice1Color, zOffset);\\n\\n color.rgb *= color.a;\\n }\\n gl_FragColor = vec4(mix(color, adjusted, _mix).rgb, color.a);\\n\\n}\";\n\n/**\n * The ColorMapFilter applies a color-map effect to an object.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/color-map.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-color-map|@pixi/filter-color-map}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {HTMLImageElement|HTMLCanvasElement|PIXI.BaseTexture|PIXI.Texture} [colorMap] - The colorMap texture of the filter.\n * @param {boolean} [nearest=false] - Whether use NEAREST for colorMap texture.\n * @param {number} [mix=1] - The mix from 0 to 1, where 0 is the original image and 1 is the color mapped image.\n */\nvar ColorMapFilter = /*@__PURE__*/(function (Filter) {\n function ColorMapFilter(colorMap, nearest, mix) {\n if ( nearest === void 0 ) nearest = false;\n if ( mix === void 0 ) mix = 1;\n\n Filter.call(this, vertex, fragment);\n\n this._size = 0;\n this._sliceSize = 0;\n this._slicePixelSize = 0;\n this._sliceInnerSize = 0;\n\n this._scaleMode = null;\n this._nearest = false;\n this.nearest = nearest;\n\n /**\n * The mix from 0 to 1, where 0 is the original image and 1 is the color mapped image.\n * @member {number}\n */\n this.mix = mix;\n\n this.colorMap = colorMap;\n }\n\n if ( Filter ) ColorMapFilter.__proto__ = Filter;\n ColorMapFilter.prototype = Object.create( Filter && Filter.prototype );\n ColorMapFilter.prototype.constructor = ColorMapFilter;\n\n var prototypeAccessors = { colorSize: { configurable: true },colorMap: { configurable: true },nearest: { configurable: true } };\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n ColorMapFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n this.uniforms._mix = this.mix;\n\n filterManager.applyFilter(this, input, output, clear);\n };\n\n /**\n * the size of one color slice\n * @member {number}\n * @readonly\n */\n prototypeAccessors.colorSize.get = function () {\n return this._size;\n };\n\n /**\n * the colorMap texture\n * @member {PIXI.Texture}\n */\n prototypeAccessors.colorMap.get = function () {\n return this._colorMap;\n };\n prototypeAccessors.colorMap.set = function (colorMap) {\n if (!(colorMap instanceof Texture)) {\n colorMap = Texture.from(colorMap);\n }\n if (colorMap && colorMap.baseTexture) {\n colorMap.baseTexture.scaleMode = this._scaleMode;\n colorMap.baseTexture.mipmap = false;\n\n this._size = colorMap.height;\n this._sliceSize = 1 / this._size;\n this._slicePixelSize = this._sliceSize / this._size;\n this._sliceInnerSize = this._slicePixelSize * (this._size - 1);\n\n this.uniforms._size = this._size;\n this.uniforms._sliceSize = this._sliceSize;\n this.uniforms._slicePixelSize = this._slicePixelSize;\n this.uniforms._sliceInnerSize = this._sliceInnerSize;\n\n this.uniforms.colorMap = colorMap;\n }\n\n this._colorMap = colorMap;\n };\n\n /**\n * Whether use NEAREST for colorMap texture.\n * @member {boolean}\n */\n prototypeAccessors.nearest.get = function () {\n return this._nearest;\n };\n prototypeAccessors.nearest.set = function (nearest) {\n this._nearest = nearest;\n this._scaleMode = nearest ? SCALE_MODES.NEAREST : SCALE_MODES.LINEAR;\n\n var texture = this._colorMap;\n\n if (texture && texture.baseTexture) {\n texture.baseTexture._glTextures = {};\n\n texture.baseTexture.scaleMode = this._scaleMode;\n texture.baseTexture.mipmap = false;\n\n texture._updateID++;\n texture.baseTexture.emit('update', texture.baseTexture);\n }\n };\n\n /**\n * If the colorMap is based on canvas , and the content of canvas has changed,\n * then call `updateColorMap` for update texture.\n */\n ColorMapFilter.prototype.updateColorMap = function updateColorMap () {\n var texture = this._colorMap;\n\n if (texture && texture.baseTexture) {\n texture._updateID++;\n texture.baseTexture.emit('update', texture.baseTexture);\n\n this.colorMap = texture;\n }\n };\n\n /**\n * Destroys this filter\n *\n * @param {boolean} [destroyBase=false] Whether to destroy the base texture of colorMap as well\n */\n ColorMapFilter.prototype.destroy = function destroy (destroyBase) {\n if (this._colorMap) {\n this._colorMap.destroy(destroyBase);\n }\n Filter.prototype.destroy.call(this);\n };\n\n Object.defineProperties( ColorMapFilter.prototype, prototypeAccessors );\n\n return ColorMapFilter;\n}(Filter));\n\nexport { ColorMapFilter };\n//# sourceMappingURL=filter-color-map.esm.js.map\n","/*!\n * @pixi/filter-color-replace - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-color-replace is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { hex2rgb, rgb2hex } from '@pixi/utils';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec3 originalColor;\\nuniform vec3 newColor;\\nuniform float epsilon;\\nvoid main(void) {\\n vec4 currentColor = texture2D(uSampler, vTextureCoord);\\n vec3 colorDiff = originalColor - (currentColor.rgb / max(currentColor.a, 0.0000000001));\\n float colorDistance = length(colorDiff);\\n float doReplace = step(colorDistance, epsilon);\\n gl_FragColor = vec4(mix(currentColor.rgb, (newColor + colorDiff) * currentColor.a, doReplace), currentColor.a);\\n}\\n\";\n\n/**\n * ColorReplaceFilter, originally by mishaa, updated by timetocode\n * http://www.html5gamedevs.com/topic/10640-outline-a-sprite-change-certain-colors/?p=69966
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/color-replace.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-color-replace|@pixi/filter-color-replace}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {number|Array} [originalColor=0xFF0000] The color that will be changed, as a 3 component RGB e.g. [1.0, 1.0, 1.0]\n * @param {number|Array} [newColor=0x000000] The resulting color, as a 3 component RGB e.g. [1.0, 0.5, 1.0]\n * @param {number} [epsilon=0.4] Tolerance/sensitivity of the floating-point comparison between colors (lower = more exact, higher = more inclusive)\n *\n * @example\n * // replaces true red with true blue\n * someSprite.filters = [new ColorReplaceFilter(\n * [1, 0, 0],\n * [0, 0, 1],\n * 0.001\n * )];\n * // replaces the RGB color 220, 220, 220 with the RGB color 225, 200, 215\n * someOtherSprite.filters = [new ColorReplaceFilter(\n * [220/255.0, 220/255.0, 220/255.0],\n * [225/255.0, 200/255.0, 215/255.0],\n * 0.001\n * )];\n * // replaces the RGB color 220, 220, 220 with the RGB color 225, 200, 215\n * someOtherSprite.filters = [new ColorReplaceFilter(0xdcdcdc, 0xe1c8d7, 0.001)];\n *\n */\nvar ColorReplaceFilter = /*@__PURE__*/(function (Filter) {\n function ColorReplaceFilter(originalColor, newColor, epsilon) {\n if ( originalColor === void 0 ) originalColor = 0xFF0000;\n if ( newColor === void 0 ) newColor = 0x000000;\n if ( epsilon === void 0 ) epsilon = 0.4;\n\n Filter.call(this, vertex, fragment);\n this.uniforms.originalColor = new Float32Array(3);\n this.uniforms.newColor = new Float32Array(3);\n this.originalColor = originalColor;\n this.newColor = newColor;\n this.epsilon = epsilon;\n }\n\n if ( Filter ) ColorReplaceFilter.__proto__ = Filter;\n ColorReplaceFilter.prototype = Object.create( Filter && Filter.prototype );\n ColorReplaceFilter.prototype.constructor = ColorReplaceFilter;\n\n var prototypeAccessors = { originalColor: { configurable: true },newColor: { configurable: true },epsilon: { configurable: true } };\n\n /**\n * The color that will be changed, as a 3 component RGB e.g. [1.0, 1.0, 1.0]\n * @member {number|Array}\n * @default 0xFF0000\n */\n prototypeAccessors.originalColor.set = function (value) {\n var arr = this.uniforms.originalColor;\n if (typeof value === 'number') {\n hex2rgb(value, arr);\n this._originalColor = value;\n }\n else {\n arr[0] = value[0];\n arr[1] = value[1];\n arr[2] = value[2];\n this._originalColor = rgb2hex(arr);\n }\n };\n prototypeAccessors.originalColor.get = function () {\n return this._originalColor;\n };\n\n /**\n * The resulting color, as a 3 component RGB e.g. [1.0, 0.5, 1.0]\n * @member {number|Array}\n * @default 0x000000\n */\n prototypeAccessors.newColor.set = function (value) {\n var arr = this.uniforms.newColor;\n if (typeof value === 'number') {\n hex2rgb(value, arr);\n this._newColor = value;\n }\n else {\n arr[0] = value[0];\n arr[1] = value[1];\n arr[2] = value[2];\n this._newColor = rgb2hex(arr);\n }\n };\n prototypeAccessors.newColor.get = function () {\n return this._newColor;\n };\n\n /**\n * Tolerance/sensitivity of the floating-point comparison between colors (lower = more exact, higher = more inclusive)\n * @member {number}\n * @default 0.4\n */\n prototypeAccessors.epsilon.set = function (value) {\n this.uniforms.epsilon = value;\n };\n prototypeAccessors.epsilon.get = function () {\n return this.uniforms.epsilon;\n };\n\n Object.defineProperties( ColorReplaceFilter.prototype, prototypeAccessors );\n\n return ColorReplaceFilter;\n}(Filter));\n\nexport { ColorReplaceFilter };\n//# sourceMappingURL=filter-color-replace.esm.js.map\n","/*!\n * @pixi/filter-convolution - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-convolution is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"precision mediump float;\\n\\nvarying mediump vec2 vTextureCoord;\\n\\nuniform sampler2D uSampler;\\nuniform vec2 texelSize;\\nuniform float matrix[9];\\n\\nvoid main(void)\\n{\\n vec4 c11 = texture2D(uSampler, vTextureCoord - texelSize); // top left\\n vec4 c12 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - texelSize.y)); // top center\\n vec4 c13 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y - texelSize.y)); // top right\\n\\n vec4 c21 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y)); // mid left\\n vec4 c22 = texture2D(uSampler, vTextureCoord); // mid center\\n vec4 c23 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y)); // mid right\\n\\n vec4 c31 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y + texelSize.y)); // bottom left\\n vec4 c32 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + texelSize.y)); // bottom center\\n vec4 c33 = texture2D(uSampler, vTextureCoord + texelSize); // bottom right\\n\\n gl_FragColor =\\n c11 * matrix[0] + c12 * matrix[1] + c13 * matrix[2] +\\n c21 * matrix[3] + c22 * matrix[4] + c23 * matrix[5] +\\n c31 * matrix[6] + c32 * matrix[7] + c33 * matrix[8];\\n\\n gl_FragColor.a = c22.a;\\n}\\n\";\n\n/**\n * The ConvolutionFilter class applies a matrix convolution filter effect.\n * A convolution combines pixels in the input image with neighboring pixels to produce a new image.\n * A wide variety of image effects can be achieved through convolutions, including blurring, edge\n * detection, sharpening, embossing, and beveling. The matrix should be specified as a 9 point Array.\n * See http://docs.gimp.org/en/plug-in-convmatrix.html for more info.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/convolution.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-convolution|@pixi/filter-convolution}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param [matrix=[0,0,0,0,0,0,0,0,0]] {number[]} An array of values used for matrix transformation. Specified as a 9 point Array.\n * @param [width=200] {number} Width of the object you are transforming\n * @param [height=200] {number} Height of the object you are transforming\n */\nvar ConvolutionFilter = /*@__PURE__*/(function (Filter) {\n function ConvolutionFilter(matrix, width, height) {\n if ( width === void 0 ) width = 200;\n if ( height === void 0 ) height = 200;\n\n Filter.call(this, vertex, fragment);\n this.uniforms.texelSize = new Float32Array(2);\n this.uniforms.matrix = new Float32Array(9);\n if (matrix !== undefined) {\n this.matrix = matrix;\n }\n this.width = width;\n this.height = height;\n }\n\n if ( Filter ) ConvolutionFilter.__proto__ = Filter;\n ConvolutionFilter.prototype = Object.create( Filter && Filter.prototype );\n ConvolutionFilter.prototype.constructor = ConvolutionFilter;\n\n var prototypeAccessors = { matrix: { configurable: true },width: { configurable: true },height: { configurable: true } };\n\n /**\n * An array of values used for matrix transformation. Specified as a 9 point Array.\n *\n * @member {Array}\n */\n prototypeAccessors.matrix.get = function () {\n return this.uniforms.matrix;\n };\n prototypeAccessors.matrix.set = function (matrix) {\n var this$1 = this;\n\n matrix.forEach(function (v, i) { return this$1.uniforms.matrix[i] = v; });\n };\n\n /**\n * Width of the object you are transforming\n *\n * @member {number}\n */\n prototypeAccessors.width.get = function () {\n return 1/this.uniforms.texelSize[0];\n };\n prototypeAccessors.width.set = function (value) {\n this.uniforms.texelSize[0] = 1/value;\n };\n\n /**\n * Height of the object you are transforming\n *\n * @member {number}\n */\n prototypeAccessors.height.get = function () {\n return 1/this.uniforms.texelSize[1];\n };\n prototypeAccessors.height.set = function (value) {\n this.uniforms.texelSize[1] = 1/value;\n };\n\n Object.defineProperties( ConvolutionFilter.prototype, prototypeAccessors );\n\n return ConvolutionFilter;\n}(Filter));\n\nexport { ConvolutionFilter };\n//# sourceMappingURL=filter-convolution.esm.js.map\n","/*!\n * @pixi/filter-cross-hatch - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-cross-hatch is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"precision mediump float;\\n\\nvarying vec2 vTextureCoord;\\n\\nuniform sampler2D uSampler;\\n\\nvoid main(void)\\n{\\n float lum = length(texture2D(uSampler, vTextureCoord.xy).rgb);\\n\\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\\n\\n if (lum < 1.00)\\n {\\n if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0)\\n {\\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\\n }\\n }\\n\\n if (lum < 0.75)\\n {\\n if (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0)\\n {\\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\\n }\\n }\\n\\n if (lum < 0.50)\\n {\\n if (mod(gl_FragCoord.x + gl_FragCoord.y - 5.0, 10.0) == 0.0)\\n {\\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\\n }\\n }\\n\\n if (lum < 0.3)\\n {\\n if (mod(gl_FragCoord.x - gl_FragCoord.y - 5.0, 10.0) == 0.0)\\n {\\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\\n }\\n }\\n}\\n\";\n\n/**\n * A Cross Hatch effect filter.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/cross-hatch.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-cross-hatch|@pixi/filter-cross-hatch}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nvar CrossHatchFilter = /*@__PURE__*/(function (Filter) {\n function CrossHatchFilter() {\n Filter.call(this, vertex, fragment);\n }\n\n if ( Filter ) CrossHatchFilter.__proto__ = Filter;\n CrossHatchFilter.prototype = Object.create( Filter && Filter.prototype );\n CrossHatchFilter.prototype.constructor = CrossHatchFilter;\n\n return CrossHatchFilter;\n}(Filter));\n\nexport { CrossHatchFilter };\n//# sourceMappingURL=filter-cross-hatch.esm.js.map\n","/*!\n * @pixi/filter-crt - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-crt is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec4 filterArea;\\nuniform vec2 dimensions;\\n\\nconst float SQRT_2 = 1.414213;\\n\\nconst float light = 1.0;\\n\\nuniform float curvature;\\nuniform float lineWidth;\\nuniform float lineContrast;\\nuniform bool verticalLine;\\nuniform float noise;\\nuniform float noiseSize;\\n\\nuniform float vignetting;\\nuniform float vignettingAlpha;\\nuniform float vignettingBlur;\\n\\nuniform float seed;\\nuniform float time;\\n\\nfloat rand(vec2 co) {\\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\\n}\\n\\nvoid main(void)\\n{\\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\\n vec2 coord = pixelCoord / dimensions;\\n\\n vec2 dir = vec2(coord - vec2(0.5, 0.5));\\n\\n float _c = curvature > 0. ? curvature : 1.;\\n float k = curvature > 0. ?(length(dir * dir) * 0.25 * _c * _c + 0.935 * _c) : 1.;\\n vec2 uv = dir * k;\\n\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n vec3 rgb = gl_FragColor.rgb;\\n\\n\\n if (noise > 0.0 && noiseSize > 0.0)\\n {\\n pixelCoord.x = floor(pixelCoord.x / noiseSize);\\n pixelCoord.y = floor(pixelCoord.y / noiseSize);\\n float _noise = rand(pixelCoord * noiseSize * seed) - 0.5;\\n rgb += _noise * noise;\\n }\\n\\n if (lineWidth > 0.0) {\\n float v = (verticalLine ? uv.x * dimensions.x : uv.y * dimensions.y) * min(1.0, 2.0 / lineWidth ) / _c;\\n float j = 1. + cos(v * 1.2 - time) * 0.5 * lineContrast;\\n rgb *= j;\\n float segment = verticalLine ? mod((dir.x + .5) * dimensions.x, 4.) : mod((dir.y + .5) * dimensions.y, 4.);\\n rgb *= 0.99 + ceil(segment) * 0.015;\\n }\\n\\n if (vignetting > 0.0)\\n {\\n float outter = SQRT_2 - vignetting * SQRT_2;\\n float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0);\\n rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha);\\n }\\n\\n gl_FragColor.rgb = rgb;\\n}\\n\";\n\n/**\n * The CRTFilter applies a CRT effect to an object.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/crt.gif)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-crt|@pixi/filter-crt}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n *\n * @param {object} [options] - The optional parameters of CRT effect\n * @param {number} [options.curvature=1.0] - Bent of interlaced lines, higher value means more bend\n * @param {number} [options.lineWidth=1.0] - Width of the interlaced lines\n * @param {number} [options.lineContrast=0.25] - Contrast of interlaced lines\n * @param {number} [options.verticalLine=false] - `true` is vertical lines, `false` is horizontal\n * @param {number} [options.noise=0.3] - Opacity/intensity of the noise effect between `0` and `1`\n * @param {number} [options.noiseSize=1.0] - The size of the noise particles\n * @param {number} [options.seed=0] - A seed value to apply to the random noise generation\n * @param {number} [options.vignetting=0.3] - The radius of the vignette effect, smaller\n * values produces a smaller vignette\n * @param {number} [options.vignettingAlpha=1.0] - Amount of opacity of vignette\n * @param {number} [options.vignettingBlur=0.3] - Blur intensity of the vignette\n * @param {number} [options.time=0] - For animating interlaced lines\n */\nvar CRTFilter = /*@__PURE__*/(function (Filter) {\n function CRTFilter(options) {\n Filter.call(this, vertex, fragment);\n this.uniforms.dimensions = new Float32Array(2);\n\n /**\n * For animating interlaced lines\n *\n * @member {number}\n * @default 0\n */\n this.time = 0;\n\n /**\n * A seed value to apply to the random noise generation\n *\n * @member {number}\n * @default 0\n */\n this.seed = 0;\n\n Object.assign(this, {\n curvature: 1.0,\n lineWidth: 1.0,\n lineContrast: 0.25,\n verticalLine: false,\n noise: 0.0,\n noiseSize: 1.0,\n seed: 0.0,\n vignetting: 0.3,\n vignettingAlpha: 1.0,\n vignettingBlur: 0.3,\n time: 0.0,\n }, options);\n }\n\n if ( Filter ) CRTFilter.__proto__ = Filter;\n CRTFilter.prototype = Object.create( Filter && Filter.prototype );\n CRTFilter.prototype.constructor = CRTFilter;\n\n var prototypeAccessors = { curvature: { configurable: true },lineWidth: { configurable: true },lineContrast: { configurable: true },verticalLine: { configurable: true },noise: { configurable: true },noiseSize: { configurable: true },vignetting: { configurable: true },vignettingAlpha: { configurable: true },vignettingBlur: { configurable: true } };\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n CRTFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n this.uniforms.dimensions[0] = input.filterFrame.width;\n this.uniforms.dimensions[1] = input.filterFrame.height;\n\n this.uniforms.seed = this.seed;\n this.uniforms.time = this.time;\n\n filterManager.applyFilter(this, input, output, clear);\n };\n\n /**\n * Bent of interlaced lines, higher value means more bend\n *\n * @member {number}\n * @default 1\n */\n prototypeAccessors.curvature.set = function (value) {\n this.uniforms.curvature = value;\n };\n prototypeAccessors.curvature.get = function () {\n return this.uniforms.curvature;\n };\n\n /**\n * Width of interlaced lines\n *\n * @member {number}\n * @default 1\n */\n prototypeAccessors.lineWidth.set = function (value) {\n this.uniforms.lineWidth = value;\n };\n prototypeAccessors.lineWidth.get = function () {\n return this.uniforms.lineWidth;\n };\n\n /**\n * Contrast of interlaced lines\n *\n * @member {number}\n * @default 0.25\n */\n prototypeAccessors.lineContrast.set = function (value) {\n this.uniforms.lineContrast = value;\n };\n prototypeAccessors.lineContrast.get = function () {\n return this.uniforms.lineContrast;\n };\n\n /**\n * `true` for vertical lines, `false` for horizontal lines\n *\n * @member {boolean}\n * @default false\n */\n prototypeAccessors.verticalLine.set = function (value) {\n this.uniforms.verticalLine = value;\n };\n prototypeAccessors.verticalLine.get = function () {\n return this.uniforms.verticalLine;\n };\n\n /**\n * Opacity/intensity of the noise effect between `0` and `1`\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.noise.set = function (value) {\n this.uniforms.noise = value;\n };\n prototypeAccessors.noise.get = function () {\n return this.uniforms.noise;\n };\n\n /**\n * The size of the noise particles\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.noiseSize.set = function (value) {\n this.uniforms.noiseSize = value;\n };\n prototypeAccessors.noiseSize.get = function () {\n return this.uniforms.noiseSize;\n };\n\n /**\n * The radius of the vignette effect, smaller\n * values produces a smaller vignette\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.vignetting.set = function (value) {\n this.uniforms.vignetting = value;\n };\n prototypeAccessors.vignetting.get = function () {\n return this.uniforms.vignetting;\n };\n\n /**\n * Amount of opacity of vignette\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.vignettingAlpha.set = function (value) {\n this.uniforms.vignettingAlpha = value;\n };\n prototypeAccessors.vignettingAlpha.get = function () {\n return this.uniforms.vignettingAlpha;\n };\n\n /**\n * Blur intensity of the vignette\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.vignettingBlur.set = function (value) {\n this.uniforms.vignettingBlur = value;\n };\n prototypeAccessors.vignettingBlur.get = function () {\n return this.uniforms.vignettingBlur;\n };\n\n Object.defineProperties( CRTFilter.prototype, prototypeAccessors );\n\n return CRTFilter;\n}(Filter));\n\nexport { CRTFilter };\n//# sourceMappingURL=filter-crt.esm.js.map\n","/*!\n * @pixi/filter-dot - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-dot is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"precision mediump float;\\n\\nvarying vec2 vTextureCoord;\\nvarying vec4 vColor;\\n\\nuniform vec4 filterArea;\\nuniform sampler2D uSampler;\\n\\nuniform float angle;\\nuniform float scale;\\n\\nfloat pattern()\\n{\\n float s = sin(angle), c = cos(angle);\\n vec2 tex = vTextureCoord * filterArea.xy;\\n vec2 point = vec2(\\n c * tex.x - s * tex.y,\\n s * tex.x + c * tex.y\\n ) * scale;\\n return (sin(point.x) * sin(point.y)) * 4.0;\\n}\\n\\nvoid main()\\n{\\n vec4 color = texture2D(uSampler, vTextureCoord);\\n float average = (color.r + color.g + color.b) / 3.0;\\n gl_FragColor = vec4(vec3(average * 10.0 - 5.0 + pattern()), color.a);\\n}\\n\";\n\n/**\n * @author Mat Groves http://matgroves.com/ @Doormat23\n * original filter: https://github.com/evanw/glfx.js/blob/master/src/filters/fun/dotscreen.js\n */\n\n/**\n * This filter applies a dotscreen effect making display objects appear to be made out of\n * black and white halftone dots like an old printer.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/dot.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-dot|@pixi/filter-dot}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {number} [scale=1] The scale of the effect.\n * @param {number} [angle=5] The radius of the effect.\n */\nvar DotFilter = /*@__PURE__*/(function (Filter) {\n function DotFilter(scale, angle) {\n if ( scale === void 0 ) scale = 1;\n if ( angle === void 0 ) angle = 5;\n\n Filter.call(this, vertex, fragment);\n this.scale = scale;\n this.angle = angle;\n }\n\n if ( Filter ) DotFilter.__proto__ = Filter;\n DotFilter.prototype = Object.create( Filter && Filter.prototype );\n DotFilter.prototype.constructor = DotFilter;\n\n var prototypeAccessors = { scale: { configurable: true },angle: { configurable: true } };\n\n /**\n * The scale of the effect.\n * @member {number}\n * @default 1\n */\n prototypeAccessors.scale.get = function () {\n return this.uniforms.scale;\n };\n prototypeAccessors.scale.set = function (value) {\n this.uniforms.scale = value;\n };\n\n /**\n * The radius of the effect.\n * @member {number}\n * @default 5\n */\n prototypeAccessors.angle.get = function () {\n return this.uniforms.angle;\n };\n prototypeAccessors.angle.set = function (value) {\n this.uniforms.angle = value;\n };\n\n Object.defineProperties( DotFilter.prototype, prototypeAccessors );\n\n return DotFilter;\n}(Filter));\n\nexport { DotFilter };\n//# sourceMappingURL=filter-dot.esm.js.map\n","/*!\n * @pixi/filter-drop-shadow - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-drop-shadow is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { KawaseBlurFilter } from '@pixi/filter-kawase-blur';\nimport { Filter } from '@pixi/core';\nimport { settings } from '@pixi/settings';\nimport { DEG_TO_RAD, Point } from '@pixi/math';\nimport { rgb2hex, hex2rgb } from '@pixi/utils';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform float alpha;\\nuniform vec3 color;\\n\\nuniform vec2 shift;\\nuniform vec4 inputSize;\\n\\nvoid main(void){\\n vec4 sample = texture2D(uSampler, vTextureCoord - shift * inputSize.zw);\\n\\n // Un-premultiply alpha before applying the color\\n if (sample.a > 0.0) {\\n sample.rgb /= sample.a;\\n }\\n\\n // Premultiply alpha again\\n sample.rgb = color.rgb * sample.a;\\n\\n // alpha user alpha\\n sample *= alpha;\\n\\n gl_FragColor = sample;\\n}\";\n\n/**\n * Drop shadow filter.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/drop-shadow.png)\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-drop-shadow|@pixi/filter-drop-shadow}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {object} [options] Filter options\n * @param {number} [options.rotation=45] The angle of the shadow in degrees.\n * @param {number} [options.distance=5] Distance of shadow\n * @param {number} [options.color=0x000000] Color of the shadow\n * @param {number} [options.alpha=0.5] Alpha of the shadow\n * @param {number} [options.shadowOnly=false] Whether render shadow only\n * @param {number} [options.blur=2] - Sets the strength of the Blur properties simultaneously\n * @param {number} [options.quality=3] - The quality of the Blur filter.\n * @param {number[]} [options.kernels=null] - The kernels of the Blur filter.\n * @param {number|number[]|PIXI.Point} [options.pixelSize=1] - the pixelSize of the Blur filter.\n * @param {number} [options.resolution=PIXI.settings.RESOLUTION] - The resolution of the Blur filter.\n */\nvar DropShadowFilter = /*@__PURE__*/(function (Filter) {\n function DropShadowFilter(options) {\n\n // Fallback support for ctor: (rotation, distance, blur, color, alpha)\n if (options && options.constructor !== Object) {\n // eslint-disable-next-line no-console\n console.warn('DropShadowFilter now uses options instead of (rotation, distance, blur, color, alpha)');\n options = { rotation: options };\n if (arguments[1] !== undefined) {\n options.distance = arguments[1];\n }\n if (arguments[2] !== undefined) {\n options.blur = arguments[2];\n }\n if (arguments[3] !== undefined) {\n options.color = arguments[3];\n }\n if (arguments[4] !== undefined) {\n options.alpha = arguments[4];\n }\n }\n\n options = Object.assign({\n rotation: 45,\n distance: 5,\n color: 0x000000,\n alpha: 0.5,\n shadowOnly: false,\n kernels: null,\n blur: 2,\n quality: 3,\n pixelSize: 1,\n resolution: settings.RESOLUTION,\n }, options);\n\n Filter.call(this);\n\n var kernels = options.kernels;\n var blur = options.blur;\n var quality = options.quality;\n var pixelSize = options.pixelSize;\n var resolution = options.resolution;\n\n this._tintFilter = new Filter(vertex, fragment);\n this._tintFilter.uniforms.color = new Float32Array(4);\n this._tintFilter.uniforms.shift = new Point();\n this._tintFilter.resolution = resolution;\n this._blurFilter = kernels ?\n new KawaseBlurFilter(kernels) :\n new KawaseBlurFilter(blur, quality);\n\n this.pixelSize = pixelSize;\n this.resolution = resolution;\n\n var shadowOnly = options.shadowOnly;\n var rotation = options.rotation;\n var distance = options.distance;\n var alpha = options.alpha;\n var color = options.color;\n\n this.shadowOnly = shadowOnly;\n this.rotation = rotation;\n this.distance = distance;\n this.alpha = alpha;\n this.color = color;\n\n this._updatePadding();\n }\n\n if ( Filter ) DropShadowFilter.__proto__ = Filter;\n DropShadowFilter.prototype = Object.create( Filter && Filter.prototype );\n DropShadowFilter.prototype.constructor = DropShadowFilter;\n\n var prototypeAccessors = { resolution: { configurable: true },distance: { configurable: true },rotation: { configurable: true },alpha: { configurable: true },color: { configurable: true },kernels: { configurable: true },blur: { configurable: true },quality: { configurable: true },pixelSize: { configurable: true } };\n\n DropShadowFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n var target = filterManager.getFilterTexture();\n\n this._tintFilter.apply(filterManager, input, target, true);\n this._blurFilter.apply(filterManager, target, output, clear);\n\n if (this.shadowOnly !== true) {\n filterManager.applyFilter(this, input, output, false);\n }\n\n filterManager.returnFilterTexture(target);\n };\n\n /**\n * Recalculate the proper padding amount.\n * @private\n */\n DropShadowFilter.prototype._updatePadding = function _updatePadding () {\n this.padding = this.distance + (this.blur * 2);\n };\n\n /**\n * Update the transform matrix of offset angle.\n * @private\n */\n DropShadowFilter.prototype._updateShift = function _updateShift () {\n this._tintFilter.uniforms.shift.set(\n this.distance * Math.cos(this.angle),\n this.distance * Math.sin(this.angle)\n );\n };\n\n /**\n * The resolution of the filter.\n *\n * @member {number}\n * @default PIXI.settings.RESOLUTION\n */\n prototypeAccessors.resolution.get = function () {\n return this._resolution;\n };\n prototypeAccessors.resolution.set = function (value) {\n this._resolution = value;\n\n if (this._tintFilter) {\n this._tintFilter.resolution = value;\n }\n if (this._blurFilter) {\n this._blurFilter.resolution = value;\n }\n };\n\n /**\n * Distance offset of the shadow\n * @member {number}\n * @default 5\n */\n prototypeAccessors.distance.get = function () {\n return this._distance;\n };\n prototypeAccessors.distance.set = function (value) {\n this._distance = value;\n this._updatePadding();\n this._updateShift();\n };\n\n /**\n * The angle of the shadow in degrees\n * @member {number}\n * @default 2\n */\n prototypeAccessors.rotation.get = function () {\n return this.angle / DEG_TO_RAD;\n };\n prototypeAccessors.rotation.set = function (value) {\n this.angle = value * DEG_TO_RAD;\n this._updateShift();\n };\n\n /**\n * The alpha of the shadow\n * @member {number}\n * @default 1\n */\n prototypeAccessors.alpha.get = function () {\n return this._tintFilter.uniforms.alpha;\n };\n prototypeAccessors.alpha.set = function (value) {\n this._tintFilter.uniforms.alpha = value;\n };\n\n /**\n * The color of the shadow.\n * @member {number}\n * @default 0x000000\n */\n prototypeAccessors.color.get = function () {\n return rgb2hex(this._tintFilter.uniforms.color);\n };\n prototypeAccessors.color.set = function (value) {\n hex2rgb(value, this._tintFilter.uniforms.color);\n };\n\n /**\n * Sets the kernels of the Blur Filter\n *\n * @member {number[]}\n */\n prototypeAccessors.kernels.get = function () {\n return this._blurFilter.kernels;\n };\n prototypeAccessors.kernels.set = function (value) {\n this._blurFilter.kernels = value;\n };\n\n /**\n * The blur of the shadow\n * @member {number}\n * @default 2\n */\n prototypeAccessors.blur.get = function () {\n return this._blurFilter.blur;\n };\n prototypeAccessors.blur.set = function (value) {\n this._blurFilter.blur = value;\n this._updatePadding();\n };\n\n /**\n * Sets the quality of the Blur Filter\n *\n * @member {number}\n * @default 4\n */\n prototypeAccessors.quality.get = function () {\n return this._blurFilter.quality;\n };\n prototypeAccessors.quality.set = function (value) {\n this._blurFilter.quality = value;\n };\n\n /**\n * Sets the pixelSize of the Kawase Blur filter\n *\n * @member {number|number[]|PIXI.Point}\n * @default 1\n */\n prototypeAccessors.pixelSize.get = function () {\n return this._blurFilter.pixelSize;\n };\n prototypeAccessors.pixelSize.set = function (value) {\n this._blurFilter.pixelSize = value;\n };\n\n Object.defineProperties( DropShadowFilter.prototype, prototypeAccessors );\n\n return DropShadowFilter;\n}(Filter));\n\nexport { DropShadowFilter };\n//# sourceMappingURL=filter-drop-shadow.esm.js.map\n","/*!\n * @pixi/filter-emboss - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-emboss is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"precision mediump float;\\n\\nvarying vec2 vTextureCoord;\\n\\nuniform sampler2D uSampler;\\nuniform float strength;\\nuniform vec4 filterArea;\\n\\n\\nvoid main(void)\\n{\\n\\tvec2 onePixel = vec2(1.0 / filterArea);\\n\\n\\tvec4 color;\\n\\n\\tcolor.rgb = vec3(0.5);\\n\\n\\tcolor -= texture2D(uSampler, vTextureCoord - onePixel) * strength;\\n\\tcolor += texture2D(uSampler, vTextureCoord + onePixel) * strength;\\n\\n\\tcolor.rgb = vec3((color.r + color.g + color.b) / 3.0);\\n\\n\\tfloat alpha = texture2D(uSampler, vTextureCoord).a;\\n\\n\\tgl_FragColor = vec4(color.rgb * alpha, alpha);\\n}\\n\";\n\n/**\n * An RGB Split Filter.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/emboss.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-emboss|@pixi/filter-emboss}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {number} [strength=5] Strength of the emboss.\n */\nvar EmbossFilter = /*@__PURE__*/(function (Filter) {\n function EmbossFilter(strength){\n if ( strength === void 0 ) strength = 5;\n\n Filter.call(this, vertex, fragment);\n this.strength = strength;\n }\n\n if ( Filter ) EmbossFilter.__proto__ = Filter;\n EmbossFilter.prototype = Object.create( Filter && Filter.prototype );\n EmbossFilter.prototype.constructor = EmbossFilter;\n\n var prototypeAccessors = { strength: { configurable: true } };\n\n /**\n * Strength of emboss.\n *\n * @member {number}\n */\n prototypeAccessors.strength.get = function () {\n return this.uniforms.strength;\n };\n prototypeAccessors.strength.set = function (value) {\n this.uniforms.strength = value;\n };\n\n Object.defineProperties( EmbossFilter.prototype, prototypeAccessors );\n\n return EmbossFilter;\n}(Filter));\n\nexport { EmbossFilter };\n//# sourceMappingURL=filter-emboss.esm.js.map\n","/*!\n * @pixi/filter-glitch - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-glitch is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter, Texture } from '@pixi/core';\nimport { SCALE_MODES } from '@pixi/constants';\nimport { DEG_TO_RAD } from '@pixi/math';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"// precision highp float;\\n\\nvarying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec4 filterArea;\\nuniform vec4 filterClamp;\\nuniform vec2 dimensions;\\nuniform float aspect;\\n\\nuniform sampler2D displacementMap;\\nuniform float offset;\\nuniform float sinDir;\\nuniform float cosDir;\\nuniform int fillMode;\\n\\nuniform float seed;\\nuniform vec2 red;\\nuniform vec2 green;\\nuniform vec2 blue;\\n\\nconst int TRANSPARENT = 0;\\nconst int ORIGINAL = 1;\\nconst int LOOP = 2;\\nconst int CLAMP = 3;\\nconst int MIRROR = 4;\\n\\nvoid main(void)\\n{\\n vec2 coord = (vTextureCoord * filterArea.xy) / dimensions;\\n\\n if (coord.x > 1.0 || coord.y > 1.0) {\\n return;\\n }\\n\\n float cx = coord.x - 0.5;\\n float cy = (coord.y - 0.5) * aspect;\\n float ny = (-sinDir * cx + cosDir * cy) / aspect + 0.5;\\n\\n // displacementMap: repeat\\n // ny = ny > 1.0 ? ny - 1.0 : (ny < 0.0 ? 1.0 + ny : ny);\\n\\n // displacementMap: mirror\\n ny = ny > 1.0 ? 2.0 - ny : (ny < 0.0 ? -ny : ny);\\n\\n vec4 dc = texture2D(displacementMap, vec2(0.5, ny));\\n\\n float displacement = (dc.r - dc.g) * (offset / filterArea.x);\\n\\n coord = vTextureCoord + vec2(cosDir * displacement, sinDir * displacement * aspect);\\n\\n if (fillMode == CLAMP) {\\n coord = clamp(coord, filterClamp.xy, filterClamp.zw);\\n } else {\\n if( coord.x > filterClamp.z ) {\\n if (fillMode == TRANSPARENT) {\\n discard;\\n } else if (fillMode == LOOP) {\\n coord.x -= filterClamp.z;\\n } else if (fillMode == MIRROR) {\\n coord.x = filterClamp.z * 2.0 - coord.x;\\n }\\n } else if( coord.x < filterClamp.x ) {\\n if (fillMode == TRANSPARENT) {\\n discard;\\n } else if (fillMode == LOOP) {\\n coord.x += filterClamp.z;\\n } else if (fillMode == MIRROR) {\\n coord.x *= -filterClamp.z;\\n }\\n }\\n\\n if( coord.y > filterClamp.w ) {\\n if (fillMode == TRANSPARENT) {\\n discard;\\n } else if (fillMode == LOOP) {\\n coord.y -= filterClamp.w;\\n } else if (fillMode == MIRROR) {\\n coord.y = filterClamp.w * 2.0 - coord.y;\\n }\\n } else if( coord.y < filterClamp.y ) {\\n if (fillMode == TRANSPARENT) {\\n discard;\\n } else if (fillMode == LOOP) {\\n coord.y += filterClamp.w;\\n } else if (fillMode == MIRROR) {\\n coord.y *= -filterClamp.w;\\n }\\n }\\n }\\n\\n gl_FragColor.r = texture2D(uSampler, coord + red * (1.0 - seed * 0.4) / filterArea.xy).r;\\n gl_FragColor.g = texture2D(uSampler, coord + green * (1.0 - seed * 0.3) / filterArea.xy).g;\\n gl_FragColor.b = texture2D(uSampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b;\\n gl_FragColor.a = texture2D(uSampler, coord).a;\\n}\\n\";\n\n/**\n * The GlitchFilter applies a glitch effect to an object.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/glitch.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-glitch|@pixi/filter-glitch}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {object} [options] - The more optional parameters of the filter.\n * @param {number} [options.slices=5] - The maximum number of slices.\n * @param {number} [options.offset=100] - The maximum offset amount of slices.\n * @param {number} [options.direction=0] - The angle in degree of the offset of slices.\n * @param {number} [options.fillMode=0] - The fill mode of the space after the offset. Acceptable values:\n * - `0` {@link PIXI.filters.GlitchFilter.TRANSPARENT TRANSPARENT}\n * - `1` {@link PIXI.filters.GlitchFilter.ORIGINAL ORIGINAL}\n * - `2` {@link PIXI.filters.GlitchFilter.LOOP LOOP}\n * - `3` {@link PIXI.filters.GlitchFilter.CLAMP CLAMP}\n * - `4` {@link PIXI.filters.GlitchFilter.MIRROR MIRROR}\n * @param {number} [options.seed=0] - A seed value for randomizing glitch effect.\n * @param {number} [options.average=false] - `true` will divide the bands roughly based on equal amounts\n * where as setting to `false` will vary the band sizes dramatically (more random looking).\n * @param {number} [options.minSize=8] - Minimum size of individual slice. Segment of total `sampleSize`\n * @param {number} [options.sampleSize=512] - The resolution of the displacement map texture.\n * @param {number} [options.red=[0,0]] - Red channel offset\n * @param {number} [options.green=[0,0]] - Green channel offset.\n * @param {number} [options.blue=[0,0]] - Blue channel offset.\n */\nvar GlitchFilter = /*@__PURE__*/(function (Filter) {\n function GlitchFilter(options) {\n if ( options === void 0 ) options = {};\n\n\n Filter.call(this, vertex, fragment);\n this.uniforms.dimensions = new Float32Array(2);\n\n options = Object.assign({\n slices: 5,\n offset: 100,\n direction: 0,\n fillMode: 0,\n average: false,\n seed: 0,\n red: [0, 0],\n green: [0, 0],\n blue: [0, 0],\n minSize: 8,\n sampleSize: 512,\n }, options);\n\n this.direction = options.direction;\n this.red = options.red;\n this.green = options.green;\n this.blue = options.blue;\n\n /**\n * The maximum offset value for each of the slices.\n *\n * @member {number}\n */\n this.offset = options.offset;\n\n /**\n * The fill mode of the space after the offset.\n *\n * @member {number}\n */\n this.fillMode = options.fillMode;\n\n /**\n * `true` will divide the bands roughly based on equal amounts\n * where as setting to `false` will vary the band sizes dramatically (more random looking).\n *\n * @member {boolean}\n * @default false\n */\n this.average = options.average;\n\n /**\n * A seed value for randomizing color offset. Animating\n * this value to `Math.random()` produces a twitching effect.\n *\n * @member {number}\n */\n this.seed = options.seed;\n\n /**\n * Minimum size of slices as a portion of the `sampleSize`\n *\n * @member {number}\n */\n this.minSize = options.minSize;\n\n /**\n * Height of the displacement map canvas.\n *\n * @member {number}\n * @readonly\n */\n this.sampleSize = options.sampleSize;\n\n /**\n * Internally generated canvas.\n *\n * @member {HTMLCanvasElement} _canvas\n * @private\n */\n this._canvas = document.createElement('canvas');\n this._canvas.width = 4;\n this._canvas.height = this.sampleSize;\n\n /**\n * The displacement map is used to generate the bands.\n * If using your own texture, `slices` will be ignored.\n *\n * @member {PIXI.Texture}\n * @readonly\n */\n this.texture = Texture.from(this._canvas, { scaleMode: SCALE_MODES.NEAREST });\n\n /**\n * Internal number of slices\n * @member {number}\n * @private\n */\n this._slices = 0;\n\n // Set slices\n this.slices = options.slices;\n }\n\n if ( Filter ) GlitchFilter.__proto__ = Filter;\n GlitchFilter.prototype = Object.create( Filter && Filter.prototype );\n GlitchFilter.prototype.constructor = GlitchFilter;\n\n var prototypeAccessors = { sizes: { configurable: true },offsets: { configurable: true },slices: { configurable: true },direction: { configurable: true },red: { configurable: true },green: { configurable: true },blue: { configurable: true } };\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n GlitchFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n\n var width = input.filterFrame.width;\n var height = input.filterFrame.height;\n\n this.uniforms.dimensions[0] = width;\n this.uniforms.dimensions[1] = height;\n this.uniforms.aspect = height / width;\n\n this.uniforms.seed = this.seed;\n this.uniforms.offset = this.offset;\n this.uniforms.fillMode = this.fillMode;\n\n filterManager.applyFilter(this, input, output, clear);\n };\n\n /**\n * Randomize the slices size (heights).\n *\n * @private\n */\n GlitchFilter.prototype._randomizeSizes = function _randomizeSizes () {\n var arr = this._sizes;\n var last = this._slices - 1;\n var size = this.sampleSize;\n var min = Math.min(this.minSize / size, 0.9 / this._slices);\n\n if (this.average) {\n var count = this._slices;\n var rest = 1;\n\n for (var i = 0; i < last; i++) {\n var averageWidth = rest / (count - i);\n var w = Math.max(averageWidth * (1 - Math.random() * 0.6), min);\n arr[i] = w;\n rest -= w;\n }\n arr[last] = rest;\n }\n else {\n var rest$1 = 1;\n var ratio = Math.sqrt(1 / this._slices);\n\n for (var i$1 = 0; i$1 < last; i$1++) {\n var w$1 = Math.max(ratio * rest$1 * Math.random(), min);\n arr[i$1] = w$1;\n rest$1 -= w$1;\n }\n arr[last] = rest$1;\n }\n\n this.shuffle();\n };\n\n /**\n * Shuffle the sizes of the slices, advanced usage.\n */\n GlitchFilter.prototype.shuffle = function shuffle () {\n var arr = this._sizes;\n var last = this._slices - 1;\n\n // shuffle\n for (var i = last; i > 0; i--) {\n var rand = (Math.random() * i) >> 0;\n var temp = arr[i];\n\n arr[i] = arr[rand];\n arr[rand] = temp;\n }\n };\n\n /**\n * Randomize the values for offset from -1 to 1\n *\n * @private\n */\n GlitchFilter.prototype._randomizeOffsets = function _randomizeOffsets () {\n for (var i = 0 ; i < this._slices; i++) {\n this._offsets[i] = Math.random() * (Math.random() < 0.5 ? -1 : 1);\n }\n };\n\n /**\n * Regenerating random size, offsets for slices.\n */\n GlitchFilter.prototype.refresh = function refresh () {\n this._randomizeSizes();\n this._randomizeOffsets();\n this.redraw();\n };\n\n /**\n * Redraw displacement bitmap texture, advanced usage.\n */\n GlitchFilter.prototype.redraw = function redraw () {\n var size = this.sampleSize;\n var texture = this.texture;\n var ctx = this._canvas.getContext('2d');\n ctx.clearRect(0, 0, 8, size);\n\n var offset;\n var y = 0;\n\n for (var i = 0 ; i < this._slices; i++) {\n offset = Math.floor(this._offsets[i] * 256);\n var height = this._sizes[i] * size;\n var red = offset > 0 ? offset : 0;\n var green = offset < 0 ? -offset : 0;\n ctx.fillStyle = 'rgba(' + red + ', ' + green + ', 0, 1)';\n ctx.fillRect(0, y >> 0, size, height + 1 >> 0);\n y += height;\n }\n\n texture.baseTexture.update();\n this.uniforms.displacementMap = texture;\n };\n\n /**\n * Manually custom slices size (height) of displacement bitmap\n *\n * @member {number[]}\n */\n prototypeAccessors.sizes.set = function (sizes) {\n var len = Math.min(this._slices, sizes.length);\n\n for (var i = 0; i < len; i++){\n this._sizes[i] = sizes[i];\n }\n };\n prototypeAccessors.sizes.get = function () {\n return this._sizes;\n };\n\n /**\n * Manually set custom slices offset of displacement bitmap, this is\n * a collection of values from -1 to 1. To change the max offset value\n * set `offset`.\n *\n * @member {number[]}\n */\n prototypeAccessors.offsets.set = function (offsets) {\n var len = Math.min(this._slices, offsets.length);\n\n for (var i = 0; i < len; i++){\n this._offsets[i] = offsets[i];\n }\n };\n prototypeAccessors.offsets.get = function () {\n return this._offsets;\n };\n\n /**\n * The count of slices.\n * @member {number}\n * @default 5\n */\n prototypeAccessors.slices.get = function () {\n return this._slices;\n };\n prototypeAccessors.slices.set = function (value) {\n if (this._slices === value) {\n return;\n }\n this._slices = value;\n this.uniforms.slices = value;\n this._sizes = this.uniforms.slicesWidth = new Float32Array(value);\n this._offsets = this.uniforms.slicesOffset = new Float32Array(value);\n this.refresh();\n };\n\n /**\n * The angle in degree of the offset of slices.\n * @member {number}\n * @default 0\n */\n prototypeAccessors.direction.get = function () {\n return this._direction;\n };\n prototypeAccessors.direction.set = function (value) {\n if (this._direction === value) {\n return;\n }\n this._direction = value;\n\n var radians = value * DEG_TO_RAD;\n\n this.uniforms.sinDir = Math.sin(radians);\n this.uniforms.cosDir = Math.cos(radians);\n };\n\n /**\n * Red channel offset.\n *\n * @member {PIXI.Point}\n */\n prototypeAccessors.red.get = function () {\n return this.uniforms.red;\n };\n prototypeAccessors.red.set = function (value) {\n this.uniforms.red = value;\n };\n\n /**\n * Green channel offset.\n *\n * @member {PIXI.Point}\n */\n prototypeAccessors.green.get = function () {\n return this.uniforms.green;\n };\n prototypeAccessors.green.set = function (value) {\n this.uniforms.green = value;\n };\n\n /**\n * Blue offset.\n *\n * @member {PIXI.Point}\n */\n prototypeAccessors.blue.get = function () {\n return this.uniforms.blue;\n };\n prototypeAccessors.blue.set = function (value) {\n this.uniforms.blue = value;\n };\n\n /**\n * Removes all references\n */\n GlitchFilter.prototype.destroy = function destroy () {\n this.texture.destroy(true);\n this.texture = null;\n this._canvas = null;\n this.red = null;\n this.green = null;\n this.blue = null;\n this._sizes = null;\n this._offsets = null;\n };\n\n Object.defineProperties( GlitchFilter.prototype, prototypeAccessors );\n\n return GlitchFilter;\n}(Filter));\n\n/**\n * Fill mode as transparent\n *\n * @constant\n * @static\n * @member {int} TRANSPARENT\n * @memberof PIXI.filters.GlitchFilter\n * @readonly\n */\nGlitchFilter.TRANSPARENT = 0;\n\n/**\n * Fill mode as original\n *\n * @constant\n * @static\n * @member {int} ORIGINAL\n * @memberof PIXI.filters.GlitchFilter\n * @readonly\n */\nGlitchFilter.ORIGINAL = 1;\n\n/**\n * Fill mode as loop\n *\n * @constant\n * @static\n * @member {int} LOOP\n * @memberof PIXI.filters.GlitchFilter\n * @readonly\n */\nGlitchFilter.LOOP = 2;\n\n/**\n * Fill mode as clamp\n *\n * @constant\n * @static\n * @member {int} CLAMP\n * @memberof PIXI.filters.GlitchFilter\n * @readonly\n */\nGlitchFilter.CLAMP = 3;\n\n/**\n * Fill mode as mirror\n *\n * @constant\n * @static\n * @member {int} MIRROR\n * @memberof PIXI.filters.GlitchFilter\n * @readonly\n */\nGlitchFilter.MIRROR = 4;\n\nexport { GlitchFilter };\n//# sourceMappingURL=filter-glitch.esm.js.map\n","/*!\n * @pixi/filter-glow - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-glow is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { rgb2hex, hex2rgb } from '@pixi/utils';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nvarying vec4 vColor;\\n\\nuniform sampler2D uSampler;\\n\\nuniform float distance;\\nuniform float outerStrength;\\nuniform float innerStrength;\\nuniform vec4 glowColor;\\nuniform vec4 filterArea;\\nuniform vec4 filterClamp;\\nconst float PI = 3.14159265358979323846264;\\n\\nvoid main(void) {\\n vec2 px = vec2(1.0 / filterArea.x, 1.0 / filterArea.y);\\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\\n vec4 curColor;\\n float totalAlpha = 0.0;\\n float maxTotalAlpha = 0.0;\\n float cosAngle;\\n float sinAngle;\\n vec2 displaced;\\n for (float angle = 0.0; angle <= PI * 2.0; angle += %QUALITY_DIST%) {\\n cosAngle = cos(angle);\\n sinAngle = sin(angle);\\n for (float curDistance = 1.0; curDistance <= %DIST%; curDistance++) {\\n displaced.x = vTextureCoord.x + cosAngle * curDistance * px.x;\\n displaced.y = vTextureCoord.y + sinAngle * curDistance * px.y;\\n curColor = texture2D(uSampler, clamp(displaced, filterClamp.xy, filterClamp.zw));\\n totalAlpha += (distance - curDistance) * curColor.a;\\n maxTotalAlpha += (distance - curDistance);\\n }\\n }\\n maxTotalAlpha = max(maxTotalAlpha, 0.0001);\\n\\n ownColor.a = max(ownColor.a, 0.0001);\\n ownColor.rgb = ownColor.rgb / ownColor.a;\\n float outerGlowAlpha = (totalAlpha / maxTotalAlpha) * outerStrength * (1. - ownColor.a);\\n float innerGlowAlpha = ((maxTotalAlpha - totalAlpha) / maxTotalAlpha) * innerStrength * ownColor.a;\\n float resultAlpha = (ownColor.a + outerGlowAlpha);\\n gl_FragColor = vec4(mix(mix(ownColor.rgb, glowColor.rgb, innerGlowAlpha / ownColor.a), glowColor.rgb, outerGlowAlpha / resultAlpha) * resultAlpha, resultAlpha);\\n}\\n\";\n\n/**\n * GlowFilter, originally by mishaa\n * http://www.html5gamedevs.com/topic/12756-glow-filter/?hl=mishaa#entry73578\n * http://codepen.io/mishaa/pen/raKzrm
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/glow.png)\n *\n * @class\n *\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-glow|@pixi/filter-glow}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {number} [distance=10] The distance of the glow. Make it 2 times more for resolution=2. It cant be changed after filter creation\n * @param {number} [outerStrength=4] The strength of the glow outward from the edge of the sprite.\n * @param {number} [innerStrength=0] The strength of the glow inward from the edge of the sprite.\n * @param {number} [color=0xffffff] The color of the glow.\n * @param {number} [quality=0.1] A number between 0 and 1 that describes the quality of the glow.\n *\n * @example\n * someSprite.filters = [\n * new GlowFilter(15, 2, 1, 0xFF0000, 0.5)\n * ];\n */\nvar GlowFilter = /*@__PURE__*/(function (Filter) {\n function GlowFilter(distance, outerStrength, innerStrength, color, quality) {\n if ( distance === void 0 ) distance = 10;\n if ( outerStrength === void 0 ) outerStrength = 4;\n if ( innerStrength === void 0 ) innerStrength = 0;\n if ( color === void 0 ) color = 0xffffff;\n if ( quality === void 0 ) quality = 0.1;\n\n Filter.call(this, vertex, fragment\n .replace(/%QUALITY_DIST%/gi, '' + (1 / quality / distance).toFixed(7))\n .replace(/%DIST%/gi, '' + distance.toFixed(7)));\n\n this.uniforms.glowColor = new Float32Array([0, 0, 0, 1]);\n this.distance = distance;\n this.color = color;\n this.outerStrength = outerStrength;\n this.innerStrength = innerStrength;\n }\n\n if ( Filter ) GlowFilter.__proto__ = Filter;\n GlowFilter.prototype = Object.create( Filter && Filter.prototype );\n GlowFilter.prototype.constructor = GlowFilter;\n\n var prototypeAccessors = { color: { configurable: true },distance: { configurable: true },outerStrength: { configurable: true },innerStrength: { configurable: true } };\n\n /**\n * The color of the glow.\n * @member {number}\n * @default 0xFFFFFF\n */\n prototypeAccessors.color.get = function () {\n return rgb2hex(this.uniforms.glowColor);\n };\n prototypeAccessors.color.set = function (value) {\n hex2rgb(value, this.uniforms.glowColor);\n };\n\n /**\n * The distance of the glow. Make it 2 times more for resolution=2. It cant be changed after filter creation\n * @member {number}\n * @default 10\n */\n prototypeAccessors.distance.get = function () {\n return this.uniforms.distance;\n };\n prototypeAccessors.distance.set = function (value) {\n this.uniforms.distance = value;\n };\n\n /**\n * The strength of the glow outward from the edge of the sprite.\n * @member {number}\n * @default 4\n */\n prototypeAccessors.outerStrength.get = function () {\n return this.uniforms.outerStrength;\n };\n prototypeAccessors.outerStrength.set = function (value) {\n this.uniforms.outerStrength = value;\n };\n\n /**\n * The strength of the glow inward from the edge of the sprite.\n * @member {number}\n * @default 0\n */\n prototypeAccessors.innerStrength.get = function () {\n return this.uniforms.innerStrength;\n };\n prototypeAccessors.innerStrength.set = function (value) {\n this.uniforms.innerStrength = value;\n };\n\n Object.defineProperties( GlowFilter.prototype, prototypeAccessors );\n\n return GlowFilter;\n}(Filter));\n\nexport { GlowFilter };\n//# sourceMappingURL=filter-glow.esm.js.map\n","/*!\n * @pixi/filter-godray - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-godray is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { Point, DEG_TO_RAD } from '@pixi/math';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar perlin = \"vec3 mod289(vec3 x)\\n{\\n return x - floor(x * (1.0 / 289.0)) * 289.0;\\n}\\nvec4 mod289(vec4 x)\\n{\\n return x - floor(x * (1.0 / 289.0)) * 289.0;\\n}\\nvec4 permute(vec4 x)\\n{\\n return mod289(((x * 34.0) + 1.0) * x);\\n}\\nvec4 taylorInvSqrt(vec4 r)\\n{\\n return 1.79284291400159 - 0.85373472095314 * r;\\n}\\nvec3 fade(vec3 t)\\n{\\n return t * t * t * (t * (t * 6.0 - 15.0) + 10.0);\\n}\\n// Classic Perlin noise, periodic variant\\nfloat pnoise(vec3 P, vec3 rep)\\n{\\n vec3 Pi0 = mod(floor(P), rep); // Integer part, modulo period\\n vec3 Pi1 = mod(Pi0 + vec3(1.0), rep); // Integer part + 1, mod period\\n Pi0 = mod289(Pi0);\\n Pi1 = mod289(Pi1);\\n vec3 Pf0 = fract(P); // Fractional part for interpolation\\n vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\\n vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\\n vec4 iy = vec4(Pi0.yy, Pi1.yy);\\n vec4 iz0 = Pi0.zzzz;\\n vec4 iz1 = Pi1.zzzz;\\n vec4 ixy = permute(permute(ix) + iy);\\n vec4 ixy0 = permute(ixy + iz0);\\n vec4 ixy1 = permute(ixy + iz1);\\n vec4 gx0 = ixy0 * (1.0 / 7.0);\\n vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\\n gx0 = fract(gx0);\\n vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\\n vec4 sz0 = step(gz0, vec4(0.0));\\n gx0 -= sz0 * (step(0.0, gx0) - 0.5);\\n gy0 -= sz0 * (step(0.0, gy0) - 0.5);\\n vec4 gx1 = ixy1 * (1.0 / 7.0);\\n vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\\n gx1 = fract(gx1);\\n vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\\n vec4 sz1 = step(gz1, vec4(0.0));\\n gx1 -= sz1 * (step(0.0, gx1) - 0.5);\\n gy1 -= sz1 * (step(0.0, gy1) - 0.5);\\n vec3 g000 = vec3(gx0.x, gy0.x, gz0.x);\\n vec3 g100 = vec3(gx0.y, gy0.y, gz0.y);\\n vec3 g010 = vec3(gx0.z, gy0.z, gz0.z);\\n vec3 g110 = vec3(gx0.w, gy0.w, gz0.w);\\n vec3 g001 = vec3(gx1.x, gy1.x, gz1.x);\\n vec3 g101 = vec3(gx1.y, gy1.y, gz1.y);\\n vec3 g011 = vec3(gx1.z, gy1.z, gz1.z);\\n vec3 g111 = vec3(gx1.w, gy1.w, gz1.w);\\n vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\\n g000 *= norm0.x;\\n g010 *= norm0.y;\\n g100 *= norm0.z;\\n g110 *= norm0.w;\\n vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\\n g001 *= norm1.x;\\n g011 *= norm1.y;\\n g101 *= norm1.z;\\n g111 *= norm1.w;\\n float n000 = dot(g000, Pf0);\\n float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\\n float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\\n float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\\n float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\\n float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\\n float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\\n float n111 = dot(g111, Pf1);\\n vec3 fade_xyz = fade(Pf0);\\n vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\\n vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\\n float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\\n return 2.2 * n_xyz;\\n}\\nfloat turb(vec3 P, vec3 rep, float lacunarity, float gain)\\n{\\n float sum = 0.0;\\n float sc = 1.0;\\n float totalgain = 1.0;\\n for (float i = 0.0; i < 6.0; i++)\\n {\\n sum += totalgain * pnoise(P * sc, rep);\\n sc *= lacunarity;\\n totalgain *= gain;\\n }\\n return abs(sum);\\n}\\n\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec4 filterArea;\\nuniform vec2 dimensions;\\n\\nuniform vec2 light;\\nuniform bool parallel;\\nuniform float aspect;\\n\\nuniform float gain;\\nuniform float lacunarity;\\nuniform float time;\\n\\n${perlin}\\n\\nvoid main(void) {\\n vec2 coord = vTextureCoord * filterArea.xy / dimensions.xy;\\n\\n float d;\\n\\n if (parallel) {\\n float _cos = light.x;\\n float _sin = light.y;\\n d = (_cos * coord.x) + (_sin * coord.y * aspect);\\n } else {\\n float dx = coord.x - light.x / dimensions.x;\\n float dy = (coord.y - light.y / dimensions.y) * aspect;\\n float dis = sqrt(dx * dx + dy * dy) + 0.00001;\\n d = dy / dis;\\n }\\n\\n vec3 dir = vec3(d, d, 0.0);\\n\\n float noise = turb(dir + vec3(time, 0.0, 62.1 + time) * 0.05, vec3(480.0, 320.0, 480.0), lacunarity, gain);\\n noise = mix(noise, 0.0, 0.3);\\n //fade vertically.\\n vec4 mist = vec4(noise, noise, noise, 1.0) * (1.0 - coord.y);\\n mist.a = 1.0;\\n\\n gl_FragColor = texture2D(uSampler, vTextureCoord) + mist;\\n}\\n\";\n\n/**\n * GordayFilter, {@link https://codepen.io/alaingalvan originally} by Alain Galvan\n *\n *\n *\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/godray.gif)\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-godray|@pixi/filter-godray}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n *\n * @example\n * displayObject.filters = [new GodrayFilter()];\n * @param {object} [options] Filter options\n * @param {number} [options.angle=30] Angle/Light-source of the rays.\n * @param {number} [options.gain=0.5] General intensity of the effect.\n * @param {number} [options.lacunrity=2.5] The density of the fractal noise.\n * @param {boolean} [options.parallel=true] `true` to use `angle`, `false` to use `center`\n * @param {number} [options.time=0] The current time position.\n * @param {PIXI.Point|number[]} [options.center=[0,0]] Focal point for non-parallel rays,\n * to use this `parallel` must be set to `false`.\n */\nvar GodrayFilter = /*@__PURE__*/(function (Filter) {\n function GodrayFilter(options) {\n Filter.call(this, vertex, fragment.replace('${perlin}', perlin));\n\n this.uniforms.dimensions = new Float32Array(2);\n\n // Fallback support for ctor: (angle, gain, lacunarity, time)\n if (typeof options === 'number') {\n // eslint-disable-next-line no-console\n console.warn('GodrayFilter now uses options instead of (angle, gain, lacunarity, time)');\n options = { angle: options };\n if (arguments[1] !== undefined) {\n options.gain = arguments[1];\n }\n if (arguments[2] !== undefined) {\n options.lacunarity = arguments[2];\n }\n if (arguments[3] !== undefined) {\n options.time = arguments[3];\n }\n }\n\n options = Object.assign({\n angle: 30,\n gain: 0.5,\n lacunarity: 2.5,\n time: 0,\n parallel: true,\n center: [0, 0],\n }, options);\n\n this._angleLight = new Point();\n this.angle = options.angle;\n this.gain = options.gain;\n this.lacunarity = options.lacunarity;\n\n /**\n * `true` if light rays are parallel (uses angle),\n * `false` to use the focal `center` point\n *\n * @member {boolean}\n * @default true\n */\n this.parallel = options.parallel;\n\n /**\n * The position of the emitting point for light rays\n * only used if `parallel` is set to `false`.\n *\n * @member {PIXI.Point|number[]}\n * @default [0, 0]\n */\n this.center = options.center;\n\n /**\n * The current time.\n *\n * @member {number}\n * @default 0\n */\n this.time = options.time;\n }\n\n if ( Filter ) GodrayFilter.__proto__ = Filter;\n GodrayFilter.prototype = Object.create( Filter && Filter.prototype );\n GodrayFilter.prototype.constructor = GodrayFilter;\n\n var prototypeAccessors = { angle: { configurable: true },gain: { configurable: true },lacunarity: { configurable: true } };\n\n /**\n * Applies the filter.\n * @private\n * @param {PIXI.FilterManager} filterManager - The manager.\n * @param {PIXI.RenderTarget} input - The input target.\n * @param {PIXI.RenderTarget} output - The output target.\n */\n GodrayFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n var ref = input.filterFrame;\n var width = ref.width;\n var height = ref.height;\n\n this.uniforms.light = this.parallel ? this._angleLight : this.center;\n\n this.uniforms.parallel = this.parallel;\n this.uniforms.dimensions[0] = width;\n this.uniforms.dimensions[1] = height;\n this.uniforms.aspect = height / width;\n this.uniforms.time = this.time;\n\n // draw the filter...\n filterManager.applyFilter(this, input, output, clear);\n };\n\n /**\n * The angle/light-source of the rays in degrees. For instance, a value of 0 is vertical rays,\n * values of 90 or -90 produce horizontal rays.\n * @member {number}\n * @default 30\n */\n prototypeAccessors.angle.get = function () {\n return this._angle;\n };\n prototypeAccessors.angle.set = function (value) {\n this._angle = value;\n\n var radians = value * DEG_TO_RAD;\n\n this._angleLight.x = Math.cos(radians);\n this._angleLight.y = Math.sin(radians);\n };\n\n /**\n * General intensity of the effect. A value closer to 1 will produce a more intense effect,\n * where a value closer to 0 will produce a subtler effect.\n *\n * @member {number}\n * @default 0.5\n */\n prototypeAccessors.gain.get = function () {\n return this.uniforms.gain;\n };\n prototypeAccessors.gain.set = function (value) {\n this.uniforms.gain = value;\n };\n\n /**\n * The density of the fractal noise. A higher amount produces more rays and a smaller amound\n * produces fewer waves.\n *\n * @member {number}\n * @default 2.5\n */\n prototypeAccessors.lacunarity.get = function () {\n return this.uniforms.lacunarity;\n };\n prototypeAccessors.lacunarity.set = function (value) {\n this.uniforms.lacunarity = value;\n };\n\n Object.defineProperties( GodrayFilter.prototype, prototypeAccessors );\n\n return GodrayFilter;\n}(Filter));\n\nexport { GodrayFilter };\n//# sourceMappingURL=filter-godray.esm.js.map\n","/*!\n * @pixi/filter-motion-blur - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-motion-blur is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { Point, ObservablePoint } from '@pixi/math';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec4 filterArea;\\n\\nuniform vec2 uVelocity;\\nuniform int uKernelSize;\\nuniform float uOffset;\\n\\nconst int MAX_KERNEL_SIZE = 2048;\\n\\n// Notice:\\n// the perfect way:\\n// int kernelSize = min(uKernelSize, MAX_KERNELSIZE);\\n// BUT in real use-case , uKernelSize < MAX_KERNELSIZE almost always.\\n// So use uKernelSize directly.\\n\\nvoid main(void)\\n{\\n vec4 color = texture2D(uSampler, vTextureCoord);\\n\\n if (uKernelSize == 0)\\n {\\n gl_FragColor = color;\\n return;\\n }\\n\\n vec2 velocity = uVelocity / filterArea.xy;\\n float offset = -uOffset / length(uVelocity) - 0.5;\\n int k = uKernelSize - 1;\\n\\n for(int i = 0; i < MAX_KERNEL_SIZE - 1; i++) {\\n if (i == k) {\\n break;\\n }\\n vec2 bias = velocity * (float(i) / float(k) + offset);\\n color += texture2D(uSampler, vTextureCoord + bias);\\n }\\n gl_FragColor = color / float(uKernelSize);\\n}\\n\";\n\n/**\n * The MotionBlurFilter applies a Motion blur to an object.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/motion-blur.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-motion-blur|@pixi/filter-motion-blur}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {PIXI.ObservablePoint|PIXI.Point|number[]} [velocity=[0, 0]] Sets the velocity of the motion for blur effect.\n * @param {number} [kernelSize=5] - The kernelSize of the blur filter. Must be odd number >= 5\n * @param {number} [offset=0] - The offset of the blur filter.\n */\nvar MotionBlurFilter = /*@__PURE__*/(function (Filter) {\n function MotionBlurFilter(velocity, kernelSize, offset) {\n if ( velocity === void 0 ) velocity = [0, 0];\n if ( kernelSize === void 0 ) kernelSize = 5;\n if ( offset === void 0 ) offset = 0;\n\n Filter.call(this, vertex, fragment);\n this.uniforms.uVelocity = new Float32Array(2);\n this._velocity = new ObservablePoint(this.velocityChanged, this);\n this.velocity = velocity;\n\n /**\n * The kernelSize of the blur, higher values are slower but look better.\n * Use odd value greater than 5.\n * @member {number}\n * @default 5\n */\n this.kernelSize = kernelSize;\n this.offset = offset;\n }\n\n if ( Filter ) MotionBlurFilter.__proto__ = Filter;\n MotionBlurFilter.prototype = Object.create( Filter && Filter.prototype );\n MotionBlurFilter.prototype.constructor = MotionBlurFilter;\n\n var prototypeAccessors = { velocity: { configurable: true },offset: { configurable: true } };\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n MotionBlurFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n var ref = this.velocity;\n var x = ref.x;\n var y = ref.y;\n\n this.uniforms.uKernelSize = (x !== 0 || y !== 0) ? this.kernelSize : 0;\n filterManager.applyFilter(this, input, output, clear);\n };\n\n /**\n * Sets the velocity of the motion for blur effect.\n *\n * @member {PIXI.ObservablePoint}\n */\n prototypeAccessors.velocity.set = function (value) {\n if (Array.isArray(value)) {\n this._velocity.set(value[0], value[1]);\n }\n else if (value instanceof Point || value instanceof ObservablePoint) {\n this._velocity.copy(value);\n }\n };\n\n prototypeAccessors.velocity.get = function () {\n return this._velocity;\n };\n\n /**\n * Handle velocity changed\n * @private\n */\n MotionBlurFilter.prototype.velocityChanged = function velocityChanged () {\n this.uniforms.uVelocity[0] = this._velocity.x;\n this.uniforms.uVelocity[1] = this._velocity.y;\n };\n\n /**\n * The offset of the blur filter.\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.offset.set = function (value) {\n this.uniforms.uOffset = value;\n };\n\n prototypeAccessors.offset.get = function () {\n return this.uniforms.uOffset;\n };\n\n Object.defineProperties( MotionBlurFilter.prototype, prototypeAccessors );\n\n return MotionBlurFilter;\n}(Filter));\n\nexport { MotionBlurFilter };\n//# sourceMappingURL=filter-motion-blur.esm.js.map\n","/*!\n * @pixi/filter-multi-color-replace - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-multi-color-replace is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { hex2rgb, rgb2hex } from '@pixi/utils';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform float epsilon;\\n\\nconst int MAX_COLORS = %maxColors%;\\n\\nuniform vec3 originalColors[MAX_COLORS];\\nuniform vec3 targetColors[MAX_COLORS];\\n\\nvoid main(void)\\n{\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n\\n float alpha = gl_FragColor.a;\\n if (alpha < 0.0001)\\n {\\n return;\\n }\\n\\n vec3 color = gl_FragColor.rgb / alpha;\\n\\n for(int i = 0; i < MAX_COLORS; i++)\\n {\\n vec3 origColor = originalColors[i];\\n if (origColor.r < 0.0)\\n {\\n break;\\n }\\n vec3 colorDiff = origColor - color;\\n if (length(colorDiff) < epsilon)\\n {\\n vec3 targetColor = targetColors[i];\\n gl_FragColor = vec4((targetColor + colorDiff) * alpha, alpha);\\n return;\\n }\\n }\\n}\\n\";\n\n/**\n * Filter for replacing a color with another color. Similar to ColorReplaceFilter, but support multiple\n * colors.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/multi-color-replace.png)\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-multi-color-replace|@pixi/filter-multi-color-replace}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {Array} replacements - The collection of replacement items. Each item is color-pair (an array length is 2).\n * In the pair, the first value is original color , the second value is target color.\n * @param {number} [epsilon=0.05] - Tolerance of the floating-point comparison between colors\n * (lower = more exact, higher = more inclusive)\n * @param {number} [maxColors] - The maximum number of replacements filter is able to use. Because the\n * fragment is only compiled once, this cannot be changed after construction.\n * If omitted, the default value is the length of `replacements`.\n *\n * @example\n * // replaces pure red with pure blue, and replaces pure green with pure white\n * someSprite.filters = [new MultiColorReplaceFilter(\n * [\n * [0xFF0000, 0x0000FF],\n * [0x00FF00, 0xFFFFFF]\n * ],\n * 0.001\n * )];\n *\n * You also could use [R, G, B] as the color\n * someOtherSprite.filters = [new MultiColorReplaceFilter(\n * [\n * [ [1,0,0], [0,0,1] ],\n * [ [0,1,0], [1,1,1] ]\n * ],\n * 0.001\n * )];\n *\n */\nvar MultiColorReplaceFilter = /*@__PURE__*/(function (Filter) {\n function MultiColorReplaceFilter(replacements, epsilon, maxColors) {\n if ( epsilon === void 0 ) epsilon = 0.05;\n if ( maxColors === void 0 ) maxColors = null;\n\n maxColors = maxColors || replacements.length;\n\n Filter.call(this, vertex, fragment.replace(/%maxColors%/g, maxColors));\n\n this.epsilon = epsilon;\n this._maxColors = maxColors;\n this._replacements = null;\n this.uniforms.originalColors = new Float32Array(maxColors * 3);\n this.uniforms.targetColors = new Float32Array(maxColors * 3);\n this.replacements = replacements;\n }\n\n if ( Filter ) MultiColorReplaceFilter.__proto__ = Filter;\n MultiColorReplaceFilter.prototype = Object.create( Filter && Filter.prototype );\n MultiColorReplaceFilter.prototype.constructor = MultiColorReplaceFilter;\n\n var prototypeAccessors = { replacements: { configurable: true },maxColors: { configurable: true },epsilon: { configurable: true } };\n\n /**\n * The source and target colors for replacement. See constructor for information on the format.\n *\n * @member {Array}\n */\n prototypeAccessors.replacements.set = function (replacements) {\n var originals = this.uniforms.originalColors;\n var targets = this.uniforms.targetColors;\n var colorCount = replacements.length;\n\n if (colorCount > this._maxColors) {\n throw (\"Length of replacements (\" + colorCount + \") exceeds the maximum colors length (\" + (this._maxColors) + \")\");\n }\n\n // Fill with negative values\n originals[colorCount * 3] = -1;\n\n for (var i = 0; i < colorCount; i++) {\n var pair = replacements[i];\n\n // for original colors\n var color = pair[0];\n if (typeof color === 'number') {\n color = hex2rgb(color);\n }\n else {\n pair[0] = rgb2hex(color);\n }\n\n originals[i * 3] = color[0];\n originals[(i * 3) + 1] = color[1];\n originals[(i * 3) + 2] = color[2];\n\n // for target colors\n var targetColor = pair[1];\n if (typeof targetColor === 'number') {\n targetColor = hex2rgb(targetColor);\n }\n else {\n pair[1] = rgb2hex(targetColor);\n }\n\n targets[i * 3] = targetColor[0];\n targets[(i * 3) + 1] = targetColor[1];\n targets[(i * 3) + 2] = targetColor[2];\n }\n\n this._replacements = replacements;\n };\n prototypeAccessors.replacements.get = function () {\n return this._replacements;\n };\n\n /**\n * Should be called after changing any of the contents of the replacements.\n * This is a convenience method for resetting the `replacements`.\n */\n MultiColorReplaceFilter.prototype.refresh = function refresh () {\n this.replacements = this._replacements;\n };\n\n /**\n * The maximum number of color replacements supported by this filter. Can be changed\n * _only_ during construction.\n *\n * @member {number}\n * @readonly\n */\n prototypeAccessors.maxColors.get = function () {\n return this._maxColors;\n };\n\n /**\n * Tolerance of the floating-point comparison between colors (lower = more exact, higher = more inclusive)\n *\n * @member {number}\n * @default 0.05\n */\n prototypeAccessors.epsilon.set = function (value) {\n this.uniforms.epsilon = value;\n };\n prototypeAccessors.epsilon.get = function () {\n return this.uniforms.epsilon;\n };\n\n Object.defineProperties( MultiColorReplaceFilter.prototype, prototypeAccessors );\n\n return MultiColorReplaceFilter;\n}(Filter));\n\nexport { MultiColorReplaceFilter };\n//# sourceMappingURL=filter-multi-color-replace.esm.js.map\n","/*!\n * @pixi/filter-old-film - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-old-film is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec4 filterArea;\\nuniform vec2 dimensions;\\n\\nuniform float sepia;\\nuniform float noise;\\nuniform float noiseSize;\\nuniform float scratch;\\nuniform float scratchDensity;\\nuniform float scratchWidth;\\nuniform float vignetting;\\nuniform float vignettingAlpha;\\nuniform float vignettingBlur;\\nuniform float seed;\\n\\nconst float SQRT_2 = 1.414213;\\nconst vec3 SEPIA_RGB = vec3(112.0 / 255.0, 66.0 / 255.0, 20.0 / 255.0);\\n\\nfloat rand(vec2 co) {\\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\\n}\\n\\nvec3 Overlay(vec3 src, vec3 dst)\\n{\\n // if (dst <= 0.5) then: 2 * src * dst\\n // if (dst > 0.5) then: 1 - 2 * (1 - dst) * (1 - src)\\n return vec3((dst.x <= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - dst.x) * (1.0 - src.x)),\\n (dst.y <= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - dst.y) * (1.0 - src.y)),\\n (dst.z <= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - dst.z) * (1.0 - src.z)));\\n}\\n\\n\\nvoid main()\\n{\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n vec3 color = gl_FragColor.rgb;\\n\\n if (sepia > 0.0)\\n {\\n float gray = (color.x + color.y + color.z) / 3.0;\\n vec3 grayscale = vec3(gray);\\n\\n color = Overlay(SEPIA_RGB, grayscale);\\n\\n color = grayscale + sepia * (color - grayscale);\\n }\\n\\n vec2 coord = vTextureCoord * filterArea.xy / dimensions.xy;\\n\\n if (vignetting > 0.0)\\n {\\n float outter = SQRT_2 - vignetting * SQRT_2;\\n vec2 dir = vec2(vec2(0.5, 0.5) - coord);\\n dir.y *= dimensions.y / dimensions.x;\\n float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0);\\n color.rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha);\\n }\\n\\n if (scratchDensity > seed && scratch != 0.0)\\n {\\n float phase = seed * 256.0;\\n float s = mod(floor(phase), 2.0);\\n float dist = 1.0 / scratchDensity;\\n float d = distance(coord, vec2(seed * dist, abs(s - seed * dist)));\\n if (d < seed * 0.6 + 0.4)\\n {\\n highp float period = scratchDensity * 10.0;\\n\\n float xx = coord.x * period + phase;\\n float aa = abs(mod(xx, 0.5) * 4.0);\\n float bb = mod(floor(xx / 0.5), 2.0);\\n float yy = (1.0 - bb) * aa + bb * (2.0 - aa);\\n\\n float kk = 2.0 * period;\\n float dw = scratchWidth / dimensions.x * (0.75 + seed);\\n float dh = dw * kk;\\n\\n float tine = (yy - (2.0 - dh));\\n\\n if (tine > 0.0) {\\n float _sign = sign(scratch);\\n\\n tine = s * tine / period + scratch + 0.1;\\n tine = clamp(tine + 1.0, 0.5 + _sign * 0.5, 1.5 + _sign * 0.5);\\n\\n color.rgb *= tine;\\n }\\n }\\n }\\n\\n if (noise > 0.0 && noiseSize > 0.0)\\n {\\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\\n pixelCoord.x = floor(pixelCoord.x / noiseSize);\\n pixelCoord.y = floor(pixelCoord.y / noiseSize);\\n // vec2 d = pixelCoord * noiseSize * vec2(1024.0 + seed * 512.0, 1024.0 - seed * 512.0);\\n // float _noise = snoise(d) * 0.5;\\n float _noise = rand(pixelCoord * noiseSize * seed) - 0.5;\\n color += _noise * noise;\\n }\\n\\n gl_FragColor.rgb = color;\\n}\\n\";\n\n/**\n * The OldFilmFilter applies a Old film effect to an object.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/old-film.gif)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-old-film|@pixi/filter-old-film}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n *\n * @param {object|number} [options] - The optional parameters of old film effect.\n * When options is a number , it will be `seed`\n * @param {number} [options.sepia=0.3] - The amount of saturation of sepia effect,\n * a value of `1` is more saturation and closer to `0` is less, and a value of\n * `0` produces no sepia effect\n * @param {number} [options.noise=0.3] - Opacity/intensity of the noise effect between `0` and `1`\n * @param {number} [options.noiseSize=1.0] - The size of the noise particles\n * @param {number} [options.scratch=0.5] - How often scratches appear\n * @param {number} [options.scratchDensity=0.3] - The density of the number of scratches\n * @param {number} [options.scratchWidth=1.0] - The width of the scratches\n * @param {number} [options.vignetting=0.3] - The radius of the vignette effect, smaller\n * values produces a smaller vignette\n * @param {number} [options.vignettingAlpha=1.0] - Amount of opacity of vignette\n * @param {number} [options.vignettingBlur=0.3] - Blur intensity of the vignette\n * @param {number} [seed=0] - A see value to apply to the random noise generation\n */\nvar OldFilmFilter = /*@__PURE__*/(function (Filter) {\n function OldFilmFilter(options, seed) {\n if ( seed === void 0 ) seed = 0;\n\n Filter.call(this, vertex, fragment);\n this.uniforms.dimensions = new Float32Array(2);\n\n if (typeof options === 'number') {\n this.seed = options;\n options = null;\n }\n else {\n /**\n * A see value to apply to the random noise generation\n * @member {number}\n */\n this.seed = seed;\n }\n\n Object.assign(this, {\n sepia: 0.3,\n noise: 0.3,\n noiseSize: 1.0,\n scratch: 0.5,\n scratchDensity: 0.3,\n scratchWidth: 1.0,\n vignetting: 0.3,\n vignettingAlpha: 1.0,\n vignettingBlur: 0.3,\n }, options);\n }\n\n if ( Filter ) OldFilmFilter.__proto__ = Filter;\n OldFilmFilter.prototype = Object.create( Filter && Filter.prototype );\n OldFilmFilter.prototype.constructor = OldFilmFilter;\n\n var prototypeAccessors = { sepia: { configurable: true },noise: { configurable: true },noiseSize: { configurable: true },scratch: { configurable: true },scratchDensity: { configurable: true },scratchWidth: { configurable: true },vignetting: { configurable: true },vignettingAlpha: { configurable: true },vignettingBlur: { configurable: true } };\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n OldFilmFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n this.uniforms.dimensions[0] = input.filterFrame.width;\n this.uniforms.dimensions[1] = input.filterFrame.height;\n\n // named `seed` because in the most programming languages,\n // `random` used for \"the function for generating random value\".\n this.uniforms.seed = this.seed;\n\n filterManager.applyFilter(this, input, output, clear);\n };\n\n\n /**\n * The amount of saturation of sepia effect,\n * a value of `1` is more saturation and closer to `0` is less,\n * and a value of `0` produces no sepia effect\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.sepia.set = function (value) {\n this.uniforms.sepia = value;\n };\n\n prototypeAccessors.sepia.get = function () {\n return this.uniforms.sepia;\n };\n\n /**\n * Opacity/intensity of the noise effect between `0` and `1`\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.noise.set = function (value) {\n this.uniforms.noise = value;\n };\n\n prototypeAccessors.noise.get = function () {\n return this.uniforms.noise;\n };\n\n /**\n * The size of the noise particles\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.noiseSize.set = function (value) {\n this.uniforms.noiseSize = value;\n };\n\n prototypeAccessors.noiseSize.get = function () {\n return this.uniforms.noiseSize;\n };\n\n /**\n * How often scratches appear\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.scratch.set = function (value) {\n this.uniforms.scratch = value;\n };\n\n prototypeAccessors.scratch.get = function () {\n return this.uniforms.scratch;\n };\n\n /**\n * The density of the number of scratches\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.scratchDensity.set = function (value) {\n this.uniforms.scratchDensity = value;\n };\n\n prototypeAccessors.scratchDensity.get = function () {\n return this.uniforms.scratchDensity;\n };\n\n /**\n * The width of the scratches\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.scratchWidth.set = function (value) {\n this.uniforms.scratchWidth = value;\n };\n\n prototypeAccessors.scratchWidth.get = function () {\n return this.uniforms.scratchWidth;\n };\n\n /**\n * The radius of the vignette effect, smaller\n * values produces a smaller vignette\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.vignetting.set = function (value) {\n this.uniforms.vignetting = value;\n };\n\n prototypeAccessors.vignetting.get = function () {\n return this.uniforms.vignetting;\n };\n\n /**\n * Amount of opacity of vignette\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.vignettingAlpha.set = function (value) {\n this.uniforms.vignettingAlpha = value;\n };\n\n prototypeAccessors.vignettingAlpha.get = function () {\n return this.uniforms.vignettingAlpha;\n };\n\n /**\n * Blur intensity of the vignette\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.vignettingBlur.set = function (value) {\n this.uniforms.vignettingBlur = value;\n };\n\n prototypeAccessors.vignettingBlur.get = function () {\n return this.uniforms.vignettingBlur;\n };\n\n Object.defineProperties( OldFilmFilter.prototype, prototypeAccessors );\n\n return OldFilmFilter;\n}(Filter));\n\nexport { OldFilmFilter };\n//# sourceMappingURL=filter-old-film.esm.js.map\n","/*!\n * @pixi/filter-outline - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-outline is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { rgb2hex, hex2rgb } from '@pixi/utils';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec2 thickness;\\nuniform vec4 outlineColor;\\nuniform vec4 filterClamp;\\n\\nconst float DOUBLE_PI = 3.14159265358979323846264 * 2.;\\n\\nvoid main(void) {\\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\\n vec4 curColor;\\n float maxAlpha = 0.;\\n vec2 displaced;\\n for (float angle = 0.; angle <= DOUBLE_PI; angle += ${angleStep}) {\\n displaced.x = vTextureCoord.x + thickness.x * cos(angle);\\n displaced.y = vTextureCoord.y + thickness.y * sin(angle);\\n curColor = texture2D(uSampler, clamp(displaced, filterClamp.xy, filterClamp.zw));\\n maxAlpha = max(maxAlpha, curColor.a);\\n }\\n float resultAlpha = max(maxAlpha, ownColor.a);\\n gl_FragColor = vec4((ownColor.rgb + outlineColor.rgb * (1. - ownColor.a)) * resultAlpha, resultAlpha);\\n}\\n\";\n\n/**\n * OutlineFilter, originally by mishaa\n * http://www.html5gamedevs.com/topic/10640-outline-a-sprite-change-certain-colors/?p=69966\n * http://codepen.io/mishaa/pen/emGNRB
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/outline.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-outline|@pixi/filter-outline}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {number} [thickness=1] The tickness of the outline. Make it 2 times more for resolution 2\n * @param {number} [color=0x000000] The color of the outline.\n * @param {number} [quality=0.1] The quality of the outline from `0` to `1`, using a higher quality\n * setting will result in slower performance and more accuracy.\n *\n * @example\n * someSprite.shader = new OutlineFilter(9, 0xFF0000);\n */\nvar OutlineFilter = /*@__PURE__*/(function (Filter) {\n function OutlineFilter(thickness, color, quality) {\n if ( thickness === void 0 ) thickness = 1;\n if ( color === void 0 ) color = 0x000000;\n if ( quality === void 0 ) quality = 0.1;\n\n var samples = Math.max(\n quality * OutlineFilter.MAX_SAMPLES,\n OutlineFilter.MIN_SAMPLES\n );\n var angleStep = (Math.PI * 2 / samples).toFixed(7);\n\n Filter.call(this, vertex, fragment.replace(/\\$\\{angleStep\\}/, angleStep));\n this.uniforms.thickness = new Float32Array([0, 0]);\n\n /**\n * The thickness of the outline.\n * @member {number}\n * @default 1\n */\n this.thickness = thickness;\n\n this.uniforms.outlineColor = new Float32Array([0, 0, 0, 1]);\n this.color = color;\n\n this.quality = quality;\n }\n\n if ( Filter ) OutlineFilter.__proto__ = Filter;\n OutlineFilter.prototype = Object.create( Filter && Filter.prototype );\n OutlineFilter.prototype.constructor = OutlineFilter;\n\n var prototypeAccessors = { color: { configurable: true } };\n\n OutlineFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n this.uniforms.thickness[0] = this.thickness / input._frame.width;\n this.uniforms.thickness[1] = this.thickness / input._frame.height;\n\n filterManager.applyFilter(this, input, output, clear);\n };\n\n /**\n * The color of the glow.\n * @member {number}\n * @default 0x000000\n */\n prototypeAccessors.color.get = function () {\n return rgb2hex(this.uniforms.outlineColor);\n };\n prototypeAccessors.color.set = function (value) {\n hex2rgb(value, this.uniforms.outlineColor);\n };\n\n Object.defineProperties( OutlineFilter.prototype, prototypeAccessors );\n\n return OutlineFilter;\n}(Filter));\n\n/**\n * The minimum number of samples for rendering outline.\n * @static\n * @member {number} MIN_SAMPLES\n * @memberof PIXI.filters.OutlineFilter\n * @default 1\n */\nOutlineFilter.MIN_SAMPLES = 1;\n\n/**\n * The maximum number of samples for rendering outline.\n * @static\n * @member {number} MAX_SAMPLES\n * @memberof PIXI.filters.OutlineFilter\n * @default 100\n */\nOutlineFilter.MAX_SAMPLES = 100;\n\nexport { OutlineFilter };\n//# sourceMappingURL=filter-outline.esm.js.map\n","/*!\n * @pixi/filter-pixelate - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-pixelate is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"precision mediump float;\\n\\nvarying vec2 vTextureCoord;\\n\\nuniform vec2 size;\\nuniform sampler2D uSampler;\\n\\nuniform vec4 filterArea;\\n\\nvec2 mapCoord( vec2 coord )\\n{\\n coord *= filterArea.xy;\\n coord += filterArea.zw;\\n\\n return coord;\\n}\\n\\nvec2 unmapCoord( vec2 coord )\\n{\\n coord -= filterArea.zw;\\n coord /= filterArea.xy;\\n\\n return coord;\\n}\\n\\nvec2 pixelate(vec2 coord, vec2 size)\\n{\\n\\treturn floor( coord / size ) * size;\\n}\\n\\nvoid main(void)\\n{\\n vec2 coord = mapCoord(vTextureCoord);\\n\\n coord = pixelate(coord, size);\\n\\n coord = unmapCoord(coord);\\n\\n gl_FragColor = texture2D(uSampler, coord);\\n}\\n\";\n\n/**\n * This filter applies a pixelate effect making display objects appear 'blocky'.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/pixelate.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-pixelate|@pixi/filter-pixelate}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {PIXI.Point|Array|number} [size=10] Either the width/height of the size of the pixels, or square size\n */\nvar PixelateFilter = /*@__PURE__*/(function (Filter) {\n function PixelateFilter(size) {\n if ( size === void 0 ) size = 10;\n\n Filter.call(this, vertex, fragment);\n this.size = size;\n }\n\n if ( Filter ) PixelateFilter.__proto__ = Filter;\n PixelateFilter.prototype = Object.create( Filter && Filter.prototype );\n PixelateFilter.prototype.constructor = PixelateFilter;\n\n var prototypeAccessors = { size: { configurable: true } };\n\n /**\n * This a point that describes the size of the blocks.\n * x is the width of the block and y is the height.\n *\n * @member {PIXI.Point|Array|number}\n * @default 10\n */\n prototypeAccessors.size.get = function () {\n return this.uniforms.size;\n };\n prototypeAccessors.size.set = function (value) {\n if (typeof value === 'number') {\n value = [value, value];\n }\n this.uniforms.size = value;\n };\n\n Object.defineProperties( PixelateFilter.prototype, prototypeAccessors );\n\n return PixelateFilter;\n}(Filter));\n\nexport { PixelateFilter };\n//# sourceMappingURL=filter-pixelate.esm.js.map\n","/*!\n * @pixi/filter-radial-blur - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-radial-blur is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec4 filterArea;\\n\\nuniform float uRadian;\\nuniform vec2 uCenter;\\nuniform float uRadius;\\nuniform int uKernelSize;\\n\\nconst int MAX_KERNEL_SIZE = 2048;\\n\\nvoid main(void)\\n{\\n vec4 color = texture2D(uSampler, vTextureCoord);\\n\\n if (uKernelSize == 0)\\n {\\n gl_FragColor = color;\\n return;\\n }\\n\\n float aspect = filterArea.y / filterArea.x;\\n vec2 center = uCenter.xy / filterArea.xy;\\n float gradient = uRadius / filterArea.x * 0.3;\\n float radius = uRadius / filterArea.x - gradient * 0.5;\\n int k = uKernelSize - 1;\\n\\n vec2 coord = vTextureCoord;\\n vec2 dir = vec2(center - coord);\\n float dist = length(vec2(dir.x, dir.y * aspect));\\n\\n float radianStep = uRadian;\\n if (radius >= 0.0 && dist > radius) {\\n float delta = dist - radius;\\n float gap = gradient;\\n float scale = 1.0 - abs(delta / gap);\\n if (scale <= 0.0) {\\n gl_FragColor = color;\\n return;\\n }\\n radianStep *= scale;\\n }\\n radianStep /= float(k);\\n\\n float s = sin(radianStep);\\n float c = cos(radianStep);\\n mat2 rotationMatrix = mat2(vec2(c, -s), vec2(s, c));\\n\\n for(int i = 0; i < MAX_KERNEL_SIZE - 1; i++) {\\n if (i == k) {\\n break;\\n }\\n\\n coord -= center;\\n coord.y *= aspect;\\n coord = rotationMatrix * coord;\\n coord.y /= aspect;\\n coord += center;\\n\\n vec4 sample = texture2D(uSampler, coord);\\n\\n // switch to pre-multiplied alpha to correctly blur transparent images\\n // sample.rgb *= sample.a;\\n\\n color += sample;\\n }\\n\\n gl_FragColor = color / float(uKernelSize);\\n}\\n\";\n\n/**\n * The RadialBlurFilter applies a Motion blur to an object.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/radial-blur.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-radial-blur|@pixi/filter-radial-blur}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {number} [angle=0] Sets the angle of the motion for blur effect.\n * @param {PIXI.Point|number[]} [center=[0,0]] The center of the radial.\n * @param {number} [kernelSize=5] - The kernelSize of the blur filter. But be odd number >= 3\n * @param {number} [radius=-1] - The maximum size of the blur radius, `-1` is infinite\n */\nvar RadialBlurFilter = /*@__PURE__*/(function (Filter) {\n function RadialBlurFilter(angle, center, kernelSize, radius) {\n if ( angle === void 0 ) angle = 0;\n if ( center === void 0 ) center = [0, 0];\n if ( kernelSize === void 0 ) kernelSize = 5;\n if ( radius === void 0 ) radius = -1;\n\n Filter.call(this, vertex, fragment);\n\n this._angle = 0;\n this.angle = angle;\n this.center = center;\n this.kernelSize = kernelSize;\n this.radius = radius;\n }\n\n if ( Filter ) RadialBlurFilter.__proto__ = Filter;\n RadialBlurFilter.prototype = Object.create( Filter && Filter.prototype );\n RadialBlurFilter.prototype.constructor = RadialBlurFilter;\n\n var prototypeAccessors = { angle: { configurable: true },center: { configurable: true },radius: { configurable: true } };\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n RadialBlurFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n this.uniforms.uKernelSize = this._angle !== 0 ? this.kernelSize : 0;\n filterManager.applyFilter(this, input, output, clear);\n };\n\n /**\n * Sets the angle in degrees of the motion for blur effect.\n *\n * @member {PIXI.Point|number[]}\n * @default [0, 0]\n */\n prototypeAccessors.angle.set = function (value) {\n this._angle = value;\n this.uniforms.uRadian = value * Math.PI / 180;\n };\n\n prototypeAccessors.angle.get = function () {\n return this._angle;\n };\n\n /**\n * Center of the effect.\n *\n * @member {PIXI.Point|number[]}\n * @default [0, 0]\n */\n prototypeAccessors.center.get = function () {\n return this.uniforms.uCenter;\n };\n\n prototypeAccessors.center.set = function (value) {\n this.uniforms.uCenter = value;\n };\n\n /**\n * Outer radius of the effect. The default value of `-1` is infinite.\n *\n * @member {number}\n * @default -1\n */\n prototypeAccessors.radius.get = function () {\n return this.uniforms.uRadius;\n };\n\n prototypeAccessors.radius.set = function (value) {\n if (value < 0 || value === Infinity) {\n value = -1;\n }\n this.uniforms.uRadius = value;\n };\n\n Object.defineProperties( RadialBlurFilter.prototype, prototypeAccessors );\n\n return RadialBlurFilter;\n}(Filter));\n\nexport { RadialBlurFilter };\n//# sourceMappingURL=filter-radial-blur.esm.js.map\n","/*!\n * @pixi/filter-reflection - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-reflection is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec4 filterArea;\\nuniform vec4 filterClamp;\\nuniform vec2 dimensions;\\n\\nuniform bool mirror;\\nuniform float boundary;\\nuniform vec2 amplitude;\\nuniform vec2 waveLength;\\nuniform vec2 alpha;\\nuniform float time;\\n\\nfloat rand(vec2 co) {\\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\\n}\\n\\nvoid main(void)\\n{\\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\\n vec2 coord = pixelCoord / dimensions;\\n\\n if (coord.y < boundary) {\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n return;\\n }\\n\\n float k = (coord.y - boundary) / (1. - boundary + 0.0001);\\n float areaY = boundary * dimensions.y / filterArea.y;\\n float v = areaY + areaY - vTextureCoord.y;\\n float y = mirror ? v : vTextureCoord.y;\\n\\n float _amplitude = ((amplitude.y - amplitude.x) * k + amplitude.x ) / filterArea.x;\\n float _waveLength = ((waveLength.y - waveLength.x) * k + waveLength.x) / filterArea.y;\\n float _alpha = (alpha.y - alpha.x) * k + alpha.x;\\n\\n float x = vTextureCoord.x + cos(v * 6.28 / _waveLength - time) * _amplitude;\\n x = clamp(x, filterClamp.x, filterClamp.z);\\n\\n vec4 color = texture2D(uSampler, vec2(x, y));\\n\\n gl_FragColor = color * _alpha;\\n}\\n\";\n\n/**\n * Applies a reflection effect to simulate the reflection on water with waves.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/reflection.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-reflection|@pixi/filter-reflection}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n *\n * @param {object} [options] - The optional parameters of Reflection effect.\n * @param {number} [options.mirror=true] - `true` to reflect the image, `false` for waves-only\n * @param {number} [options.boundary=0.5] - Vertical position of the reflection point, default is 50% (middle)\n * smaller numbers produce a larger reflection, larger numbers produce a smaller reflection.\n * @param {number} [options.amplitude=[0, 20]] - Starting and ending amplitude of waves\n * @param {number} [options.waveLength=[30, 100]] - Starting and ending length of waves\n * @param {number} [options.alpha=[1, 1]] - Starting and ending alpha values\n * @param {number} [options.time=0] - Time for animating position of waves\n */\nvar ReflectionFilter = /*@__PURE__*/(function (Filter) {\n function ReflectionFilter(options) {\n Filter.call(this, vertex, fragment);\n this.uniforms.amplitude = new Float32Array(2);\n this.uniforms.waveLength = new Float32Array(2);\n this.uniforms.alpha = new Float32Array(2);\n this.uniforms.dimensions = new Float32Array(2);\n\n Object.assign(this, {\n mirror: true,\n boundary: 0.5,\n amplitude: [0, 20],\n waveLength: [30, 100],\n alpha: [1, 1],\n\n /**\n * Time for animating position of waves\n *\n * @member {number}\n * @memberof PIXI.filters.ReflectionFilter#\n * @default 0\n */\n time: 0,\n }, options);\n }\n\n if ( Filter ) ReflectionFilter.__proto__ = Filter;\n ReflectionFilter.prototype = Object.create( Filter && Filter.prototype );\n ReflectionFilter.prototype.constructor = ReflectionFilter;\n\n var prototypeAccessors = { mirror: { configurable: true },boundary: { configurable: true },amplitude: { configurable: true },waveLength: { configurable: true },alpha: { configurable: true } };\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n ReflectionFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n this.uniforms.dimensions[0] = input.filterFrame.width;\n this.uniforms.dimensions[1] = input.filterFrame.height;\n\n this.uniforms.time = this.time;\n\n filterManager.applyFilter(this, input, output, clear);\n };\n\n /**\n * `true` to reflect the image, `false` for waves-only\n *\n * @member {boolean}\n * @default true\n */\n prototypeAccessors.mirror.set = function (value) {\n this.uniforms.mirror = value;\n };\n prototypeAccessors.mirror.get = function () {\n return this.uniforms.mirror;\n };\n\n /**\n * Vertical position of the reflection point, default is 50% (middle)\n * smaller numbers produce a larger reflection, larger numbers produce a smaller reflection.\n *\n * @member {number}\n * @default 0.5\n */\n prototypeAccessors.boundary.set = function (value) {\n this.uniforms.boundary = value;\n };\n prototypeAccessors.boundary.get = function () {\n return this.uniforms.boundary;\n };\n\n /**\n * Starting and ending amplitude of waves\n * @member {number[]}\n * @default [0, 20]\n */\n prototypeAccessors.amplitude.set = function (value) {\n this.uniforms.amplitude[0] = value[0];\n this.uniforms.amplitude[1] = value[1];\n };\n prototypeAccessors.amplitude.get = function () {\n return this.uniforms.amplitude;\n };\n\n /**\n * Starting and ending length of waves\n * @member {number[]}\n * @default [30, 100]\n */\n prototypeAccessors.waveLength.set = function (value) {\n this.uniforms.waveLength[0] = value[0];\n this.uniforms.waveLength[1] = value[1];\n };\n prototypeAccessors.waveLength.get = function () {\n return this.uniforms.waveLength;\n };\n\n /**\n * Starting and ending alpha values\n * @member {number[]}\n * @default [1, 1]\n */\n prototypeAccessors.alpha.set = function (value) {\n this.uniforms.alpha[0] = value[0];\n this.uniforms.alpha[1] = value[1];\n };\n prototypeAccessors.alpha.get = function () {\n return this.uniforms.alpha;\n };\n\n Object.defineProperties( ReflectionFilter.prototype, prototypeAccessors );\n\n return ReflectionFilter;\n}(Filter));\n\nexport { ReflectionFilter };\n//# sourceMappingURL=filter-reflection.esm.js.map\n","/*!\n * @pixi/filter-rgb-split - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-rgb-split is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"precision mediump float;\\n\\nvarying vec2 vTextureCoord;\\n\\nuniform sampler2D uSampler;\\nuniform vec4 filterArea;\\nuniform vec2 red;\\nuniform vec2 green;\\nuniform vec2 blue;\\n\\nvoid main(void)\\n{\\n gl_FragColor.r = texture2D(uSampler, vTextureCoord + red/filterArea.xy).r;\\n gl_FragColor.g = texture2D(uSampler, vTextureCoord + green/filterArea.xy).g;\\n gl_FragColor.b = texture2D(uSampler, vTextureCoord + blue/filterArea.xy).b;\\n gl_FragColor.a = texture2D(uSampler, vTextureCoord).a;\\n}\\n\";\n\n/**\n * An RGB Split Filter.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/rgb.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-rgb-split|@pixi/filter-rgb-split}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {PIXI.Point} [red=[-10,0]] Red channel offset\n * @param {PIXI.Point} [green=[0, 10]] Green channel offset\n * @param {PIXI.Point} [blue=[0, 0]] Blue channel offset\n */\nvar RGBSplitFilter = /*@__PURE__*/(function (Filter) {\n function RGBSplitFilter(red, green, blue) {\n if ( red === void 0 ) red = [-10, 0];\n if ( green === void 0 ) green = [0, 10];\n if ( blue === void 0 ) blue = [0, 0];\n\n Filter.call(this, vertex, fragment);\n this.red = red;\n this.green = green;\n this.blue = blue;\n }\n\n if ( Filter ) RGBSplitFilter.__proto__ = Filter;\n RGBSplitFilter.prototype = Object.create( Filter && Filter.prototype );\n RGBSplitFilter.prototype.constructor = RGBSplitFilter;\n\n var prototypeAccessors = { red: { configurable: true },green: { configurable: true },blue: { configurable: true } };\n\n /**\n * Red channel offset.\n *\n * @member {PIXI.Point}\n */\n prototypeAccessors.red.get = function () {\n return this.uniforms.red;\n };\n prototypeAccessors.red.set = function (value) {\n this.uniforms.red = value;\n };\n\n /**\n * Green channel offset.\n *\n * @member {PIXI.Point}\n */\n prototypeAccessors.green.get = function () {\n return this.uniforms.green;\n };\n prototypeAccessors.green.set = function (value) {\n this.uniforms.green = value;\n };\n\n /**\n * Blue offset.\n *\n * @member {PIXI.Point}\n */\n prototypeAccessors.blue.get = function () {\n return this.uniforms.blue;\n };\n prototypeAccessors.blue.set = function (value) {\n this.uniforms.blue = value;\n };\n\n Object.defineProperties( RGBSplitFilter.prototype, prototypeAccessors );\n\n return RGBSplitFilter;\n}(Filter));\n\nexport { RGBSplitFilter };\n//# sourceMappingURL=filter-rgb-split.esm.js.map\n","/*!\n * @pixi/filter-shockwave - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-shockwave is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec4 filterArea;\\nuniform vec4 filterClamp;\\n\\nuniform vec2 center;\\n\\nuniform float amplitude;\\nuniform float wavelength;\\n// uniform float power;\\nuniform float brightness;\\nuniform float speed;\\nuniform float radius;\\n\\nuniform float time;\\n\\nconst float PI = 3.14159;\\n\\nvoid main()\\n{\\n float halfWavelength = wavelength * 0.5 / filterArea.x;\\n float maxRadius = radius / filterArea.x;\\n float currentRadius = time * speed / filterArea.x;\\n\\n float fade = 1.0;\\n\\n if (maxRadius > 0.0) {\\n if (currentRadius > maxRadius) {\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n return;\\n }\\n fade = 1.0 - pow(currentRadius / maxRadius, 2.0);\\n }\\n\\n vec2 dir = vec2(vTextureCoord - center / filterArea.xy);\\n dir.y *= filterArea.y / filterArea.x;\\n float dist = length(dir);\\n\\n if (dist <= 0.0 || dist < currentRadius - halfWavelength || dist > currentRadius + halfWavelength) {\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n return;\\n }\\n\\n vec2 diffUV = normalize(dir);\\n\\n float diff = (dist - currentRadius) / halfWavelength;\\n\\n float p = 1.0 - pow(abs(diff), 2.0);\\n\\n // float powDiff = diff * pow(p, 2.0) * ( amplitude * fade );\\n float powDiff = 1.25 * sin(diff * PI) * p * ( amplitude * fade );\\n\\n vec2 offset = diffUV * powDiff / filterArea.xy;\\n\\n // Do clamp :\\n vec2 coord = vTextureCoord + offset;\\n vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw);\\n vec4 color = texture2D(uSampler, clampedCoord);\\n if (coord != clampedCoord) {\\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\\n }\\n\\n // No clamp :\\n // gl_FragColor = texture2D(uSampler, vTextureCoord + offset);\\n\\n color.rgb *= 1.0 + (brightness - 1.0) * p * fade;\\n\\n gl_FragColor = color;\\n}\\n\";\n\n/**\n * The ShockwaveFilter class lets you apply a shockwave effect.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/shockwave.gif)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-shockwave|@pixi/filter-shockwave}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n *\n * @param {PIXI.Point|number[]} [center=[0.5, 0.5]] See `center` property.\n * @param {object} [options] - The optional parameters of shockwave filter.\n * @param {number} [options.amplitude=0.5] - See `amplitude`` property.\n * @param {number} [options.wavelength=1.0] - See `wavelength` property.\n * @param {number} [options.speed=500.0] - See `speed` property.\n * @param {number} [options.brightness=8] - See `brightness` property.\n * @param {number} [options.radius=4] - See `radius` property.\n * @param {number} [time=0] - See `time` property.\n */\nvar ShockwaveFilter = /*@__PURE__*/(function (Filter) {\n function ShockwaveFilter(center, options, time) {\n if ( center === void 0 ) center = [0.0, 0.0];\n if ( options === void 0 ) options = {};\n if ( time === void 0 ) time = 0;\n\n Filter.call(this, vertex, fragment);\n\n this.center = center;\n\n if (Array.isArray(options)) {\n // eslint-disable-next-line no-console\n console.warn('Deprecated Warning: ShockwaveFilter params Array has been changed to options Object.');\n options = {};\n }\n\n options = Object.assign({\n amplitude: 30.0,\n wavelength: 160.0,\n brightness: 1.0,\n speed: 500.0,\n radius: -1.0,\n }, options);\n\n this.amplitude = options.amplitude;\n\n this.wavelength = options.wavelength;\n\n this.brightness = options.brightness;\n\n this.speed = options.speed;\n\n this.radius = options.radius;\n\n /**\n * Sets the elapsed time of the shockwave.\n * It could control the current size of shockwave.\n *\n * @member {number}\n */\n this.time = time;\n }\n\n if ( Filter ) ShockwaveFilter.__proto__ = Filter;\n ShockwaveFilter.prototype = Object.create( Filter && Filter.prototype );\n ShockwaveFilter.prototype.constructor = ShockwaveFilter;\n\n var prototypeAccessors = { center: { configurable: true },amplitude: { configurable: true },wavelength: { configurable: true },brightness: { configurable: true },speed: { configurable: true },radius: { configurable: true } };\n\n ShockwaveFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n /**\n * There is no set/get of `time`, for performance.\n * Because in the most real cases, `time` will be changed in ever game tick.\n * Use set/get will take more function-call.\n */\n this.uniforms.time = this.time;\n\n filterManager.applyFilter(this, input, output, clear);\n };\n\n /**\n * Sets the center of the shockwave in normalized screen coords. That is\n * (0,0) is the top-left and (1,1) is the bottom right.\n *\n * @member {PIXI.Point|number[]}\n */\n prototypeAccessors.center.get = function () {\n return this.uniforms.center;\n };\n prototypeAccessors.center.set = function (value) {\n this.uniforms.center = value;\n };\n\n /**\n * The amplitude of the shockwave.\n *\n * @member {number}\n */\n prototypeAccessors.amplitude.get = function () {\n return this.uniforms.amplitude;\n };\n prototypeAccessors.amplitude.set = function (value) {\n this.uniforms.amplitude = value;\n };\n\n /**\n * The wavelength of the shockwave.\n *\n * @member {number}\n */\n prototypeAccessors.wavelength.get = function () {\n return this.uniforms.wavelength;\n };\n prototypeAccessors.wavelength.set = function (value) {\n this.uniforms.wavelength = value;\n };\n\n /**\n * The brightness of the shockwave.\n *\n * @member {number}\n */\n prototypeAccessors.brightness.get = function () {\n return this.uniforms.brightness;\n };\n prototypeAccessors.brightness.set = function (value) {\n this.uniforms.brightness = value;\n };\n\n /**\n * The speed about the shockwave ripples out.\n * The unit is `pixel/second`\n *\n * @member {number}\n */\n prototypeAccessors.speed.get = function () {\n return this.uniforms.speed;\n };\n prototypeAccessors.speed.set = function (value) {\n this.uniforms.speed = value;\n };\n\n /**\n * The maximum radius of shockwave.\n * `< 0.0` means it's infinity.\n *\n * @member {number}\n */\n prototypeAccessors.radius.get = function () {\n return this.uniforms.radius;\n };\n prototypeAccessors.radius.set = function (value) {\n this.uniforms.radius = value;\n };\n\n Object.defineProperties( ShockwaveFilter.prototype, prototypeAccessors );\n\n return ShockwaveFilter;\n}(Filter));\n\nexport { ShockwaveFilter };\n//# sourceMappingURL=filter-shockwave.esm.js.map\n","/*!\n * @pixi/filter-simple-lightmap - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-simple-lightmap is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { hex2rgb, rgb2hex } from '@pixi/utils';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform sampler2D uLightmap;\\nuniform vec4 filterArea;\\nuniform vec2 dimensions;\\nuniform vec4 ambientColor;\\nvoid main() {\\n vec4 diffuseColor = texture2D(uSampler, vTextureCoord);\\n vec2 lightCoord = (vTextureCoord * filterArea.xy) / dimensions;\\n vec4 light = texture2D(uLightmap, lightCoord);\\n vec3 ambient = ambientColor.rgb * ambientColor.a;\\n vec3 intensity = ambient + light.rgb;\\n vec3 finalColor = diffuseColor.rgb * intensity;\\n gl_FragColor = vec4(finalColor, diffuseColor.a);\\n}\\n\";\n\n/**\n* SimpleLightmap, originally by Oza94\n* http://www.html5gamedevs.com/topic/20027-pixijs-simple-lightmapping/\n* http://codepen.io/Oza94/pen/EPoRxj\n*\n* You have to specify filterArea, or suffer consequences.\n* You may have to use it with `filter.dontFit = true`,\n* until we rewrite this using same approach as for DisplacementFilter.\n*\n* ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/simple-lightmap.png)\n* @class\n* @extends PIXI.Filter\n* @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-simple-lightmap|@pixi/filter-simple-lightmap}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n* @param {PIXI.Texture} texture a texture where your lightmap is rendered\n* @param {Array|number} [color=0x000000] An RGBA array of the ambient color\n* @param {number} [alpha=1] Default alpha set independent of color (if it's a number, not array).\n*\n* @example\n* displayObject.filters = [new SimpleLightmapFilter(texture, 0x666666)];\n*/\nvar SimpleLightmapFilter = /*@__PURE__*/(function (Filter) {\n function SimpleLightmapFilter(texture, color, alpha) {\n if ( color === void 0 ) color = 0x000000;\n if ( alpha === void 0 ) alpha = 1;\n\n Filter.call(this, vertex, fragment);\n this.uniforms.dimensions = new Float32Array(2);\n this.uniforms.ambientColor = new Float32Array([0, 0, 0, alpha]);\n this.texture = texture;\n this.color = color;\n }\n\n if ( Filter ) SimpleLightmapFilter.__proto__ = Filter;\n SimpleLightmapFilter.prototype = Object.create( Filter && Filter.prototype );\n SimpleLightmapFilter.prototype.constructor = SimpleLightmapFilter;\n\n var prototypeAccessors = { texture: { configurable: true },color: { configurable: true },alpha: { configurable: true } };\n\n /**\n * Applies the filter.\n * @private\n * @param {PIXI.FilterManager} filterManager - The manager.\n * @param {PIXI.RenderTarget} input - The input target.\n * @param {PIXI.RenderTarget} output - The output target.\n */\n SimpleLightmapFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n this.uniforms.dimensions[0] = input.filterFrame.width;\n this.uniforms.dimensions[1] = input.filterFrame.height;\n\n // draw the filter...\n filterManager.applyFilter(this, input, output, clear);\n };\n\n\n /**\n * a texture where your lightmap is rendered\n * @member {PIXI.Texture}\n */\n prototypeAccessors.texture.get = function () {\n return this.uniforms.uLightmap;\n };\n prototypeAccessors.texture.set = function (value) {\n this.uniforms.uLightmap = value;\n };\n\n /**\n * An RGBA array of the ambient color or a hex color without alpha\n * @member {Array|number}\n */\n prototypeAccessors.color.set = function (value) {\n var arr = this.uniforms.ambientColor;\n if (typeof value === 'number') {\n hex2rgb(value, arr);\n this._color = value;\n }\n else {\n arr[0] = value[0];\n arr[1] = value[1];\n arr[2] = value[2];\n arr[3] = value[3];\n this._color = rgb2hex(arr);\n }\n };\n prototypeAccessors.color.get = function () {\n return this._color;\n };\n\n /**\n * When setting `color` as hex, this can be used to set alpha independently.\n * @member {number}\n */\n prototypeAccessors.alpha.get = function () {\n return this.uniforms.ambientColor[3];\n };\n prototypeAccessors.alpha.set = function (value) {\n this.uniforms.ambientColor[3] = value;\n };\n\n Object.defineProperties( SimpleLightmapFilter.prototype, prototypeAccessors );\n\n return SimpleLightmapFilter;\n}(Filter));\n\nexport { SimpleLightmapFilter };\n//# sourceMappingURL=filter-simple-lightmap.esm.js.map\n","/*!\n * @pixi/filter-tilt-shift - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-tilt-shift is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { Point } from '@pixi/math';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\n\\nuniform sampler2D uSampler;\\nuniform float blur;\\nuniform float gradientBlur;\\nuniform vec2 start;\\nuniform vec2 end;\\nuniform vec2 delta;\\nuniform vec2 texSize;\\n\\nfloat random(vec3 scale, float seed)\\n{\\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\\n}\\n\\nvoid main(void)\\n{\\n vec4 color = vec4(0.0);\\n float total = 0.0;\\n\\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\\n float radius = smoothstep(0.0, 1.0, abs(dot(vTextureCoord * texSize - start, normal)) / gradientBlur) * blur;\\n\\n for (float t = -30.0; t <= 30.0; t++)\\n {\\n float percent = (t + offset - 0.5) / 30.0;\\n float weight = 1.0 - abs(percent);\\n vec4 sample = texture2D(uSampler, vTextureCoord + delta / texSize * percent * radius);\\n sample.rgb *= sample.a;\\n color += sample * weight;\\n total += weight;\\n }\\n\\n color /= total;\\n color.rgb /= color.a + 0.00001;\\n\\n gl_FragColor = color;\\n}\\n\";\n\n/**\n * @author Vico @vicocotea\n * original filter https://github.com/evanw/glfx.js/blob/master/src/filters/blur/tiltshift.js by Evan Wallace : http://madebyevan.com/\n */\n\n/**\n * A TiltShiftAxisFilter.\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @private\n */\nvar TiltShiftAxisFilter = /*@__PURE__*/(function (Filter) {\n function TiltShiftAxisFilter(blur, gradientBlur, start, end){\n if ( blur === void 0 ) blur = 100;\n if ( gradientBlur === void 0 ) gradientBlur = 600;\n if ( start === void 0 ) start = null;\n if ( end === void 0 ) end = null;\n\n Filter.call(this, vertex, fragment);\n this.uniforms.blur = blur;\n this.uniforms.gradientBlur = gradientBlur;\n this.uniforms.start = start || new Point(0, window.innerHeight / 2);\n this.uniforms.end = end || new Point(600, window.innerHeight / 2);\n this.uniforms.delta = new Point(30, 30);\n this.uniforms.texSize = new Point(window.innerWidth, window.innerHeight);\n this.updateDelta();\n }\n\n if ( Filter ) TiltShiftAxisFilter.__proto__ = Filter;\n TiltShiftAxisFilter.prototype = Object.create( Filter && Filter.prototype );\n TiltShiftAxisFilter.prototype.constructor = TiltShiftAxisFilter;\n\n var prototypeAccessors = { blur: { configurable: true },gradientBlur: { configurable: true },start: { configurable: true },end: { configurable: true } };\n\n /**\n * Updates the filter delta values.\n * This is overridden in the X and Y filters, does nothing for this class.\n *\n */\n TiltShiftAxisFilter.prototype.updateDelta = function updateDelta () {\n this.uniforms.delta.x = 0;\n this.uniforms.delta.y = 0;\n };\n\n /**\n * The strength of the blur.\n *\n * @member {number}\n * @memberof PIXI.filters.TiltShiftAxisFilter#\n */\n prototypeAccessors.blur.get = function () {\n return this.uniforms.blur;\n };\n prototypeAccessors.blur.set = function (value) {\n this.uniforms.blur = value;\n };\n\n /**\n * The strength of the gradient blur.\n *\n * @member {number}\n * @memberof PIXI.filters.TiltShiftAxisFilter#\n */\n prototypeAccessors.gradientBlur.get = function () {\n return this.uniforms.gradientBlur;\n };\n prototypeAccessors.gradientBlur.set = function (value) {\n this.uniforms.gradientBlur = value;\n };\n\n /**\n * The X value to start the effect at.\n *\n * @member {PIXI.Point}\n * @memberof PIXI.filters.TiltShiftAxisFilter#\n */\n prototypeAccessors.start.get = function () {\n return this.uniforms.start;\n };\n prototypeAccessors.start.set = function (value) {\n this.uniforms.start = value;\n this.updateDelta();\n };\n\n /**\n * The X value to end the effect at.\n *\n * @member {PIXI.Point}\n * @memberof PIXI.filters.TiltShiftAxisFilter#\n */\n prototypeAccessors.end.get = function () {\n return this.uniforms.end;\n };\n prototypeAccessors.end.set = function (value) {\n this.uniforms.end = value;\n this.updateDelta();\n };\n\n Object.defineProperties( TiltShiftAxisFilter.prototype, prototypeAccessors );\n\n return TiltShiftAxisFilter;\n}(Filter));\n\n/**\n * @author Vico @vicocotea\n * original filter https://github.com/evanw/glfx.js/blob/master/src/filters/blur/tiltshift.js by Evan Wallace : http://madebyevan.com/\n */\n\n/**\n * A TiltShiftXFilter.\n *\n * @class\n * @extends PIXI.TiltShiftAxisFilter\n * @memberof PIXI.filters\n * @private\n */\nvar TiltShiftXFilter = /*@__PURE__*/(function (TiltShiftAxisFilter) {\n function TiltShiftXFilter () {\n TiltShiftAxisFilter.apply(this, arguments);\n }\n\n if ( TiltShiftAxisFilter ) TiltShiftXFilter.__proto__ = TiltShiftAxisFilter;\n TiltShiftXFilter.prototype = Object.create( TiltShiftAxisFilter && TiltShiftAxisFilter.prototype );\n TiltShiftXFilter.prototype.constructor = TiltShiftXFilter;\n\n TiltShiftXFilter.prototype.updateDelta = function updateDelta () {\n var dx = this.uniforms.end.x - this.uniforms.start.x;\n var dy = this.uniforms.end.y - this.uniforms.start.y;\n var d = Math.sqrt(dx * dx + dy * dy);\n this.uniforms.delta.x = dx / d;\n this.uniforms.delta.y = dy / d;\n };\n\n return TiltShiftXFilter;\n}(TiltShiftAxisFilter));\n\n/**\n * @author Vico @vicocotea\n * original filter https://github.com/evanw/glfx.js/blob/master/src/filters/blur/tiltshift.js by Evan Wallace : http://madebyevan.com/\n */\n\n/**\n * A TiltShiftYFilter.\n *\n * @class\n * @extends PIXI.TiltShiftAxisFilter\n * @memberof PIXI.filters\n * @private\n */\nvar TiltShiftYFilter = /*@__PURE__*/(function (TiltShiftAxisFilter) {\n function TiltShiftYFilter () {\n TiltShiftAxisFilter.apply(this, arguments);\n }\n\n if ( TiltShiftAxisFilter ) TiltShiftYFilter.__proto__ = TiltShiftAxisFilter;\n TiltShiftYFilter.prototype = Object.create( TiltShiftAxisFilter && TiltShiftAxisFilter.prototype );\n TiltShiftYFilter.prototype.constructor = TiltShiftYFilter;\n\n TiltShiftYFilter.prototype.updateDelta = function updateDelta () {\n var dx = this.uniforms.end.x - this.uniforms.start.x;\n var dy = this.uniforms.end.y - this.uniforms.start.y;\n var d = Math.sqrt(dx * dx + dy * dy);\n this.uniforms.delta.x = -dy / d;\n this.uniforms.delta.y = dx / d;\n };\n\n return TiltShiftYFilter;\n}(TiltShiftAxisFilter));\n\n/**\n * @author Vico @vicocotea\n * original filter https://github.com/evanw/glfx.js/blob/master/src/filters/blur/tiltshift.js by Evan Wallace : http://madebyevan.com/\n */\n\n/**\n * A TiltShift Filter. Manages the pass of both a TiltShiftXFilter and TiltShiftYFilter.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/tilt-shift.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-tilt-shift|@pixi/filter-tilt-shift}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {number} [blur=100] The strength of the blur.\n * @param {number} [gradientBlur=600] The strength of the gradient blur.\n * @param {PIXI.Point} [start=null] The Y value to start the effect at.\n * @param {PIXI.Point} [end=null] The Y value to end the effect at.\n */\nvar TiltShiftFilter = /*@__PURE__*/(function (Filter) {\n function TiltShiftFilter(blur, gradientBlur, start, end) {\n if ( blur === void 0 ) blur = 100;\n if ( gradientBlur === void 0 ) gradientBlur = 600;\n if ( start === void 0 ) start = null;\n if ( end === void 0 ) end = null;\n\n Filter.call(this);\n this.tiltShiftXFilter = new TiltShiftXFilter(blur, gradientBlur, start, end);\n this.tiltShiftYFilter = new TiltShiftYFilter(blur, gradientBlur, start, end);\n }\n\n if ( Filter ) TiltShiftFilter.__proto__ = Filter;\n TiltShiftFilter.prototype = Object.create( Filter && Filter.prototype );\n TiltShiftFilter.prototype.constructor = TiltShiftFilter;\n\n var prototypeAccessors = { blur: { configurable: true },gradientBlur: { configurable: true },start: { configurable: true },end: { configurable: true } };\n\n TiltShiftFilter.prototype.apply = function apply (filterManager, input, output) {\n var renderTarget = filterManager.getFilterTexture();\n this.tiltShiftXFilter.apply(filterManager, input, renderTarget);\n this.tiltShiftYFilter.apply(filterManager, renderTarget, output);\n filterManager.returnFilterTexture(renderTarget);\n };\n\n /**\n * The strength of the blur.\n *\n * @member {number}\n */\n prototypeAccessors.blur.get = function () {\n return this.tiltShiftXFilter.blur;\n };\n prototypeAccessors.blur.set = function (value) {\n this.tiltShiftXFilter.blur = this.tiltShiftYFilter.blur = value;\n };\n\n /**\n * The strength of the gradient blur.\n *\n * @member {number}\n */\n prototypeAccessors.gradientBlur.get = function () {\n return this.tiltShiftXFilter.gradientBlur;\n };\n prototypeAccessors.gradientBlur.set = function (value) {\n this.tiltShiftXFilter.gradientBlur = this.tiltShiftYFilter.gradientBlur = value;\n };\n\n /**\n * The Y value to start the effect at.\n *\n * @member {PIXI.Point}\n */\n prototypeAccessors.start.get = function () {\n return this.tiltShiftXFilter.start;\n };\n prototypeAccessors.start.set = function (value) {\n this.tiltShiftXFilter.start = this.tiltShiftYFilter.start = value;\n };\n\n /**\n * The Y value to end the effect at.\n *\n * @member {PIXI.Point}\n */\n prototypeAccessors.end.get = function () {\n return this.tiltShiftXFilter.end;\n };\n prototypeAccessors.end.set = function (value) {\n this.tiltShiftXFilter.end = this.tiltShiftYFilter.end = value;\n };\n\n Object.defineProperties( TiltShiftFilter.prototype, prototypeAccessors );\n\n return TiltShiftFilter;\n}(Filter));\n\nexport { TiltShiftAxisFilter, TiltShiftFilter, TiltShiftXFilter, TiltShiftYFilter };\n//# sourceMappingURL=filter-tilt-shift.esm.js.map\n","/*!\n * @pixi/filter-twist - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-twist is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\n\\nuniform sampler2D uSampler;\\nuniform float radius;\\nuniform float angle;\\nuniform vec2 offset;\\nuniform vec4 filterArea;\\n\\nvec2 mapCoord( vec2 coord )\\n{\\n coord *= filterArea.xy;\\n coord += filterArea.zw;\\n\\n return coord;\\n}\\n\\nvec2 unmapCoord( vec2 coord )\\n{\\n coord -= filterArea.zw;\\n coord /= filterArea.xy;\\n\\n return coord;\\n}\\n\\nvec2 twist(vec2 coord)\\n{\\n coord -= offset;\\n\\n float dist = length(coord);\\n\\n if (dist < radius)\\n {\\n float ratioDist = (radius - dist) / radius;\\n float angleMod = ratioDist * ratioDist * angle;\\n float s = sin(angleMod);\\n float c = cos(angleMod);\\n coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c);\\n }\\n\\n coord += offset;\\n\\n return coord;\\n}\\n\\nvoid main(void)\\n{\\n\\n vec2 coord = mapCoord(vTextureCoord);\\n\\n coord = twist(coord);\\n\\n coord = unmapCoord(coord);\\n\\n gl_FragColor = texture2D(uSampler, coord );\\n\\n}\\n\";\n\n/**\n * This filter applies a twist effect making display objects appear twisted in the given direction.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/twist.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-twist|@pixi/filter-twist}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {number} [radius=200] The radius of the twist.\n * @param {number} [angle=4] The angle of the twist.\n * @param {number} [padding=20] Padding for filter area.\n */\nvar TwistFilter = /*@__PURE__*/(function (Filter) {\n function TwistFilter(radius, angle, padding) {\n if ( radius === void 0 ) radius = 200;\n if ( angle === void 0 ) angle = 4;\n if ( padding === void 0 ) padding = 20;\n\n Filter.call(this, vertex, fragment);\n\n this.radius = radius;\n this.angle = angle;\n this.padding = padding;\n }\n\n if ( Filter ) TwistFilter.__proto__ = Filter;\n TwistFilter.prototype = Object.create( Filter && Filter.prototype );\n TwistFilter.prototype.constructor = TwistFilter;\n\n var prototypeAccessors = { offset: { configurable: true },radius: { configurable: true },angle: { configurable: true } };\n\n /**\n * This point describes the the offset of the twist.\n *\n * @member {PIXI.Point}\n */\n prototypeAccessors.offset.get = function () {\n return this.uniforms.offset;\n };\n prototypeAccessors.offset.set = function (value) {\n this.uniforms.offset = value;\n };\n\n /**\n * The radius of the twist.\n *\n * @member {number}\n */\n prototypeAccessors.radius.get = function () {\n return this.uniforms.radius;\n };\n prototypeAccessors.radius.set = function (value) {\n this.uniforms.radius = value;\n };\n\n /**\n * The angle of the twist.\n *\n * @member {number}\n */\n prototypeAccessors.angle.get = function () {\n return this.uniforms.angle;\n };\n prototypeAccessors.angle.set = function (value) {\n this.uniforms.angle = value;\n };\n\n Object.defineProperties( TwistFilter.prototype, prototypeAccessors );\n\n return TwistFilter;\n}(Filter));\n\nexport { TwistFilter };\n//# sourceMappingURL=filter-twist.esm.js.map\n","/*!\n * @pixi/filter-zoom-blur - v3.0.3\n * Compiled Wed, 29 May 2019 03:04:05 UTC\n *\n * @pixi/filter-zoom-blur is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec4 filterArea;\\n\\nuniform vec2 uCenter;\\nuniform float uStrength;\\nuniform float uInnerRadius;\\nuniform float uRadius;\\n\\nconst float MAX_KERNEL_SIZE = 32.0;\\n\\n// author: http://byteblacksmith.com/improvements-to-the-canonical-one-liner-glsl-rand-for-opengl-es-2-0/\\nhighp float rand(vec2 co, float seed) {\\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n highp float dt = dot(co + seed, vec2(a, b)), sn = mod(dt, 3.14159);\\n return fract(sin(sn) * c + seed);\\n}\\n\\nvoid main() {\\n\\n float minGradient = uInnerRadius * 0.3;\\n float innerRadius = (uInnerRadius + minGradient * 0.5) / filterArea.x;\\n\\n float gradient = uRadius * 0.3;\\n float radius = (uRadius - gradient * 0.5) / filterArea.x;\\n\\n float countLimit = MAX_KERNEL_SIZE;\\n\\n vec2 dir = vec2(uCenter.xy / filterArea.xy - vTextureCoord);\\n float dist = length(vec2(dir.x, dir.y * filterArea.y / filterArea.x));\\n\\n float strength = uStrength;\\n\\n float delta = 0.0;\\n float gap;\\n if (dist < innerRadius) {\\n delta = innerRadius - dist;\\n gap = minGradient;\\n } else if (radius >= 0.0 && dist > radius) { // radius < 0 means it's infinity\\n delta = dist - radius;\\n gap = gradient;\\n }\\n\\n if (delta > 0.0) {\\n float normalCount = gap / filterArea.x;\\n delta = (normalCount - delta) / normalCount;\\n countLimit *= delta;\\n strength *= delta;\\n if (countLimit < 1.0)\\n {\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n return;\\n }\\n }\\n\\n // randomize the lookup values to hide the fixed number of samples\\n float offset = rand(vTextureCoord, 0.0);\\n\\n float total = 0.0;\\n vec4 color = vec4(0.0);\\n\\n dir *= strength;\\n\\n for (float t = 0.0; t < MAX_KERNEL_SIZE; t++) {\\n float percent = (t + offset) / MAX_KERNEL_SIZE;\\n float weight = 4.0 * (percent - percent * percent);\\n vec2 p = vTextureCoord + dir * percent;\\n vec4 sample = texture2D(uSampler, p);\\n\\n // switch to pre-multiplied alpha to correctly blur transparent images\\n // sample.rgb *= sample.a;\\n\\n color += sample * weight;\\n total += weight;\\n\\n if (t > countLimit){\\n break;\\n }\\n }\\n\\n color /= total;\\n // switch back from pre-multiplied alpha\\n // color.rgb /= color.a + 0.00001;\\n\\n gl_FragColor = color;\\n}\\n\";\n\n/**\n * The ZoomFilter applies a Zoom blur to an object.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/zoom-blur.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-zoom-blur|@pixi/filter-zoom-blur}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {number} [strength=0.1] Sets the strength of the zoom blur effect\n * @param {PIXI.Point|number[]} [center=[0,0]] The center of the zoom.\n * @param {number} [innerRadius=0] The inner radius of zoom. The part in inner circle won't apply zoom blur effect.\n * @param {number} [radius=-1] See `radius` property.\n */\nvar ZoomBlurFilter = /*@__PURE__*/(function (Filter) {\n function ZoomBlurFilter(strength, center, innerRadius, radius) {\n if ( strength === void 0 ) strength = 0.1;\n if ( center === void 0 ) center = [0, 0];\n if ( innerRadius === void 0 ) innerRadius = 0;\n if ( radius === void 0 ) radius = -1;\n\n Filter.call(this, vertex, fragment);\n\n this.center = center;\n this.strength = strength;\n this.innerRadius = innerRadius;\n this.radius = radius;\n }\n\n if ( Filter ) ZoomBlurFilter.__proto__ = Filter;\n ZoomBlurFilter.prototype = Object.create( Filter && Filter.prototype );\n ZoomBlurFilter.prototype.constructor = ZoomBlurFilter;\n\n var prototypeAccessors = { center: { configurable: true },strength: { configurable: true },innerRadius: { configurable: true },radius: { configurable: true } };\n\n /**\n * Center of the effect.\n *\n * @member {PIXI.Point|number[]}\n * @default [0, 0]\n */\n prototypeAccessors.center.get = function () {\n return this.uniforms.uCenter;\n };\n prototypeAccessors.center.set = function (value) {\n this.uniforms.uCenter = value;\n };\n\n /**\n * Intensity of the zoom effect.\n *\n * @member {number}\n * @default 0.1\n */\n prototypeAccessors.strength.get = function () {\n return this.uniforms.uStrength;\n };\n prototypeAccessors.strength.set = function (value) {\n this.uniforms.uStrength = value;\n };\n\n /**\n * Radius of the inner region not effected by blur.\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.innerRadius.get = function () {\n return this.uniforms.uInnerRadius;\n };\n prototypeAccessors.innerRadius.set = function (value) {\n this.uniforms.uInnerRadius = value;\n };\n\n /**\n * Outer radius of the effect. The default value is `-1`.\n * `< 0.0` means it's infinity.\n *\n * @member {number}\n * @default -1\n */\n prototypeAccessors.radius.get = function () {\n return this.uniforms.uRadius;\n };\n prototypeAccessors.radius.set = function (value) {\n if (value < 0 || value === Infinity) {\n value = -1;\n }\n this.uniforms.uRadius = value;\n };\n\n Object.defineProperties( ZoomBlurFilter.prototype, prototypeAccessors );\n\n return ZoomBlurFilter;\n}(Filter));\n\nexport { ZoomBlurFilter };\n//# sourceMappingURL=filter-zoom-blur.esm.js.map\n"],"names":["vertex","fragment","AdjustmentFilter","Filter","options","call","this","Object","assign","gamma","saturation","contrast","brightness","red","green","blue","alpha","__proto__","prototype","create","constructor","apply","filterManager","input","output","clear","uniforms","Math","max","applyFilter","fragmentClamp","KawaseBlurFilter","blur","quality","clamp","uOffset","Float32Array","_pixelSize","Point","pixelSize","_clamp","_kernels","Array","isArray","kernels","_blur","prototypeAccessors","configurable","offset","uvX","x","_frame","width","uvY","y","height","_quality","tmp","renderTarget","getFilterTexture","source","target","last","i","returnFilterTexture","_generateKernels","k","step","push","get","set","value","length","round","defineProperties","ExtractBrightnessFilter","threshold","fragment$1","AdvancedBloomFilter","bloomScale","resolution","settings","RESOLUTION","_extractFilter","_blurFilter","currentState","brightTarget","bloomTarget","bloomTexture","_resolution","AsciiFilter","size","BevelFilter","lightColor","shadowColor","rotation","thickness","lightAlpha","shadowAlpha","_updateTransform","transformX","_thickness","cos","_angle","transformY","sin","DEG_TO_RAD","rgb2hex","hex2rgb","BloomFilter","kernelSize","blurX","blurY","blurXFilter","BlurFilterPass","blurYFilter","blendMode","BLEND_MODES","SCREEN","defaultFilter","AlphaFilter","BulgePinchFilter","center","radius","strength","dimensions","filterFrame","ColorMapFilter","colorMap","nearest","mix","_size","_sliceSize","_slicePixelSize","_sliceInnerSize","_scaleMode","_nearest","colorSize","_mix","_colorMap","Texture","from","baseTexture","scaleMode","mipmap","SCALE_MODES","NEAREST","LINEAR","texture","_glTextures","_updateID","emit","updateColorMap","destroy","destroyBase","ColorReplaceFilter","originalColor","newColor","epsilon","arr","_originalColor","_newColor","ConvolutionFilter","matrix","texelSize","undefined","this$1","forEach","v","CrossHatchFilter","CRTFilter","time","seed","curvature","lineWidth","lineContrast","verticalLine","noise","noiseSize","vignetting","vignettingAlpha","vignettingBlur","DotFilter","scale","angle","DropShadowFilter","console","warn","arguments","distance","color","shadowOnly","_tintFilter","shift","_updatePadding","padding","_updateShift","_distance","EmbossFilter","GlitchFilter","slices","direction","fillMode","average","minSize","sampleSize","_canvas","document","createElement","_slices","sizes","offsets","aspect","_randomizeSizes","_sizes","min","count","rest","averageWidth","w","random","rest$1","ratio","sqrt","i$1","w$1","shuffle","rand","temp","_randomizeOffsets","_offsets","refresh","redraw","ctx","getContext","clearRect","floor","fillStyle","fillRect","update","displacementMap","len","slicesWidth","slicesOffset","_direction","radians","sinDir","cosDir","TRANSPARENT","ORIGINAL","LOOP","CLAMP","MIRROR","GlowFilter","outerStrength","innerStrength","replace","toFixed","glowColor","perlin","GodrayFilter","gain","lacunarity","parallel","_angleLight","ref","light","MotionBlurFilter","velocity","uVelocity","_velocity","ObservablePoint","velocityChanged","uKernelSize","copy","MultiColorReplaceFilter","replacements","maxColors","_maxColors","_replacements","originalColors","targetColors","originals","targets","colorCount","pair","targetColor","OldFilmFilter","sepia","scratch","scratchDensity","scratchWidth","OutlineFilter","samples","MAX_SAMPLES","MIN_SAMPLES","angleStep","PI","outlineColor","PixelateFilter","RadialBlurFilter","uRadian","uCenter","uRadius","Infinity","ReflectionFilter","amplitude","waveLength","mirror","boundary","RGBSplitFilter","ShockwaveFilter","wavelength","speed","SimpleLightmapFilter","ambientColor","uLightmap","_color","TiltShiftAxisFilter","gradientBlur","start","end","window","innerHeight","delta","texSize","innerWidth","updateDelta","TiltShiftXFilter","dx","dy","d","TiltShiftYFilter","TiltShiftFilter","tiltShiftXFilter","tiltShiftYFilter","TwistFilter","ZoomBlurFilter","innerRadius","uStrength","uInnerRadius"],"mappings":";;;;;;;qDASA,IAAIA,EAAS,sRAETC,EAAW,4rBAwBXC,EAAiC,SAAUC,GAC3C,SAASD,EAAiBE,GACtBD,EAAOE,KAAKC,KAAMN,EAAQC,GAE1BM,OAAOC,OAAOF,KAAM,CAOhBG,MAAO,EAQPC,WAAY,EAQZC,SAAU,EAQVC,WAAY,EAQZC,IAAK,EAQLC,MAAO,EAQPC,KAAM,EAQNC,MAAO,GACRZ,GAwBP,OArBKD,IAASD,EAAiBe,UAAYd,GAC3CD,EAAiBgB,UAAYX,OAAOY,OAAQhB,GAAUA,EAAOe,WAC7DhB,EAAiBgB,UAAUE,YAAclB,EAMzCA,EAAiBgB,UAAUG,MAAQ,SAAgBC,EAAeC,EAAOC,EAAQC,GAC7EnB,KAAKoB,SAASjB,MAAQkB,KAAKC,IAAItB,KAAKG,MAAO,MAC3CH,KAAKoB,SAAShB,WAAaJ,KAAKI,WAChCJ,KAAKoB,SAASf,SAAWL,KAAKK,SAC9BL,KAAKoB,SAASd,WAAaN,KAAKM,WAChCN,KAAKoB,SAASb,IAAMP,KAAKO,IACzBP,KAAKoB,SAASZ,MAAQR,KAAKQ,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No newline at end of file +{"version":3,"file":"pixi-filters.js","sources":["../../filters/adjustment/lib/filter-adjustment.esm.js","../../filters/kawase-blur/lib/filter-kawase-blur.esm.js","../../filters/advanced-bloom/lib/filter-advanced-bloom.esm.js","../../filters/ascii/lib/filter-ascii.esm.js","../../filters/bevel/lib/filter-bevel.esm.js","../../filters/bloom/lib/filter-bloom.esm.js","../../filters/bulge-pinch/lib/filter-bulge-pinch.esm.js","../../filters/color-map/lib/filter-color-map.esm.js","../../filters/color-overlay/lib/filter-color-overlay.esm.js","../../filters/color-replace/lib/filter-color-replace.esm.js","../../filters/convolution/lib/filter-convolution.esm.js","../../filters/cross-hatch/lib/filter-cross-hatch.esm.js","../../filters/crt/lib/filter-crt.esm.js","../../filters/dot/lib/filter-dot.esm.js","../../filters/drop-shadow/lib/filter-drop-shadow.esm.js","../../filters/emboss/lib/filter-emboss.esm.js","../../filters/glitch/lib/filter-glitch.esm.js","../../filters/glow/lib/filter-glow.esm.js","../../filters/godray/lib/filter-godray.esm.js","../../filters/motion-blur/lib/filter-motion-blur.esm.js","../../filters/multi-color-replace/lib/filter-multi-color-replace.esm.js","../../filters/old-film/lib/filter-old-film.esm.js","../../filters/outline/lib/filter-outline.esm.js","../../filters/pixelate/lib/filter-pixelate.esm.js","../../filters/radial-blur/lib/filter-radial-blur.esm.js","../../filters/reflection/lib/filter-reflection.esm.js","../../filters/rgb-split/lib/filter-rgb-split.esm.js","../../filters/shockwave/lib/filter-shockwave.esm.js","../../filters/simple-lightmap/lib/filter-simple-lightmap.esm.js","../../filters/tilt-shift/lib/filter-tilt-shift.esm.js","../../filters/twist/lib/filter-twist.esm.js","../../filters/zoom-blur/lib/filter-zoom-blur.esm.js"],"sourcesContent":["/*!\n * @pixi/filter-adjustment - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-adjustment is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform float gamma;\\nuniform float contrast;\\nuniform float saturation;\\nuniform float brightness;\\nuniform float red;\\nuniform float green;\\nuniform float blue;\\nuniform float alpha;\\n\\nvoid main(void)\\n{\\n vec4 c = texture2D(uSampler, vTextureCoord);\\n\\n if (c.a > 0.0) {\\n c.rgb /= c.a;\\n\\n vec3 rgb = pow(c.rgb, vec3(1. / gamma));\\n rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, saturation), contrast);\\n rgb.r *= red;\\n rgb.g *= green;\\n rgb.b *= blue;\\n c.rgb = rgb * brightness;\\n\\n c.rgb *= c.a;\\n }\\n\\n gl_FragColor = c * alpha;\\n}\\n\";\n\n/**\n * The ability to adjust gamma, contrast, saturation, brightness, alpha or color-channel shift. This is a faster\n * and much simpler to use than {@link http://pixijs.download/release/docs/PIXI.filters.ColorMatrixFilter.html ColorMatrixFilter}\n * because it does not use a matrix.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/adjustment.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-adjustment|@pixi/filter-adjustment}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n *\n * @param {object|number} [options] - The optional parameters of the filter.\n * @param {number} [options.gamma=1] - The amount of luminance\n * @param {number} [options.saturation=1] - The amount of color saturation\n * @param {number} [options.contrast=1] - The amount of contrast\n * @param {number} [options.brightness=1] - The overall brightness\n * @param {number} [options.red=1] - The multipled red channel\n * @param {number} [options.green=1] - The multipled green channel\n * @param {number} [options.blue=1] - The multipled blue channel\n * @param {number} [options.alpha=1] - The overall alpha amount\n */\nvar AdjustmentFilter = /*@__PURE__*/(function (Filter) {\n function AdjustmentFilter(options) {\n Filter.call(this, vertex, fragment);\n\n Object.assign(this, {\n /**\n * The amount of luminance\n * @member {number}\n * @memberof PIXI.filters.AdjustmentFilter#\n * @default 1\n */\n gamma: 1,\n\n /**\n * The amount of saturation\n * @member {number}\n * @memberof PIXI.filters.AdjustmentFilter#\n * @default 1\n */\n saturation: 1,\n\n /**\n * The amount of contrast\n * @member {number}\n * @memberof PIXI.filters.AdjustmentFilter#\n * @default 1\n */\n contrast: 1,\n\n /**\n * The amount of brightness\n * @member {number}\n * @memberof PIXI.filters.AdjustmentFilter#\n * @default 1\n */\n brightness: 1,\n\n /**\n * The amount of red channel\n * @member {number}\n * @memberof PIXI.filters.AdjustmentFilter#\n * @default 1\n */\n red: 1,\n\n /**\n * The amount of green channel\n * @member {number}\n * @memberof PIXI.filters.AdjustmentFilter#\n * @default 1\n */\n green: 1,\n\n /**\n * The amount of blue channel\n * @member {number}\n * @memberof PIXI.filters.AdjustmentFilter#\n * @default 1\n */\n blue: 1,\n\n /**\n * The amount of alpha channel\n * @member {number}\n * @memberof PIXI.filters.AdjustmentFilter#\n * @default 1\n */\n alpha: 1,\n }, options);\n }\n\n if ( Filter ) AdjustmentFilter.__proto__ = Filter;\n AdjustmentFilter.prototype = Object.create( Filter && Filter.prototype );\n AdjustmentFilter.prototype.constructor = AdjustmentFilter;\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n AdjustmentFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n this.uniforms.gamma = Math.max(this.gamma, 0.0001);\n this.uniforms.saturation = this.saturation;\n this.uniforms.contrast = this.contrast;\n this.uniforms.brightness = this.brightness;\n this.uniforms.red = this.red;\n this.uniforms.green = this.green;\n this.uniforms.blue = this.blue;\n this.uniforms.alpha = this.alpha;\n\n filterManager.applyFilter(this, input, output, clear);\n };\n\n return AdjustmentFilter;\n}(Filter));\n\nexport { AdjustmentFilter };\n//# sourceMappingURL=filter-adjustment.esm.js.map\n","/*!\n * @pixi/filter-kawase-blur - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-kawase-blur is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { Point } from '@pixi/math';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"\\nvarying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec2 uOffset;\\n\\nvoid main(void)\\n{\\n vec4 color = vec4(0.0);\\n\\n // Sample top left pixel\\n color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y));\\n\\n // Sample top right pixel\\n color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y));\\n\\n // Sample bottom right pixel\\n color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y));\\n\\n // Sample bottom left pixel\\n color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y));\\n\\n // Average\\n color *= 0.25;\\n\\n gl_FragColor = color;\\n}\";\n\nvar fragmentClamp = \"\\nvarying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec2 uOffset;\\nuniform vec4 filterClamp;\\n\\nvoid main(void)\\n{\\n vec4 color = vec4(0.0);\\n\\n // Sample top left pixel\\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw));\\n\\n // Sample top right pixel\\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw));\\n\\n // Sample bottom right pixel\\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw));\\n\\n // Sample bottom left pixel\\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw));\\n\\n // Average\\n color *= 0.25;\\n\\n gl_FragColor = color;\\n}\\n\";\n\n/**\n * A much faster blur than Gaussian blur, but more complicated to use.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/kawase-blur.png)\n *\n * @see https://software.intel.com/en-us/blogs/2014/07/15/an-investigation-of-fast-real-time-gpu-based-image-blur-algorithms\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-kawase-blur|@pixi/filter-kawase-blur}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {number|number[]} [blur=4] - The blur of the filter. Should be greater than `0`. If\n * value is an Array, setting kernels.\n * @param {number} [quality=3] - The quality of the filter. Should be an integer greater than `1`.\n * @param {boolean} [clamp=false] - Clamp edges, useful for removing dark edges\n * from fullscreen filters or bleeding to the edge of filterArea.\n */\nvar KawaseBlurFilter = /*@__PURE__*/(function (Filter) {\n function KawaseBlurFilter(blur, quality, clamp) {\n if ( blur === void 0 ) blur = 4;\n if ( quality === void 0 ) quality = 3;\n if ( clamp === void 0 ) clamp = false;\n\n Filter.call(this, vertex, clamp ? fragmentClamp : fragment);\n this.uniforms.uOffset = new Float32Array(2);\n\n this._pixelSize = new Point();\n this.pixelSize = 1;\n this._clamp = clamp;\n this._kernels = null;\n\n // if `blur` is array , as kernels\n if (Array.isArray(blur)) {\n this.kernels = blur;\n }\n else {\n this._blur = blur;\n this.quality = quality;\n }\n }\n\n if ( Filter ) KawaseBlurFilter.__proto__ = Filter;\n KawaseBlurFilter.prototype = Object.create( Filter && Filter.prototype );\n KawaseBlurFilter.prototype.constructor = KawaseBlurFilter;\n\n var prototypeAccessors = { kernels: { configurable: true },clamp: { configurable: true },pixelSize: { configurable: true },quality: { configurable: true },blur: { configurable: true } };\n\n /**\n * Overrides apply\n * @private\n */\n KawaseBlurFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n var uvX = this.pixelSize.x / input._frame.width;\n var uvY = this.pixelSize.y / input._frame.height;\n var offset;\n\n if (this._quality === 1 || this._blur === 0) {\n offset = this._kernels[0] + 0.5;\n this.uniforms.uOffset[0] = offset * uvX;\n this.uniforms.uOffset[1] = offset * uvY;\n filterManager.applyFilter(this, input, output, clear);\n }\n else {\n var renderTarget = filterManager.getFilterTexture();\n\n var source = input;\n var target = renderTarget;\n var tmp;\n\n var last = this._quality - 1;\n\n for (var i = 0; i < last; i++) {\n offset = this._kernels[i] + 0.5;\n this.uniforms.uOffset[0] = offset * uvX;\n this.uniforms.uOffset[1] = offset * uvY;\n filterManager.applyFilter(this, source, target, 1);\n\n tmp = source;\n source = target;\n target = tmp;\n }\n offset = this._kernels[last] + 0.5;\n this.uniforms.uOffset[0] = offset * uvX;\n this.uniforms.uOffset[1] = offset * uvY;\n filterManager.applyFilter(this, source, output, clear);\n\n filterManager.returnFilterTexture(renderTarget);\n }\n };\n\n /**\n * Auto generate kernels by blur & quality\n * @private\n */\n KawaseBlurFilter.prototype._generateKernels = function _generateKernels () {\n var blur = this._blur;\n var quality = this._quality;\n var kernels = [ blur ];\n\n if (blur > 0) {\n var k = blur;\n var step = blur / quality;\n\n for (var i = 1; i < quality; i++) {\n k -= step;\n kernels.push(k);\n }\n }\n\n this._kernels = kernels;\n };\n\n /**\n * The kernel size of the blur filter, for advanced usage.\n *\n * @member {number[]}\n * @default [0]\n */\n prototypeAccessors.kernels.get = function () {\n return this._kernels;\n };\n prototypeAccessors.kernels.set = function (value) {\n if (Array.isArray(value) && value.length > 0) {\n this._kernels = value;\n this._quality = value.length;\n this._blur = Math.max.apply(Math, value);\n }\n else {\n // if value is invalid , set default value\n this._kernels = [0];\n this._quality = 1;\n }\n };\n\n /**\n * Get the if the filter is clampped.\n *\n * @readonly\n * @member {boolean}\n * @default false\n */\n prototypeAccessors.clamp.get = function () {\n return this._clamp;\n };\n\n /**\n * Sets the pixel size of the filter. Large size is blurrier. For advanced usage.\n *\n * @member {PIXI.Point|number[]}\n * @default [1, 1]\n */\n prototypeAccessors.pixelSize.set = function (value) {\n if (typeof value === 'number') {\n this._pixelSize.x = value;\n this._pixelSize.y = value;\n }\n else if (Array.isArray(value)) {\n this._pixelSize.x = value[0];\n this._pixelSize.y = value[1];\n }\n else if (value instanceof Point) {\n this._pixelSize.x = value.x;\n this._pixelSize.y = value.y;\n }\n else {\n // if value is invalid , set default value\n this._pixelSize.x = 1;\n this._pixelSize.y = 1;\n }\n };\n prototypeAccessors.pixelSize.get = function () {\n return this._pixelSize;\n };\n\n /**\n * The quality of the filter, integer greater than `1`.\n *\n * @member {number}\n * @default 3\n */\n prototypeAccessors.quality.get = function () {\n return this._quality;\n };\n prototypeAccessors.quality.set = function (value) {\n this._quality = Math.max(1, Math.round(value));\n this._generateKernels();\n };\n\n /**\n * The amount of blur, value greater than `0`.\n *\n * @member {number}\n * @default 4\n */\n prototypeAccessors.blur.get = function () {\n return this._blur;\n };\n prototypeAccessors.blur.set = function (value) {\n this._blur = value;\n this._generateKernels();\n };\n\n Object.defineProperties( KawaseBlurFilter.prototype, prototypeAccessors );\n\n return KawaseBlurFilter;\n}(Filter));\n\nexport { KawaseBlurFilter };\n//# sourceMappingURL=filter-kawase-blur.esm.js.map\n","/*!\n * @pixi/filter-advanced-bloom - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-advanced-bloom is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { KawaseBlurFilter } from '@pixi/filter-kawase-blur';\nimport { settings } from '@pixi/settings';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"\\nuniform sampler2D uSampler;\\nvarying vec2 vTextureCoord;\\n\\nuniform float threshold;\\n\\nvoid main() {\\n vec4 color = texture2D(uSampler, vTextureCoord);\\n\\n // A simple & fast algorithm for getting brightness.\\n // It's inaccuracy , but good enought for this feature.\\n float _max = max(max(color.r, color.g), color.b);\\n float _min = min(min(color.r, color.g), color.b);\\n float brightness = (_max + _min) * 0.5;\\n\\n if(brightness > threshold) {\\n gl_FragColor = color;\\n } else {\\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\\n }\\n}\\n\";\n\n/**\n * Internal filter for AdvancedBloomFilter to get brightness.\n * @class\n * @private\n * @param {number} [threshold=0.5] Defines how bright a color needs to be extracted.\n */\nvar ExtractBrightnessFilter = /*@__PURE__*/(function (Filter) {\n function ExtractBrightnessFilter(threshold) {\n if ( threshold === void 0 ) threshold = 0.5;\n\n Filter.call(this, vertex, fragment);\n\n this.threshold = threshold;\n }\n\n if ( Filter ) ExtractBrightnessFilter.__proto__ = Filter;\n ExtractBrightnessFilter.prototype = Object.create( Filter && Filter.prototype );\n ExtractBrightnessFilter.prototype.constructor = ExtractBrightnessFilter;\n\n var prototypeAccessors = { threshold: { configurable: true } };\n\n /**\n * Defines how bright a color needs to be extracted.\n *\n * @member {number}\n * @default 0.5\n */\n prototypeAccessors.threshold.get = function () {\n return this.uniforms.threshold;\n };\n prototypeAccessors.threshold.set = function (value) {\n this.uniforms.threshold = value;\n };\n\n Object.defineProperties( ExtractBrightnessFilter.prototype, prototypeAccessors );\n\n return ExtractBrightnessFilter;\n}(Filter));\n\nvar fragment$1 = \"uniform sampler2D uSampler;\\nvarying vec2 vTextureCoord;\\n\\nuniform sampler2D bloomTexture;\\nuniform float bloomScale;\\nuniform float brightness;\\n\\nvoid main() {\\n vec4 color = texture2D(uSampler, vTextureCoord);\\n color.rgb *= brightness;\\n vec4 bloomColor = vec4(texture2D(bloomTexture, vTextureCoord).rgb, 0.0);\\n bloomColor.rgb *= bloomScale;\\n gl_FragColor = color + bloomColor;\\n}\\n\";\n\n/**\n * The AdvancedBloomFilter applies a Bloom Effect to an object. Unlike the normal BloomFilter\n * this had some advanced controls for adjusting the look of the bloom. Note: this filter\n * is slower than normal BloomFilter.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/advanced-bloom.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-advanced-bloom|@pixi/filter-advanced-bloom}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n *\n * @param {object|number} [options] - The optional parameters of advanced bloom filter.\n * When options is a number , it will be `options.threshold`.\n * @param {number} [options.threshold=0.5] - Defines how bright a color needs to be to affect bloom.\n * @param {number} [options.bloomScale=1.0] - To adjust the strength of the bloom. Higher values is more intense brightness.\n * @param {number} [options.brightness=1.0] - The brightness, lower value is more subtle brightness, higher value is blown-out.\n * @param {number} [options.blur=8] - Sets the strength of the Blur properties simultaneously\n * @param {number} [options.quality=4] - The quality of the Blur filter.\n * @param {number[]} [options.kernels=null] - The kernels of the Blur filter.\n * @param {number|number[]|PIXI.Point} [options.pixelSize=1] - the pixelSize of the Blur filter.\n * @param {number} [options.resolution=PIXI.settings.RESOLUTION] - The resolution of the Blur filter.\n */\nvar AdvancedBloomFilter = /*@__PURE__*/(function (Filter) {\n function AdvancedBloomFilter(options) {\n\n Filter.call(this, vertex, fragment$1);\n\n if (typeof options === 'number') {\n options = { threshold: options };\n }\n\n options = Object.assign({\n threshold: 0.5,\n bloomScale: 1.0,\n brightness: 1.0,\n kernels: null,\n blur: 8,\n quality: 4,\n pixelSize: 1,\n resolution: settings.RESOLUTION,\n }, options);\n\n /**\n * To adjust the strength of the bloom. Higher values is more intense brightness.\n *\n * @member {number}\n * @default 1.0\n */\n this.bloomScale = options.bloomScale;\n\n /**\n * The brightness, lower value is more subtle brightness, higher value is blown-out.\n *\n * @member {number}\n * @default 1.0\n */\n this.brightness = options.brightness;\n\n var kernels = options.kernels;\n var blur = options.blur;\n var quality = options.quality;\n var pixelSize = options.pixelSize;\n var resolution = options.resolution;\n\n this._extractFilter = new ExtractBrightnessFilter(options.threshold);\n this._extractFilter.resolution = resolution;\n this._blurFilter = kernels ?\n new KawaseBlurFilter(kernels) :\n new KawaseBlurFilter(blur, quality);\n this.pixelSize = pixelSize;\n this.resolution = resolution;\n }\n\n if ( Filter ) AdvancedBloomFilter.__proto__ = Filter;\n AdvancedBloomFilter.prototype = Object.create( Filter && Filter.prototype );\n AdvancedBloomFilter.prototype.constructor = AdvancedBloomFilter;\n\n var prototypeAccessors = { resolution: { configurable: true },threshold: { configurable: true },kernels: { configurable: true },blur: { configurable: true },quality: { configurable: true },pixelSize: { configurable: true } };\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n AdvancedBloomFilter.prototype.apply = function apply (filterManager, input, output, clear, currentState) {\n\n var brightTarget = filterManager.getFilterTexture();\n\n this._extractFilter.apply(filterManager, input, brightTarget, 1, currentState);\n\n var bloomTarget = filterManager.getFilterTexture();\n\n this._blurFilter.apply(filterManager, brightTarget, bloomTarget, 1, currentState);\n\n this.uniforms.bloomScale = this.bloomScale;\n this.uniforms.brightness = this.brightness;\n this.uniforms.bloomTexture = bloomTarget;\n\n filterManager.applyFilter(this, input, output, clear);\n\n filterManager.returnFilterTexture(bloomTarget);\n filterManager.returnFilterTexture(brightTarget);\n };\n\n /**\n * The resolution of the filter.\n *\n * @member {number}\n */\n prototypeAccessors.resolution.get = function () {\n return this._resolution;\n };\n prototypeAccessors.resolution.set = function (value) {\n this._resolution = value;\n\n if (this._extractFilter) {\n this._extractFilter.resolution = value;\n }\n if (this._blurFilter) {\n this._blurFilter.resolution = value;\n }\n };\n\n /**\n * Defines how bright a color needs to be to affect bloom.\n *\n * @member {number}\n * @default 0.5\n */\n prototypeAccessors.threshold.get = function () {\n return this._extractFilter.threshold;\n };\n prototypeAccessors.threshold.set = function (value) {\n this._extractFilter.threshold = value;\n };\n\n /**\n * Sets the kernels of the Blur Filter\n *\n * @member {number}\n * @default 4\n */\n prototypeAccessors.kernels.get = function () {\n return this._blurFilter.kernels;\n };\n prototypeAccessors.kernels.set = function (value) {\n this._blurFilter.kernels = value;\n };\n\n /**\n * Sets the strength of the Blur properties simultaneously\n *\n * @member {number}\n * @default 2\n */\n prototypeAccessors.blur.get = function () {\n return this._blurFilter.blur;\n };\n prototypeAccessors.blur.set = function (value) {\n this._blurFilter.blur = value;\n };\n\n /**\n * Sets the quality of the Blur Filter\n *\n * @member {number}\n * @default 4\n */\n prototypeAccessors.quality.get = function () {\n return this._blurFilter.quality;\n };\n prototypeAccessors.quality.set = function (value) {\n this._blurFilter.quality = value;\n };\n\n /**\n * Sets the pixelSize of the Kawase Blur filter\n *\n * @member {number|number[]|PIXI.Point}\n * @default 1\n */\n prototypeAccessors.pixelSize.get = function () {\n return this._blurFilter.pixelSize;\n };\n prototypeAccessors.pixelSize.set = function (value) {\n this._blurFilter.pixelSize = value;\n };\n\n Object.defineProperties( AdvancedBloomFilter.prototype, prototypeAccessors );\n\n return AdvancedBloomFilter;\n}(Filter));\n\nexport { AdvancedBloomFilter };\n//# sourceMappingURL=filter-advanced-bloom.esm.js.map\n","/*!\n * @pixi/filter-ascii - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-ascii is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\n\\nuniform vec4 filterArea;\\nuniform float pixelSize;\\nuniform sampler2D uSampler;\\n\\nvec2 mapCoord( vec2 coord )\\n{\\n coord *= filterArea.xy;\\n coord += filterArea.zw;\\n\\n return coord;\\n}\\n\\nvec2 unmapCoord( vec2 coord )\\n{\\n coord -= filterArea.zw;\\n coord /= filterArea.xy;\\n\\n return coord;\\n}\\n\\nvec2 pixelate(vec2 coord, vec2 size)\\n{\\n return floor( coord / size ) * size;\\n}\\n\\nvec2 getMod(vec2 coord, vec2 size)\\n{\\n return mod( coord , size) / size;\\n}\\n\\nfloat character(float n, vec2 p)\\n{\\n p = floor(p*vec2(4.0, -4.0) + 2.5);\\n\\n if (clamp(p.x, 0.0, 4.0) == p.x)\\n {\\n if (clamp(p.y, 0.0, 4.0) == p.y)\\n {\\n if (int(mod(n/exp2(p.x + 5.0*p.y), 2.0)) == 1) return 1.0;\\n }\\n }\\n return 0.0;\\n}\\n\\nvoid main()\\n{\\n vec2 coord = mapCoord(vTextureCoord);\\n\\n // get the rounded color..\\n vec2 pixCoord = pixelate(coord, vec2(pixelSize));\\n pixCoord = unmapCoord(pixCoord);\\n\\n vec4 color = texture2D(uSampler, pixCoord);\\n\\n // determine the character to use\\n float gray = (color.r + color.g + color.b) / 3.0;\\n\\n float n = 65536.0; // .\\n if (gray > 0.2) n = 65600.0; // :\\n if (gray > 0.3) n = 332772.0; // *\\n if (gray > 0.4) n = 15255086.0; // o\\n if (gray > 0.5) n = 23385164.0; // &\\n if (gray > 0.6) n = 15252014.0; // 8\\n if (gray > 0.7) n = 13199452.0; // @\\n if (gray > 0.8) n = 11512810.0; // #\\n\\n // get the mod..\\n vec2 modd = getMod(coord, vec2(pixelSize));\\n\\n gl_FragColor = color * character( n, vec2(-1.0) + modd * 2.0);\\n\\n}\\n\";\n\n// TODO (cengler) - The Y is flipped in this shader for some reason.\n\n/**\n * @author Vico @vicocotea\n * original shader : https://www.shadertoy.com/view/lssGDj by @movAX13h\n */\n\n/**\n * An ASCII filter.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/ascii.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-ascii|@pixi/filter-ascii}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {number} [size=8] Size of the font\n */\nvar AsciiFilter = /*@__PURE__*/(function (Filter) {\n function AsciiFilter(size) {\n if ( size === void 0 ) size = 8;\n\n Filter.call(this, vertex, fragment);\n this.size = size;\n }\n\n if ( Filter ) AsciiFilter.__proto__ = Filter;\n AsciiFilter.prototype = Object.create( Filter && Filter.prototype );\n AsciiFilter.prototype.constructor = AsciiFilter;\n\n var prototypeAccessors = { size: { configurable: true } };\n\n /**\n * The pixel size used by the filter.\n *\n * @member {number}\n */\n prototypeAccessors.size.get = function () {\n return this.uniforms.pixelSize;\n };\n prototypeAccessors.size.set = function (value) {\n this.uniforms.pixelSize = value;\n };\n\n Object.defineProperties( AsciiFilter.prototype, prototypeAccessors );\n\n return AsciiFilter;\n}(Filter));\n\nexport { AsciiFilter };\n//# sourceMappingURL=filter-ascii.esm.js.map\n","/*!\n * @pixi/filter-bevel - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-bevel is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { DEG_TO_RAD } from '@pixi/math';\nimport { rgb2hex, hex2rgb } from '@pixi/utils';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"precision mediump float;\\n\\nvarying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec4 filterArea;\\n\\nuniform float transformX;\\nuniform float transformY;\\nuniform vec3 lightColor;\\nuniform float lightAlpha;\\nuniform vec3 shadowColor;\\nuniform float shadowAlpha;\\n\\nvoid main(void) {\\n vec2 transform = vec2(1.0 / filterArea) * vec2(transformX, transformY);\\n vec4 color = texture2D(uSampler, vTextureCoord);\\n float light = texture2D(uSampler, vTextureCoord - transform).a;\\n float shadow = texture2D(uSampler, vTextureCoord + transform).a;\\n\\n color.rgb = mix(color.rgb, lightColor, clamp((color.a - light) * lightAlpha, 0.0, 1.0));\\n color.rgb = mix(color.rgb, shadowColor, clamp((color.a - shadow) * shadowAlpha, 0.0, 1.0));\\n gl_FragColor = vec4(color.rgb * color.a, color.a);\\n}\\n\";\n\n/**\n * Bevel Filter.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/bevel.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-bevel|@pixi/filter-bevel}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {object} [options] - The optional parameters of the filter.\n * @param {number} [options.rotation = 45] - The angle of the light in degrees.\n * @param {number} [options.thickness = 2] - The tickness of the bevel.\n * @param {number} [options.lightColor = 0xffffff] - Color of the light.\n * @param {number} [options.lightAlpha = 0.7] - Alpha of the light.\n * @param {number} [options.shadowColor = 0x000000] - Color of the shadow.\n * @param {number} [options.shadowAlpha = 0.7] - Alpha of the shadow.\n */\nvar BevelFilter = /*@__PURE__*/(function (Filter) {\n function BevelFilter(options) {\n if ( options === void 0 ) options = {};\n\n Filter.call(this, vertex, fragment);\n\n this.uniforms.lightColor = new Float32Array(3);\n this.uniforms.shadowColor = new Float32Array(3);\n\n options = Object.assign({\n rotation: 45,\n thickness: 2,\n lightColor: 0xffffff,\n lightAlpha: 0.7,\n shadowColor: 0x000000,\n shadowAlpha: 0.7,\n }, options);\n\n /**\n * The angle of the light in degrees.\n * @member {number}\n * @default 45\n */\n this.rotation = options.rotation;\n\n /**\n * The tickness of the bevel.\n * @member {number}\n * @default 2\n */\n this.thickness = options.thickness;\n\n /**\n * Color of the light.\n * @member {number}\n * @default 0xffffff\n */\n this.lightColor = options.lightColor;\n\n /**\n * Alpha of the light.\n * @member {number}\n * @default 0.7\n */\n this.lightAlpha = options.lightAlpha;\n\n /**\n * Color of the shadow.\n * @member {number}\n * @default 0x000000\n */\n this.shadowColor = options.shadowColor;\n\n /**\n * Alpha of the shadow.\n * @member {number}\n * @default 0.7\n */\n this.shadowAlpha = options.shadowAlpha;\n\n }\n\n if ( Filter ) BevelFilter.__proto__ = Filter;\n BevelFilter.prototype = Object.create( Filter && Filter.prototype );\n BevelFilter.prototype.constructor = BevelFilter;\n\n var prototypeAccessors = { rotation: { configurable: true },thickness: { configurable: true },lightColor: { configurable: true },lightAlpha: { configurable: true },shadowColor: { configurable: true },shadowAlpha: { configurable: true } };\n\n /**\n * Update the transform matrix of offset angle.\n * @private\n */\n BevelFilter.prototype._updateTransform = function _updateTransform () {\n this.uniforms.transformX = this._thickness * Math.cos(this._angle);\n this.uniforms.transformY = this._thickness * Math.sin(this._angle);\n };\n\n prototypeAccessors.rotation.get = function () {\n return this._angle / DEG_TO_RAD;\n };\n prototypeAccessors.rotation.set = function (value) {\n this._angle = value * DEG_TO_RAD;\n this._updateTransform();\n };\n\n prototypeAccessors.thickness.get = function () {\n return this._thickness;\n };\n prototypeAccessors.thickness.set = function (value) {\n this._thickness = value;\n this._updateTransform();\n };\n\n prototypeAccessors.lightColor.get = function () {\n return rgb2hex(this.uniforms.lightColor);\n };\n prototypeAccessors.lightColor.set = function (value) {\n hex2rgb(value, this.uniforms.lightColor);\n };\n\n prototypeAccessors.lightAlpha.get = function () {\n return this.uniforms.lightAlpha;\n };\n prototypeAccessors.lightAlpha.set = function (value) {\n this.uniforms.lightAlpha = value;\n };\n\n prototypeAccessors.shadowColor.get = function () {\n return rgb2hex(this.uniforms.shadowColor);\n };\n prototypeAccessors.shadowColor.set = function (value) {\n hex2rgb(value, this.uniforms.shadowColor);\n };\n\n prototypeAccessors.shadowAlpha.get = function () {\n return this.uniforms.shadowAlpha;\n };\n prototypeAccessors.shadowAlpha.set = function (value) {\n this.uniforms.shadowAlpha = value;\n };\n\n Object.defineProperties( BevelFilter.prototype, prototypeAccessors );\n\n return BevelFilter;\n}(Filter));\n\nexport { BevelFilter };\n//# sourceMappingURL=filter-bevel.esm.js.map\n","/*!\n * @pixi/filter-bloom - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-bloom is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { BLEND_MODES } from '@pixi/constants';\nimport { AlphaFilter } from '@pixi/filter-alpha';\nimport { BlurFilterPass } from '@pixi/filter-blur';\nimport { settings } from '@pixi/settings';\nimport { Point } from '@pixi/math';\n\n/**\n * The BloomFilter applies a Gaussian blur to an object.\n * The strength of the blur can be set for x- and y-axis separately.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/bloom.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-bloom|@pixi/filter-bloom}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {number|PIXI.Point|number[]} [blur=2] Sets the strength of both the blurX and blurY properties simultaneously\n * @param {number} [quality=4] The quality of the blurX & blurY filter.\n * @param {number} [resolution=PIXI.settings.RESOLUTION] The resolution of the blurX & blurY filter.\n * @param {number} [kernelSize=5] The kernelSize of the blurX & blurY filter.Options: 5, 7, 9, 11, 13, 15.\n */\nvar BloomFilter = /*@__PURE__*/(function (Filter) {\n function BloomFilter(blur, quality, resolution, kernelSize) {\n if ( blur === void 0 ) blur = 2;\n if ( quality === void 0 ) quality = 4;\n if ( resolution === void 0 ) resolution = settings.RESOLUTION;\n if ( kernelSize === void 0 ) kernelSize = 5;\n\n Filter.call(this);\n\n var blurX;\n var blurY;\n\n if (typeof blur === 'number') {\n blurX = blur;\n blurY = blur;\n }\n else if (blur instanceof Point) {\n blurX = blur.x;\n blurY = blur.y;\n }\n else if (Array.isArray(blur)) {\n blurX = blur[0];\n blurY = blur[1];\n }\n\n this.blurXFilter = new BlurFilterPass(true, blurX, quality, resolution, kernelSize);\n this.blurYFilter = new BlurFilterPass(false, blurY, quality, resolution, kernelSize);\n this.blurYFilter.blendMode = BLEND_MODES.SCREEN;\n this.defaultFilter = new AlphaFilter();\n }\n\n if ( Filter ) BloomFilter.__proto__ = Filter;\n BloomFilter.prototype = Object.create( Filter && Filter.prototype );\n BloomFilter.prototype.constructor = BloomFilter;\n\n var prototypeAccessors = { blur: { configurable: true },blurX: { configurable: true },blurY: { configurable: true } };\n\n BloomFilter.prototype.apply = function apply (filterManager, input, output) {\n var renderTarget = filterManager.getFilterTexture(true);\n\n //TODO - copyTexSubImage2D could be used here?\n this.defaultFilter.apply(filterManager, input, output);\n\n this.blurXFilter.apply(filterManager, input, renderTarget);\n this.blurYFilter.apply(filterManager, renderTarget, output);\n\n filterManager.returnFilterTexture(renderTarget);\n };\n\n /**\n * Sets the strength of both the blurX and blurY properties simultaneously\n *\n * @member {number}\n * @default 2\n */\n prototypeAccessors.blur.get = function () {\n return this.blurXFilter.blur;\n };\n prototypeAccessors.blur.set = function (value) {\n this.blurXFilter.blur = this.blurYFilter.blur = value;\n };\n\n /**\n * Sets the strength of the blurX property\n *\n * @member {number}\n * @default 2\n */\n prototypeAccessors.blurX.get = function () {\n return this.blurXFilter.blur;\n };\n prototypeAccessors.blurX.set = function (value) {\n this.blurXFilter.blur = value;\n };\n\n /**\n * Sets the strength of the blurY property\n *\n * @member {number}\n * @default 2\n */\n prototypeAccessors.blurY.get = function () {\n return this.blurYFilter.blur;\n };\n prototypeAccessors.blurY.set = function (value) {\n this.blurYFilter.blur = value;\n };\n\n Object.defineProperties( BloomFilter.prototype, prototypeAccessors );\n\n return BloomFilter;\n}(Filter));\n\nexport { BloomFilter };\n//# sourceMappingURL=filter-bloom.esm.js.map\n","/*!\n * @pixi/filter-bulge-pinch - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-bulge-pinch is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"uniform float radius;\\nuniform float strength;\\nuniform vec2 center;\\nuniform sampler2D uSampler;\\nvarying vec2 vTextureCoord;\\n\\nuniform vec4 filterArea;\\nuniform vec4 filterClamp;\\nuniform vec2 dimensions;\\n\\nvoid main()\\n{\\n vec2 coord = vTextureCoord * filterArea.xy;\\n coord -= center * dimensions.xy;\\n float distance = length(coord);\\n if (distance < radius) {\\n float percent = distance / radius;\\n if (strength > 0.0) {\\n coord *= mix(1.0, smoothstep(0.0, radius / distance, percent), strength * 0.75);\\n } else {\\n coord *= mix(1.0, pow(percent, 1.0 + strength * 0.75) * radius / distance, 1.0 - percent);\\n }\\n }\\n coord += center * dimensions.xy;\\n coord /= filterArea.xy;\\n vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw);\\n vec4 color = texture2D(uSampler, clampedCoord);\\n if (coord != clampedCoord) {\\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\\n }\\n\\n gl_FragColor = color;\\n}\\n\";\n\n/**\n * @author Julien CLEREL @JuloxRox\n * original filter https://github.com/evanw/glfx.js/blob/master/src/filters/warp/bulgepinch.js by Evan Wallace : http://madebyevan.com/\n */\n\n/**\n * Bulges or pinches the image in a circle.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/bulge-pinch.gif)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-bulge-pinch|@pixi/filter-bulge-pinch}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {object} [options] Options to use for filter.\n * @param {PIXI.Point|Array} [options.center=[0,0]] The x and y coordinates of the center of the circle of effect.\n * @param {number} [options.radius=100] The radius of the circle of effect.\n * @param {number} [options.strength=1] -1 to 1 (-1 is strong pinch, 0 is no effect, 1 is strong bulge)\n */\nvar BulgePinchFilter = /*@__PURE__*/(function (Filter) {\n function BulgePinchFilter(options) {\n Filter.call(this, vertex, fragment);\n\n // @deprecated (center, radius, strength) args\n if (typeof options !== 'object') {\n var center = arguments[0];\n var radius = arguments[1];\n var strength = arguments[2];\n options = {};\n if (center !== undefined) {\n options.center = center;\n }\n if (radius !== undefined) {\n options.radius = radius;\n }\n if (strength !== undefined) {\n options.strength = strength;\n }\n }\n\n this.uniforms.dimensions = new Float32Array(2);\n\n Object.assign(this, {\n center: [0.5, 0.5],\n radius: 100,\n strength: 1,\n }, options);\n }\n\n if ( Filter ) BulgePinchFilter.__proto__ = Filter;\n BulgePinchFilter.prototype = Object.create( Filter && Filter.prototype );\n BulgePinchFilter.prototype.constructor = BulgePinchFilter;\n\n var prototypeAccessors = { radius: { configurable: true },strength: { configurable: true },center: { configurable: true } };\n\n BulgePinchFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n this.uniforms.dimensions[0] = input.filterFrame.width;\n this.uniforms.dimensions[1] = input.filterFrame.height;\n filterManager.applyFilter(this, input, output, clear);\n };\n\n /**\n * The radius of the circle of effect.\n *\n * @member {number}\n */\n prototypeAccessors.radius.get = function () {\n return this.uniforms.radius;\n };\n prototypeAccessors.radius.set = function (value) {\n this.uniforms.radius = value;\n };\n\n /**\n * The strength of the effect. -1 to 1 (-1 is strong pinch, 0 is no effect, 1 is strong bulge)\n *\n * @member {number}\n */\n prototypeAccessors.strength.get = function () {\n return this.uniforms.strength;\n };\n prototypeAccessors.strength.set = function (value) {\n this.uniforms.strength = value;\n };\n\n /**\n * The x and y coordinates of the center of the circle of effect.\n *\n * @member {PIXI.Point}\n */\n prototypeAccessors.center.get = function () {\n return this.uniforms.center;\n };\n prototypeAccessors.center.set = function (value) {\n this.uniforms.center = value;\n };\n\n Object.defineProperties( BulgePinchFilter.prototype, prototypeAccessors );\n\n return BulgePinchFilter;\n}(Filter));\n\nexport { BulgePinchFilter };\n//# sourceMappingURL=filter-bulge-pinch.esm.js.map\n","/*!\n * @pixi/filter-color-map - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-color-map is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Texture, Filter } from '@pixi/core';\nimport { SCALE_MODES } from '@pixi/constants';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform sampler2D colorMap;\\nuniform float _mix;\\nuniform float _size;\\nuniform float _sliceSize;\\nuniform float _slicePixelSize;\\nuniform float _sliceInnerSize;\\nvoid main() {\\n vec4 color = texture2D(uSampler, vTextureCoord.xy);\\n\\n vec4 adjusted;\\n if (color.a > 0.0) {\\n color.rgb /= color.a;\\n float innerWidth = _size - 1.0;\\n float zSlice0 = min(floor(color.b * innerWidth), innerWidth);\\n float zSlice1 = min(zSlice0 + 1.0, innerWidth);\\n float xOffset = _slicePixelSize * 0.5 + color.r * _sliceInnerSize;\\n float s0 = xOffset + (zSlice0 * _sliceSize);\\n float s1 = xOffset + (zSlice1 * _sliceSize);\\n float yOffset = _sliceSize * 0.5 + color.g * (1.0 - _sliceSize);\\n vec4 slice0Color = texture2D(colorMap, vec2(s0,yOffset));\\n vec4 slice1Color = texture2D(colorMap, vec2(s1,yOffset));\\n float zOffset = fract(color.b * innerWidth);\\n adjusted = mix(slice0Color, slice1Color, zOffset);\\n\\n color.rgb *= color.a;\\n }\\n gl_FragColor = vec4(mix(color, adjusted, _mix).rgb, color.a);\\n\\n}\";\n\n/**\n * The ColorMapFilter applies a color-map effect to an object.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/color-map.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-color-map|@pixi/filter-color-map}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {HTMLImageElement|HTMLCanvasElement|PIXI.BaseTexture|PIXI.Texture} [colorMap] - The colorMap texture of the filter.\n * @param {boolean} [nearest=false] - Whether use NEAREST for colorMap texture.\n * @param {number} [mix=1] - The mix from 0 to 1, where 0 is the original image and 1 is the color mapped image.\n */\nvar ColorMapFilter = /*@__PURE__*/(function (Filter) {\n function ColorMapFilter(colorMap, nearest, mix) {\n if ( nearest === void 0 ) nearest = false;\n if ( mix === void 0 ) mix = 1;\n\n Filter.call(this, vertex, fragment);\n\n this._size = 0;\n this._sliceSize = 0;\n this._slicePixelSize = 0;\n this._sliceInnerSize = 0;\n\n this._scaleMode = null;\n this._nearest = false;\n this.nearest = nearest;\n\n /**\n * The mix from 0 to 1, where 0 is the original image and 1 is the color mapped image.\n * @member {number}\n */\n this.mix = mix;\n\n this.colorMap = colorMap;\n }\n\n if ( Filter ) ColorMapFilter.__proto__ = Filter;\n ColorMapFilter.prototype = Object.create( Filter && Filter.prototype );\n ColorMapFilter.prototype.constructor = ColorMapFilter;\n\n var prototypeAccessors = { colorSize: { configurable: true },colorMap: { configurable: true },nearest: { configurable: true } };\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n ColorMapFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n this.uniforms._mix = this.mix;\n\n filterManager.applyFilter(this, input, output, clear);\n };\n\n /**\n * the size of one color slice\n * @member {number}\n * @readonly\n */\n prototypeAccessors.colorSize.get = function () {\n return this._size;\n };\n\n /**\n * the colorMap texture\n * @member {PIXI.Texture}\n */\n prototypeAccessors.colorMap.get = function () {\n return this._colorMap;\n };\n prototypeAccessors.colorMap.set = function (colorMap) {\n if (!(colorMap instanceof Texture)) {\n colorMap = Texture.from(colorMap);\n }\n if (colorMap && colorMap.baseTexture) {\n colorMap.baseTexture.scaleMode = this._scaleMode;\n colorMap.baseTexture.mipmap = false;\n\n this._size = colorMap.height;\n this._sliceSize = 1 / this._size;\n this._slicePixelSize = this._sliceSize / this._size;\n this._sliceInnerSize = this._slicePixelSize * (this._size - 1);\n\n this.uniforms._size = this._size;\n this.uniforms._sliceSize = this._sliceSize;\n this.uniforms._slicePixelSize = this._slicePixelSize;\n this.uniforms._sliceInnerSize = this._sliceInnerSize;\n\n this.uniforms.colorMap = colorMap;\n }\n\n this._colorMap = colorMap;\n };\n\n /**\n * Whether use NEAREST for colorMap texture.\n * @member {boolean}\n */\n prototypeAccessors.nearest.get = function () {\n return this._nearest;\n };\n prototypeAccessors.nearest.set = function (nearest) {\n this._nearest = nearest;\n this._scaleMode = nearest ? SCALE_MODES.NEAREST : SCALE_MODES.LINEAR;\n\n var texture = this._colorMap;\n\n if (texture && texture.baseTexture) {\n texture.baseTexture._glTextures = {};\n\n texture.baseTexture.scaleMode = this._scaleMode;\n texture.baseTexture.mipmap = false;\n\n texture._updateID++;\n texture.baseTexture.emit('update', texture.baseTexture);\n }\n };\n\n /**\n * If the colorMap is based on canvas , and the content of canvas has changed,\n * then call `updateColorMap` for update texture.\n */\n ColorMapFilter.prototype.updateColorMap = function updateColorMap () {\n var texture = this._colorMap;\n\n if (texture && texture.baseTexture) {\n texture._updateID++;\n texture.baseTexture.emit('update', texture.baseTexture);\n\n this.colorMap = texture;\n }\n };\n\n /**\n * Destroys this filter\n *\n * @param {boolean} [destroyBase=false] Whether to destroy the base texture of colorMap as well\n */\n ColorMapFilter.prototype.destroy = function destroy (destroyBase) {\n if (this._colorMap) {\n this._colorMap.destroy(destroyBase);\n }\n Filter.prototype.destroy.call(this);\n };\n\n Object.defineProperties( ColorMapFilter.prototype, prototypeAccessors );\n\n return ColorMapFilter;\n}(Filter));\n\nexport { ColorMapFilter };\n//# sourceMappingURL=filter-color-map.esm.js.map\n","/*!\n * @pixi/filter-color-overlay - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-color-overlay is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { hex2rgb, rgb2hex } from '@pixi/utils';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec3 color;\\nvoid main(void) {\\n vec4 currentColor = texture2D(uSampler, vTextureCoord);\\n vec3 colorOverlay = color * currentColor.a;\\n gl_FragColor = vec4(colorOverlay.r, colorOverlay.g, colorOverlay.b, currentColor.a);\\n}\\n\";\n\n/**\n * Replace all colors within a source graphic with a single color.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/color-overlay.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-color-replace|@pixi/filter-color-replace}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {number|Array} [color=0x000000] The resulting color, as a 3 component RGB e.g. [1.0, 0.5, 1.0]\n *\n * @example\n * // replaces red with blue\n * someSprite.filters = [new ColorOverlayFilter(\n * [1, 0, 0],\n * [0, 0, 1],\n * 0.001\n * )];\n *\n */\nvar ColorOverlayFilter = /*@__PURE__*/(function (Filter) {\n function ColorOverlayFilter(color) {\n if ( color === void 0 ) color = 0x000000;\n\n Filter.call(this, vertex, fragment);\n this.uniforms.color = new Float32Array(3);\n this.color = color;\n }\n\n if ( Filter ) ColorOverlayFilter.__proto__ = Filter;\n ColorOverlayFilter.prototype = Object.create( Filter && Filter.prototype );\n ColorOverlayFilter.prototype.constructor = ColorOverlayFilter;\n\n var prototypeAccessors = { color: { configurable: true } };\n\n /**\n * The resulting color, as a 3 component RGB e.g. [1.0, 0.5, 1.0]\n * @member {number|Array}\n * @default 0x000000\n */\n prototypeAccessors.color.set = function (value) {\n var arr = this.uniforms.color;\n if (typeof value === 'number') {\n hex2rgb(value, arr);\n this._color = value;\n }\n else {\n arr[0] = value[0];\n arr[1] = value[1];\n arr[2] = value[2];\n this._color = rgb2hex(arr);\n }\n };\n prototypeAccessors.color.get = function () {\n return this._color;\n };\n\n Object.defineProperties( ColorOverlayFilter.prototype, prototypeAccessors );\n\n return ColorOverlayFilter;\n}(Filter));\n\nexport { ColorOverlayFilter };\n//# sourceMappingURL=filter-color-overlay.esm.js.map\n","/*!\n * @pixi/filter-color-replace - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-color-replace is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { hex2rgb, rgb2hex } from '@pixi/utils';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec3 originalColor;\\nuniform vec3 newColor;\\nuniform float epsilon;\\nvoid main(void) {\\n vec4 currentColor = texture2D(uSampler, vTextureCoord);\\n vec3 colorDiff = originalColor - (currentColor.rgb / max(currentColor.a, 0.0000000001));\\n float colorDistance = length(colorDiff);\\n float doReplace = step(colorDistance, epsilon);\\n gl_FragColor = vec4(mix(currentColor.rgb, (newColor + colorDiff) * currentColor.a, doReplace), currentColor.a);\\n}\\n\";\n\n/**\n * ColorReplaceFilter, originally by mishaa, updated by timetocode\n * http://www.html5gamedevs.com/topic/10640-outline-a-sprite-change-certain-colors/?p=69966
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/color-replace.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-color-replace|@pixi/filter-color-replace}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {number|Array} [originalColor=0xFF0000] The color that will be changed, as a 3 component RGB e.g. [1.0, 1.0, 1.0]\n * @param {number|Array} [newColor=0x000000] The resulting color, as a 3 component RGB e.g. [1.0, 0.5, 1.0]\n * @param {number} [epsilon=0.4] Tolerance/sensitivity of the floating-point comparison between colors (lower = more exact, higher = more inclusive)\n *\n * @example\n * // replaces true red with true blue\n * someSprite.filters = [new ColorReplaceFilter(\n * [1, 0, 0],\n * [0, 0, 1],\n * 0.001\n * )];\n * // replaces the RGB color 220, 220, 220 with the RGB color 225, 200, 215\n * someOtherSprite.filters = [new ColorReplaceFilter(\n * [220/255.0, 220/255.0, 220/255.0],\n * [225/255.0, 200/255.0, 215/255.0],\n * 0.001\n * )];\n * // replaces the RGB color 220, 220, 220 with the RGB color 225, 200, 215\n * someOtherSprite.filters = [new ColorReplaceFilter(0xdcdcdc, 0xe1c8d7, 0.001)];\n *\n */\nvar ColorReplaceFilter = /*@__PURE__*/(function (Filter) {\n function ColorReplaceFilter(originalColor, newColor, epsilon) {\n if ( originalColor === void 0 ) originalColor = 0xFF0000;\n if ( newColor === void 0 ) newColor = 0x000000;\n if ( epsilon === void 0 ) epsilon = 0.4;\n\n Filter.call(this, vertex, fragment);\n this.uniforms.originalColor = new Float32Array(3);\n this.uniforms.newColor = new Float32Array(3);\n this.originalColor = originalColor;\n this.newColor = newColor;\n this.epsilon = epsilon;\n }\n\n if ( Filter ) ColorReplaceFilter.__proto__ = Filter;\n ColorReplaceFilter.prototype = Object.create( Filter && Filter.prototype );\n ColorReplaceFilter.prototype.constructor = ColorReplaceFilter;\n\n var prototypeAccessors = { originalColor: { configurable: true },newColor: { configurable: true },epsilon: { configurable: true } };\n\n /**\n * The color that will be changed, as a 3 component RGB e.g. [1.0, 1.0, 1.0]\n * @member {number|Array}\n * @default 0xFF0000\n */\n prototypeAccessors.originalColor.set = function (value) {\n var arr = this.uniforms.originalColor;\n if (typeof value === 'number') {\n hex2rgb(value, arr);\n this._originalColor = value;\n }\n else {\n arr[0] = value[0];\n arr[1] = value[1];\n arr[2] = value[2];\n this._originalColor = rgb2hex(arr);\n }\n };\n prototypeAccessors.originalColor.get = function () {\n return this._originalColor;\n };\n\n /**\n * The resulting color, as a 3 component RGB e.g. [1.0, 0.5, 1.0]\n * @member {number|Array}\n * @default 0x000000\n */\n prototypeAccessors.newColor.set = function (value) {\n var arr = this.uniforms.newColor;\n if (typeof value === 'number') {\n hex2rgb(value, arr);\n this._newColor = value;\n }\n else {\n arr[0] = value[0];\n arr[1] = value[1];\n arr[2] = value[2];\n this._newColor = rgb2hex(arr);\n }\n };\n prototypeAccessors.newColor.get = function () {\n return this._newColor;\n };\n\n /**\n * Tolerance/sensitivity of the floating-point comparison between colors (lower = more exact, higher = more inclusive)\n * @member {number}\n * @default 0.4\n */\n prototypeAccessors.epsilon.set = function (value) {\n this.uniforms.epsilon = value;\n };\n prototypeAccessors.epsilon.get = function () {\n return this.uniforms.epsilon;\n };\n\n Object.defineProperties( ColorReplaceFilter.prototype, prototypeAccessors );\n\n return ColorReplaceFilter;\n}(Filter));\n\nexport { ColorReplaceFilter };\n//# sourceMappingURL=filter-color-replace.esm.js.map\n","/*!\n * @pixi/filter-convolution - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-convolution is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"precision mediump float;\\n\\nvarying mediump vec2 vTextureCoord;\\n\\nuniform sampler2D uSampler;\\nuniform vec2 texelSize;\\nuniform float matrix[9];\\n\\nvoid main(void)\\n{\\n vec4 c11 = texture2D(uSampler, vTextureCoord - texelSize); // top left\\n vec4 c12 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - texelSize.y)); // top center\\n vec4 c13 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y - texelSize.y)); // top right\\n\\n vec4 c21 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y)); // mid left\\n vec4 c22 = texture2D(uSampler, vTextureCoord); // mid center\\n vec4 c23 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y)); // mid right\\n\\n vec4 c31 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y + texelSize.y)); // bottom left\\n vec4 c32 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + texelSize.y)); // bottom center\\n vec4 c33 = texture2D(uSampler, vTextureCoord + texelSize); // bottom right\\n\\n gl_FragColor =\\n c11 * matrix[0] + c12 * matrix[1] + c13 * matrix[2] +\\n c21 * matrix[3] + c22 * matrix[4] + c23 * matrix[5] +\\n c31 * matrix[6] + c32 * matrix[7] + c33 * matrix[8];\\n\\n gl_FragColor.a = c22.a;\\n}\\n\";\n\n/**\n * The ConvolutionFilter class applies a matrix convolution filter effect.\n * A convolution combines pixels in the input image with neighboring pixels to produce a new image.\n * A wide variety of image effects can be achieved through convolutions, including blurring, edge\n * detection, sharpening, embossing, and beveling. The matrix should be specified as a 9 point Array.\n * See http://docs.gimp.org/en/plug-in-convmatrix.html for more info.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/convolution.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-convolution|@pixi/filter-convolution}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param [matrix=[0,0,0,0,0,0,0,0,0]] {number[]} An array of values used for matrix transformation. Specified as a 9 point Array.\n * @param [width=200] {number} Width of the object you are transforming\n * @param [height=200] {number} Height of the object you are transforming\n */\nvar ConvolutionFilter = /*@__PURE__*/(function (Filter) {\n function ConvolutionFilter(matrix, width, height) {\n if ( width === void 0 ) width = 200;\n if ( height === void 0 ) height = 200;\n\n Filter.call(this, vertex, fragment);\n this.uniforms.texelSize = new Float32Array(2);\n this.uniforms.matrix = new Float32Array(9);\n if (matrix !== undefined) {\n this.matrix = matrix;\n }\n this.width = width;\n this.height = height;\n }\n\n if ( Filter ) ConvolutionFilter.__proto__ = Filter;\n ConvolutionFilter.prototype = Object.create( Filter && Filter.prototype );\n ConvolutionFilter.prototype.constructor = ConvolutionFilter;\n\n var prototypeAccessors = { matrix: { configurable: true },width: { configurable: true },height: { configurable: true } };\n\n /**\n * An array of values used for matrix transformation. Specified as a 9 point Array.\n *\n * @member {Array}\n */\n prototypeAccessors.matrix.get = function () {\n return this.uniforms.matrix;\n };\n prototypeAccessors.matrix.set = function (matrix) {\n var this$1 = this;\n\n matrix.forEach(function (v, i) { return this$1.uniforms.matrix[i] = v; });\n };\n\n /**\n * Width of the object you are transforming\n *\n * @member {number}\n */\n prototypeAccessors.width.get = function () {\n return 1/this.uniforms.texelSize[0];\n };\n prototypeAccessors.width.set = function (value) {\n this.uniforms.texelSize[0] = 1/value;\n };\n\n /**\n * Height of the object you are transforming\n *\n * @member {number}\n */\n prototypeAccessors.height.get = function () {\n return 1/this.uniforms.texelSize[1];\n };\n prototypeAccessors.height.set = function (value) {\n this.uniforms.texelSize[1] = 1/value;\n };\n\n Object.defineProperties( ConvolutionFilter.prototype, prototypeAccessors );\n\n return ConvolutionFilter;\n}(Filter));\n\nexport { ConvolutionFilter };\n//# sourceMappingURL=filter-convolution.esm.js.map\n","/*!\n * @pixi/filter-cross-hatch - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-cross-hatch is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"precision mediump float;\\n\\nvarying vec2 vTextureCoord;\\n\\nuniform sampler2D uSampler;\\n\\nvoid main(void)\\n{\\n float lum = length(texture2D(uSampler, vTextureCoord.xy).rgb);\\n\\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\\n\\n if (lum < 1.00)\\n {\\n if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0)\\n {\\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\\n }\\n }\\n\\n if (lum < 0.75)\\n {\\n if (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0)\\n {\\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\\n }\\n }\\n\\n if (lum < 0.50)\\n {\\n if (mod(gl_FragCoord.x + gl_FragCoord.y - 5.0, 10.0) == 0.0)\\n {\\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\\n }\\n }\\n\\n if (lum < 0.3)\\n {\\n if (mod(gl_FragCoord.x - gl_FragCoord.y - 5.0, 10.0) == 0.0)\\n {\\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\\n }\\n }\\n}\\n\";\n\n/**\n * A Cross Hatch effect filter.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/cross-hatch.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-cross-hatch|@pixi/filter-cross-hatch}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n */\nvar CrossHatchFilter = /*@__PURE__*/(function (Filter) {\n function CrossHatchFilter() {\n Filter.call(this, vertex, fragment);\n }\n\n if ( Filter ) CrossHatchFilter.__proto__ = Filter;\n CrossHatchFilter.prototype = Object.create( Filter && Filter.prototype );\n CrossHatchFilter.prototype.constructor = CrossHatchFilter;\n\n return CrossHatchFilter;\n}(Filter));\n\nexport { CrossHatchFilter };\n//# sourceMappingURL=filter-cross-hatch.esm.js.map\n","/*!\n * @pixi/filter-crt - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-crt is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec4 filterArea;\\nuniform vec2 dimensions;\\n\\nconst float SQRT_2 = 1.414213;\\n\\nconst float light = 1.0;\\n\\nuniform float curvature;\\nuniform float lineWidth;\\nuniform float lineContrast;\\nuniform bool verticalLine;\\nuniform float noise;\\nuniform float noiseSize;\\n\\nuniform float vignetting;\\nuniform float vignettingAlpha;\\nuniform float vignettingBlur;\\n\\nuniform float seed;\\nuniform float time;\\n\\nfloat rand(vec2 co) {\\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\\n}\\n\\nvoid main(void)\\n{\\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\\n vec2 coord = pixelCoord / dimensions;\\n\\n vec2 dir = vec2(coord - vec2(0.5, 0.5));\\n\\n float _c = curvature > 0. ? curvature : 1.;\\n float k = curvature > 0. ?(length(dir * dir) * 0.25 * _c * _c + 0.935 * _c) : 1.;\\n vec2 uv = dir * k;\\n\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n vec3 rgb = gl_FragColor.rgb;\\n\\n\\n if (noise > 0.0 && noiseSize > 0.0)\\n {\\n pixelCoord.x = floor(pixelCoord.x / noiseSize);\\n pixelCoord.y = floor(pixelCoord.y / noiseSize);\\n float _noise = rand(pixelCoord * noiseSize * seed) - 0.5;\\n rgb += _noise * noise;\\n }\\n\\n if (lineWidth > 0.0) {\\n float v = (verticalLine ? uv.x * dimensions.x : uv.y * dimensions.y) * min(1.0, 2.0 / lineWidth ) / _c;\\n float j = 1. + cos(v * 1.2 - time) * 0.5 * lineContrast;\\n rgb *= j;\\n float segment = verticalLine ? mod((dir.x + .5) * dimensions.x, 4.) : mod((dir.y + .5) * dimensions.y, 4.);\\n rgb *= 0.99 + ceil(segment) * 0.015;\\n }\\n\\n if (vignetting > 0.0)\\n {\\n float outter = SQRT_2 - vignetting * SQRT_2;\\n float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0);\\n rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha);\\n }\\n\\n gl_FragColor.rgb = rgb;\\n}\\n\";\n\n/**\n * The CRTFilter applies a CRT effect to an object.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/crt.gif)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-crt|@pixi/filter-crt}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n *\n * @param {object} [options] - The optional parameters of CRT effect\n * @param {number} [options.curvature=1.0] - Bent of interlaced lines, higher value means more bend\n * @param {number} [options.lineWidth=1.0] - Width of the interlaced lines\n * @param {number} [options.lineContrast=0.25] - Contrast of interlaced lines\n * @param {number} [options.verticalLine=false] - `true` is vertical lines, `false` is horizontal\n * @param {number} [options.noise=0.3] - Opacity/intensity of the noise effect between `0` and `1`\n * @param {number} [options.noiseSize=1.0] - The size of the noise particles\n * @param {number} [options.seed=0] - A seed value to apply to the random noise generation\n * @param {number} [options.vignetting=0.3] - The radius of the vignette effect, smaller\n * values produces a smaller vignette\n * @param {number} [options.vignettingAlpha=1.0] - Amount of opacity of vignette\n * @param {number} [options.vignettingBlur=0.3] - Blur intensity of the vignette\n * @param {number} [options.time=0] - For animating interlaced lines\n */\nvar CRTFilter = /*@__PURE__*/(function (Filter) {\n function CRTFilter(options) {\n Filter.call(this, vertex, fragment);\n this.uniforms.dimensions = new Float32Array(2);\n\n /**\n * For animating interlaced lines\n *\n * @member {number}\n * @default 0\n */\n this.time = 0;\n\n /**\n * A seed value to apply to the random noise generation\n *\n * @member {number}\n * @default 0\n */\n this.seed = 0;\n\n Object.assign(this, {\n curvature: 1.0,\n lineWidth: 1.0,\n lineContrast: 0.25,\n verticalLine: false,\n noise: 0.0,\n noiseSize: 1.0,\n seed: 0.0,\n vignetting: 0.3,\n vignettingAlpha: 1.0,\n vignettingBlur: 0.3,\n time: 0.0,\n }, options);\n }\n\n if ( Filter ) CRTFilter.__proto__ = Filter;\n CRTFilter.prototype = Object.create( Filter && Filter.prototype );\n CRTFilter.prototype.constructor = CRTFilter;\n\n var prototypeAccessors = { curvature: { configurable: true },lineWidth: { configurable: true },lineContrast: { configurable: true },verticalLine: { configurable: true },noise: { configurable: true },noiseSize: { configurable: true },vignetting: { configurable: true },vignettingAlpha: { configurable: true },vignettingBlur: { configurable: true } };\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n CRTFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n this.uniforms.dimensions[0] = input.filterFrame.width;\n this.uniforms.dimensions[1] = input.filterFrame.height;\n\n this.uniforms.seed = this.seed;\n this.uniforms.time = this.time;\n\n filterManager.applyFilter(this, input, output, clear);\n };\n\n /**\n * Bent of interlaced lines, higher value means more bend\n *\n * @member {number}\n * @default 1\n */\n prototypeAccessors.curvature.set = function (value) {\n this.uniforms.curvature = value;\n };\n prototypeAccessors.curvature.get = function () {\n return this.uniforms.curvature;\n };\n\n /**\n * Width of interlaced lines\n *\n * @member {number}\n * @default 1\n */\n prototypeAccessors.lineWidth.set = function (value) {\n this.uniforms.lineWidth = value;\n };\n prototypeAccessors.lineWidth.get = function () {\n return this.uniforms.lineWidth;\n };\n\n /**\n * Contrast of interlaced lines\n *\n * @member {number}\n * @default 0.25\n */\n prototypeAccessors.lineContrast.set = function (value) {\n this.uniforms.lineContrast = value;\n };\n prototypeAccessors.lineContrast.get = function () {\n return this.uniforms.lineContrast;\n };\n\n /**\n * `true` for vertical lines, `false` for horizontal lines\n *\n * @member {boolean}\n * @default false\n */\n prototypeAccessors.verticalLine.set = function (value) {\n this.uniforms.verticalLine = value;\n };\n prototypeAccessors.verticalLine.get = function () {\n return this.uniforms.verticalLine;\n };\n\n /**\n * Opacity/intensity of the noise effect between `0` and `1`\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.noise.set = function (value) {\n this.uniforms.noise = value;\n };\n prototypeAccessors.noise.get = function () {\n return this.uniforms.noise;\n };\n\n /**\n * The size of the noise particles\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.noiseSize.set = function (value) {\n this.uniforms.noiseSize = value;\n };\n prototypeAccessors.noiseSize.get = function () {\n return this.uniforms.noiseSize;\n };\n\n /**\n * The radius of the vignette effect, smaller\n * values produces a smaller vignette\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.vignetting.set = function (value) {\n this.uniforms.vignetting = value;\n };\n prototypeAccessors.vignetting.get = function () {\n return this.uniforms.vignetting;\n };\n\n /**\n * Amount of opacity of vignette\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.vignettingAlpha.set = function (value) {\n this.uniforms.vignettingAlpha = value;\n };\n prototypeAccessors.vignettingAlpha.get = function () {\n return this.uniforms.vignettingAlpha;\n };\n\n /**\n * Blur intensity of the vignette\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.vignettingBlur.set = function (value) {\n this.uniforms.vignettingBlur = value;\n };\n prototypeAccessors.vignettingBlur.get = function () {\n return this.uniforms.vignettingBlur;\n };\n\n Object.defineProperties( CRTFilter.prototype, prototypeAccessors );\n\n return CRTFilter;\n}(Filter));\n\nexport { CRTFilter };\n//# sourceMappingURL=filter-crt.esm.js.map\n","/*!\n * @pixi/filter-dot - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-dot is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"precision mediump float;\\n\\nvarying vec2 vTextureCoord;\\nvarying vec4 vColor;\\n\\nuniform vec4 filterArea;\\nuniform sampler2D uSampler;\\n\\nuniform float angle;\\nuniform float scale;\\n\\nfloat pattern()\\n{\\n float s = sin(angle), c = cos(angle);\\n vec2 tex = vTextureCoord * filterArea.xy;\\n vec2 point = vec2(\\n c * tex.x - s * tex.y,\\n s * tex.x + c * tex.y\\n ) * scale;\\n return (sin(point.x) * sin(point.y)) * 4.0;\\n}\\n\\nvoid main()\\n{\\n vec4 color = texture2D(uSampler, vTextureCoord);\\n float average = (color.r + color.g + color.b) / 3.0;\\n gl_FragColor = vec4(vec3(average * 10.0 - 5.0 + pattern()), color.a);\\n}\\n\";\n\n/**\n * @author Mat Groves http://matgroves.com/ @Doormat23\n * original filter: https://github.com/evanw/glfx.js/blob/master/src/filters/fun/dotscreen.js\n */\n\n/**\n * This filter applies a dotscreen effect making display objects appear to be made out of\n * black and white halftone dots like an old printer.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/dot.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-dot|@pixi/filter-dot}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {number} [scale=1] The scale of the effect.\n * @param {number} [angle=5] The radius of the effect.\n */\nvar DotFilter = /*@__PURE__*/(function (Filter) {\n function DotFilter(scale, angle) {\n if ( scale === void 0 ) scale = 1;\n if ( angle === void 0 ) angle = 5;\n\n Filter.call(this, vertex, fragment);\n this.scale = scale;\n this.angle = angle;\n }\n\n if ( Filter ) DotFilter.__proto__ = Filter;\n DotFilter.prototype = Object.create( Filter && Filter.prototype );\n DotFilter.prototype.constructor = DotFilter;\n\n var prototypeAccessors = { scale: { configurable: true },angle: { configurable: true } };\n\n /**\n * The scale of the effect.\n * @member {number}\n * @default 1\n */\n prototypeAccessors.scale.get = function () {\n return this.uniforms.scale;\n };\n prototypeAccessors.scale.set = function (value) {\n this.uniforms.scale = value;\n };\n\n /**\n * The radius of the effect.\n * @member {number}\n * @default 5\n */\n prototypeAccessors.angle.get = function () {\n return this.uniforms.angle;\n };\n prototypeAccessors.angle.set = function (value) {\n this.uniforms.angle = value;\n };\n\n Object.defineProperties( DotFilter.prototype, prototypeAccessors );\n\n return DotFilter;\n}(Filter));\n\nexport { DotFilter };\n//# sourceMappingURL=filter-dot.esm.js.map\n","/*!\n * @pixi/filter-drop-shadow - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-drop-shadow is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { KawaseBlurFilter } from '@pixi/filter-kawase-blur';\nimport { Filter } from '@pixi/core';\nimport { settings } from '@pixi/settings';\nimport { DEG_TO_RAD, Point } from '@pixi/math';\nimport { rgb2hex, hex2rgb } from '@pixi/utils';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform float alpha;\\nuniform vec3 color;\\n\\nuniform vec2 shift;\\nuniform vec4 inputSize;\\n\\nvoid main(void){\\n vec4 sample = texture2D(uSampler, vTextureCoord - shift * inputSize.zw);\\n\\n // Premultiply alpha\\n sample.rgb = color.rgb * sample.a;\\n\\n // alpha user alpha\\n sample *= alpha;\\n\\n gl_FragColor = sample;\\n}\";\n\n/**\n * Drop shadow filter.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/drop-shadow.png)\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-drop-shadow|@pixi/filter-drop-shadow}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {object} [options] Filter options\n * @param {number} [options.rotation=45] The angle of the shadow in degrees.\n * @param {number} [options.distance=5] Distance of shadow\n * @param {number} [options.color=0x000000] Color of the shadow\n * @param {number} [options.alpha=0.5] Alpha of the shadow\n * @param {number} [options.shadowOnly=false] Whether render shadow only\n * @param {number} [options.blur=2] - Sets the strength of the Blur properties simultaneously\n * @param {number} [options.quality=3] - The quality of the Blur filter.\n * @param {number[]} [options.kernels=null] - The kernels of the Blur filter.\n * @param {number|number[]|PIXI.Point} [options.pixelSize=1] - the pixelSize of the Blur filter.\n * @param {number} [options.resolution=PIXI.settings.RESOLUTION] - The resolution of the Blur filter.\n */\nvar DropShadowFilter = /*@__PURE__*/(function (Filter) {\n function DropShadowFilter(options) {\n\n // Fallback support for ctor: (rotation, distance, blur, color, alpha)\n if (options && options.constructor !== Object) {\n // eslint-disable-next-line no-console\n console.warn('DropShadowFilter now uses options instead of (rotation, distance, blur, color, alpha)');\n options = { rotation: options };\n if (arguments[1] !== undefined) {\n options.distance = arguments[1];\n }\n if (arguments[2] !== undefined) {\n options.blur = arguments[2];\n }\n if (arguments[3] !== undefined) {\n options.color = arguments[3];\n }\n if (arguments[4] !== undefined) {\n options.alpha = arguments[4];\n }\n }\n\n options = Object.assign({\n rotation: 45,\n distance: 5,\n color: 0x000000,\n alpha: 0.5,\n shadowOnly: false,\n kernels: null,\n blur: 2,\n quality: 3,\n pixelSize: 1,\n resolution: settings.RESOLUTION,\n }, options);\n\n Filter.call(this);\n\n var kernels = options.kernels;\n var blur = options.blur;\n var quality = options.quality;\n var pixelSize = options.pixelSize;\n var resolution = options.resolution;\n\n this._tintFilter = new Filter(vertex, fragment);\n this._tintFilter.uniforms.color = new Float32Array(4);\n this._tintFilter.uniforms.shift = new Point();\n this._tintFilter.resolution = resolution;\n this._blurFilter = kernels ?\n new KawaseBlurFilter(kernels) :\n new KawaseBlurFilter(blur, quality);\n\n this.pixelSize = pixelSize;\n this.resolution = resolution;\n\n var shadowOnly = options.shadowOnly;\n var rotation = options.rotation;\n var distance = options.distance;\n var alpha = options.alpha;\n var color = options.color;\n\n this.shadowOnly = shadowOnly;\n this.rotation = rotation;\n this.distance = distance;\n this.alpha = alpha;\n this.color = color;\n\n this._updatePadding();\n }\n\n if ( Filter ) DropShadowFilter.__proto__ = Filter;\n DropShadowFilter.prototype = Object.create( Filter && Filter.prototype );\n DropShadowFilter.prototype.constructor = DropShadowFilter;\n\n var prototypeAccessors = { resolution: { configurable: true },distance: { configurable: true },rotation: { configurable: true },alpha: { configurable: true },color: { configurable: true },kernels: { configurable: true },blur: { configurable: true },quality: { configurable: true },pixelSize: { configurable: true } };\n\n DropShadowFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n var target = filterManager.getFilterTexture();\n\n this._tintFilter.apply(filterManager, input, target, 1);\n this._blurFilter.apply(filterManager, target, output, clear);\n\n if (this.shadowOnly !== true) {\n filterManager.applyFilter(this, input, output, 0);\n }\n\n filterManager.returnFilterTexture(target);\n };\n\n /**\n * Recalculate the proper padding amount.\n * @private\n */\n DropShadowFilter.prototype._updatePadding = function _updatePadding () {\n this.padding = this.distance + (this.blur * 2);\n };\n\n /**\n * Update the transform matrix of offset angle.\n * @private\n */\n DropShadowFilter.prototype._updateShift = function _updateShift () {\n this._tintFilter.uniforms.shift.set(\n this.distance * Math.cos(this.angle),\n this.distance * Math.sin(this.angle)\n );\n };\n\n /**\n * The resolution of the filter.\n *\n * @member {number}\n * @default PIXI.settings.RESOLUTION\n */\n prototypeAccessors.resolution.get = function () {\n return this._resolution;\n };\n prototypeAccessors.resolution.set = function (value) {\n this._resolution = value;\n\n if (this._tintFilter) {\n this._tintFilter.resolution = value;\n }\n if (this._blurFilter) {\n this._blurFilter.resolution = value;\n }\n };\n\n /**\n * Distance offset of the shadow\n * @member {number}\n * @default 5\n */\n prototypeAccessors.distance.get = function () {\n return this._distance;\n };\n prototypeAccessors.distance.set = function (value) {\n this._distance = value;\n this._updatePadding();\n this._updateShift();\n };\n\n /**\n * The angle of the shadow in degrees\n * @member {number}\n * @default 2\n */\n prototypeAccessors.rotation.get = function () {\n return this.angle / DEG_TO_RAD;\n };\n prototypeAccessors.rotation.set = function (value) {\n this.angle = value * DEG_TO_RAD;\n this._updateShift();\n };\n\n /**\n * The alpha of the shadow\n * @member {number}\n * @default 1\n */\n prototypeAccessors.alpha.get = function () {\n return this._tintFilter.uniforms.alpha;\n };\n prototypeAccessors.alpha.set = function (value) {\n this._tintFilter.uniforms.alpha = value;\n };\n\n /**\n * The color of the shadow.\n * @member {number}\n * @default 0x000000\n */\n prototypeAccessors.color.get = function () {\n return rgb2hex(this._tintFilter.uniforms.color);\n };\n prototypeAccessors.color.set = function (value) {\n hex2rgb(value, this._tintFilter.uniforms.color);\n };\n\n /**\n * Sets the kernels of the Blur Filter\n *\n * @member {number[]}\n */\n prototypeAccessors.kernels.get = function () {\n return this._blurFilter.kernels;\n };\n prototypeAccessors.kernels.set = function (value) {\n this._blurFilter.kernels = value;\n };\n\n /**\n * The blur of the shadow\n * @member {number}\n * @default 2\n */\n prototypeAccessors.blur.get = function () {\n return this._blurFilter.blur;\n };\n prototypeAccessors.blur.set = function (value) {\n this._blurFilter.blur = value;\n this._updatePadding();\n };\n\n /**\n * Sets the quality of the Blur Filter\n *\n * @member {number}\n * @default 4\n */\n prototypeAccessors.quality.get = function () {\n return this._blurFilter.quality;\n };\n prototypeAccessors.quality.set = function (value) {\n this._blurFilter.quality = value;\n };\n\n /**\n * Sets the pixelSize of the Kawase Blur filter\n *\n * @member {number|number[]|PIXI.Point}\n * @default 1\n */\n prototypeAccessors.pixelSize.get = function () {\n return this._blurFilter.pixelSize;\n };\n prototypeAccessors.pixelSize.set = function (value) {\n this._blurFilter.pixelSize = value;\n };\n\n Object.defineProperties( DropShadowFilter.prototype, prototypeAccessors );\n\n return DropShadowFilter;\n}(Filter));\n\nexport { DropShadowFilter };\n//# sourceMappingURL=filter-drop-shadow.esm.js.map\n","/*!\n * @pixi/filter-emboss - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-emboss is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"precision mediump float;\\n\\nvarying vec2 vTextureCoord;\\n\\nuniform sampler2D uSampler;\\nuniform float strength;\\nuniform vec4 filterArea;\\n\\n\\nvoid main(void)\\n{\\n\\tvec2 onePixel = vec2(1.0 / filterArea);\\n\\n\\tvec4 color;\\n\\n\\tcolor.rgb = vec3(0.5);\\n\\n\\tcolor -= texture2D(uSampler, vTextureCoord - onePixel) * strength;\\n\\tcolor += texture2D(uSampler, vTextureCoord + onePixel) * strength;\\n\\n\\tcolor.rgb = vec3((color.r + color.g + color.b) / 3.0);\\n\\n\\tfloat alpha = texture2D(uSampler, vTextureCoord).a;\\n\\n\\tgl_FragColor = vec4(color.rgb * alpha, alpha);\\n}\\n\";\n\n/**\n * An RGB Split Filter.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/emboss.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-emboss|@pixi/filter-emboss}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {number} [strength=5] Strength of the emboss.\n */\nvar EmbossFilter = /*@__PURE__*/(function (Filter) {\n function EmbossFilter(strength){\n if ( strength === void 0 ) strength = 5;\n\n Filter.call(this, vertex, fragment);\n this.strength = strength;\n }\n\n if ( Filter ) EmbossFilter.__proto__ = Filter;\n EmbossFilter.prototype = Object.create( Filter && Filter.prototype );\n EmbossFilter.prototype.constructor = EmbossFilter;\n\n var prototypeAccessors = { strength: { configurable: true } };\n\n /**\n * Strength of emboss.\n *\n * @member {number}\n */\n prototypeAccessors.strength.get = function () {\n return this.uniforms.strength;\n };\n prototypeAccessors.strength.set = function (value) {\n this.uniforms.strength = value;\n };\n\n Object.defineProperties( EmbossFilter.prototype, prototypeAccessors );\n\n return EmbossFilter;\n}(Filter));\n\nexport { EmbossFilter };\n//# sourceMappingURL=filter-emboss.esm.js.map\n","/*!\n * @pixi/filter-glitch - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-glitch is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter, Texture } from '@pixi/core';\nimport { SCALE_MODES } from '@pixi/constants';\nimport { DEG_TO_RAD } from '@pixi/math';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"// precision highp float;\\n\\nvarying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec4 filterArea;\\nuniform vec4 filterClamp;\\nuniform vec2 dimensions;\\nuniform float aspect;\\n\\nuniform sampler2D displacementMap;\\nuniform float offset;\\nuniform float sinDir;\\nuniform float cosDir;\\nuniform int fillMode;\\n\\nuniform float seed;\\nuniform vec2 red;\\nuniform vec2 green;\\nuniform vec2 blue;\\n\\nconst int TRANSPARENT = 0;\\nconst int ORIGINAL = 1;\\nconst int LOOP = 2;\\nconst int CLAMP = 3;\\nconst int MIRROR = 4;\\n\\nvoid main(void)\\n{\\n vec2 coord = (vTextureCoord * filterArea.xy) / dimensions;\\n\\n if (coord.x > 1.0 || coord.y > 1.0) {\\n return;\\n }\\n\\n float cx = coord.x - 0.5;\\n float cy = (coord.y - 0.5) * aspect;\\n float ny = (-sinDir * cx + cosDir * cy) / aspect + 0.5;\\n\\n // displacementMap: repeat\\n // ny = ny > 1.0 ? ny - 1.0 : (ny < 0.0 ? 1.0 + ny : ny);\\n\\n // displacementMap: mirror\\n ny = ny > 1.0 ? 2.0 - ny : (ny < 0.0 ? -ny : ny);\\n\\n vec4 dc = texture2D(displacementMap, vec2(0.5, ny));\\n\\n float displacement = (dc.r - dc.g) * (offset / filterArea.x);\\n\\n coord = vTextureCoord + vec2(cosDir * displacement, sinDir * displacement * aspect);\\n\\n if (fillMode == CLAMP) {\\n coord = clamp(coord, filterClamp.xy, filterClamp.zw);\\n } else {\\n if( coord.x > filterClamp.z ) {\\n if (fillMode == TRANSPARENT) {\\n discard;\\n } else if (fillMode == LOOP) {\\n coord.x -= filterClamp.z;\\n } else if (fillMode == MIRROR) {\\n coord.x = filterClamp.z * 2.0 - coord.x;\\n }\\n } else if( coord.x < filterClamp.x ) {\\n if (fillMode == TRANSPARENT) {\\n discard;\\n } else if (fillMode == LOOP) {\\n coord.x += filterClamp.z;\\n } else if (fillMode == MIRROR) {\\n coord.x *= -filterClamp.z;\\n }\\n }\\n\\n if( coord.y > filterClamp.w ) {\\n if (fillMode == TRANSPARENT) {\\n discard;\\n } else if (fillMode == LOOP) {\\n coord.y -= filterClamp.w;\\n } else if (fillMode == MIRROR) {\\n coord.y = filterClamp.w * 2.0 - coord.y;\\n }\\n } else if( coord.y < filterClamp.y ) {\\n if (fillMode == TRANSPARENT) {\\n discard;\\n } else if (fillMode == LOOP) {\\n coord.y += filterClamp.w;\\n } else if (fillMode == MIRROR) {\\n coord.y *= -filterClamp.w;\\n }\\n }\\n }\\n\\n gl_FragColor.r = texture2D(uSampler, coord + red * (1.0 - seed * 0.4) / filterArea.xy).r;\\n gl_FragColor.g = texture2D(uSampler, coord + green * (1.0 - seed * 0.3) / filterArea.xy).g;\\n gl_FragColor.b = texture2D(uSampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b;\\n gl_FragColor.a = texture2D(uSampler, coord).a;\\n}\\n\";\n\n/**\n * The GlitchFilter applies a glitch effect to an object.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/glitch.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-glitch|@pixi/filter-glitch}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {object} [options] - The more optional parameters of the filter.\n * @param {number} [options.slices=5] - The maximum number of slices.\n * @param {number} [options.offset=100] - The maximum offset amount of slices.\n * @param {number} [options.direction=0] - The angle in degree of the offset of slices.\n * @param {number} [options.fillMode=0] - The fill mode of the space after the offset. Acceptable values:\n * - `0` {@link PIXI.filters.GlitchFilter.TRANSPARENT TRANSPARENT}\n * - `1` {@link PIXI.filters.GlitchFilter.ORIGINAL ORIGINAL}\n * - `2` {@link PIXI.filters.GlitchFilter.LOOP LOOP}\n * - `3` {@link PIXI.filters.GlitchFilter.CLAMP CLAMP}\n * - `4` {@link PIXI.filters.GlitchFilter.MIRROR MIRROR}\n * @param {number} [options.seed=0] - A seed value for randomizing glitch effect.\n * @param {number} [options.average=false] - `true` will divide the bands roughly based on equal amounts\n * where as setting to `false` will vary the band sizes dramatically (more random looking).\n * @param {number} [options.minSize=8] - Minimum size of individual slice. Segment of total `sampleSize`\n * @param {number} [options.sampleSize=512] - The resolution of the displacement map texture.\n * @param {number} [options.red=[0,0]] - Red channel offset\n * @param {number} [options.green=[0,0]] - Green channel offset.\n * @param {number} [options.blue=[0,0]] - Blue channel offset.\n */\nvar GlitchFilter = /*@__PURE__*/(function (Filter) {\n function GlitchFilter(options) {\n if ( options === void 0 ) options = {};\n\n\n Filter.call(this, vertex, fragment);\n this.uniforms.dimensions = new Float32Array(2);\n\n options = Object.assign({\n slices: 5,\n offset: 100,\n direction: 0,\n fillMode: 0,\n average: false,\n seed: 0,\n red: [0, 0],\n green: [0, 0],\n blue: [0, 0],\n minSize: 8,\n sampleSize: 512,\n }, options);\n\n this.direction = options.direction;\n this.red = options.red;\n this.green = options.green;\n this.blue = options.blue;\n\n /**\n * The maximum offset value for each of the slices.\n *\n * @member {number}\n */\n this.offset = options.offset;\n\n /**\n * The fill mode of the space after the offset.\n *\n * @member {number}\n */\n this.fillMode = options.fillMode;\n\n /**\n * `true` will divide the bands roughly based on equal amounts\n * where as setting to `false` will vary the band sizes dramatically (more random looking).\n *\n * @member {boolean}\n * @default false\n */\n this.average = options.average;\n\n /**\n * A seed value for randomizing color offset. Animating\n * this value to `Math.random()` produces a twitching effect.\n *\n * @member {number}\n */\n this.seed = options.seed;\n\n /**\n * Minimum size of slices as a portion of the `sampleSize`\n *\n * @member {number}\n */\n this.minSize = options.minSize;\n\n /**\n * Height of the displacement map canvas.\n *\n * @member {number}\n * @readonly\n */\n this.sampleSize = options.sampleSize;\n\n /**\n * Internally generated canvas.\n *\n * @member {HTMLCanvasElement} _canvas\n * @private\n */\n this._canvas = document.createElement('canvas');\n this._canvas.width = 4;\n this._canvas.height = this.sampleSize;\n\n /**\n * The displacement map is used to generate the bands.\n * If using your own texture, `slices` will be ignored.\n *\n * @member {PIXI.Texture}\n * @readonly\n */\n this.texture = Texture.from(this._canvas, { scaleMode: SCALE_MODES.NEAREST });\n\n /**\n * Internal number of slices\n * @member {number}\n * @private\n */\n this._slices = 0;\n\n // Set slices\n this.slices = options.slices;\n }\n\n if ( Filter ) GlitchFilter.__proto__ = Filter;\n GlitchFilter.prototype = Object.create( Filter && Filter.prototype );\n GlitchFilter.prototype.constructor = GlitchFilter;\n\n var prototypeAccessors = { sizes: { configurable: true },offsets: { configurable: true },slices: { configurable: true },direction: { configurable: true },red: { configurable: true },green: { configurable: true },blue: { configurable: true } };\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n GlitchFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n\n var width = input.filterFrame.width;\n var height = input.filterFrame.height;\n\n this.uniforms.dimensions[0] = width;\n this.uniforms.dimensions[1] = height;\n this.uniforms.aspect = height / width;\n\n this.uniforms.seed = this.seed;\n this.uniforms.offset = this.offset;\n this.uniforms.fillMode = this.fillMode;\n\n filterManager.applyFilter(this, input, output, clear);\n };\n\n /**\n * Randomize the slices size (heights).\n *\n * @private\n */\n GlitchFilter.prototype._randomizeSizes = function _randomizeSizes () {\n var arr = this._sizes;\n var last = this._slices - 1;\n var size = this.sampleSize;\n var min = Math.min(this.minSize / size, 0.9 / this._slices);\n\n if (this.average) {\n var count = this._slices;\n var rest = 1;\n\n for (var i = 0; i < last; i++) {\n var averageWidth = rest / (count - i);\n var w = Math.max(averageWidth * (1 - Math.random() * 0.6), min);\n arr[i] = w;\n rest -= w;\n }\n arr[last] = rest;\n }\n else {\n var rest$1 = 1;\n var ratio = Math.sqrt(1 / this._slices);\n\n for (var i$1 = 0; i$1 < last; i$1++) {\n var w$1 = Math.max(ratio * rest$1 * Math.random(), min);\n arr[i$1] = w$1;\n rest$1 -= w$1;\n }\n arr[last] = rest$1;\n }\n\n this.shuffle();\n };\n\n /**\n * Shuffle the sizes of the slices, advanced usage.\n */\n GlitchFilter.prototype.shuffle = function shuffle () {\n var arr = this._sizes;\n var last = this._slices - 1;\n\n // shuffle\n for (var i = last; i > 0; i--) {\n var rand = (Math.random() * i) >> 0;\n var temp = arr[i];\n\n arr[i] = arr[rand];\n arr[rand] = temp;\n }\n };\n\n /**\n * Randomize the values for offset from -1 to 1\n *\n * @private\n */\n GlitchFilter.prototype._randomizeOffsets = function _randomizeOffsets () {\n for (var i = 0 ; i < this._slices; i++) {\n this._offsets[i] = Math.random() * (Math.random() < 0.5 ? -1 : 1);\n }\n };\n\n /**\n * Regenerating random size, offsets for slices.\n */\n GlitchFilter.prototype.refresh = function refresh () {\n this._randomizeSizes();\n this._randomizeOffsets();\n this.redraw();\n };\n\n /**\n * Redraw displacement bitmap texture, advanced usage.\n */\n GlitchFilter.prototype.redraw = function redraw () {\n var size = this.sampleSize;\n var texture = this.texture;\n var ctx = this._canvas.getContext('2d');\n ctx.clearRect(0, 0, 8, size);\n\n var offset;\n var y = 0;\n\n for (var i = 0 ; i < this._slices; i++) {\n offset = Math.floor(this._offsets[i] * 256);\n var height = this._sizes[i] * size;\n var red = offset > 0 ? offset : 0;\n var green = offset < 0 ? -offset : 0;\n ctx.fillStyle = 'rgba(' + red + ', ' + green + ', 0, 1)';\n ctx.fillRect(0, y >> 0, size, height + 1 >> 0);\n y += height;\n }\n\n texture.baseTexture.update();\n this.uniforms.displacementMap = texture;\n };\n\n /**\n * Manually custom slices size (height) of displacement bitmap\n *\n * @member {number[]}\n */\n prototypeAccessors.sizes.set = function (sizes) {\n var len = Math.min(this._slices, sizes.length);\n\n for (var i = 0; i < len; i++){\n this._sizes[i] = sizes[i];\n }\n };\n prototypeAccessors.sizes.get = function () {\n return this._sizes;\n };\n\n /**\n * Manually set custom slices offset of displacement bitmap, this is\n * a collection of values from -1 to 1. To change the max offset value\n * set `offset`.\n *\n * @member {number[]}\n */\n prototypeAccessors.offsets.set = function (offsets) {\n var len = Math.min(this._slices, offsets.length);\n\n for (var i = 0; i < len; i++){\n this._offsets[i] = offsets[i];\n }\n };\n prototypeAccessors.offsets.get = function () {\n return this._offsets;\n };\n\n /**\n * The count of slices.\n * @member {number}\n * @default 5\n */\n prototypeAccessors.slices.get = function () {\n return this._slices;\n };\n prototypeAccessors.slices.set = function (value) {\n if (this._slices === value) {\n return;\n }\n this._slices = value;\n this.uniforms.slices = value;\n this._sizes = this.uniforms.slicesWidth = new Float32Array(value);\n this._offsets = this.uniforms.slicesOffset = new Float32Array(value);\n this.refresh();\n };\n\n /**\n * The angle in degree of the offset of slices.\n * @member {number}\n * @default 0\n */\n prototypeAccessors.direction.get = function () {\n return this._direction;\n };\n prototypeAccessors.direction.set = function (value) {\n if (this._direction === value) {\n return;\n }\n this._direction = value;\n\n var radians = value * DEG_TO_RAD;\n\n this.uniforms.sinDir = Math.sin(radians);\n this.uniforms.cosDir = Math.cos(radians);\n };\n\n /**\n * Red channel offset.\n *\n * @member {PIXI.Point}\n */\n prototypeAccessors.red.get = function () {\n return this.uniforms.red;\n };\n prototypeAccessors.red.set = function (value) {\n this.uniforms.red = value;\n };\n\n /**\n * Green channel offset.\n *\n * @member {PIXI.Point}\n */\n prototypeAccessors.green.get = function () {\n return this.uniforms.green;\n };\n prototypeAccessors.green.set = function (value) {\n this.uniforms.green = value;\n };\n\n /**\n * Blue offset.\n *\n * @member {PIXI.Point}\n */\n prototypeAccessors.blue.get = function () {\n return this.uniforms.blue;\n };\n prototypeAccessors.blue.set = function (value) {\n this.uniforms.blue = value;\n };\n\n /**\n * Removes all references\n */\n GlitchFilter.prototype.destroy = function destroy () {\n this.texture.destroy(true);\n this.texture = null;\n this._canvas = null;\n this.red = null;\n this.green = null;\n this.blue = null;\n this._sizes = null;\n this._offsets = null;\n };\n\n Object.defineProperties( GlitchFilter.prototype, prototypeAccessors );\n\n return GlitchFilter;\n}(Filter));\n\n/**\n * Fill mode as transparent\n *\n * @constant\n * @static\n * @member {int} TRANSPARENT\n * @memberof PIXI.filters.GlitchFilter\n * @readonly\n */\nGlitchFilter.TRANSPARENT = 0;\n\n/**\n * Fill mode as original\n *\n * @constant\n * @static\n * @member {int} ORIGINAL\n * @memberof PIXI.filters.GlitchFilter\n * @readonly\n */\nGlitchFilter.ORIGINAL = 1;\n\n/**\n * Fill mode as loop\n *\n * @constant\n * @static\n * @member {int} LOOP\n * @memberof PIXI.filters.GlitchFilter\n * @readonly\n */\nGlitchFilter.LOOP = 2;\n\n/**\n * Fill mode as clamp\n *\n * @constant\n * @static\n * @member {int} CLAMP\n * @memberof PIXI.filters.GlitchFilter\n * @readonly\n */\nGlitchFilter.CLAMP = 3;\n\n/**\n * Fill mode as mirror\n *\n * @constant\n * @static\n * @member {int} MIRROR\n * @memberof PIXI.filters.GlitchFilter\n * @readonly\n */\nGlitchFilter.MIRROR = 4;\n\nexport { GlitchFilter };\n//# sourceMappingURL=filter-glitch.esm.js.map\n","/*!\n * @pixi/filter-glow - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-glow is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { rgb2hex, hex2rgb } from '@pixi/utils';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nvarying vec4 vColor;\\n\\nuniform sampler2D uSampler;\\n\\nuniform float outerStrength;\\nuniform float innerStrength;\\n\\nuniform vec4 glowColor;\\n\\nuniform vec4 filterArea;\\nuniform vec4 filterClamp;\\nuniform bool knockout;\\n\\nconst float PI = 3.14159265358979323846264;\\n\\nconst float DIST = __DIST__;\\nconst float ANGLE_STEP_SIZE = min(__ANGLE_STEP_SIZE__, PI * 2.0);\\nconst float ANGLE_STEP_NUM = ceil(PI * 2.0 / ANGLE_STEP_SIZE);\\n\\nconst float MAX_TOTAL_ALPHA = ANGLE_STEP_NUM * DIST * (DIST + 1.0) / 2.0;\\n\\nvoid main(void) {\\n vec2 px = vec2(1.0 / filterArea.x, 1.0 / filterArea.y);\\n\\n float totalAlpha = 0.0;\\n\\n vec2 direction;\\n vec2 displaced;\\n vec4 curColor;\\n\\n for (float angle = 0.0; angle < PI * 2.0; angle += ANGLE_STEP_SIZE) {\\n direction = vec2(cos(angle), sin(angle)) * px;\\n\\n for (float curDistance = 0.0; curDistance < DIST; curDistance++) {\\n displaced = clamp(vTextureCoord + direction * \\n (curDistance + 1.0), filterClamp.xy, filterClamp.zw);\\n\\n curColor = texture2D(uSampler, displaced);\\n\\n totalAlpha += (DIST - curDistance) * curColor.a;\\n }\\n }\\n \\n curColor = texture2D(uSampler, vTextureCoord);\\n\\n float alphaRatio = (totalAlpha / MAX_TOTAL_ALPHA);\\n\\n float innerGlowAlpha = (1.0 - alphaRatio) * innerStrength * curColor.a;\\n float innerGlowStrength = min(1.0, innerGlowAlpha);\\n \\n vec4 innerColor = mix(curColor, glowColor, innerGlowStrength);\\n\\n float outerGlowAlpha = alphaRatio * outerStrength * (1. - curColor.a);\\n float outerGlowStrength = min(1.0 - innerColor.a, outerGlowAlpha);\\n\\n vec4 outerGlowColor = outerGlowStrength * glowColor.rgba;\\n \\n if (knockout) {\\n float resultAlpha = outerGlowAlpha + innerGlowAlpha;\\n gl_FragColor = vec4(glowColor.rgb * resultAlpha, resultAlpha);\\n }\\n else {\\n gl_FragColor = innerColor + outerGlowColor;\\n }\\n}\\n\";\n\n/**\n * GlowFilter, originally by mishaa\n * [codepen]{@link http://codepen.io/mishaa/pen/raKzrm}.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/glow.png)\n * @class\n *\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-glow|@pixi/filter-glow}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {number} [options] Options for glow.\n * @param {number} [options.distance=10] The distance of the glow. Make it 2 times more for resolution=2.\n * It can't be changed after filter creation.\n * @param {number} [options.outerStrength=4] The strength of the glow outward from the edge of the sprite.\n * @param {number} [options.innerStrength=0] The strength of the glow inward from the edge of the sprite.\n * @param {number} [options.color=0xffffff] The color of the glow.\n * @param {number} [options.quality=0.1] A number between 0 and 1 that describes the quality of the glow.\n * The higher the number the less performant.\n * @param {boolean} [options.knockout=false] Toggle to hide the contents and only show glow.\n *\n * @example\n * someSprite.filters = [\n * new GlowFilter({ distance: 15, outerStrength: 2 })\n * ];\n */\nvar GlowFilter = /*@__PURE__*/(function (Filter) {\n function GlowFilter(options) {\n var ref = Object.assign({}, GlowFilter.defaults, options);\n var distance = ref.distance;\n var outerStrength = ref.outerStrength;\n var innerStrength = ref.innerStrength;\n var color = ref.color;\n var knockout = ref.knockout;\n var quality = ref.quality;\n\n distance = Math.round(distance);\n\n Filter.call(this, vertex, fragment\n .replace(/__ANGLE_STEP_SIZE__/gi, '' + (1 / quality / distance).toFixed(7))\n .replace(/__DIST__/gi, distance.toFixed(0) + '.0'));\n\n this.uniforms.glowColor = new Float32Array([0, 0, 0, 1]);\n\n Object.assign(this, {\n color: color,\n outerStrength: outerStrength,\n innerStrength: innerStrength,\n padding: distance,\n knockout: knockout,\n });\n }\n\n if ( Filter ) GlowFilter.__proto__ = Filter;\n GlowFilter.prototype = Object.create( Filter && Filter.prototype );\n GlowFilter.prototype.constructor = GlowFilter;\n\n var prototypeAccessors = { color: { configurable: true },outerStrength: { configurable: true },innerStrength: { configurable: true },knockout: { configurable: true } };\n\n /**\n * The color of the glow.\n * @member {number}\n * @default 0xFFFFFF\n */\n prototypeAccessors.color.get = function () {\n return rgb2hex(this.uniforms.glowColor);\n };\n prototypeAccessors.color.set = function (value) {\n hex2rgb(value, this.uniforms.glowColor);\n };\n\n /**\n * The strength of the glow outward from the edge of the sprite.\n * @member {number}\n * @default 4\n */\n prototypeAccessors.outerStrength.get = function () {\n return this.uniforms.outerStrength;\n };\n prototypeAccessors.outerStrength.set = function (value) {\n this.uniforms.outerStrength = value;\n };\n\n /**\n * The strength of the glow inward from the edge of the sprite.\n * @member {number}\n * @default 0\n */\n prototypeAccessors.innerStrength.get = function () {\n return this.uniforms.innerStrength;\n };\n prototypeAccessors.innerStrength.set = function (value) {\n this.uniforms.innerStrength = value;\n };\n\n /**\n * Only draw the glow, not the texture itself\n * @member {boolean}\n * @default false\n */\n prototypeAccessors.knockout.get = function () {\n return this.uniforms.knockout;\n };\n prototypeAccessors.knockout.set = function (value) {\n this.uniforms.knockout = value;\n };\n\n Object.defineProperties( GlowFilter.prototype, prototypeAccessors );\n\n return GlowFilter;\n}(Filter));\n\nGlowFilter.defaults = {\n distance: 10,\n outerStrength: 4,\n innerStrength: 0,\n color: 0xffffff,\n quality: 0.1,\n knockout: false,\n};\n\nexport { GlowFilter };\n//# sourceMappingURL=filter-glow.esm.js.map\n","/*!\n * @pixi/filter-godray - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-godray is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { Point, DEG_TO_RAD } from '@pixi/math';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar perlin = \"vec3 mod289(vec3 x)\\n{\\n return x - floor(x * (1.0 / 289.0)) * 289.0;\\n}\\nvec4 mod289(vec4 x)\\n{\\n return x - floor(x * (1.0 / 289.0)) * 289.0;\\n}\\nvec4 permute(vec4 x)\\n{\\n return mod289(((x * 34.0) + 1.0) * x);\\n}\\nvec4 taylorInvSqrt(vec4 r)\\n{\\n return 1.79284291400159 - 0.85373472095314 * r;\\n}\\nvec3 fade(vec3 t)\\n{\\n return t * t * t * (t * (t * 6.0 - 15.0) + 10.0);\\n}\\n// Classic Perlin noise, periodic variant\\nfloat pnoise(vec3 P, vec3 rep)\\n{\\n vec3 Pi0 = mod(floor(P), rep); // Integer part, modulo period\\n vec3 Pi1 = mod(Pi0 + vec3(1.0), rep); // Integer part + 1, mod period\\n Pi0 = mod289(Pi0);\\n Pi1 = mod289(Pi1);\\n vec3 Pf0 = fract(P); // Fractional part for interpolation\\n vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\\n vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\\n vec4 iy = vec4(Pi0.yy, Pi1.yy);\\n vec4 iz0 = Pi0.zzzz;\\n vec4 iz1 = Pi1.zzzz;\\n vec4 ixy = permute(permute(ix) + iy);\\n vec4 ixy0 = permute(ixy + iz0);\\n vec4 ixy1 = permute(ixy + iz1);\\n vec4 gx0 = ixy0 * (1.0 / 7.0);\\n vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\\n gx0 = fract(gx0);\\n vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\\n vec4 sz0 = step(gz0, vec4(0.0));\\n gx0 -= sz0 * (step(0.0, gx0) - 0.5);\\n gy0 -= sz0 * (step(0.0, gy0) - 0.5);\\n vec4 gx1 = ixy1 * (1.0 / 7.0);\\n vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\\n gx1 = fract(gx1);\\n vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\\n vec4 sz1 = step(gz1, vec4(0.0));\\n gx1 -= sz1 * (step(0.0, gx1) - 0.5);\\n gy1 -= sz1 * (step(0.0, gy1) - 0.5);\\n vec3 g000 = vec3(gx0.x, gy0.x, gz0.x);\\n vec3 g100 = vec3(gx0.y, gy0.y, gz0.y);\\n vec3 g010 = vec3(gx0.z, gy0.z, gz0.z);\\n vec3 g110 = vec3(gx0.w, gy0.w, gz0.w);\\n vec3 g001 = vec3(gx1.x, gy1.x, gz1.x);\\n vec3 g101 = vec3(gx1.y, gy1.y, gz1.y);\\n vec3 g011 = vec3(gx1.z, gy1.z, gz1.z);\\n vec3 g111 = vec3(gx1.w, gy1.w, gz1.w);\\n vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\\n g000 *= norm0.x;\\n g010 *= norm0.y;\\n g100 *= norm0.z;\\n g110 *= norm0.w;\\n vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\\n g001 *= norm1.x;\\n g011 *= norm1.y;\\n g101 *= norm1.z;\\n g111 *= norm1.w;\\n float n000 = dot(g000, Pf0);\\n float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\\n float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\\n float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\\n float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\\n float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\\n float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\\n float n111 = dot(g111, Pf1);\\n vec3 fade_xyz = fade(Pf0);\\n vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\\n vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\\n float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\\n return 2.2 * n_xyz;\\n}\\nfloat turb(vec3 P, vec3 rep, float lacunarity, float gain)\\n{\\n float sum = 0.0;\\n float sc = 1.0;\\n float totalgain = 1.0;\\n for (float i = 0.0; i < 6.0; i++)\\n {\\n sum += totalgain * pnoise(P * sc, rep);\\n sc *= lacunarity;\\n totalgain *= gain;\\n }\\n return abs(sum);\\n}\\n\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec4 filterArea;\\nuniform vec2 dimensions;\\n\\nuniform vec2 light;\\nuniform bool parallel;\\nuniform float aspect;\\n\\nuniform float gain;\\nuniform float lacunarity;\\nuniform float time;\\n\\n${perlin}\\n\\nvoid main(void) {\\n vec2 coord = vTextureCoord * filterArea.xy / dimensions.xy;\\n\\n float d;\\n\\n if (parallel) {\\n float _cos = light.x;\\n float _sin = light.y;\\n d = (_cos * coord.x) + (_sin * coord.y * aspect);\\n } else {\\n float dx = coord.x - light.x / dimensions.x;\\n float dy = (coord.y - light.y / dimensions.y) * aspect;\\n float dis = sqrt(dx * dx + dy * dy) + 0.00001;\\n d = dy / dis;\\n }\\n\\n vec3 dir = vec3(d, d, 0.0);\\n\\n float noise = turb(dir + vec3(time, 0.0, 62.1 + time) * 0.05, vec3(480.0, 320.0, 480.0), lacunarity, gain);\\n noise = mix(noise, 0.0, 0.3);\\n //fade vertically.\\n vec4 mist = vec4(noise, noise, noise, 1.0) * (1.0 - coord.y);\\n mist.a = 1.0;\\n\\n gl_FragColor = texture2D(uSampler, vTextureCoord) + mist;\\n}\\n\";\n\n/**\n * GordayFilter, {@link https://codepen.io/alaingalvan originally} by Alain Galvan\n *\n *\n *\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/godray.gif)\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-godray|@pixi/filter-godray}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n *\n * @example\n * displayObject.filters = [new GodrayFilter()];\n * @param {object} [options] Filter options\n * @param {number} [options.angle=30] Angle/Light-source of the rays.\n * @param {number} [options.gain=0.5] General intensity of the effect.\n * @param {number} [options.lacunrity=2.5] The density of the fractal noise.\n * @param {boolean} [options.parallel=true] `true` to use `angle`, `false` to use `center`\n * @param {number} [options.time=0] The current time position.\n * @param {PIXI.Point|number[]} [options.center=[0,0]] Focal point for non-parallel rays,\n * to use this `parallel` must be set to `false`.\n */\nvar GodrayFilter = /*@__PURE__*/(function (Filter) {\n function GodrayFilter(options) {\n Filter.call(this, vertex, fragment.replace('${perlin}', perlin));\n\n this.uniforms.dimensions = new Float32Array(2);\n\n // Fallback support for ctor: (angle, gain, lacunarity, time)\n if (typeof options === 'number') {\n // eslint-disable-next-line no-console\n console.warn('GodrayFilter now uses options instead of (angle, gain, lacunarity, time)');\n options = { angle: options };\n if (arguments[1] !== undefined) {\n options.gain = arguments[1];\n }\n if (arguments[2] !== undefined) {\n options.lacunarity = arguments[2];\n }\n if (arguments[3] !== undefined) {\n options.time = arguments[3];\n }\n }\n\n options = Object.assign({\n angle: 30,\n gain: 0.5,\n lacunarity: 2.5,\n time: 0,\n parallel: true,\n center: [0, 0],\n }, options);\n\n this._angleLight = new Point();\n this.angle = options.angle;\n this.gain = options.gain;\n this.lacunarity = options.lacunarity;\n\n /**\n * `true` if light rays are parallel (uses angle),\n * `false` to use the focal `center` point\n *\n * @member {boolean}\n * @default true\n */\n this.parallel = options.parallel;\n\n /**\n * The position of the emitting point for light rays\n * only used if `parallel` is set to `false`.\n *\n * @member {PIXI.Point|number[]}\n * @default [0, 0]\n */\n this.center = options.center;\n\n /**\n * The current time.\n *\n * @member {number}\n * @default 0\n */\n this.time = options.time;\n }\n\n if ( Filter ) GodrayFilter.__proto__ = Filter;\n GodrayFilter.prototype = Object.create( Filter && Filter.prototype );\n GodrayFilter.prototype.constructor = GodrayFilter;\n\n var prototypeAccessors = { angle: { configurable: true },gain: { configurable: true },lacunarity: { configurable: true } };\n\n /**\n * Applies the filter.\n * @private\n * @param {PIXI.FilterManager} filterManager - The manager.\n * @param {PIXI.RenderTarget} input - The input target.\n * @param {PIXI.RenderTarget} output - The output target.\n */\n GodrayFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n var ref = input.filterFrame;\n var width = ref.width;\n var height = ref.height;\n\n this.uniforms.light = this.parallel ? this._angleLight : this.center;\n\n this.uniforms.parallel = this.parallel;\n this.uniforms.dimensions[0] = width;\n this.uniforms.dimensions[1] = height;\n this.uniforms.aspect = height / width;\n this.uniforms.time = this.time;\n\n // draw the filter...\n filterManager.applyFilter(this, input, output, clear);\n };\n\n /**\n * The angle/light-source of the rays in degrees. For instance, a value of 0 is vertical rays,\n * values of 90 or -90 produce horizontal rays.\n * @member {number}\n * @default 30\n */\n prototypeAccessors.angle.get = function () {\n return this._angle;\n };\n prototypeAccessors.angle.set = function (value) {\n this._angle = value;\n\n var radians = value * DEG_TO_RAD;\n\n this._angleLight.x = Math.cos(radians);\n this._angleLight.y = Math.sin(radians);\n };\n\n /**\n * General intensity of the effect. A value closer to 1 will produce a more intense effect,\n * where a value closer to 0 will produce a subtler effect.\n *\n * @member {number}\n * @default 0.5\n */\n prototypeAccessors.gain.get = function () {\n return this.uniforms.gain;\n };\n prototypeAccessors.gain.set = function (value) {\n this.uniforms.gain = value;\n };\n\n /**\n * The density of the fractal noise. A higher amount produces more rays and a smaller amound\n * produces fewer waves.\n *\n * @member {number}\n * @default 2.5\n */\n prototypeAccessors.lacunarity.get = function () {\n return this.uniforms.lacunarity;\n };\n prototypeAccessors.lacunarity.set = function (value) {\n this.uniforms.lacunarity = value;\n };\n\n Object.defineProperties( GodrayFilter.prototype, prototypeAccessors );\n\n return GodrayFilter;\n}(Filter));\n\nexport { GodrayFilter };\n//# sourceMappingURL=filter-godray.esm.js.map\n","/*!\n * @pixi/filter-motion-blur - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-motion-blur is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { Point, ObservablePoint } from '@pixi/math';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec4 filterArea;\\n\\nuniform vec2 uVelocity;\\nuniform int uKernelSize;\\nuniform float uOffset;\\n\\nconst int MAX_KERNEL_SIZE = 2048;\\n\\n// Notice:\\n// the perfect way:\\n// int kernelSize = min(uKernelSize, MAX_KERNELSIZE);\\n// BUT in real use-case , uKernelSize < MAX_KERNELSIZE almost always.\\n// So use uKernelSize directly.\\n\\nvoid main(void)\\n{\\n vec4 color = texture2D(uSampler, vTextureCoord);\\n\\n if (uKernelSize == 0)\\n {\\n gl_FragColor = color;\\n return;\\n }\\n\\n vec2 velocity = uVelocity / filterArea.xy;\\n float offset = -uOffset / length(uVelocity) - 0.5;\\n int k = uKernelSize - 1;\\n\\n for(int i = 0; i < MAX_KERNEL_SIZE - 1; i++) {\\n if (i == k) {\\n break;\\n }\\n vec2 bias = velocity * (float(i) / float(k) + offset);\\n color += texture2D(uSampler, vTextureCoord + bias);\\n }\\n gl_FragColor = color / float(uKernelSize);\\n}\\n\";\n\n/**\n * The MotionBlurFilter applies a Motion blur to an object.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/motion-blur.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-motion-blur|@pixi/filter-motion-blur}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {PIXI.ObservablePoint|PIXI.Point|number[]} [velocity=[0, 0]] Sets the velocity of the motion for blur effect.\n * @param {number} [kernelSize=5] - The kernelSize of the blur filter. Must be odd number >= 5\n * @param {number} [offset=0] - The offset of the blur filter.\n */\nvar MotionBlurFilter = /*@__PURE__*/(function (Filter) {\n function MotionBlurFilter(velocity, kernelSize, offset) {\n if ( velocity === void 0 ) velocity = [0, 0];\n if ( kernelSize === void 0 ) kernelSize = 5;\n if ( offset === void 0 ) offset = 0;\n\n Filter.call(this, vertex, fragment);\n this.uniforms.uVelocity = new Float32Array(2);\n this._velocity = new ObservablePoint(this.velocityChanged, this);\n this.velocity = velocity;\n\n /**\n * The kernelSize of the blur, higher values are slower but look better.\n * Use odd value greater than 5.\n * @member {number}\n * @default 5\n */\n this.kernelSize = kernelSize;\n this.offset = offset;\n }\n\n if ( Filter ) MotionBlurFilter.__proto__ = Filter;\n MotionBlurFilter.prototype = Object.create( Filter && Filter.prototype );\n MotionBlurFilter.prototype.constructor = MotionBlurFilter;\n\n var prototypeAccessors = { velocity: { configurable: true },offset: { configurable: true } };\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n MotionBlurFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n var ref = this.velocity;\n var x = ref.x;\n var y = ref.y;\n\n this.uniforms.uKernelSize = (x !== 0 || y !== 0) ? this.kernelSize : 0;\n filterManager.applyFilter(this, input, output, clear);\n };\n\n /**\n * Sets the velocity of the motion for blur effect.\n *\n * @member {PIXI.ObservablePoint|PIXI.Point|number[]}\n */\n prototypeAccessors.velocity.set = function (value) {\n if (Array.isArray(value)) {\n this._velocity.set(value[0], value[1]);\n }\n else if (value instanceof Point || value instanceof ObservablePoint) {\n this._velocity.copyFrom(value);\n }\n };\n\n prototypeAccessors.velocity.get = function () {\n return this._velocity;\n };\n\n /**\n * Handle velocity changed\n * @private\n */\n MotionBlurFilter.prototype.velocityChanged = function velocityChanged () {\n this.uniforms.uVelocity[0] = this._velocity.x;\n this.uniforms.uVelocity[1] = this._velocity.y;\n };\n\n /**\n * The offset of the blur filter.\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.offset.set = function (value) {\n this.uniforms.uOffset = value;\n };\n\n prototypeAccessors.offset.get = function () {\n return this.uniforms.uOffset;\n };\n\n Object.defineProperties( MotionBlurFilter.prototype, prototypeAccessors );\n\n return MotionBlurFilter;\n}(Filter));\n\nexport { MotionBlurFilter };\n//# sourceMappingURL=filter-motion-blur.esm.js.map\n","/*!\n * @pixi/filter-multi-color-replace - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-multi-color-replace is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { hex2rgb, rgb2hex } from '@pixi/utils';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform float epsilon;\\n\\nconst int MAX_COLORS = %maxColors%;\\n\\nuniform vec3 originalColors[MAX_COLORS];\\nuniform vec3 targetColors[MAX_COLORS];\\n\\nvoid main(void)\\n{\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n\\n float alpha = gl_FragColor.a;\\n if (alpha < 0.0001)\\n {\\n return;\\n }\\n\\n vec3 color = gl_FragColor.rgb / alpha;\\n\\n for(int i = 0; i < MAX_COLORS; i++)\\n {\\n vec3 origColor = originalColors[i];\\n if (origColor.r < 0.0)\\n {\\n break;\\n }\\n vec3 colorDiff = origColor - color;\\n if (length(colorDiff) < epsilon)\\n {\\n vec3 targetColor = targetColors[i];\\n gl_FragColor = vec4((targetColor + colorDiff) * alpha, alpha);\\n return;\\n }\\n }\\n}\\n\";\n\n/**\n * Filter for replacing a color with another color. Similar to ColorReplaceFilter, but support multiple\n * colors.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/multi-color-replace.png)\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-multi-color-replace|@pixi/filter-multi-color-replace}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {Array} replacements - The collection of replacement items. Each item is color-pair (an array length is 2).\n * In the pair, the first value is original color , the second value is target color.\n * @param {number} [epsilon=0.05] - Tolerance of the floating-point comparison between colors\n * (lower = more exact, higher = more inclusive)\n * @param {number} [maxColors] - The maximum number of replacements filter is able to use. Because the\n * fragment is only compiled once, this cannot be changed after construction.\n * If omitted, the default value is the length of `replacements`.\n *\n * @example\n * // replaces pure red with pure blue, and replaces pure green with pure white\n * someSprite.filters = [new MultiColorReplaceFilter(\n * [\n * [0xFF0000, 0x0000FF],\n * [0x00FF00, 0xFFFFFF]\n * ],\n * 0.001\n * )];\n *\n * You also could use [R, G, B] as the color\n * someOtherSprite.filters = [new MultiColorReplaceFilter(\n * [\n * [ [1,0,0], [0,0,1] ],\n * [ [0,1,0], [1,1,1] ]\n * ],\n * 0.001\n * )];\n *\n */\nvar MultiColorReplaceFilter = /*@__PURE__*/(function (Filter) {\n function MultiColorReplaceFilter(replacements, epsilon, maxColors) {\n if ( epsilon === void 0 ) epsilon = 0.05;\n if ( maxColors === void 0 ) maxColors = null;\n\n maxColors = maxColors || replacements.length;\n\n Filter.call(this, vertex, fragment.replace(/%maxColors%/g, maxColors));\n\n this.epsilon = epsilon;\n this._maxColors = maxColors;\n this._replacements = null;\n this.uniforms.originalColors = new Float32Array(maxColors * 3);\n this.uniforms.targetColors = new Float32Array(maxColors * 3);\n this.replacements = replacements;\n }\n\n if ( Filter ) MultiColorReplaceFilter.__proto__ = Filter;\n MultiColorReplaceFilter.prototype = Object.create( Filter && Filter.prototype );\n MultiColorReplaceFilter.prototype.constructor = MultiColorReplaceFilter;\n\n var prototypeAccessors = { replacements: { configurable: true },maxColors: { configurable: true },epsilon: { configurable: true } };\n\n /**\n * The source and target colors for replacement. See constructor for information on the format.\n *\n * @member {Array}\n */\n prototypeAccessors.replacements.set = function (replacements) {\n var originals = this.uniforms.originalColors;\n var targets = this.uniforms.targetColors;\n var colorCount = replacements.length;\n\n if (colorCount > this._maxColors) {\n throw (\"Length of replacements (\" + colorCount + \") exceeds the maximum colors length (\" + (this._maxColors) + \")\");\n }\n\n // Fill with negative values\n originals[colorCount * 3] = -1;\n\n for (var i = 0; i < colorCount; i++) {\n var pair = replacements[i];\n\n // for original colors\n var color = pair[0];\n if (typeof color === 'number') {\n color = hex2rgb(color);\n }\n else {\n pair[0] = rgb2hex(color);\n }\n\n originals[i * 3] = color[0];\n originals[(i * 3) + 1] = color[1];\n originals[(i * 3) + 2] = color[2];\n\n // for target colors\n var targetColor = pair[1];\n if (typeof targetColor === 'number') {\n targetColor = hex2rgb(targetColor);\n }\n else {\n pair[1] = rgb2hex(targetColor);\n }\n\n targets[i * 3] = targetColor[0];\n targets[(i * 3) + 1] = targetColor[1];\n targets[(i * 3) + 2] = targetColor[2];\n }\n\n this._replacements = replacements;\n };\n prototypeAccessors.replacements.get = function () {\n return this._replacements;\n };\n\n /**\n * Should be called after changing any of the contents of the replacements.\n * This is a convenience method for resetting the `replacements`.\n */\n MultiColorReplaceFilter.prototype.refresh = function refresh () {\n this.replacements = this._replacements;\n };\n\n /**\n * The maximum number of color replacements supported by this filter. Can be changed\n * _only_ during construction.\n *\n * @member {number}\n * @readonly\n */\n prototypeAccessors.maxColors.get = function () {\n return this._maxColors;\n };\n\n /**\n * Tolerance of the floating-point comparison between colors (lower = more exact, higher = more inclusive)\n *\n * @member {number}\n * @default 0.05\n */\n prototypeAccessors.epsilon.set = function (value) {\n this.uniforms.epsilon = value;\n };\n prototypeAccessors.epsilon.get = function () {\n return this.uniforms.epsilon;\n };\n\n Object.defineProperties( MultiColorReplaceFilter.prototype, prototypeAccessors );\n\n return MultiColorReplaceFilter;\n}(Filter));\n\nexport { MultiColorReplaceFilter };\n//# sourceMappingURL=filter-multi-color-replace.esm.js.map\n","/*!\n * @pixi/filter-old-film - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-old-film is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec4 filterArea;\\nuniform vec2 dimensions;\\n\\nuniform float sepia;\\nuniform float noise;\\nuniform float noiseSize;\\nuniform float scratch;\\nuniform float scratchDensity;\\nuniform float scratchWidth;\\nuniform float vignetting;\\nuniform float vignettingAlpha;\\nuniform float vignettingBlur;\\nuniform float seed;\\n\\nconst float SQRT_2 = 1.414213;\\nconst vec3 SEPIA_RGB = vec3(112.0 / 255.0, 66.0 / 255.0, 20.0 / 255.0);\\n\\nfloat rand(vec2 co) {\\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\\n}\\n\\nvec3 Overlay(vec3 src, vec3 dst)\\n{\\n // if (dst <= 0.5) then: 2 * src * dst\\n // if (dst > 0.5) then: 1 - 2 * (1 - dst) * (1 - src)\\n return vec3((dst.x <= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - dst.x) * (1.0 - src.x)),\\n (dst.y <= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - dst.y) * (1.0 - src.y)),\\n (dst.z <= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - dst.z) * (1.0 - src.z)));\\n}\\n\\n\\nvoid main()\\n{\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n vec3 color = gl_FragColor.rgb;\\n\\n if (sepia > 0.0)\\n {\\n float gray = (color.x + color.y + color.z) / 3.0;\\n vec3 grayscale = vec3(gray);\\n\\n color = Overlay(SEPIA_RGB, grayscale);\\n\\n color = grayscale + sepia * (color - grayscale);\\n }\\n\\n vec2 coord = vTextureCoord * filterArea.xy / dimensions.xy;\\n\\n if (vignetting > 0.0)\\n {\\n float outter = SQRT_2 - vignetting * SQRT_2;\\n vec2 dir = vec2(vec2(0.5, 0.5) - coord);\\n dir.y *= dimensions.y / dimensions.x;\\n float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0);\\n color.rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha);\\n }\\n\\n if (scratchDensity > seed && scratch != 0.0)\\n {\\n float phase = seed * 256.0;\\n float s = mod(floor(phase), 2.0);\\n float dist = 1.0 / scratchDensity;\\n float d = distance(coord, vec2(seed * dist, abs(s - seed * dist)));\\n if (d < seed * 0.6 + 0.4)\\n {\\n highp float period = scratchDensity * 10.0;\\n\\n float xx = coord.x * period + phase;\\n float aa = abs(mod(xx, 0.5) * 4.0);\\n float bb = mod(floor(xx / 0.5), 2.0);\\n float yy = (1.0 - bb) * aa + bb * (2.0 - aa);\\n\\n float kk = 2.0 * period;\\n float dw = scratchWidth / dimensions.x * (0.75 + seed);\\n float dh = dw * kk;\\n\\n float tine = (yy - (2.0 - dh));\\n\\n if (tine > 0.0) {\\n float _sign = sign(scratch);\\n\\n tine = s * tine / period + scratch + 0.1;\\n tine = clamp(tine + 1.0, 0.5 + _sign * 0.5, 1.5 + _sign * 0.5);\\n\\n color.rgb *= tine;\\n }\\n }\\n }\\n\\n if (noise > 0.0 && noiseSize > 0.0)\\n {\\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\\n pixelCoord.x = floor(pixelCoord.x / noiseSize);\\n pixelCoord.y = floor(pixelCoord.y / noiseSize);\\n // vec2 d = pixelCoord * noiseSize * vec2(1024.0 + seed * 512.0, 1024.0 - seed * 512.0);\\n // float _noise = snoise(d) * 0.5;\\n float _noise = rand(pixelCoord * noiseSize * seed) - 0.5;\\n color += _noise * noise;\\n }\\n\\n gl_FragColor.rgb = color;\\n}\\n\";\n\n/**\n * The OldFilmFilter applies a Old film effect to an object.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/old-film.gif)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-old-film|@pixi/filter-old-film}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n *\n * @param {object|number} [options] - The optional parameters of old film effect.\n * When options is a number , it will be `seed`\n * @param {number} [options.sepia=0.3] - The amount of saturation of sepia effect,\n * a value of `1` is more saturation and closer to `0` is less, and a value of\n * `0` produces no sepia effect\n * @param {number} [options.noise=0.3] - Opacity/intensity of the noise effect between `0` and `1`\n * @param {number} [options.noiseSize=1.0] - The size of the noise particles\n * @param {number} [options.scratch=0.5] - How often scratches appear\n * @param {number} [options.scratchDensity=0.3] - The density of the number of scratches\n * @param {number} [options.scratchWidth=1.0] - The width of the scratches\n * @param {number} [options.vignetting=0.3] - The radius of the vignette effect, smaller\n * values produces a smaller vignette\n * @param {number} [options.vignettingAlpha=1.0] - Amount of opacity of vignette\n * @param {number} [options.vignettingBlur=0.3] - Blur intensity of the vignette\n * @param {number} [seed=0] - A see value to apply to the random noise generation\n */\nvar OldFilmFilter = /*@__PURE__*/(function (Filter) {\n function OldFilmFilter(options, seed) {\n if ( seed === void 0 ) seed = 0;\n\n Filter.call(this, vertex, fragment);\n this.uniforms.dimensions = new Float32Array(2);\n\n if (typeof options === 'number') {\n this.seed = options;\n options = null;\n }\n else {\n /**\n * A see value to apply to the random noise generation\n * @member {number}\n */\n this.seed = seed;\n }\n\n Object.assign(this, {\n sepia: 0.3,\n noise: 0.3,\n noiseSize: 1.0,\n scratch: 0.5,\n scratchDensity: 0.3,\n scratchWidth: 1.0,\n vignetting: 0.3,\n vignettingAlpha: 1.0,\n vignettingBlur: 0.3,\n }, options);\n }\n\n if ( Filter ) OldFilmFilter.__proto__ = Filter;\n OldFilmFilter.prototype = Object.create( Filter && Filter.prototype );\n OldFilmFilter.prototype.constructor = OldFilmFilter;\n\n var prototypeAccessors = { sepia: { configurable: true },noise: { configurable: true },noiseSize: { configurable: true },scratch: { configurable: true },scratchDensity: { configurable: true },scratchWidth: { configurable: true },vignetting: { configurable: true },vignettingAlpha: { configurable: true },vignettingBlur: { configurable: true } };\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n OldFilmFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n this.uniforms.dimensions[0] = input.filterFrame.width;\n this.uniforms.dimensions[1] = input.filterFrame.height;\n\n // named `seed` because in the most programming languages,\n // `random` used for \"the function for generating random value\".\n this.uniforms.seed = this.seed;\n\n filterManager.applyFilter(this, input, output, clear);\n };\n\n\n /**\n * The amount of saturation of sepia effect,\n * a value of `1` is more saturation and closer to `0` is less,\n * and a value of `0` produces no sepia effect\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.sepia.set = function (value) {\n this.uniforms.sepia = value;\n };\n\n prototypeAccessors.sepia.get = function () {\n return this.uniforms.sepia;\n };\n\n /**\n * Opacity/intensity of the noise effect between `0` and `1`\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.noise.set = function (value) {\n this.uniforms.noise = value;\n };\n\n prototypeAccessors.noise.get = function () {\n return this.uniforms.noise;\n };\n\n /**\n * The size of the noise particles\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.noiseSize.set = function (value) {\n this.uniforms.noiseSize = value;\n };\n\n prototypeAccessors.noiseSize.get = function () {\n return this.uniforms.noiseSize;\n };\n\n /**\n * How often scratches appear\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.scratch.set = function (value) {\n this.uniforms.scratch = value;\n };\n\n prototypeAccessors.scratch.get = function () {\n return this.uniforms.scratch;\n };\n\n /**\n * The density of the number of scratches\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.scratchDensity.set = function (value) {\n this.uniforms.scratchDensity = value;\n };\n\n prototypeAccessors.scratchDensity.get = function () {\n return this.uniforms.scratchDensity;\n };\n\n /**\n * The width of the scratches\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.scratchWidth.set = function (value) {\n this.uniforms.scratchWidth = value;\n };\n\n prototypeAccessors.scratchWidth.get = function () {\n return this.uniforms.scratchWidth;\n };\n\n /**\n * The radius of the vignette effect, smaller\n * values produces a smaller vignette\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.vignetting.set = function (value) {\n this.uniforms.vignetting = value;\n };\n\n prototypeAccessors.vignetting.get = function () {\n return this.uniforms.vignetting;\n };\n\n /**\n * Amount of opacity of vignette\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.vignettingAlpha.set = function (value) {\n this.uniforms.vignettingAlpha = value;\n };\n\n prototypeAccessors.vignettingAlpha.get = function () {\n return this.uniforms.vignettingAlpha;\n };\n\n /**\n * Blur intensity of the vignette\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.vignettingBlur.set = function (value) {\n this.uniforms.vignettingBlur = value;\n };\n\n prototypeAccessors.vignettingBlur.get = function () {\n return this.uniforms.vignettingBlur;\n };\n\n Object.defineProperties( OldFilmFilter.prototype, prototypeAccessors );\n\n return OldFilmFilter;\n}(Filter));\n\nexport { OldFilmFilter };\n//# sourceMappingURL=filter-old-film.esm.js.map\n","/*!\n * @pixi/filter-outline - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-outline is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { rgb2hex, hex2rgb } from '@pixi/utils';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec2 thickness;\\nuniform vec4 outlineColor;\\nuniform vec4 filterClamp;\\n\\nconst float DOUBLE_PI = 3.14159265358979323846264 * 2.;\\n\\nvoid main(void) {\\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\\n vec4 curColor;\\n float maxAlpha = 0.;\\n vec2 displaced;\\n for (float angle = 0.; angle <= DOUBLE_PI; angle += ${angleStep}) {\\n displaced.x = vTextureCoord.x + thickness.x * cos(angle);\\n displaced.y = vTextureCoord.y + thickness.y * sin(angle);\\n curColor = texture2D(uSampler, clamp(displaced, filterClamp.xy, filterClamp.zw));\\n maxAlpha = max(maxAlpha, curColor.a);\\n }\\n float resultAlpha = max(maxAlpha, ownColor.a);\\n gl_FragColor = vec4((ownColor.rgb + outlineColor.rgb * (1. - ownColor.a)) * resultAlpha, resultAlpha);\\n}\\n\";\n\n/**\n * OutlineFilter, originally by mishaa\n * http://www.html5gamedevs.com/topic/10640-outline-a-sprite-change-certain-colors/?p=69966\n * http://codepen.io/mishaa/pen/emGNRB
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/outline.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-outline|@pixi/filter-outline}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {number} [thickness=1] The tickness of the outline. Make it 2 times more for resolution 2\n * @param {number} [color=0x000000] The color of the outline.\n * @param {number} [quality=0.1] The quality of the outline from `0` to `1`, using a higher quality\n * setting will result in slower performance and more accuracy.\n *\n * @example\n * someSprite.filters = [new OutlineFilter(2, 0x99ff99)];\n */\nvar OutlineFilter = /*@__PURE__*/(function (Filter) {\n function OutlineFilter(thickness, color, quality) {\n if ( thickness === void 0 ) thickness = 1;\n if ( color === void 0 ) color = 0x000000;\n if ( quality === void 0 ) quality = 0.1;\n\n var samples = Math.max(\n quality * OutlineFilter.MAX_SAMPLES,\n OutlineFilter.MIN_SAMPLES\n );\n var angleStep = (Math.PI * 2 / samples).toFixed(7);\n\n Filter.call(this, vertex, fragment.replace(/\\$\\{angleStep\\}/, angleStep));\n this.uniforms.thickness = new Float32Array([0, 0]);\n\n /**\n * The thickness of the outline.\n * @member {number}\n * @default 1\n */\n this.thickness = thickness;\n\n this.uniforms.outlineColor = new Float32Array([0, 0, 0, 1]);\n this.color = color;\n\n this.quality = quality;\n }\n\n if ( Filter ) OutlineFilter.__proto__ = Filter;\n OutlineFilter.prototype = Object.create( Filter && Filter.prototype );\n OutlineFilter.prototype.constructor = OutlineFilter;\n\n var prototypeAccessors = { color: { configurable: true } };\n\n OutlineFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n this.uniforms.thickness[0] = this.thickness / input._frame.width;\n this.uniforms.thickness[1] = this.thickness / input._frame.height;\n\n filterManager.applyFilter(this, input, output, clear);\n };\n\n /**\n * The color of the glow.\n * @member {number}\n * @default 0x000000\n */\n prototypeAccessors.color.get = function () {\n return rgb2hex(this.uniforms.outlineColor);\n };\n prototypeAccessors.color.set = function (value) {\n hex2rgb(value, this.uniforms.outlineColor);\n };\n\n Object.defineProperties( OutlineFilter.prototype, prototypeAccessors );\n\n return OutlineFilter;\n}(Filter));\n\n/**\n * The minimum number of samples for rendering outline.\n * @static\n * @member {number} MIN_SAMPLES\n * @memberof PIXI.filters.OutlineFilter\n * @default 1\n */\nOutlineFilter.MIN_SAMPLES = 1;\n\n/**\n * The maximum number of samples for rendering outline.\n * @static\n * @member {number} MAX_SAMPLES\n * @memberof PIXI.filters.OutlineFilter\n * @default 100\n */\nOutlineFilter.MAX_SAMPLES = 100;\n\nexport { OutlineFilter };\n//# sourceMappingURL=filter-outline.esm.js.map\n","/*!\n * @pixi/filter-pixelate - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-pixelate is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"precision mediump float;\\n\\nvarying vec2 vTextureCoord;\\n\\nuniform vec2 size;\\nuniform sampler2D uSampler;\\n\\nuniform vec4 filterArea;\\n\\nvec2 mapCoord( vec2 coord )\\n{\\n coord *= filterArea.xy;\\n coord += filterArea.zw;\\n\\n return coord;\\n}\\n\\nvec2 unmapCoord( vec2 coord )\\n{\\n coord -= filterArea.zw;\\n coord /= filterArea.xy;\\n\\n return coord;\\n}\\n\\nvec2 pixelate(vec2 coord, vec2 size)\\n{\\n\\treturn floor( coord / size ) * size;\\n}\\n\\nvoid main(void)\\n{\\n vec2 coord = mapCoord(vTextureCoord);\\n\\n coord = pixelate(coord, size);\\n\\n coord = unmapCoord(coord);\\n\\n gl_FragColor = texture2D(uSampler, coord);\\n}\\n\";\n\n/**\n * This filter applies a pixelate effect making display objects appear 'blocky'.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/pixelate.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-pixelate|@pixi/filter-pixelate}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {PIXI.Point|Array|number} [size=10] Either the width/height of the size of the pixels, or square size\n */\nvar PixelateFilter = /*@__PURE__*/(function (Filter) {\n function PixelateFilter(size) {\n if ( size === void 0 ) size = 10;\n\n Filter.call(this, vertex, fragment);\n this.size = size;\n }\n\n if ( Filter ) PixelateFilter.__proto__ = Filter;\n PixelateFilter.prototype = Object.create( Filter && Filter.prototype );\n PixelateFilter.prototype.constructor = PixelateFilter;\n\n var prototypeAccessors = { size: { configurable: true } };\n\n /**\n * This a point that describes the size of the blocks.\n * x is the width of the block and y is the height.\n *\n * @member {PIXI.Point|Array|number}\n * @default 10\n */\n prototypeAccessors.size.get = function () {\n return this.uniforms.size;\n };\n prototypeAccessors.size.set = function (value) {\n if (typeof value === 'number') {\n value = [value, value];\n }\n this.uniforms.size = value;\n };\n\n Object.defineProperties( PixelateFilter.prototype, prototypeAccessors );\n\n return PixelateFilter;\n}(Filter));\n\nexport { PixelateFilter };\n//# sourceMappingURL=filter-pixelate.esm.js.map\n","/*!\n * @pixi/filter-radial-blur - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-radial-blur is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec4 filterArea;\\n\\nuniform float uRadian;\\nuniform vec2 uCenter;\\nuniform float uRadius;\\nuniform int uKernelSize;\\n\\nconst int MAX_KERNEL_SIZE = 2048;\\n\\nvoid main(void)\\n{\\n vec4 color = texture2D(uSampler, vTextureCoord);\\n\\n if (uKernelSize == 0)\\n {\\n gl_FragColor = color;\\n return;\\n }\\n\\n float aspect = filterArea.y / filterArea.x;\\n vec2 center = uCenter.xy / filterArea.xy;\\n float gradient = uRadius / filterArea.x * 0.3;\\n float radius = uRadius / filterArea.x - gradient * 0.5;\\n int k = uKernelSize - 1;\\n\\n vec2 coord = vTextureCoord;\\n vec2 dir = vec2(center - coord);\\n float dist = length(vec2(dir.x, dir.y * aspect));\\n\\n float radianStep = uRadian;\\n if (radius >= 0.0 && dist > radius) {\\n float delta = dist - radius;\\n float gap = gradient;\\n float scale = 1.0 - abs(delta / gap);\\n if (scale <= 0.0) {\\n gl_FragColor = color;\\n return;\\n }\\n radianStep *= scale;\\n }\\n radianStep /= float(k);\\n\\n float s = sin(radianStep);\\n float c = cos(radianStep);\\n mat2 rotationMatrix = mat2(vec2(c, -s), vec2(s, c));\\n\\n for(int i = 0; i < MAX_KERNEL_SIZE - 1; i++) {\\n if (i == k) {\\n break;\\n }\\n\\n coord -= center;\\n coord.y *= aspect;\\n coord = rotationMatrix * coord;\\n coord.y /= aspect;\\n coord += center;\\n\\n vec4 sample = texture2D(uSampler, coord);\\n\\n // switch to pre-multiplied alpha to correctly blur transparent images\\n // sample.rgb *= sample.a;\\n\\n color += sample;\\n }\\n\\n gl_FragColor = color / float(uKernelSize);\\n}\\n\";\n\n/**\n * The RadialBlurFilter applies a Motion blur to an object.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/radial-blur.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-radial-blur|@pixi/filter-radial-blur}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {number} [angle=0] Sets the angle of the motion for blur effect.\n * @param {PIXI.Point|number[]} [center=[0,0]] The center of the radial.\n * @param {number} [kernelSize=5] - The kernelSize of the blur filter. But be odd number >= 3\n * @param {number} [radius=-1] - The maximum size of the blur radius, `-1` is infinite\n */\nvar RadialBlurFilter = /*@__PURE__*/(function (Filter) {\n function RadialBlurFilter(angle, center, kernelSize, radius) {\n if ( angle === void 0 ) angle = 0;\n if ( center === void 0 ) center = [0, 0];\n if ( kernelSize === void 0 ) kernelSize = 5;\n if ( radius === void 0 ) radius = -1;\n\n Filter.call(this, vertex, fragment);\n\n this._angle = 0;\n this.angle = angle;\n this.center = center;\n this.kernelSize = kernelSize;\n this.radius = radius;\n }\n\n if ( Filter ) RadialBlurFilter.__proto__ = Filter;\n RadialBlurFilter.prototype = Object.create( Filter && Filter.prototype );\n RadialBlurFilter.prototype.constructor = RadialBlurFilter;\n\n var prototypeAccessors = { angle: { configurable: true },center: { configurable: true },radius: { configurable: true } };\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n RadialBlurFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n this.uniforms.uKernelSize = this._angle !== 0 ? this.kernelSize : 0;\n filterManager.applyFilter(this, input, output, clear);\n };\n\n /**\n * Sets the angle in degrees of the motion for blur effect.\n *\n * @member {PIXI.Point|number[]}\n * @default [0, 0]\n */\n prototypeAccessors.angle.set = function (value) {\n this._angle = value;\n this.uniforms.uRadian = value * Math.PI / 180;\n };\n\n prototypeAccessors.angle.get = function () {\n return this._angle;\n };\n\n /**\n * Center of the effect.\n *\n * @member {PIXI.Point|number[]}\n * @default [0, 0]\n */\n prototypeAccessors.center.get = function () {\n return this.uniforms.uCenter;\n };\n\n prototypeAccessors.center.set = function (value) {\n this.uniforms.uCenter = value;\n };\n\n /**\n * Outer radius of the effect. The default value of `-1` is infinite.\n *\n * @member {number}\n * @default -1\n */\n prototypeAccessors.radius.get = function () {\n return this.uniforms.uRadius;\n };\n\n prototypeAccessors.radius.set = function (value) {\n if (value < 0 || value === Infinity) {\n value = -1;\n }\n this.uniforms.uRadius = value;\n };\n\n Object.defineProperties( RadialBlurFilter.prototype, prototypeAccessors );\n\n return RadialBlurFilter;\n}(Filter));\n\nexport { RadialBlurFilter };\n//# sourceMappingURL=filter-radial-blur.esm.js.map\n","/*!\n * @pixi/filter-reflection - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-reflection is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\n\\nuniform vec4 filterArea;\\nuniform vec4 filterClamp;\\nuniform vec2 dimensions;\\n\\nuniform bool mirror;\\nuniform float boundary;\\nuniform vec2 amplitude;\\nuniform vec2 waveLength;\\nuniform vec2 alpha;\\nuniform float time;\\n\\nfloat rand(vec2 co) {\\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\\n}\\n\\nvoid main(void)\\n{\\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\\n vec2 coord = pixelCoord / dimensions;\\n\\n if (coord.y < boundary) {\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n return;\\n }\\n\\n float k = (coord.y - boundary) / (1. - boundary + 0.0001);\\n float areaY = boundary * dimensions.y / filterArea.y;\\n float v = areaY + areaY - vTextureCoord.y;\\n float y = mirror ? v : vTextureCoord.y;\\n\\n float _amplitude = ((amplitude.y - amplitude.x) * k + amplitude.x ) / filterArea.x;\\n float _waveLength = ((waveLength.y - waveLength.x) * k + waveLength.x) / filterArea.y;\\n float _alpha = (alpha.y - alpha.x) * k + alpha.x;\\n\\n float x = vTextureCoord.x + cos(v * 6.28 / _waveLength - time) * _amplitude;\\n x = clamp(x, filterClamp.x, filterClamp.z);\\n\\n vec4 color = texture2D(uSampler, vec2(x, y));\\n\\n gl_FragColor = color * _alpha;\\n}\\n\";\n\n/**\n * Applies a reflection effect to simulate the reflection on water with waves.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/reflection.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-reflection|@pixi/filter-reflection}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n *\n * @param {object} [options] - The optional parameters of Reflection effect.\n * @param {number} [options.mirror=true] - `true` to reflect the image, `false` for waves-only\n * @param {number} [options.boundary=0.5] - Vertical position of the reflection point, default is 50% (middle)\n * smaller numbers produce a larger reflection, larger numbers produce a smaller reflection.\n * @param {number} [options.amplitude=[0, 20]] - Starting and ending amplitude of waves\n * @param {number} [options.waveLength=[30, 100]] - Starting and ending length of waves\n * @param {number} [options.alpha=[1, 1]] - Starting and ending alpha values\n * @param {number} [options.time=0] - Time for animating position of waves\n */\nvar ReflectionFilter = /*@__PURE__*/(function (Filter) {\n function ReflectionFilter(options) {\n Filter.call(this, vertex, fragment);\n this.uniforms.amplitude = new Float32Array(2);\n this.uniforms.waveLength = new Float32Array(2);\n this.uniforms.alpha = new Float32Array(2);\n this.uniforms.dimensions = new Float32Array(2);\n\n Object.assign(this, {\n mirror: true,\n boundary: 0.5,\n amplitude: [0, 20],\n waveLength: [30, 100],\n alpha: [1, 1],\n\n /**\n * Time for animating position of waves\n *\n * @member {number}\n * @memberof PIXI.filters.ReflectionFilter#\n * @default 0\n */\n time: 0,\n }, options);\n }\n\n if ( Filter ) ReflectionFilter.__proto__ = Filter;\n ReflectionFilter.prototype = Object.create( Filter && Filter.prototype );\n ReflectionFilter.prototype.constructor = ReflectionFilter;\n\n var prototypeAccessors = { mirror: { configurable: true },boundary: { configurable: true },amplitude: { configurable: true },waveLength: { configurable: true },alpha: { configurable: true } };\n\n /**\n * Override existing apply method in PIXI.Filter\n * @private\n */\n ReflectionFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n this.uniforms.dimensions[0] = input.filterFrame.width;\n this.uniforms.dimensions[1] = input.filterFrame.height;\n\n this.uniforms.time = this.time;\n\n filterManager.applyFilter(this, input, output, clear);\n };\n\n /**\n * `true` to reflect the image, `false` for waves-only\n *\n * @member {boolean}\n * @default true\n */\n prototypeAccessors.mirror.set = function (value) {\n this.uniforms.mirror = value;\n };\n prototypeAccessors.mirror.get = function () {\n return this.uniforms.mirror;\n };\n\n /**\n * Vertical position of the reflection point, default is 50% (middle)\n * smaller numbers produce a larger reflection, larger numbers produce a smaller reflection.\n *\n * @member {number}\n * @default 0.5\n */\n prototypeAccessors.boundary.set = function (value) {\n this.uniforms.boundary = value;\n };\n prototypeAccessors.boundary.get = function () {\n return this.uniforms.boundary;\n };\n\n /**\n * Starting and ending amplitude of waves\n * @member {number[]}\n * @default [0, 20]\n */\n prototypeAccessors.amplitude.set = function (value) {\n this.uniforms.amplitude[0] = value[0];\n this.uniforms.amplitude[1] = value[1];\n };\n prototypeAccessors.amplitude.get = function () {\n return this.uniforms.amplitude;\n };\n\n /**\n * Starting and ending length of waves\n * @member {number[]}\n * @default [30, 100]\n */\n prototypeAccessors.waveLength.set = function (value) {\n this.uniforms.waveLength[0] = value[0];\n this.uniforms.waveLength[1] = value[1];\n };\n prototypeAccessors.waveLength.get = function () {\n return this.uniforms.waveLength;\n };\n\n /**\n * Starting and ending alpha values\n * @member {number[]}\n * @default [1, 1]\n */\n prototypeAccessors.alpha.set = function (value) {\n this.uniforms.alpha[0] = value[0];\n this.uniforms.alpha[1] = value[1];\n };\n prototypeAccessors.alpha.get = function () {\n return this.uniforms.alpha;\n };\n\n Object.defineProperties( ReflectionFilter.prototype, prototypeAccessors );\n\n return ReflectionFilter;\n}(Filter));\n\nexport { ReflectionFilter };\n//# sourceMappingURL=filter-reflection.esm.js.map\n","/*!\n * @pixi/filter-rgb-split - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-rgb-split is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"precision mediump float;\\n\\nvarying vec2 vTextureCoord;\\n\\nuniform sampler2D uSampler;\\nuniform vec4 filterArea;\\nuniform vec2 red;\\nuniform vec2 green;\\nuniform vec2 blue;\\n\\nvoid main(void)\\n{\\n gl_FragColor.r = texture2D(uSampler, vTextureCoord + red/filterArea.xy).r;\\n gl_FragColor.g = texture2D(uSampler, vTextureCoord + green/filterArea.xy).g;\\n gl_FragColor.b = texture2D(uSampler, vTextureCoord + blue/filterArea.xy).b;\\n gl_FragColor.a = texture2D(uSampler, vTextureCoord).a;\\n}\\n\";\n\n/**\n * An RGB Split Filter.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/rgb.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-rgb-split|@pixi/filter-rgb-split}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {PIXI.Point} [red=[-10,0]] Red channel offset\n * @param {PIXI.Point} [green=[0, 10]] Green channel offset\n * @param {PIXI.Point} [blue=[0, 0]] Blue channel offset\n */\nvar RGBSplitFilter = /*@__PURE__*/(function (Filter) {\n function RGBSplitFilter(red, green, blue) {\n if ( red === void 0 ) red = [-10, 0];\n if ( green === void 0 ) green = [0, 10];\n if ( blue === void 0 ) blue = [0, 0];\n\n Filter.call(this, vertex, fragment);\n this.red = red;\n this.green = green;\n this.blue = blue;\n }\n\n if ( Filter ) RGBSplitFilter.__proto__ = Filter;\n RGBSplitFilter.prototype = Object.create( Filter && Filter.prototype );\n RGBSplitFilter.prototype.constructor = RGBSplitFilter;\n\n var prototypeAccessors = { red: { configurable: true },green: { configurable: true },blue: { configurable: true } };\n\n /**\n * Red channel offset.\n *\n * @member {PIXI.Point}\n */\n prototypeAccessors.red.get = function () {\n return this.uniforms.red;\n };\n prototypeAccessors.red.set = function (value) {\n this.uniforms.red = value;\n };\n\n /**\n * Green channel offset.\n *\n * @member {PIXI.Point}\n */\n prototypeAccessors.green.get = function () {\n return this.uniforms.green;\n };\n prototypeAccessors.green.set = function (value) {\n this.uniforms.green = value;\n };\n\n /**\n * Blue offset.\n *\n * @member {PIXI.Point}\n */\n prototypeAccessors.blue.get = function () {\n return this.uniforms.blue;\n };\n prototypeAccessors.blue.set = function (value) {\n this.uniforms.blue = value;\n };\n\n Object.defineProperties( RGBSplitFilter.prototype, prototypeAccessors );\n\n return RGBSplitFilter;\n}(Filter));\n\nexport { RGBSplitFilter };\n//# sourceMappingURL=filter-rgb-split.esm.js.map\n","/*!\n * @pixi/filter-shockwave - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-shockwave is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec4 filterArea;\\nuniform vec4 filterClamp;\\n\\nuniform vec2 center;\\n\\nuniform float amplitude;\\nuniform float wavelength;\\n// uniform float power;\\nuniform float brightness;\\nuniform float speed;\\nuniform float radius;\\n\\nuniform float time;\\n\\nconst float PI = 3.14159;\\n\\nvoid main()\\n{\\n float halfWavelength = wavelength * 0.5 / filterArea.x;\\n float maxRadius = radius / filterArea.x;\\n float currentRadius = time * speed / filterArea.x;\\n\\n float fade = 1.0;\\n\\n if (maxRadius > 0.0) {\\n if (currentRadius > maxRadius) {\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n return;\\n }\\n fade = 1.0 - pow(currentRadius / maxRadius, 2.0);\\n }\\n\\n vec2 dir = vec2(vTextureCoord - center / filterArea.xy);\\n dir.y *= filterArea.y / filterArea.x;\\n float dist = length(dir);\\n\\n if (dist <= 0.0 || dist < currentRadius - halfWavelength || dist > currentRadius + halfWavelength) {\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n return;\\n }\\n\\n vec2 diffUV = normalize(dir);\\n\\n float diff = (dist - currentRadius) / halfWavelength;\\n\\n float p = 1.0 - pow(abs(diff), 2.0);\\n\\n // float powDiff = diff * pow(p, 2.0) * ( amplitude * fade );\\n float powDiff = 1.25 * sin(diff * PI) * p * ( amplitude * fade );\\n\\n vec2 offset = diffUV * powDiff / filterArea.xy;\\n\\n // Do clamp :\\n vec2 coord = vTextureCoord + offset;\\n vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw);\\n vec4 color = texture2D(uSampler, clampedCoord);\\n if (coord != clampedCoord) {\\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\\n }\\n\\n // No clamp :\\n // gl_FragColor = texture2D(uSampler, vTextureCoord + offset);\\n\\n color.rgb *= 1.0 + (brightness - 1.0) * p * fade;\\n\\n gl_FragColor = color;\\n}\\n\";\n\n/**\n * The ShockwaveFilter class lets you apply a shockwave effect.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/shockwave.gif)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-shockwave|@pixi/filter-shockwave}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n *\n * @param {PIXI.Point|number[]} [center=[0.5, 0.5]] See `center` property.\n * @param {object} [options] - The optional parameters of shockwave filter.\n * @param {number} [options.amplitude=0.5] - See `amplitude`` property.\n * @param {number} [options.wavelength=1.0] - See `wavelength` property.\n * @param {number} [options.speed=500.0] - See `speed` property.\n * @param {number} [options.brightness=8] - See `brightness` property.\n * @param {number} [options.radius=4] - See `radius` property.\n * @param {number} [time=0] - See `time` property.\n */\nvar ShockwaveFilter = /*@__PURE__*/(function (Filter) {\n function ShockwaveFilter(center, options, time) {\n if ( center === void 0 ) center = [0.0, 0.0];\n if ( options === void 0 ) options = {};\n if ( time === void 0 ) time = 0;\n\n Filter.call(this, vertex, fragment);\n\n this.center = center;\n\n if (Array.isArray(options)) {\n // eslint-disable-next-line no-console\n console.warn('Deprecated Warning: ShockwaveFilter params Array has been changed to options Object.');\n options = {};\n }\n\n options = Object.assign({\n amplitude: 30.0,\n wavelength: 160.0,\n brightness: 1.0,\n speed: 500.0,\n radius: -1.0,\n }, options);\n\n this.amplitude = options.amplitude;\n\n this.wavelength = options.wavelength;\n\n this.brightness = options.brightness;\n\n this.speed = options.speed;\n\n this.radius = options.radius;\n\n /**\n * Sets the elapsed time of the shockwave.\n * It could control the current size of shockwave.\n *\n * @member {number}\n */\n this.time = time;\n }\n\n if ( Filter ) ShockwaveFilter.__proto__ = Filter;\n ShockwaveFilter.prototype = Object.create( Filter && Filter.prototype );\n ShockwaveFilter.prototype.constructor = ShockwaveFilter;\n\n var prototypeAccessors = { center: { configurable: true },amplitude: { configurable: true },wavelength: { configurable: true },brightness: { configurable: true },speed: { configurable: true },radius: { configurable: true } };\n\n ShockwaveFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n /**\n * There is no set/get of `time`, for performance.\n * Because in the most real cases, `time` will be changed in ever game tick.\n * Use set/get will take more function-call.\n */\n this.uniforms.time = this.time;\n\n filterManager.applyFilter(this, input, output, clear);\n };\n\n /**\n * Sets the center of the shockwave in normalized screen coords. That is\n * (0,0) is the top-left and (1,1) is the bottom right.\n *\n * @member {PIXI.Point|number[]}\n */\n prototypeAccessors.center.get = function () {\n return this.uniforms.center;\n };\n prototypeAccessors.center.set = function (value) {\n this.uniforms.center = value;\n };\n\n /**\n * The amplitude of the shockwave.\n *\n * @member {number}\n */\n prototypeAccessors.amplitude.get = function () {\n return this.uniforms.amplitude;\n };\n prototypeAccessors.amplitude.set = function (value) {\n this.uniforms.amplitude = value;\n };\n\n /**\n * The wavelength of the shockwave.\n *\n * @member {number}\n */\n prototypeAccessors.wavelength.get = function () {\n return this.uniforms.wavelength;\n };\n prototypeAccessors.wavelength.set = function (value) {\n this.uniforms.wavelength = value;\n };\n\n /**\n * The brightness of the shockwave.\n *\n * @member {number}\n */\n prototypeAccessors.brightness.get = function () {\n return this.uniforms.brightness;\n };\n prototypeAccessors.brightness.set = function (value) {\n this.uniforms.brightness = value;\n };\n\n /**\n * The speed about the shockwave ripples out.\n * The unit is `pixel/second`\n *\n * @member {number}\n */\n prototypeAccessors.speed.get = function () {\n return this.uniforms.speed;\n };\n prototypeAccessors.speed.set = function (value) {\n this.uniforms.speed = value;\n };\n\n /**\n * The maximum radius of shockwave.\n * `< 0.0` means it's infinity.\n *\n * @member {number}\n */\n prototypeAccessors.radius.get = function () {\n return this.uniforms.radius;\n };\n prototypeAccessors.radius.set = function (value) {\n this.uniforms.radius = value;\n };\n\n Object.defineProperties( ShockwaveFilter.prototype, prototypeAccessors );\n\n return ShockwaveFilter;\n}(Filter));\n\nexport { ShockwaveFilter };\n//# sourceMappingURL=filter-shockwave.esm.js.map\n","/*!\n * @pixi/filter-simple-lightmap - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-simple-lightmap is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { hex2rgb, rgb2hex } from '@pixi/utils';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform sampler2D uLightmap;\\nuniform vec4 filterArea;\\nuniform vec2 dimensions;\\nuniform vec4 ambientColor;\\nvoid main() {\\n vec4 diffuseColor = texture2D(uSampler, vTextureCoord);\\n vec2 lightCoord = (vTextureCoord * filterArea.xy) / dimensions;\\n vec4 light = texture2D(uLightmap, lightCoord);\\n vec3 ambient = ambientColor.rgb * ambientColor.a;\\n vec3 intensity = ambient + light.rgb;\\n vec3 finalColor = diffuseColor.rgb * intensity;\\n gl_FragColor = vec4(finalColor, diffuseColor.a);\\n}\\n\";\n\n/**\n* SimpleLightmap, originally by Oza94\n* http://www.html5gamedevs.com/topic/20027-pixijs-simple-lightmapping/\n* http://codepen.io/Oza94/pen/EPoRxj\n*\n* You have to specify filterArea, or suffer consequences.\n* You may have to use it with `filter.dontFit = true`,\n* until we rewrite this using same approach as for DisplacementFilter.\n*\n* ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/simple-lightmap.png)\n* @class\n* @extends PIXI.Filter\n* @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-simple-lightmap|@pixi/filter-simple-lightmap}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n* @param {PIXI.Texture} texture a texture where your lightmap is rendered\n* @param {Array|number} [color=0x000000] An RGBA array of the ambient color\n* @param {number} [alpha=1] Default alpha set independent of color (if it's a number, not array).\n*\n* @example\n* displayObject.filters = [new SimpleLightmapFilter(texture, 0x666666)];\n*/\nvar SimpleLightmapFilter = /*@__PURE__*/(function (Filter) {\n function SimpleLightmapFilter(texture, color, alpha) {\n if ( color === void 0 ) color = 0x000000;\n if ( alpha === void 0 ) alpha = 1;\n\n Filter.call(this, vertex, fragment);\n this.uniforms.dimensions = new Float32Array(2);\n this.uniforms.ambientColor = new Float32Array([0, 0, 0, alpha]);\n this.texture = texture;\n this.color = color;\n }\n\n if ( Filter ) SimpleLightmapFilter.__proto__ = Filter;\n SimpleLightmapFilter.prototype = Object.create( Filter && Filter.prototype );\n SimpleLightmapFilter.prototype.constructor = SimpleLightmapFilter;\n\n var prototypeAccessors = { texture: { configurable: true },color: { configurable: true },alpha: { configurable: true } };\n\n /**\n * Applies the filter.\n * @private\n * @param {PIXI.FilterManager} filterManager - The manager.\n * @param {PIXI.RenderTarget} input - The input target.\n * @param {PIXI.RenderTarget} output - The output target.\n */\n SimpleLightmapFilter.prototype.apply = function apply (filterManager, input, output, clear) {\n this.uniforms.dimensions[0] = input.filterFrame.width;\n this.uniforms.dimensions[1] = input.filterFrame.height;\n\n // draw the filter...\n filterManager.applyFilter(this, input, output, clear);\n };\n\n\n /**\n * a texture where your lightmap is rendered\n * @member {PIXI.Texture}\n */\n prototypeAccessors.texture.get = function () {\n return this.uniforms.uLightmap;\n };\n prototypeAccessors.texture.set = function (value) {\n this.uniforms.uLightmap = value;\n };\n\n /**\n * An RGBA array of the ambient color or a hex color without alpha\n * @member {Array|number}\n */\n prototypeAccessors.color.set = function (value) {\n var arr = this.uniforms.ambientColor;\n if (typeof value === 'number') {\n hex2rgb(value, arr);\n this._color = value;\n }\n else {\n arr[0] = value[0];\n arr[1] = value[1];\n arr[2] = value[2];\n arr[3] = value[3];\n this._color = rgb2hex(arr);\n }\n };\n prototypeAccessors.color.get = function () {\n return this._color;\n };\n\n /**\n * When setting `color` as hex, this can be used to set alpha independently.\n * @member {number}\n */\n prototypeAccessors.alpha.get = function () {\n return this.uniforms.ambientColor[3];\n };\n prototypeAccessors.alpha.set = function (value) {\n this.uniforms.ambientColor[3] = value;\n };\n\n Object.defineProperties( SimpleLightmapFilter.prototype, prototypeAccessors );\n\n return SimpleLightmapFilter;\n}(Filter));\n\nexport { SimpleLightmapFilter };\n//# sourceMappingURL=filter-simple-lightmap.esm.js.map\n","/*!\n * @pixi/filter-tilt-shift - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-tilt-shift is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\nimport { Point } from '@pixi/math';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\n\\nuniform sampler2D uSampler;\\nuniform float blur;\\nuniform float gradientBlur;\\nuniform vec2 start;\\nuniform vec2 end;\\nuniform vec2 delta;\\nuniform vec2 texSize;\\n\\nfloat random(vec3 scale, float seed)\\n{\\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\\n}\\n\\nvoid main(void)\\n{\\n vec4 color = vec4(0.0);\\n float total = 0.0;\\n\\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\\n float radius = smoothstep(0.0, 1.0, abs(dot(vTextureCoord * texSize - start, normal)) / gradientBlur) * blur;\\n\\n for (float t = -30.0; t <= 30.0; t++)\\n {\\n float percent = (t + offset - 0.5) / 30.0;\\n float weight = 1.0 - abs(percent);\\n vec4 sample = texture2D(uSampler, vTextureCoord + delta / texSize * percent * radius);\\n sample.rgb *= sample.a;\\n color += sample * weight;\\n total += weight;\\n }\\n\\n color /= total;\\n color.rgb /= color.a + 0.00001;\\n\\n gl_FragColor = color;\\n}\\n\";\n\n/**\n * @author Vico @vicocotea\n * original filter https://github.com/evanw/glfx.js/blob/master/src/filters/blur/tiltshift.js by Evan Wallace : http://madebyevan.com/\n */\n\n/**\n * A TiltShiftAxisFilter.\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @private\n */\nvar TiltShiftAxisFilter = /*@__PURE__*/(function (Filter) {\n function TiltShiftAxisFilter(blur, gradientBlur, start, end){\n if ( blur === void 0 ) blur = 100;\n if ( gradientBlur === void 0 ) gradientBlur = 600;\n if ( start === void 0 ) start = null;\n if ( end === void 0 ) end = null;\n\n Filter.call(this, vertex, fragment);\n this.uniforms.blur = blur;\n this.uniforms.gradientBlur = gradientBlur;\n this.uniforms.start = start || new Point(0, window.innerHeight / 2);\n this.uniforms.end = end || new Point(600, window.innerHeight / 2);\n this.uniforms.delta = new Point(30, 30);\n this.uniforms.texSize = new Point(window.innerWidth, window.innerHeight);\n this.updateDelta();\n }\n\n if ( Filter ) TiltShiftAxisFilter.__proto__ = Filter;\n TiltShiftAxisFilter.prototype = Object.create( Filter && Filter.prototype );\n TiltShiftAxisFilter.prototype.constructor = TiltShiftAxisFilter;\n\n var prototypeAccessors = { blur: { configurable: true },gradientBlur: { configurable: true },start: { configurable: true },end: { configurable: true } };\n\n /**\n * Updates the filter delta values.\n * This is overridden in the X and Y filters, does nothing for this class.\n *\n */\n TiltShiftAxisFilter.prototype.updateDelta = function updateDelta () {\n this.uniforms.delta.x = 0;\n this.uniforms.delta.y = 0;\n };\n\n /**\n * The strength of the blur.\n *\n * @member {number}\n * @memberof PIXI.filters.TiltShiftAxisFilter#\n */\n prototypeAccessors.blur.get = function () {\n return this.uniforms.blur;\n };\n prototypeAccessors.blur.set = function (value) {\n this.uniforms.blur = value;\n };\n\n /**\n * The strength of the gradient blur.\n *\n * @member {number}\n * @memberof PIXI.filters.TiltShiftAxisFilter#\n */\n prototypeAccessors.gradientBlur.get = function () {\n return this.uniforms.gradientBlur;\n };\n prototypeAccessors.gradientBlur.set = function (value) {\n this.uniforms.gradientBlur = value;\n };\n\n /**\n * The X value to start the effect at.\n *\n * @member {PIXI.Point}\n * @memberof PIXI.filters.TiltShiftAxisFilter#\n */\n prototypeAccessors.start.get = function () {\n return this.uniforms.start;\n };\n prototypeAccessors.start.set = function (value) {\n this.uniforms.start = value;\n this.updateDelta();\n };\n\n /**\n * The X value to end the effect at.\n *\n * @member {PIXI.Point}\n * @memberof PIXI.filters.TiltShiftAxisFilter#\n */\n prototypeAccessors.end.get = function () {\n return this.uniforms.end;\n };\n prototypeAccessors.end.set = function (value) {\n this.uniforms.end = value;\n this.updateDelta();\n };\n\n Object.defineProperties( TiltShiftAxisFilter.prototype, prototypeAccessors );\n\n return TiltShiftAxisFilter;\n}(Filter));\n\n/**\n * @author Vico @vicocotea\n * original filter https://github.com/evanw/glfx.js/blob/master/src/filters/blur/tiltshift.js by Evan Wallace : http://madebyevan.com/\n */\n\n/**\n * A TiltShiftXFilter.\n *\n * @class\n * @extends PIXI.TiltShiftAxisFilter\n * @memberof PIXI.filters\n * @private\n */\nvar TiltShiftXFilter = /*@__PURE__*/(function (TiltShiftAxisFilter) {\n function TiltShiftXFilter () {\n TiltShiftAxisFilter.apply(this, arguments);\n }\n\n if ( TiltShiftAxisFilter ) TiltShiftXFilter.__proto__ = TiltShiftAxisFilter;\n TiltShiftXFilter.prototype = Object.create( TiltShiftAxisFilter && TiltShiftAxisFilter.prototype );\n TiltShiftXFilter.prototype.constructor = TiltShiftXFilter;\n\n TiltShiftXFilter.prototype.updateDelta = function updateDelta () {\n var dx = this.uniforms.end.x - this.uniforms.start.x;\n var dy = this.uniforms.end.y - this.uniforms.start.y;\n var d = Math.sqrt(dx * dx + dy * dy);\n this.uniforms.delta.x = dx / d;\n this.uniforms.delta.y = dy / d;\n };\n\n return TiltShiftXFilter;\n}(TiltShiftAxisFilter));\n\n/**\n * @author Vico @vicocotea\n * original filter https://github.com/evanw/glfx.js/blob/master/src/filters/blur/tiltshift.js by Evan Wallace : http://madebyevan.com/\n */\n\n/**\n * A TiltShiftYFilter.\n *\n * @class\n * @extends PIXI.TiltShiftAxisFilter\n * @memberof PIXI.filters\n * @private\n */\nvar TiltShiftYFilter = /*@__PURE__*/(function (TiltShiftAxisFilter) {\n function TiltShiftYFilter () {\n TiltShiftAxisFilter.apply(this, arguments);\n }\n\n if ( TiltShiftAxisFilter ) TiltShiftYFilter.__proto__ = TiltShiftAxisFilter;\n TiltShiftYFilter.prototype = Object.create( TiltShiftAxisFilter && TiltShiftAxisFilter.prototype );\n TiltShiftYFilter.prototype.constructor = TiltShiftYFilter;\n\n TiltShiftYFilter.prototype.updateDelta = function updateDelta () {\n var dx = this.uniforms.end.x - this.uniforms.start.x;\n var dy = this.uniforms.end.y - this.uniforms.start.y;\n var d = Math.sqrt(dx * dx + dy * dy);\n this.uniforms.delta.x = -dy / d;\n this.uniforms.delta.y = dx / d;\n };\n\n return TiltShiftYFilter;\n}(TiltShiftAxisFilter));\n\n/**\n * @author Vico @vicocotea\n * original filter https://github.com/evanw/glfx.js/blob/master/src/filters/blur/tiltshift.js by Evan Wallace : http://madebyevan.com/\n */\n\n/**\n * A TiltShift Filter. Manages the pass of both a TiltShiftXFilter and TiltShiftYFilter.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/tilt-shift.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-tilt-shift|@pixi/filter-tilt-shift}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {number} [blur=100] The strength of the blur.\n * @param {number} [gradientBlur=600] The strength of the gradient blur.\n * @param {PIXI.Point} [start=null] The Y value to start the effect at.\n * @param {PIXI.Point} [end=null] The Y value to end the effect at.\n */\nvar TiltShiftFilter = /*@__PURE__*/(function (Filter) {\n function TiltShiftFilter(blur, gradientBlur, start, end) {\n if ( blur === void 0 ) blur = 100;\n if ( gradientBlur === void 0 ) gradientBlur = 600;\n if ( start === void 0 ) start = null;\n if ( end === void 0 ) end = null;\n\n Filter.call(this);\n this.tiltShiftXFilter = new TiltShiftXFilter(blur, gradientBlur, start, end);\n this.tiltShiftYFilter = new TiltShiftYFilter(blur, gradientBlur, start, end);\n }\n\n if ( Filter ) TiltShiftFilter.__proto__ = Filter;\n TiltShiftFilter.prototype = Object.create( Filter && Filter.prototype );\n TiltShiftFilter.prototype.constructor = TiltShiftFilter;\n\n var prototypeAccessors = { blur: { configurable: true },gradientBlur: { configurable: true },start: { configurable: true },end: { configurable: true } };\n\n TiltShiftFilter.prototype.apply = function apply (filterManager, input, output) {\n var renderTarget = filterManager.getFilterTexture();\n this.tiltShiftXFilter.apply(filterManager, input, renderTarget);\n this.tiltShiftYFilter.apply(filterManager, renderTarget, output);\n filterManager.returnFilterTexture(renderTarget);\n };\n\n /**\n * The strength of the blur.\n *\n * @member {number}\n */\n prototypeAccessors.blur.get = function () {\n return this.tiltShiftXFilter.blur;\n };\n prototypeAccessors.blur.set = function (value) {\n this.tiltShiftXFilter.blur = this.tiltShiftYFilter.blur = value;\n };\n\n /**\n * The strength of the gradient blur.\n *\n * @member {number}\n */\n prototypeAccessors.gradientBlur.get = function () {\n return this.tiltShiftXFilter.gradientBlur;\n };\n prototypeAccessors.gradientBlur.set = function (value) {\n this.tiltShiftXFilter.gradientBlur = this.tiltShiftYFilter.gradientBlur = value;\n };\n\n /**\n * The Y value to start the effect at.\n *\n * @member {PIXI.Point}\n */\n prototypeAccessors.start.get = function () {\n return this.tiltShiftXFilter.start;\n };\n prototypeAccessors.start.set = function (value) {\n this.tiltShiftXFilter.start = this.tiltShiftYFilter.start = value;\n };\n\n /**\n * The Y value to end the effect at.\n *\n * @member {PIXI.Point}\n */\n prototypeAccessors.end.get = function () {\n return this.tiltShiftXFilter.end;\n };\n prototypeAccessors.end.set = function (value) {\n this.tiltShiftXFilter.end = this.tiltShiftYFilter.end = value;\n };\n\n Object.defineProperties( TiltShiftFilter.prototype, prototypeAccessors );\n\n return TiltShiftFilter;\n}(Filter));\n\nexport { TiltShiftAxisFilter, TiltShiftFilter, TiltShiftXFilter, TiltShiftYFilter };\n//# sourceMappingURL=filter-tilt-shift.esm.js.map\n","/*!\n * @pixi/filter-twist - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-twist is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\n\\nuniform sampler2D uSampler;\\nuniform float radius;\\nuniform float angle;\\nuniform vec2 offset;\\nuniform vec4 filterArea;\\n\\nvec2 mapCoord( vec2 coord )\\n{\\n coord *= filterArea.xy;\\n coord += filterArea.zw;\\n\\n return coord;\\n}\\n\\nvec2 unmapCoord( vec2 coord )\\n{\\n coord -= filterArea.zw;\\n coord /= filterArea.xy;\\n\\n return coord;\\n}\\n\\nvec2 twist(vec2 coord)\\n{\\n coord -= offset;\\n\\n float dist = length(coord);\\n\\n if (dist < radius)\\n {\\n float ratioDist = (radius - dist) / radius;\\n float angleMod = ratioDist * ratioDist * angle;\\n float s = sin(angleMod);\\n float c = cos(angleMod);\\n coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c);\\n }\\n\\n coord += offset;\\n\\n return coord;\\n}\\n\\nvoid main(void)\\n{\\n\\n vec2 coord = mapCoord(vTextureCoord);\\n\\n coord = twist(coord);\\n\\n coord = unmapCoord(coord);\\n\\n gl_FragColor = texture2D(uSampler, coord );\\n\\n}\\n\";\n\n/**\n * This filter applies a twist effect making display objects appear twisted in the given direction.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/twist.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-twist|@pixi/filter-twist}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {number} [radius=200] The radius of the twist.\n * @param {number} [angle=4] The angle of the twist.\n * @param {number} [padding=20] Padding for filter area.\n */\nvar TwistFilter = /*@__PURE__*/(function (Filter) {\n function TwistFilter(radius, angle, padding) {\n if ( radius === void 0 ) radius = 200;\n if ( angle === void 0 ) angle = 4;\n if ( padding === void 0 ) padding = 20;\n\n Filter.call(this, vertex, fragment);\n\n this.radius = radius;\n this.angle = angle;\n this.padding = padding;\n }\n\n if ( Filter ) TwistFilter.__proto__ = Filter;\n TwistFilter.prototype = Object.create( Filter && Filter.prototype );\n TwistFilter.prototype.constructor = TwistFilter;\n\n var prototypeAccessors = { offset: { configurable: true },radius: { configurable: true },angle: { configurable: true } };\n\n /**\n * This point describes the the offset of the twist.\n *\n * @member {PIXI.Point}\n */\n prototypeAccessors.offset.get = function () {\n return this.uniforms.offset;\n };\n prototypeAccessors.offset.set = function (value) {\n this.uniforms.offset = value;\n };\n\n /**\n * The radius of the twist.\n *\n * @member {number}\n */\n prototypeAccessors.radius.get = function () {\n return this.uniforms.radius;\n };\n prototypeAccessors.radius.set = function (value) {\n this.uniforms.radius = value;\n };\n\n /**\n * The angle of the twist.\n *\n * @member {number}\n */\n prototypeAccessors.angle.get = function () {\n return this.uniforms.angle;\n };\n prototypeAccessors.angle.set = function (value) {\n this.uniforms.angle = value;\n };\n\n Object.defineProperties( TwistFilter.prototype, prototypeAccessors );\n\n return TwistFilter;\n}(Filter));\n\nexport { TwistFilter };\n//# sourceMappingURL=filter-twist.esm.js.map\n","/*!\n * @pixi/filter-zoom-blur - v3.1.0\n * Compiled Wed, 11 Mar 2020 20:38:18 UTC\n *\n * @pixi/filter-zoom-blur is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\nimport { Filter } from '@pixi/core';\n\nvar vertex = \"attribute vec2 aVertexPosition;\\nattribute vec2 aTextureCoord;\\n\\nuniform mat3 projectionMatrix;\\n\\nvarying vec2 vTextureCoord;\\n\\nvoid main(void)\\n{\\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\n\nvar fragment = \"varying vec2 vTextureCoord;\\nuniform sampler2D uSampler;\\nuniform vec4 filterArea;\\n\\nuniform vec2 uCenter;\\nuniform float uStrength;\\nuniform float uInnerRadius;\\nuniform float uRadius;\\n\\nconst float MAX_KERNEL_SIZE = 32.0;\\n\\n// author: http://byteblacksmith.com/improvements-to-the-canonical-one-liner-glsl-rand-for-opengl-es-2-0/\\nhighp float rand(vec2 co, float seed) {\\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n highp float dt = dot(co + seed, vec2(a, b)), sn = mod(dt, 3.14159);\\n return fract(sin(sn) * c + seed);\\n}\\n\\nvoid main() {\\n\\n float minGradient = uInnerRadius * 0.3;\\n float innerRadius = (uInnerRadius + minGradient * 0.5) / filterArea.x;\\n\\n float gradient = uRadius * 0.3;\\n float radius = (uRadius - gradient * 0.5) / filterArea.x;\\n\\n float countLimit = MAX_KERNEL_SIZE;\\n\\n vec2 dir = vec2(uCenter.xy / filterArea.xy - vTextureCoord);\\n float dist = length(vec2(dir.x, dir.y * filterArea.y / filterArea.x));\\n\\n float strength = uStrength;\\n\\n float delta = 0.0;\\n float gap;\\n if (dist < innerRadius) {\\n delta = innerRadius - dist;\\n gap = minGradient;\\n } else if (radius >= 0.0 && dist > radius) { // radius < 0 means it's infinity\\n delta = dist - radius;\\n gap = gradient;\\n }\\n\\n if (delta > 0.0) {\\n float normalCount = gap / filterArea.x;\\n delta = (normalCount - delta) / normalCount;\\n countLimit *= delta;\\n strength *= delta;\\n if (countLimit < 1.0)\\n {\\n gl_FragColor = texture2D(uSampler, vTextureCoord);\\n return;\\n }\\n }\\n\\n // randomize the lookup values to hide the fixed number of samples\\n float offset = rand(vTextureCoord, 0.0);\\n\\n float total = 0.0;\\n vec4 color = vec4(0.0);\\n\\n dir *= strength;\\n\\n for (float t = 0.0; t < MAX_KERNEL_SIZE; t++) {\\n float percent = (t + offset) / MAX_KERNEL_SIZE;\\n float weight = 4.0 * (percent - percent * percent);\\n vec2 p = vTextureCoord + dir * percent;\\n vec4 sample = texture2D(uSampler, p);\\n\\n // switch to pre-multiplied alpha to correctly blur transparent images\\n // sample.rgb *= sample.a;\\n\\n color += sample * weight;\\n total += weight;\\n\\n if (t > countLimit){\\n break;\\n }\\n }\\n\\n color /= total;\\n // switch back from pre-multiplied alpha\\n // color.rgb /= color.a + 0.00001;\\n\\n gl_FragColor = color;\\n}\\n\";\n\n/**\n * The ZoomFilter applies a Zoom blur to an object.
\n * ![original](../tools/screenshots/dist/original.png)![filter](../tools/screenshots/dist/zoom-blur.png)\n *\n * @class\n * @extends PIXI.Filter\n * @memberof PIXI.filters\n * @see {@link https://www.npmjs.com/package/@pixi/filter-zoom-blur|@pixi/filter-zoom-blur}\n * @see {@link https://www.npmjs.com/package/pixi-filters|pixi-filters}\n * @param {object} [options] Filter options to use.\n * @param {number} [options.strength=0.1] Sets the strength of the zoom blur effect\n * @param {PIXI.Point|number[]} [options.center=[0,0]] The center of the zoom.\n * @param {number} [options.innerRadius=0] The inner radius of zoom. The part in inner circle won't apply zoom blur effect.\n * @param {number} [options.radius=-1] See `radius` property.\n */\nvar ZoomBlurFilter = /*@__PURE__*/(function (Filter) {\n function ZoomBlurFilter(options) {\n Filter.call(this, vertex, fragment);\n\n // @deprecated (strength, center, innerRadius, radius) args\n if (typeof options !== 'object') {\n var strength = arguments[0];\n var center = arguments[1];\n var innerRadius = arguments[2];\n var radius = arguments[3];\n options = {};\n if (strength !== undefined) {\n options.strength = strength;\n }\n if (center !== undefined) {\n options.center = center;\n }\n if (innerRadius !== undefined) {\n options.innerRadius = innerRadius;\n }\n if (radius !== undefined) {\n options.radius = radius;\n }\n }\n\n Object.assign(this, {\n strength: 0.1,\n center: [0, 0],\n innerRadius: 0,\n radius: -1,\n }, options);\n }\n\n if ( Filter ) ZoomBlurFilter.__proto__ = Filter;\n ZoomBlurFilter.prototype = Object.create( Filter && Filter.prototype );\n ZoomBlurFilter.prototype.constructor = ZoomBlurFilter;\n\n var prototypeAccessors = { center: { configurable: true },strength: { configurable: true },innerRadius: { configurable: true },radius: { configurable: true } };\n\n /**\n * Center of the effect.\n *\n * @member {PIXI.Point|number[]}\n * @default [0, 0]\n */\n prototypeAccessors.center.get = function () {\n return this.uniforms.uCenter;\n };\n prototypeAccessors.center.set = function (value) {\n this.uniforms.uCenter = value;\n };\n\n /**\n * Intensity of the zoom effect.\n *\n * @member {number}\n * @default 0.1\n */\n prototypeAccessors.strength.get = function () {\n return this.uniforms.uStrength;\n };\n prototypeAccessors.strength.set = function (value) {\n this.uniforms.uStrength = value;\n };\n\n /**\n * Radius of the inner region not effected by blur.\n *\n * @member {number}\n * @default 0\n */\n prototypeAccessors.innerRadius.get = function () {\n return this.uniforms.uInnerRadius;\n };\n prototypeAccessors.innerRadius.set = function (value) {\n this.uniforms.uInnerRadius = value;\n };\n\n /**\n * Outer radius of the effect. The default value is `-1`.\n * `< 0.0` means it's infinity.\n *\n * @member {number}\n * @default -1\n */\n prototypeAccessors.radius.get = function () {\n return this.uniforms.uRadius;\n };\n prototypeAccessors.radius.set = function (value) {\n if (value < 0 || value === Infinity) {\n value = -1;\n }\n this.uniforms.uRadius = value;\n };\n\n Object.defineProperties( ZoomBlurFilter.prototype, prototypeAccessors );\n\n return ZoomBlurFilter;\n}(Filter));\n\nexport { ZoomBlurFilter };\n//# sourceMappingURL=filter-zoom-blur.esm.js.map\n"],"names":["vertex","fragment","AdjustmentFilter","Filter","options","call","this","Object","assign","gamma","saturation","contrast","brightness","red","green","blue","alpha","__proto__","prototype","create","constructor","apply","filterManager","input","output","clear","uniforms","Math","max","applyFilter","fragmentClamp","KawaseBlurFilter","blur","quality","clamp","uOffset","Float32Array","_pixelSize","Point","pixelSize","_clamp","_kernels","Array","isArray","kernels","_blur","prototypeAccessors","configurable","offset","uvX","x","_frame","width","uvY","y","height","_quality","tmp","renderTarget","getFilterTexture","source","target","last","i","returnFilterTexture","_generateKernels","k","step","push","get","set","value","length","round","defineProperties","ExtractBrightnessFilter","threshold","fragment$1","AdvancedBloomFilter","bloomScale","resolution","settings","RESOLUTION","_extractFilter","_blurFilter","currentState","brightTarget","bloomTarget","bloomTexture","_resolution","AsciiFilter","size","BevelFilter","lightColor","shadowColor","rotation","thickness","lightAlpha","shadowAlpha","_updateTransform","transformX","_thickness","cos","_angle","transformY","sin","DEG_TO_RAD","rgb2hex","hex2rgb","BloomFilter","kernelSize","blurX","blurY","blurXFilter","BlurFilterPass","blurYFilter","blendMode","BLEND_MODES","SCREEN","defaultFilter","AlphaFilter","BulgePinchFilter","center","arguments","radius","strength","undefined","dimensions","filterFrame","ColorMapFilter","colorMap","nearest","mix","_size","_sliceSize","_slicePixelSize","_sliceInnerSize","_scaleMode","_nearest","colorSize","_mix","_colorMap","Texture","from","baseTexture","scaleMode","mipmap","SCALE_MODES","NEAREST","LINEAR","texture","_glTextures","_updateID","emit","updateColorMap","destroy","destroyBase","ColorOverlayFilter","color","arr","_color","ColorReplaceFilter","originalColor","newColor","epsilon","_originalColor","_newColor","ConvolutionFilter","matrix","texelSize","this$1","forEach","v","CrossHatchFilter","CRTFilter","time","seed","curvature","lineWidth","lineContrast","verticalLine","noise","noiseSize","vignetting","vignettingAlpha","vignettingBlur","DotFilter","scale","angle","DropShadowFilter","console","warn","distance","shadowOnly","_tintFilter","shift","_updatePadding","padding","_updateShift","_distance","EmbossFilter","GlitchFilter","slices","direction","fillMode","average","minSize","sampleSize","_canvas","document","createElement","_slices","sizes","offsets","aspect","_randomizeSizes","_sizes","min","count","rest","averageWidth","w","random","rest$1","ratio","sqrt","i$1","w$1","shuffle","rand","temp","_randomizeOffsets","_offsets","refresh","redraw","ctx","getContext","clearRect","floor","fillStyle","fillRect","update","displacementMap","len","slicesWidth","slicesOffset","_direction","radians","sinDir","cosDir","TRANSPARENT","ORIGINAL","LOOP","CLAMP","MIRROR","GlowFilter","ref","defaults","outerStrength","innerStrength","knockout","replace","toFixed","glowColor","perlin","GodrayFilter","gain","lacunarity","parallel","_angleLight","light","MotionBlurFilter","velocity","uVelocity","_velocity","ObservablePoint","velocityChanged","uKernelSize","copyFrom","MultiColorReplaceFilter","replacements","maxColors","_maxColors","_replacements","originalColors","targetColors","originals","targets","colorCount","pair","targetColor","OldFilmFilter","sepia","scratch","scratchDensity","scratchWidth","OutlineFilter","samples","MAX_SAMPLES","MIN_SAMPLES","angleStep","PI","outlineColor","PixelateFilter","RadialBlurFilter","uRadian","uCenter","uRadius","Infinity","ReflectionFilter","amplitude","waveLength","mirror","boundary","RGBSplitFilter","ShockwaveFilter","wavelength","speed","SimpleLightmapFilter","ambientColor","uLightmap","TiltShiftAxisFilter","gradientBlur","start","end","window","innerHeight","delta","texSize","innerWidth","updateDelta","TiltShiftXFilter","dx","dy","d","TiltShiftYFilter","TiltShiftFilter","tiltShiftXFilter","tiltShiftYFilter","TwistFilter","ZoomBlurFilter","innerRadius","uStrength","uInnerRadius"],"mappings":";;;;;;;qDASA,IAAIA,EAAS,sRAETC,EAAW,4rBAwBXC,EAAiC,SAAUC,GAC3C,SAASD,EAAiBE,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pD,IAAM,SAAUC,GACtCjE,KAAKoB,SAASwR,QAAU3O,GAS5BzB,EAAmB+E,SAASxD,IAAM,WAC9B,OAAO/D,KAAKoB,SAAS4T,WAEzBxS,EAAmB+E,SAASvD,IAAM,SAAUC,GACxCjE,KAAKoB,SAAS4T,UAAY/Q,GAS9BzB,EAAmBuS,YAAYhR,IAAM,WACjC,OAAO/D,KAAKoB,SAAS6T,cAEzBzS,EAAmBuS,YAAY/Q,IAAM,SAAUC,GAC3CjE,KAAKoB,SAAS6T,aAAehR,GAUjCzB,EAAmB8E,OAAOvD,IAAM,WAC5B,OAAO/D,KAAKoB,SAASyR,SAEzBrQ,EAAmB8E,OAAOtD,IAAM,SAAUC,IAClCA,EAAQ,GAAKA,IAAU6O,EAAAA,KACvB7O,GAAS,GAEbjE,KAAKoB,SAASyR,QAAU5O,GAG5BhE,OAAOmE,iBAAkB0Q,EAAelU,UAAW4B,GAE5CsS,GACTjV"} \ No newline at end of file diff --git a/tokenmagic/module/tokenmagic.js b/tokenmagic/module/tokenmagic.js index f0239ad..fbd7669 100644 --- a/tokenmagic/module/tokenmagic.js +++ b/tokenmagic/module/tokenmagic.js @@ -1300,13 +1300,11 @@ function initSocketListener() { switch (data.tmAction) { case SocketAction.SET_FLAG: - // getting the scene coming from the socket await updateFlags(`filters`); break; case SocketAction.SET_ANIME_FLAG: - // getting the scene coming from the socket - await updateFlags(`animeInfos`); + await updateFlags(`animeInfo`); break; } }); diff --git a/tokenmagic/packs/token-magic-portfolio.db b/tokenmagic/packs/token-magic-portfolio.db index 4550633..7594326 100644 --- a/tokenmagic/packs/token-magic-portfolio.db +++ b/tokenmagic/packs/token-magic-portfolio.db @@ -13,14 +13,14 @@ {"_id":"9FRCMHBW6OsUXDwz","name":"35 - T02 - Chromatic Fire (xfire)","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"let params =\r\n[{\r\n filterType: \"xfire\",\r\n filterId: \"myChromaticXFire\",\r\n time: 0,\r\n blend: 2,\r\n amplitude: 1.1,\r\n dispersion: 0,\r\n chromatic: true,\r\n scaleX: 1,\r\n scaleY: 1,\r\n inlay: false,\r\n animated :\r\n {\r\n time : \r\n { \r\n active: true, \r\n speed: -0.0015, \r\n animType: \"move\" \r\n }\r\n }\r\n}];\r\n\r\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} {"_id":"9gvCwVdvis3NABbI","name":"30 - T01 - Simple Web (web)","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"let params = \r\n[{\r\n filterType: \"web\",\r\n filterId: \"simpleweb\",\r\n time: 100,\r\n div1: 20,\r\n div2: 10,\r\n animated :\r\n {\r\n time : \r\n { \r\n active: true, \r\n speed: 0.0005, \r\n animType: \"move\" \r\n }\r\n }\r\n}]\r\n\r\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} {"_id":"Ac6lTCiwnycb2Hbw","name":"23 - T01 - Mirror Images","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"let params =\r\n[{\r\n filterType: \"images\",\r\n filterId: \"myMirrorImages\",\r\n time: 0,\r\n nbImage: 4,\r\n alphaImg: 1.0,\r\n alphaChr: 0.0,\r\n blend: 4,\r\n ampX: 0.10,\r\n ampY: 0.10,\r\n zOrder: 20,\r\n animated :\r\n {\r\n time: \r\n { \r\n active: true, \r\n speed: 0.0010, \r\n animType: \"move\" \r\n }\r\n }\r\n}];\r\n\r\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} -{"_id":"As1JrHLEm38Nm667","name":"F - 01 - Delete filters by Placeable","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"// Delete all filters on the placeable in parameter (token or tile)\r\nTokenMagic.deleteFilters(_token);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} +{"_id":"As1JrHLEm38Nm667","name":"00 - B - Delete filters by Placeable","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"// Delete all filters on the placeable in parameter (token or tile)\nTokenMagic.deleteFilters(_token);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} {"_id":"BGz9j7xPy0H2QlBf","name":"E - Click, click, click and click !","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"let glowFunc = async function() {\r\n\r\n const myTokens = canvas.tokens.placeables;\r\n\r\n for (const myToken of myTokens ){\r\n if (myToken.TMFXhasFilterId(\"funnyAlternateGlow\")) {\r\n await myToken.TMFXdeleteFilters(\"funnyAlternateGlow\");\r\n } else {\r\n let params =\r\n [{\r\n filterType: \"glow\",\r\n filterId: \"funnyAlternateGlow\",\r\n color: Math.floor(Math.random() * 16777215),\r\n animated: null\r\n }];\r\n await myToken.TMFXaddUpdateFilters(params);\r\n }\r\n }\r\n};\r\n\r\nglowFunc();","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} {"_id":"BV1FdyFefneHRoEx","name":"31 - T01 - Glowing Globes (globes)","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"let params = \r\n[{\r\n filterType: \"globes\",\r\n filterId: \"glowingGlobes\",\r\n time: 0,\r\n color: 0x5099DD,\r\n distortion: 0.4,\r\n scale: 80,\r\n alphaDiscard: false,\r\n zOrder: 1,\r\n animated :\r\n {\r\n time : \r\n { \r\n active: true, \r\n speed: 0.0005, \r\n animType: \"move\" \r\n }\r\n }\r\n}]\r\n\r\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} {"_id":"CPMuEoGlADZ4OfXv","name":"24 - T09 - Water Defense 2 - Ring","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"let params =\r\n[{\r\n filterType: \"field\",\r\n filterId: \"myWaterField\",\r\n shieldType: 9,\r\n gridPadding: 1.2,\r\n color: 0x20BBEE,\r\n time: 0,\r\n blend: 4,\r\n intensity: 1,\r\n lightAlpha: 0.7,\r\n lightSize: 0.5,\r\n scale: 0.6,\r\n radius: 1,\r\n chromatic: false,\r\n hideRadius: 0.8,\r\n animated :\r\n {\r\n time : \r\n { \r\n active: true, \r\n speed: 0.0015, \r\n animType: \"move\" \r\n },\r\n radius: \r\n {\r\n active: true, \r\n loopDuration: 6000, \r\n animType: \"cosOscillation\", \r\n val1:1, \r\n val2:0.8\r\n },\r\n hideRadius: \r\n {\r\n active: true, \r\n loopDuration: 3000, \r\n animType: \"cosOscillation\", \r\n val1:0.6, \r\n val2:0\r\n }\r\n }\r\n},{\r\n filterType: \"liquid\",\r\n filterId: \"myDriftLiquid\",\r\n color: 0x002040,\r\n time: 0,\r\n blend: 4,\r\n intensity: 4,\r\n spectral: false,\r\n scale: 1.5,\r\n zOrder: 3000,\r\n animated :\r\n {\r\n time : \r\n { \r\n active: true, \r\n speed: 0.0018, \r\n animType: \"move\" \r\n }\r\n }\r\n}];\r\n\r\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} {"_id":"CRwxsDAsfCkXXTOa","name":"34 - T03 - Blood Bath (splash)","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"let params =\r\n [{\r\n filterType: \"splash\",\r\n filterId: \"mySplash\",\r\n color: 0xFF0505,\r\n padding: 80,\r\n time: 0,\r\n seed: 0.10,\r\n splashFactor: 2.25,\r\n spread: 7,\r\n blend: 7,\r\n dimX: 1,\r\n dimY: 1,\r\n alphaBlending: false,\r\n alphaDiscard: true,\r\n cut: true,\r\n animated :\r\n {\r\n time : \r\n { \r\n active: true, \r\n speed: 0.0009, \r\n animType: \"move\" \r\n }\r\n }\r\n }];\r\n\r\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} {"_id":"CdFhWPKBMb5wj7cM","name":"11 - Blur","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"let params =\r\n[{\r\n filterType: \"blur\",\r\n filterId: \"myBlur\",\r\n padding: 10,\r\n quality: 4.0,\r\n blur: 0,\r\n blurX: 0,\r\n blurY: 0,\r\n animated:\r\n {\r\n blurX: \r\n { \r\n active: true, \r\n animType: \"syncCosOscillation\", \r\n loopDuration: 500, \r\n val1: 0, \r\n val2: 6\r\n },\r\n blurY: \r\n { \r\n active: true, \r\n animType: \"syncCosOscillation\", \r\n loopDuration: 750, \r\n val1: 0, \r\n val2: 6}\r\n }\r\n}];\r\n\r\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} {"_id":"D2su0oqd2SLY0uZ7","name":"30 - T02 - Infernal Web (field+web)","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"let params = \r\n[{\r\n filterType: \"field\",\r\n filterId: \"infernalWeb\",\r\n shieldType: 1,\r\n gridPadding: 1.5,\r\n color: 0xCC2050,\r\n time: 0,\r\n blend: 3,\r\n intensity: 1,\r\n lightAlpha: 1,\r\n lightSize: 0.8,\r\n scale: 1,\r\n radius: 1,\r\n chromatic: false,\r\n zOrder: 512,\r\n animated :\r\n {\r\n time : \r\n { \r\n active: true, \r\n speed: 0.0012, \r\n animType: \"move\" \r\n },\r\n lightSize: \r\n {\r\n val1: 0.4, val2: 1.5,\r\n animType: \"syncCosOscillation\",\r\n loopDuration: 5000\r\n }\r\n }\r\n}\r\n,{\r\n filterType: \"web\",\r\n filterId: \"infernalWeb\",\r\n time: 100,\r\n div1: 16,\r\n div2: 8,\r\n tear: 0.45,\r\n amplitude: 0.8,\r\n thickness: 2,\r\n color: 0xAA3030,\r\n zOrder: 1024,\r\n animated :\r\n {\r\n time : \r\n { \r\n active: true, \r\n speed: 0.0005, \r\n animType: \"move\" \r\n }\r\n }\r\n}]\r\n\r\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} -{"_id":"DCRnfJDBd25fOQxc","name":"F - 02 - Delete filters on Selected","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"// Delete all filters on the selected tokens/tiles\r\nTokenMagic.deleteFiltersOnSelected();","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} +{"_id":"DCRnfJDBd25fOQxc","name":"00 - A - Delete filters on Selected","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"// Delete all filters on the selected tokens/tiles\nTokenMagic.deleteFiltersOnSelected();","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} {"_id":"DoXvYWKPRcTpHbPG","name":"20 - Waves","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"// Below, you can turn on the anchor animation.\r\nlet params =\r\n[{\r\n filterType: \"wave\",\r\n filterId: \"myWaves\",\r\n time: 0,\r\n anchorX: 0.5,\r\n anchorY: 0.5,\r\n strength: 0.015,\r\n frequency: 120,\r\n color: 0xFFFFFF,\r\n maxIntensity: 2.5,\r\n minIntensity: 0.9,\r\n padding:10,\r\n animated :\r\n {\r\n time : \r\n { \r\n active: true, \r\n speed: 0.0085, \r\n animType: \"move\" \r\n },\r\n anchorX :\r\n {\r\n active: false,\r\n val1: 0.15,\r\n val2: 0.85,\r\n animType: \"syncChaoticOscillation\",\r\n loopDuration: 20000\r\n },\r\n anchorY :\r\n {\r\n active: false,\r\n val1: 0.15,\r\n val2: 0.85,\r\n animType: \"syncSinOscillation\",\r\n loopDuration: 20000\r\n }\r\n }\r\n}];\r\n\r\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} {"_id":"Edw0KaZiBtWEG86g","name":"16 - Inner Fog","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{"furnace":{"runAsGM":false}},"scope":"global","command":"let params =\r\n[{\r\n filterType: \"fog\",\r\n filterId: \"myFog\",\r\n color: 0x000000,\r\n density: 0.65,\r\n time: 0,\r\n dimX: 1,\r\n dimY: 1,\r\n animated :\r\n {\r\n time : \r\n { \r\n active: true, \r\n speed: 2.2, \r\n animType: \"move\" \r\n }\r\n }\r\n}];\r\n\r\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} {"_id":"EzV1RAvmD9azXoNe","name":"24 - T08 - Chromatic Bubble 2","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{"furnace":{"runAsGM":false}},"scope":"global","command":"let params =\r\n[{\r\n filterType: \"field\",\r\n filterId: \"myChromaField\",\r\n shieldType: 8,\r\n gridPadding: 1,\r\n color: 0xAAAAAA,\r\n time: 0,\r\n blend: 2,\r\n intensity: 1,\r\n lightAlpha: 0,\r\n lightSize: 0,\r\n scale: 1,\r\n radius: 1,\r\n chromatic: true,\r\n discardThreshold: 0.3,\r\n alphaDiscard: true,\r\n animated :\r\n {\r\n time : \r\n { \r\n active: true, \r\n speed: 0.0045, \r\n animType: \"move\" \r\n }\r\n }\r\n}];\r\n\r\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} @@ -79,11 +79,11 @@ {"_id":"hC63QbO6aATjatSA","name":"35 - T04 - Cold Fire (xfire)","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"let params =\r\n[{\r\n filterType: \"xfire\",\r\n filterId: \"myColdXFire\",\r\n time: 0,\r\n color: 0xBBDDEE,\r\n blend: 1,\r\n amplitude: 1,\r\n dispersion: 0,\r\n chromatic: false,\r\n scaleX: 1,\r\n scaleY: 1,\r\n inlay: false,\r\n animated :\r\n {\r\n time : \r\n { \r\n active: true, \r\n speed: -0.0015, \r\n animType: \"move\" \r\n }\r\n }\r\n}];\r\n\r\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} {"_id":"hFZvMSE5VMCUiYNE","name":"25 - T03 - X-ray Scan (xray)","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"let params =\r\n[{\r\n filterType: \"xray\",\r\n filterId: \"myXrayScan\",\r\n time: 0,\r\n color: 0xFFFFFF,\r\n blend: 5,\r\n dimX: 20,\r\n dimY: 20,\r\n anchorX: 0.5,\r\n anchorY: 0,\r\n divisor: 8,\r\n intensity: 1,\r\n animated :\r\n {\r\n time : \r\n { \r\n active: true, \r\n speed: 0.00038, \r\n animType: \"move\" \r\n }\r\n }\r\n}];\r\n\r\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} {"_id":"hayiRem3LXoEP3tL","name":"03 - Drop Shadow","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"let params =\r\n[{\r\n filterType: \"shadow\",\r\n filterId: \"myShadow\",\r\n rotation: 35,\r\n blur: 2,\r\n quality: 5,\r\n distance: 20,\r\n alpha: 0.7,\r\n padding: 10,\r\n shadowOnly: false,\r\n color: 0x000000,\r\n zOrder: 6000,\r\n animated:\r\n {\r\n blur: \r\n { \r\n active: true, \r\n loopDuration: 500, \r\n animType: \"syncCosOscillation\", \r\n val1: 2, \r\n val2: 4\r\n },\r\n rotation:\r\n {\r\n active: true,\r\n loopDuration: 100,\r\n animType: \"syncSinOscillation\",\r\n val1: 33,\r\n val2: 37\r\n }\r\n }\r\n}];\r\n\r\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} -{"_id":"jFdKzkYqcKOmeQPW","name":"09 - T02 - Moo Man Dance (transform)","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"let params =\r\n [{\r\n filterType: \"transform\",\r\n filterId: \"theMooManDance\",\r\n twRadiusPercent: 70,\r\n bpRadiusPercent: 90,\r\n padding: 10,\r\n animated:\r\n {\r\n twRotation:\r\n {\r\n animType: \"sinOscillation\",\r\n val1: -90,\r\n val2: +90,\r\n loopDuration: 500,\r\n },\r\n bpStrength:\r\n {\r\n animType: \"cosOscillation\",\r\n val1: 0,\r\n val2: 0.55,\r\n loopDuration: 1000,\r\n },\r\n translationX:\r\n {\r\n animType: \"sinOscillation\",\r\n val1: -0.180,\r\n val2: +0.180,\r\n loopDuration: 1400,\r\n },\r\n translationY:\r\n {\r\n animType: \"cosOscillation\",\r\n val1: -0.180,\r\n val2: +0.180,\r\n loopDuration: 1400,\r\n },\r\n rotation:\r\n {\r\n animType: \"cosOscillation\",\r\n val1: 90,\r\n val2: -90,\r\n loopDuration: 4200,\r\n }, \r\n }\r\n }];\r\n\r\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} +{"_id":"jFdKzkYqcKOmeQPW","name":"09 - T02 - Moo Man Dance (transform)","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"let params =\n [{\n filterType: \"transform\",\n filterId: \"theMooManDance\",\n twRadiusPercent: 70,\n bpRadiusPercent: 90,\n padding: 10,\n animated:\n {\n twRotation:\n {\n animType: \"sinOscillation\",\n val1: -90,\n val2: +90,\n loopDuration: 500,\n },\n bpStrength:\n {\n animType: \"cosOscillation\",\n val1: 0,\n val2: 0.55,\n loopDuration: 1000,\n },\n translationX:\n {\n animType: \"sinOscillation\",\n val1: -0.180,\n val2: +0.180,\n loopDuration: 1400,\n },\n translationY:\n {\n animType: \"cosOscillation\",\n val1: -0.180,\n val2: +0.180,\n loopDuration: 1400,\n },\n rotation:\n {\n animType: \"cosOscillation\",\n val1: 90,\n val2: -90,\n loopDuration: 4200,\n }, \n }\n }];\n\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} {"_id":"ki2AEmXzUJkGpU65","name":"29 - T02 - Phase Spider Web (xfog+web)","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"let params = \r\n[{\r\n filterType: \"web\",\r\n filterId: \"phaseweb\",\r\n time: 0,\r\n animated:\r\n {\r\n time:\r\n {\r\n active: true,\r\n speed: 0.0005,\r\n animType: \"move\"\r\n }\r\n }\r\n},\r\n{\r\n filterType: \"xfog\",\r\n filterId: \"phaseweb\",\r\n color: 0x30FF30,\r\n time: 0,\r\n animated:\r\n {\r\n time:\r\n {\r\n active: true,\r\n speed: 0.0005,\r\n animType: \"move\"\r\n }\r\n }\r\n}]\r\n\r\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} {"_id":"kyQD90fSuNLDI4Y0","name":"24 - T02 - Fire Shield 4 - Lava Zone","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"let params =\r\n[{\r\n filterType: \"zapshadow\",\r\n filterId: \"myZap\",\r\n alphaTolerance: 0.45\r\n},{\r\n filterType: \"field\",\r\n filterId: \"myLavaRing\",\r\n shieldType: 6,\r\n gridPadding: 1.25,\r\n color: 0xFFAA00,\r\n time: 0,\r\n blend: 14,\r\n intensity: 1,\r\n lightAlpha: 0,\r\n lightSize: 0.7,\r\n scale: 1,\r\n radius: 1,\r\n chromatic: false,\r\n discardThreshold: 0.30,\r\n hideRadius: 0.95,\r\n alphaDiscard: true,\r\n animated :\r\n {\r\n time : \r\n { \r\n active: true, \r\n speed: 0.0015, \r\n animType: \"move\" \r\n },\r\n radius: \r\n {\r\n active: true, \r\n loopDuration: 6000, \r\n animType: \"cosOscillation\", \r\n val1:1, \r\n val2:0.8\r\n },\r\n hideRadius: \r\n {\r\n active: true, \r\n loopDuration: 3000, \r\n animType: \"cosOscillation\", \r\n val1:0.75, \r\n val2:0.4\r\n }\r\n }\r\n},{\r\n filterType: \"xglow\",\r\n filterId: \"myBurningAura\",\r\n auraType: 2,\r\n color: 0xFF5000,\r\n thickness: 9.8,\r\n scale: 1.,\r\n time: 0,\r\n auraIntensity: 2,\r\n subAuraIntensity: 1,\r\n threshold: 0.30,\r\n discard: true,\r\n zOrder: 3000,\r\n animated:\r\n {\r\n time : \r\n { \r\n active: true,\r\n speed: 0.0027, \r\n animType: \"move\" \r\n },\r\n thickness:\r\n {\r\n active: true,\r\n loopDuration: 600, \r\n animType: \"cosOscillation\", \r\n val1:4, \r\n val2:8\r\n }\r\n }\r\n}];\r\n\r\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} {"_id":"lH53KTce3zYEFXos","name":"08 - Old film","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"// special : the OldFilm filter need an Outline filter to be contained (or else, it will affect all the container)\r\nlet params =\r\n[{\r\n filterType: \"oldfilm\",\r\n filterId: \"myOldfilm\",\r\n sepia: 0.6,\r\n noise: 0.2,\r\n noiseSize: 1.0,\r\n scratch: 0.8,\r\n scratchDensity: 0.5,\r\n scratchWidth: 1.2,\r\n vignetting: 0.9,\r\n vignettingAlpha: 0.6,\r\n vignettingBlur: 0.2,\r\n animated:\r\n {\r\n seed: \r\n { \r\n active: true, \r\n animType: \"randomNumber\", \r\n val1: 0, \r\n val2: 1 \r\n },\r\n vignetting: \r\n { \r\n active: true, \r\n animType: \"syncCosOscillation\" , \r\n loopDuration: 2000, \r\n val1: 0.2, \r\n val2: 0.4 }\r\n }\r\n},\r\n{\r\n filterType: \"outline\",\r\n filterId: \"oldfilmOutline\",\r\n color: 0x000000,\r\n thickness: 0,\r\n zOrder: 61\r\n}];\r\n\r\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} -{"_id":"lZefFMIYs8WYRpdZ","name":"36 - T01 - Turn into Mystery Man (polymorph)","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"// This macro contains a small tutorial to work with non-infinite loops.\r\n\r\n// Click once to transform your token and again to revert to the original shape.\r\n\r\n// There is 9 types of metamorphose\r\n// 1 - Simple transition\r\n// 2 - Dreamy\r\n// 3 - Twist\r\n// 4 - Water drop\r\n// 5 - TV Noise\r\n// 6 - Morphing\r\n// 7 - Take off/Put on you disguise!\r\n// 8 - Wind\r\n// 9 - Hologram\r\n\r\n// change the type here\r\nlet transitionType = 4;\r\n\r\n// change the target image here\r\nlet targetImagePath = \"icons/svg/mystery-man.svg\";\r\n\r\n// declare filter id (think to change the id for personal macros)\r\n// each filterId should be unique to a player or gm to prevent collisions\r\n// example : \"brutusChthulhuPolymorph\"\r\nlet polymorphFilterId = \"myPolymorph\";\r\n\r\n// we put our code into an async function that will be called later\r\nlet polymorphFunc = async function () {\r\n\r\n for (const token of canvas.tokens.controlled) {\r\n let params;\r\n \r\n // Is the filter already activated on the placeable ? \r\n if (token.TMFXhasFilterId(polymorphFilterId)) {\r\n \r\n // Yes. So we update only loops and active in the animated section for the progress property, to reset the animation (just one loop).\r\n // \"active\" to say at Token Magic : \"Hey filter! It's time to work again!\"\r\n // \"loops\" so that Token Magic can know how many loops it needs to schedule for the animation.\r\n // Each animation loop decreases \"loops\" by one. When \"loops\" reach 0, \"active\" becomes \"false\" and the animation will be dormant again.\r\n params =\r\n [{\r\n filterType: \"polymorph\",\r\n filterId: polymorphFilterId,\r\n animated:\r\n {\r\n progress:\r\n {\r\n active: true,\r\n loops: 1\r\n }\r\n }\r\n }];\r\n\r\n } else {\r\n\r\n // No. So we create the entirety of the filter\r\n params =\r\n [{\r\n filterType: \"polymorph\",\r\n filterId: polymorphFilterId,\r\n type: transitionType,\r\n padding: 70,\r\n magnify: 1,\r\n imagePath: targetImagePath,\r\n animated:\r\n {\r\n progress:\r\n {\r\n active: true,\r\n animType: \"halfCosOscillation\",\r\n val1: 0,\r\n val2: 100,\r\n loops: 1,\r\n loopDuration: 1000\r\n }\r\n }\r\n }];\r\n }\r\n\r\n // all functions that add, update or delete filters are asynchronous\r\n // if you are in a loop AND/OR you chain them, it is MANDATORY to await them\r\n // otherwise, data persistence may not works.\r\n // this is the reason why we use an async function (we cant use await in a non-async function)\r\n // avoid awaiting in a forEach loop, use for or for/of loop.\r\n await token.TMFXaddUpdateFilters(params);\r\n }\r\n\r\n};\r\n\r\n// polymorph async function call\r\npolymorphFunc();","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} +{"_id":"lZefFMIYs8WYRpdZ","name":"36 - T01 - Turn into Mystery Man (polymorph)","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"// This macro contains a small tutorial : how to work with non-infinite loops and halfCosOscillation animType\n\n// Click once to transform your token and again to revert to the original shape (thank to halfCosOscillation)\n\n// There is 9 types of metamorphose\n// 1 - Simple transition\n// 2 - Dreamy\n// 3 - Twist\n// 4 - Water drop\n// 5 - TV Noise\n// 6 - Morphing\n// 7 - Take off/Put on you disguise!\n// 8 - Wind\n// 9 - Hologram\n\n// change the type here\nlet transitionType = 4;\n\n// change the target image here\nlet targetImagePath = \"icons/svg/mystery-man.svg\";\n\n// declare filter id (think to change the id for personal macros)\n// each filterId should be unique to a player or gm to prevent collisions\n// example : \"brutusChthulhuPolymorph\"\nlet polymorphFilterId = \"myPolymorph\";\n\n// we put our code into an async function that will be called later\nlet polymorphFunc = async function () {\n\n for (const token of canvas.tokens.controlled) {\n let params;\n \n // Is the filter already activated on the placeable ? \n if (token.TMFXhasFilterId(polymorphFilterId)) {\n \n // Yes. So we update the type in the general section and loops + active in the progress animated section, to activate the animation for just one loop.\n // \"type\" to allow you to change the animation type\n // \"active\" to say at Token Magic : \"Hey filter! It's time to work again!\"\n // \"loops\" so that Token Magic can know how many loops it needs to schedule for the animation.\n // Each animation loop decreases \"loops\" by one. When \"loops\" reach 0, \"active\" becomes \"false\" and the animation will be dormant again.\n // Thank to the halfCosOscillation, a loop brings the value of the property from val1 to val2. A second loop is needed to bring val2 to val1. This is useful for monitoring progress with back and forth movements.\n params =\n [{\n filterType: \"polymorph\",\n filterId: polymorphFilterId,\n type: transitionType,\n animated:\n {\n progress:\n {\n active: true,\n loops: 1\n }\n }\n }];\n\n } else {\n\n // No. So we create the entirety of the filter\n params =\n [{\n filterType: \"polymorph\",\n filterId: polymorphFilterId,\n type: transitionType,\n padding: 70,\n magnify: 1,\n imagePath: targetImagePath,\n animated:\n {\n progress:\n {\n active: true,\n animType: \"halfCosOscillation\",\n val1: 0,\n val2: 100,\n loops: 1,\n loopDuration: 1000\n }\n }\n }];\n }\n\n // all functions that add, update or delete filters are asynchronous\n // if you are in a loop AND/OR you chain these functions, it is MANDATORY to await them\n // otherwise, data persistence may not works.\n // this is the reason why we use an async function (we cant use await in a non-async function)\n // avoid awaiting in a forEach loop, use \"for\" or \"for/of\" loop.\n await token.TMFXaddUpdateFilters(params);\n }\n\n};\n\n// polymorph async function call\npolymorphFunc();","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} {"_id":"llpMoa9rOjeCzWf3","name":"35 - T06 - Custom Color Fire (xfire)","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"// example with color fine tuning\r\nlet params =\r\n[{\r\n filterType: \"xfire\",\r\n filterId: \"myCustomXFire\",\r\n time: 0,\r\n color1: 0x00DD20,\r\n color2: 0x009090,\r\n color3: 0x001020,\r\n color4: 0x00CCFF,\r\n blend: 1,\r\n amplitude: 1,\r\n dispersion: 0,\r\n chromatic: false,\r\n scaleX: 1,\r\n scaleY: 1,\r\n inlay: false,\r\n animated :\r\n {\r\n time : \r\n { \r\n active: true, \r\n speed: -0.0015, \r\n animType: \"move\" \r\n }\r\n }\r\n}];\r\n\r\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} {"_id":"qMZ03TZJuNYwudlg","name":"32 - T01 - Solar Ripples (ripples)","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"let params = \r\n[{\r\n filterType: \"ripples\",\r\n filterId: \"SolarRipples\",\r\n color: 0xCC9000,\r\n time: 0,\r\n alphaDiscard: false,\r\n animated :\r\n {\r\n time : \r\n { \r\n active: true, \r\n speed: 0.0009, \r\n animType: \"move\" \r\n }\r\n }\r\n}]\r\n\r\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} {"_id":"r3JzTibAUnlpgPsD","name":"13 - Shockwave (wave)","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{"furnace":{"runAsGM":false}},"scope":"global","command":"// Below, you can turn on the anchor animation.\r\nlet params =\r\n[{\r\n filterType: \"wave\",\r\n filterId: \"myShockwave\",\r\n time: 0,\r\n strength: 0.03,\r\n frequency: 15,\r\n maxIntensity: 4.0,\r\n minIntensity: 0.5,\r\n padding:25,\r\n animated :\r\n {\r\n time : \r\n { \r\n active: true, \r\n speed: 0.0180,\r\n animType: \"move\",\r\n }\r\n }\r\n}];\r\n\r\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} @@ -101,4 +101,8 @@ {"_id":"ycesEG9gnQecVsDM","name":"23 - T02 - Chaotic Images","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"// This is an extreme example...\r\nlet params =\r\n[{\r\n filterType: \"images\",\r\n filterId: \"myChaoticImages\",\r\n time: 0,\r\n nbImage: 4,\r\n alphaImg: 1.0,\r\n alphaChr: 0.0,\r\n blend: 4,\r\n ampX: 0.10,\r\n ampY: 0.10,\r\n padding: 80,\r\n zOrder: 20,\r\n animated :\r\n {\r\n time: \r\n { \r\n active: true, \r\n speed: 0.0010, \r\n animType: \"move\" \r\n },\r\n ampX:\r\n {\r\n active: true,\r\n val1: 0.00,\r\n val2: 0.30,\r\n chaosFactor: 0.03,\r\n animType: \"syncChaoticOscillation\",\r\n loopDuration: 2000\r\n },\r\n ampY:\r\n {\r\n active: true,\r\n val1: 0.00,\r\n val2: 0.30,\r\n chaosFactor: 0.04,\r\n animType: \"syncChaoticOscillation\",\r\n loopDuration: 1650\r\n },\r\n alphaChr: \r\n { \r\n active: true, \r\n animType: \"randomNumberPerLoop\", \r\n val1: 0.0, \r\n val2: 1,\r\n loopDuration: 250\r\n },\r\n alphaImg: \r\n { \r\n active: true, \r\n animType: \"randomNumberPerLoop\", \r\n val1: 0.8, \r\n val2: 1,\r\n loopDuration: 250\r\n },\r\n nbImage:\r\n {\r\n active: true,\r\n val1: 1,\r\n val2: 9,\r\n animType: \"syncSinOscillation\",\r\n loopDuration: 1400\r\n }\r\n }\r\n}];\r\n\r\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} {"_id":"ydY1XOCO4yIhunkj","name":"27 - T03 - Ugly Villains Aura (xglow)","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"let params =\r\n[{\r\n filterType: \"zapshadow\",\r\n filterId: \"myUglyZapShadow\",\r\n alphaTolerance: 0.50\r\n},\r\n{\r\n filterType: \"xglow\",\r\n filterId: \"myUglyGlow\",\r\n auraType: 2,\r\n color: 0x050505,\r\n thickness: 2.7,\r\n scale: 7,\r\n time: 0,\r\n auraIntensity: 5,\r\n subAuraIntensity: 2,\r\n threshold: 0.08,\r\n discard: false,\r\n animated:\r\n {\r\n time : \r\n { \r\n active: true,\r\n speed: 0.0012, \r\n animType: \"move\" \r\n },\r\n auraIntensity:\r\n {\r\n active: true,\r\n loopDuration: 3000, \r\n animType: \"syncCosOscillation\", \r\n val1:5, \r\n val2:0\r\n },\r\n subAuraIntensity:\r\n {\r\n active: true,\r\n loopDuration: 3000, \r\n animType: \"syncCosOscillation\", \r\n val1:2, \r\n val2:0\r\n },\r\n color:\r\n {\r\n active: true,\r\n loopDuration: 6000, \r\n animType: \"syncColorOscillation\", \r\n val1:0x050505, \r\n val2:0x200000\r\n },\r\n threshold:\r\n {\r\n active: true,\r\n loopDuration: 1500, \r\n animType: \"syncCosOscillation\", \r\n val1:0.02, \r\n val2:0.50\r\n }\r\n }\r\n}];\r\n\r\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} {"_id":"zCCp4x0EResFji7O","name":"21 - Flood","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"let params =\r\n[{\r\n filterType: \"flood\",\r\n filterId: \"myFlood\",\r\n time: 0,\r\n color: 0x0020BB,\r\n billowy: 0.43,\r\n tintIntensity: 0.72,\r\n glint: 0.31,\r\n scale: 70,\r\n padding: 10,\r\n animated :\r\n {\r\n time : \r\n { \r\n active: true, \r\n speed: 0.0006, \r\n animType: \"move\"\r\n }\r\n }\r\n}];\r\n\r\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} -{"_id":"lZefFMIYs8WYRpdZ","name":"36 - T01 - Turn into Mystery Man (polymorph)","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"// This macro contains a small tutorial to work with non-infinite loops and halfCosOscillation animType\r\n\r\n// Click once to transform your token and again to revert to the original shape (thank to halfCosOscillation)\r\n\r\n// There is 9 types of metamorphose\r\n// 1 - Simple transition\r\n// 2 - Dreamy\r\n// 3 - Twist\r\n// 4 - Water drop\r\n// 5 - TV Noise\r\n// 6 - Morphing\r\n// 7 - Take off/Put on you disguise!\r\n// 8 - Wind\r\n// 9 - Hologram\r\n\r\n// change the type here\r\nlet transitionType = 4;\r\n\r\n// change the target image here\r\nlet targetImagePath = \"icons/svg/mystery-man.svg\";\r\n\r\n// declare filter id (think to change the id for personal macros)\r\n// each filterId should be unique to a player or gm to prevent collisions\r\n// example : \"brutusChthulhuPolymorph\"\r\nlet polymorphFilterId = \"myPolymorph\";\r\n\r\n// we put our code into an async function that will be called later\r\nlet polymorphFunc = async function () {\r\n\r\n for (const token of canvas.tokens.controlled) {\r\n let params;\r\n \r\n // Is the filter already activated on the placeable ? \r\n if (token.TMFXhasFilterId(polymorphFilterId)) {\r\n \r\n // Yes. So we update only loops and active in the animated section for the progress property, to reset the animation (just one loop).\r\n // \"active\" to say at Token Magic : \"Hey filter! It's time to work again!\"\r\n // \"loops\" so that Token Magic can know how many loops it needs to schedule for the animation.\r\n // Each animation loop decreases \"loops\" by one. When \"loops\" reach 0, \"active\" becomes \"false\" and the animation will be dormant again.\r\n // Thanks to the halfCosOscillation, a loop brings the value of the property from val1 to val2. A second loop is needed to bring val2 to val1. This is useful for monitoring progress with back and forth movements.\r\n params =\r\n [{\r\n filterType: \"polymorph\",\r\n filterId: polymorphFilterId,\r\n animated:\r\n {\r\n progress:\r\n {\r\n active: true,\r\n loops: 1\r\n }\r\n }\r\n }];\r\n\r\n } else {\r\n\r\n // No. So we create the entirety of the filter\r\n params =\r\n [{\r\n filterType: \"polymorph\",\r\n filterId: polymorphFilterId,\r\n type: transitionType,\r\n padding: 70,\r\n magnify: 1,\r\n imagePath: targetImagePath,\r\n animated:\r\n {\r\n progress:\r\n {\r\n active: true,\r\n animType: \"halfCosOscillation\",\r\n val1: 0,\r\n val2: 100,\r\n loops: 1,\r\n loopDuration: 1000\r\n }\r\n }\r\n }];\r\n }\r\n\r\n // all functions that add, update or delete filters are asynchronous\r\n // if you are in a loop AND/OR you chain them, it is MANDATORY to await them\r\n // otherwise, data persistence may not works.\r\n // this is the reason why we use an async function (we cant use await in a non-async function)\r\n // avoid awaiting in a forEach loop, use for or for/of loop.\r\n await token.TMFXaddUpdateFilters(params);\r\n }\r\n\r\n};\r\n\r\n// polymorph async function call\r\npolymorphFunc();","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} +{"_id":"jFdKzkYqcKOmeQPW","name":"09 - T02 - Moo Man Dance (transform)","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"let params =\n [{\n filterType: \"transform\",\n filterId: \"theMooManDance\",\n twRadiusPercent: 70,\n bpRadiusPercent: 90,\n padding: 10,\n animated:\n {\n twRotation:\n {\n animType: \"sinOscillation\",\n val1: -90,\n val2: +90,\n loopDuration: 500,\n },\n bpStrength:\n {\n animType: \"cosOscillation\",\n val1: 0,\n val2: 0.55,\n loopDuration: 1000,\n },\n translationX:\n {\n animType: \"sinOscillation\",\n val1: -0.125,\n val2: +0.125,\n loopDuration: 1400,\n },\n translationY:\n {\n animType: \"cosOscillation\",\n val1: -0.125,\n val2: +0.125,\n loopDuration: 1100,\n },\n rotation:\n {\n animType: \"cosOscillation\",\n val1: 90,\n val2: -90,\n loopDuration: 4200,\n }, \n }\n }];\n\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} +{"_id":"jFdKzkYqcKOmeQPW","name":"09 - T02 - Moo Man Dance (transform)","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"let params =\n [{\n filterType: \"transform\",\n filterId: \"theMooManDance\",\n twRadiusPercent: 70,\n bpRadiusPercent: 90,\n padding: 10,\n animated:\n {\n twRotation:\n {\n animType: \"sinOscillation\",\n val1: -90,\n val2: +90,\n loopDuration: 500,\n },\n bpStrength:\n {\n animType: \"cosOscillation\",\n val1: 0,\n val2: 0.55,\n loopDuration: 1000,\n },\n translationX:\n {\n animType: \"sinOscillation\",\n val1: -0.125,\n val2: +0.125,\n loopDuration: 1400,\n },\n translationY:\n {\n animType: \"cosOscillation\",\n val1: -0.125,\n val2: +0.125,\n loopDuration: 1400,\n },\n rotation:\n {\n animType: \"cosOscillation\",\n val1: 90,\n val2: -90,\n loopDuration: 4200,\n }, \n }\n }];\n\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} +{"_id":"jFdKzkYqcKOmeQPW","name":"09 - T02 - Moo Man Dance (transform)","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"let params =\n [{\n filterType: \"transform\",\n filterId: \"theMooManDance\",\n twRadiusPercent: 70,\n bpRadiusPercent: 90,\n padding: 50,\n animated:\n {\n twRotation:\n {\n animType: \"sinOscillation\",\n val1: -90,\n val2: +90,\n loopDuration: 500,\n },\n bpStrength:\n {\n animType: \"cosOscillation\",\n val1: 0,\n val2: 0.55,\n loopDuration: 1000,\n },\n translationX:\n {\n animType: \"sinOscillation\",\n val1: -0.125,\n val2: +0.125,\n loopDuration: 1400,\n },\n translationY:\n {\n animType: \"cosOscillation\",\n val1: -0.125,\n val2: +0.125,\n loopDuration: 1400,\n },\n rotation:\n {\n animType: \"cosOscillation\",\n val1: 90,\n val2: -90,\n loopDuration: 4200,\n }, \n }\n }];\n\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} +{"_id":"jFdKzkYqcKOmeQPW","name":"09 - T02 - Moo Man Dance (transform)","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{},"scope":"global","command":"let params =\n [{\n filterType: \"transform\",\n filterId: \"theMooManDance\",\n twRadiusPercent: 70,\n bpRadiusPercent: 90,\n padding: 50,\n animated:\n {\n twRotation:\n {\n animType: \"sinOscillation\",\n val1: -90,\n val2: +90,\n loopDuration: 1000,\n },\n bpStrength:\n {\n animType: \"cosOscillation\",\n val1: 0,\n val2: 0.55,\n loopDuration: 1000,\n },\n translationX:\n {\n animType: \"sinOscillation\",\n val1: -0.125,\n val2: +0.125,\n loopDuration: 1400,\n },\n translationY:\n {\n animType: \"cosOscillation\",\n val1: -0.125,\n val2: +0.125,\n loopDuration: 1400,\n },\n rotation:\n {\n animType: \"cosOscillation\",\n val1: 90,\n val2: -90,\n loopDuration: 4200,\n }, \n }\n }];\n\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[]} +{"name":"24 - T11 - Grid Force Field 2 - Chromatic","permission":{"default":0,"Njc5YzFjZDI5NjZl":3},"type":"script","flags":{"core":{"sourceId":"Macro.3cAW4Jy8eXV4IvlZ"}},"scope":"global","command":"let params =\n[{\n filterType: \"field\",\n filterId: \"myGridField\",\n shieldType: 11,\n gridPadding: 2,\n color: 0xC1C1C1,\n time: 0,\n blend: 2,\n intensity: 1,\n lightAlpha: 0,\n lightSize: 0.3,\n scale: 0.5,\n radius: 1,\n chromatic: true,\n alphaDiscard: true,\n discardThreshold: 0.3,\n zOrder: 512,\n animated :\n {\n time : \n { \n active: true, \n speed: 0.0009, \n animType: \"move\" \n }\n }\n}];\n\nTokenMagic.addUpdateFiltersOnSelected(params);","author":"Njc5YzFjZDI5NjZl","img":"icons/svg/dice-target.svg","actorIds":[],"_id":"fZd9j5Y4p49Vwys0"} diff --git a/tokenmagic/updates/UPDATE-0.4.3.md b/tokenmagic/updates/UPDATE-0.4.3.md index 3810f18..95a0422 100644 --- a/tokenmagic/updates/UPDATE-0.4.3.md +++ b/tokenmagic/updates/UPDATE-0.4.3.md @@ -1,36 +1,35 @@ # Token Magic FX - Update v0.4.3-alpha -*New effects :* +*News :* - Polymorph effect : - Allow image transition between a source image (token, tile, etc.) and a target image of your choice. - 9 types of transition are provided : - Morphing, waterdrop, waving, twisting, take off/put on your disguise!, tvnoise, hologram, wind and basic alpha transition. - Properties to reduce or enlarge the target image. - XFire effect : - - A new fire filter with advanced properties, designed to be easily colorizable. + - A fire filter with advanced properties, designed to be easily colorizable. - specific blend modes that do not alter the visual quality of the filter depending on the brightness and intensity of the source image. - An advanced mode allows you to choose up to 4 colors to compose your perfect fire. - An inlay mode to create new effects, like superfrost or superheat. - A chromatic mode. - Adjustable scale on the x and y axis. - New macros have been added to the TMFX compendium (+ new presets for main library and templates) +- Added two new `animType` : + - `halfCosOscillation` and `halfSinOscillation` : + - The half of the given oscillation in one loop. + - A tutorial is provided in the following macro : "36 - T01 - Turn into Mystery Man (polymorph)" -*Improvements :* +*Updates :* - Rank your effects : - The order in which you put your filters is important. - A new property called `rank` allow you to force the ordering of filters on a given target. - Filters with lowest rank are executed first, etc. - - If you do not specify a rank, TMFX will automatically assign rank within its reserved range (which start at 10000, to 20000). + - If you do not specify a rank, TMFX will automatically assign rank within its reserved range (10000 to 20000). - This system is the default mode and an alternative to the zOrder option, you can use either. - Transform filter : - The twist and bulge/pinch filters have been reengineered and put in the transform filter : - with better performance and the elimination of flicker. - -*New animtypes :* -- Added two new `animType` : - - `halfCosOscillation` and `halfSinOscillation` : - - The half of the given oscillation in one loop. - - A tutorial is provided in the following macro : "36 - T01 - Turn into Mystery Man (polymorph)" +- Updated PIXI libs *Deprecated :* - Twist and Bulge/Pinch effects :