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

pixi-filters

Package Overview
Dependencies
Maintainers
3
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pixi-filters - npm Package Compare versions

Comparing version 2.3.0 to 2.3.1

106

lib/pixi-filters.es.js
/*!
* pixi-filters - v2.3.0
* Compiled Tue, 31 Oct 2017 18:02:59 UTC
* pixi-filters - v2.3.1
* Compiled Wed, 29 Nov 2017 16:45:13 UTC
*

@@ -12,4 +12,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-ascii - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:25 UTC
* @pixi/filter-ascii - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:39 UTC
*

@@ -24,4 +24,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-advanced-bloom - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:25 UTC
* @pixi/filter-advanced-bloom - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:39 UTC
*

@@ -39,4 +39,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-bloom - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:25 UTC
* @pixi/filter-bloom - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:39 UTC
*

@@ -53,4 +53,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-bulge-pinch - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:25 UTC
* @pixi/filter-bulge-pinch - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:39 UTC
*

@@ -60,9 +60,9 @@ * pixi-filters is licensed under the MIT License.

*/
var vertex$2="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}\n";
var vertex$2="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}";
var fragment$2="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 gl_FragColor = texture2D(uSampler, clampedCoord);\n if (coord != clampedCoord) {\n gl_FragColor *= max(0.0, 1.0 - length(coord - clampedCoord));\n }\n}\n";
var BulgePinchFilter=function(e){function r(r,n,t){e.call(this,vertex$2,fragment$2),this.center=r||[.5,.5],this.radius=n||100,this.strength=t||1;}e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r;var n={radius:{configurable:!0},strength:{configurable:!0},center:{configurable:!0}};return r.prototype.apply=function(e,r,n){this.uniforms.dimensions[0]=r.sourceFrame.width,this.uniforms.dimensions[1]=r.sourceFrame.height,e.applyFilter(this,r,n);},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(r.prototype,n),r}(PIXI.Filter);PIXI.filters.BulgePinchFilter=BulgePinchFilter;
var BulgePinchFilter=function(e){function r(r,n,t){e.call(this,vertex$2,fragment$2),this.center=r||[.5,.5],this.radius=n||100,this.strength=t||1;}e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r;var n={radius:{configurable:!0},strength:{configurable:!0},center:{configurable:!0}};return r.prototype.apply=function(e,r,n,t){this.uniforms.dimensions[0]=r.sourceFrame.width,this.uniforms.dimensions[1]=r.sourceFrame.height,e.applyFilter(this,r,n,t);},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(r.prototype,n),r}(PIXI.Filter);PIXI.filters.BulgePinchFilter=BulgePinchFilter;
/*!
* @pixi/filter-color-replace - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:26 UTC
* @pixi/filter-color-replace - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:41 UTC
*

@@ -72,3 +72,3 @@ * pixi-filters is licensed under the MIT License.

*/
var vertex$3="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}\n";
var vertex$3="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}";
var fragment$3="varying vec2 vTextureCoord;\nuniform sampler2D texture;\nuniform vec3 originalColor;\nuniform vec3 newColor;\nuniform float epsilon;\nvoid main(void) {\n vec4 currentColor = texture2D(texture, 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";

@@ -78,4 +78,4 @@ var ColorReplaceFilter=function(o){function r(r,e,n){void 0===r&&(r=16711680),void 0===e&&(e=0),void 0===n&&(n=.4),o.call(this,vertex$3,fragment$3),this.originalColor=r,this.newColor=e,this.epsilon=n;}o&&(r.__proto__=o),(r.prototype=Object.create(o&&o.prototype)).constructor=r;var e={originalColor:{configurable:!0},newColor:{configurable:!0},epsilon:{configurable:!0}};return e.originalColor.set=function(o){var r=this.uniforms.originalColor;"number"==typeof o?(PIXI.utils.hex2rgb(o,r),this._originalColor=o):(r[0]=o[0],r[1]=o[1],r[2]=o[2],this._originalColor=PIXI.utils.rgb2hex(r));},e.originalColor.get=function(){return this._originalColor},e.newColor.set=function(o){var r=this.uniforms.newColor;"number"==typeof o?(PIXI.utils.hex2rgb(o,r),this._newColor=o):(r[0]=o[0],r[1]=o[1],r[2]=o[2],this._newColor=PIXI.utils.rgb2hex(r));},e.newColor.get=function(){return this._newColor},e.epsilon.set=function(o){this.uniforms.epsilon=o;},e.epsilon.get=function(){return this.uniforms.epsilon},Object.defineProperties(r.prototype,e),r}(PIXI.Filter);PIXI.filters.ColorReplaceFilter=ColorReplaceFilter;

/*!
* @pixi/filter-convolution - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:26 UTC
* @pixi/filter-convolution - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:41 UTC
*

@@ -90,4 +90,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-cross-hatch - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:26 UTC
* @pixi/filter-cross-hatch - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:41 UTC
*

@@ -102,4 +102,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-dot - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:26 UTC
* @pixi/filter-dot - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:41 UTC
*

@@ -114,4 +114,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-drop-shadow - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:28 UTC
* @pixi/filter-drop-shadow - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:42 UTC
*

@@ -123,7 +123,7 @@ * pixi-filters is licensed under the MIT License.

var fragment$7="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float alpha;\nuniform vec3 color;\nvoid main(void){\n vec4 sample = texture2D(uSampler, vTextureCoord);\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}";
var DropShadowFilter=function(t){function r(r,e,i,n,o){void 0===r&&(r=45),void 0===e&&(e=5),void 0===i&&(i=2),void 0===n&&(n=0),void 0===o&&(o=.5),t.call(this),this.tintFilter=new PIXI.Filter(vertex$7,fragment$7),this.blurFilter=new PIXI.filters.BlurFilter,this.blurFilter.blur=i,this.rotation=r,this.padding=e,this.distance=e,this.alpha=o,this.color=n;}t&&(r.__proto__=t),(r.prototype=Object.create(t&&t.prototype)).constructor=r;var e={distance:{configurable:!0},rotation:{configurable:!0},blur:{configurable:!0},alpha:{configurable:!0},color:{configurable:!0}};return r.prototype.apply=function(r,e,i){var n=r.getRenderTarget();n.transform=new PIXI.Matrix,n.transform.translate(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle)),this.tintFilter.apply(r,e,n,!0),this.blurFilter.apply(r,n,i),t.prototype.apply.call(this,r,e,i),n.transform=null,r.returnRenderTarget(n);},r.prototype.updatePadding=function(){this.padding=this.distance+2*this.blur;},e.distance.get=function(){return this._distance},e.distance.set=function(t){this._distance=t,this.updatePadding();},e.rotation.get=function(){return this.angle/PIXI.DEG_TO_RAD},e.rotation.set=function(t){this.angle=t*PIXI.DEG_TO_RAD;},e.blur.get=function(){return this.blurFilter.blur},e.blur.set=function(t){this.blurFilter.blur=t,this.updatePadding();},e.alpha.get=function(){return this.tintFilter.uniforms.alpha},e.alpha.set=function(t){this.tintFilter.uniforms.alpha=t;},e.color.get=function(){return PIXI.utils.rgb2hex(this.tintFilter.uniforms.color)},e.color.set=function(t){PIXI.utils.hex2rgb(t,this.tintFilter.uniforms.color);},Object.defineProperties(r.prototype,e),r}(PIXI.Filter);PIXI.filters.DropShadowFilter=DropShadowFilter;
var DropShadowFilter=function(t){function r(r,e,i,n,a){void 0===r&&(r=45),void 0===e&&(e=5),void 0===i&&(i=2),void 0===n&&(n=0),void 0===a&&(a=.5),t.call(this),this.tintFilter=new PIXI.Filter(vertex$7,fragment$7),this.blurFilter=new PIXI.filters.BlurFilter,this.blurFilter.blur=i,this.targetTransform=new PIXI.Matrix,this.rotation=r,this.padding=e,this.distance=e,this.alpha=a,this.color=n;}t&&(r.__proto__=t),(r.prototype=Object.create(t&&t.prototype)).constructor=r;var e={distance:{configurable:!0},rotation:{configurable:!0},blur:{configurable:!0},alpha:{configurable:!0},color:{configurable:!0}};return r.prototype.apply=function(t,r,e,i){var n=t.getRenderTarget();n.transform=this.targetTransform,this.tintFilter.apply(t,r,n,!0),this.blurFilter.apply(t,n,e),t.applyFilter(this,r,e,i),n.transform=null,t.returnRenderTarget(n);},r.prototype._updatePadding=function(){this.padding=this.distance+2*this.blur;},r.prototype._updateTargetTransform=function(){this.targetTransform.tx=this.distance*Math.cos(this.angle),this.targetTransform.ty=this.distance*Math.sin(this.angle);},e.distance.get=function(){return this._distance},e.distance.set=function(t){this._distance=t,this._updatePadding(),this._updateTargetTransform();},e.rotation.get=function(){return this.angle/PIXI.DEG_TO_RAD},e.rotation.set=function(t){this.angle=t*PIXI.DEG_TO_RAD,this._updateTargetTransform();},e.blur.get=function(){return this.blurFilter.blur},e.blur.set=function(t){this.blurFilter.blur=t,this._updatePadding();},e.alpha.get=function(){return this.tintFilter.uniforms.alpha},e.alpha.set=function(t){this.tintFilter.uniforms.alpha=t;},e.color.get=function(){return PIXI.utils.rgb2hex(this.tintFilter.uniforms.color)},e.color.set=function(t){PIXI.utils.hex2rgb(t,this.tintFilter.uniforms.color);},Object.defineProperties(r.prototype,e),r}(PIXI.Filter);PIXI.filters.DropShadowFilter=DropShadowFilter;
/*!
* @pixi/filter-emboss - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:28 UTC
* @pixi/filter-emboss - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:42 UTC
*

@@ -138,4 +138,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-glow - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:28 UTC
* @pixi/filter-glow - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:42 UTC
*

@@ -145,3 +145,3 @@ * pixi-filters is licensed under the MIT License.

*/
var vertex$9="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}\n";
var vertex$9="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}";
var fragment$9="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;\nvec2 px = vec2(1.0 / filterArea.x, 1.0 / filterArea.y);\n\nvoid main(void) {\n const float PI = 3.14159265358979323846264;\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";

@@ -151,4 +151,4 @@ var GlowFilter=function(o){function n(n,t,r,e,l){void 0===n&&(n=10),void 0===t&&(t=4),void 0===r&&(r=0),void 0===e&&(e=16777215),void 0===l&&(l=.1),o.call(this,vertex$9,fragment$9.replace(/%QUALITY_DIST%/gi,""+(1/l/n).toFixed(7)).replace(/%DIST%/gi,""+n.toFixed(7))),this.uniforms.glowColor=new Float32Array([0,0,0,1]),this.distance=n,this.color=e,this.outerStrength=t,this.innerStrength=r;}o&&(n.__proto__=o),(n.prototype=Object.create(o&&o.prototype)).constructor=n;var t={color:{configurable:!0},distance:{configurable:!0},outerStrength:{configurable:!0},innerStrength:{configurable:!0}};return t.color.get=function(){return PIXI.utils.rgb2hex(this.uniforms.glowColor)},t.color.set=function(o){PIXI.utils.hex2rgb(o,this.uniforms.glowColor);},t.distance.get=function(){return this.uniforms.distance},t.distance.set=function(o){this.uniforms.distance=o;},t.outerStrength.get=function(){return this.uniforms.outerStrength},t.outerStrength.set=function(o){this.uniforms.outerStrength=o;},t.innerStrength.get=function(){return this.uniforms.innerStrength},t.innerStrength.set=function(o){this.uniforms.innerStrength=o;},Object.defineProperties(n.prototype,t),n}(PIXI.Filter);PIXI.filters.GlowFilter=GlowFilter;

/*!
* @pixi/filter-godray - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:28 UTC
* @pixi/filter-godray - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:42 UTC
*

@@ -164,4 +164,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-outline - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:29 UTC
* @pixi/filter-outline - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:44 UTC
*

@@ -171,3 +171,3 @@ * pixi-filters is licensed under the MIT License.

*/
var vertex$11="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}\n";
var vertex$11="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}";
var fragment$10="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float thickness;\nuniform vec4 outlineColor;\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nvec2 px = vec2(1.0 / filterArea.x, 1.0 / filterArea.y);\n\nvoid main(void) {\n const float PI = 3.14159265358979323846264;\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\n vec4 curColor;\n float maxAlpha = 0.;\n vec2 displaced;\n for (float angle = 0.; angle < PI * 2.; angle += %THICKNESS% ) {\n displaced.x = vTextureCoord.x + thickness * px.x * cos(angle);\n displaced.y = vTextureCoord.y + thickness * px.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";

@@ -177,4 +177,4 @@ var OutlineFilter=function(e){function o(o,r){void 0===o&&(o=1),void 0===r&&(r=0),e.call(this,vertex$11,fragment$10.replace(/%THICKNESS%/gi,(1/o).toFixed(7))),this.thickness=o,this.uniforms.outlineColor=new Float32Array([0,0,0,1]),this.color=r;}e&&(o.__proto__=e),(o.prototype=Object.create(e&&e.prototype)).constructor=o;var r={color:{configurable:!0},thickness:{configurable:!0}};return r.color.get=function(){return PIXI.utils.rgb2hex(this.uniforms.outlineColor)},r.color.set=function(e){PIXI.utils.hex2rgb(e,this.uniforms.outlineColor);},r.thickness.get=function(){return this.uniforms.thickness},r.thickness.set=function(e){this.uniforms.thickness=e;},Object.defineProperties(o.prototype,r),o}(PIXI.Filter);PIXI.filters.OutlineFilter=OutlineFilter;

/*!
* @pixi/filter-multi-color-replace - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:29 UTC
* @pixi/filter-multi-color-replace - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:43 UTC
*

@@ -184,3 +184,3 @@ * pixi-filters is licensed under the MIT License.

*/
var vertex$12="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";
var vertex$12="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}";
var fragment$11="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";

@@ -190,4 +190,4 @@ var MultiColorReplaceFilter=function(o){function r(r,e,n){void 0===e&&(e=.05),void 0===n&&(n=null),n=n||r.length,o.call(this,vertex$12,fragment$11.replace(/%maxColors%/g,n)),this.epsilon=e,this._maxColors=n,this._replacements=null,this.uniforms.originalColors=new Float32Array(3*n),this.uniforms.targetColors=new Float32Array(3*n),this.replacements=r;}o&&(r.__proto__=o),(r.prototype=Object.create(o&&o.prototype)).constructor=r;var e={replacements:{configurable:!0},maxColors:{configurable:!0},epsilon:{configurable:!0}};return e.replacements.set=function(o){var r=this.uniforms.originalColors,e=this.uniforms.targetColors,n=o.length;if(n>this._maxColors){ throw"Length of replacements ("+n+") exceeds the maximum colors length ("+this._maxColors+")"; }r[3*n]=-1;for(var t=0;t<n;t++){var i=o[t],l=i[0];"number"==typeof l?l=PIXI.utils.hex2rgb(l):i[0]=PIXI.utils.rgb2hex(l),r[3*t]=l[0],r[3*t+1]=l[1],r[3*t+2]=l[2];var a=i[1];"number"==typeof a?a=PIXI.utils.hex2rgb(a):i[1]=PIXI.utils.rgb2hex(a),e[3*t]=a[0],e[3*t+1]=a[1],e[3*t+2]=a[2];}this._replacements=o;},e.replacements.get=function(){return this._replacements},r.prototype.refresh=function(){this.replacements=this._replacements;},e.maxColors.get=function(){return this._maxColors},e.epsilon.set=function(o){this.uniforms.epsilon=o;},e.epsilon.get=function(){return this.uniforms.epsilon},Object.defineProperties(r.prototype,e),r}(PIXI.Filter);PIXI.filters.MultiColorReplaceFilter=MultiColorReplaceFilter;

/*!
* @pixi/filter-pixelate - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:29 UTC
* @pixi/filter-pixelate - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:44 UTC
*

@@ -202,4 +202,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-rgb-split - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:29 UTC
* @pixi/filter-rgb-split - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:44 UTC
*

@@ -214,4 +214,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-shockwave - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:31 UTC
* @pixi/filter-shockwave - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:45 UTC
*

@@ -223,7 +223,7 @@ * pixi-filters is licensed under the MIT License.

var fragment$14="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 gl_FragColor = texture2D(uSampler, clampedCoord);\n if (coord != clampedCoord) {\n gl_FragColor *= max(0.0, 1.0 - length(coord - clampedCoord));\n }\n\n // No clamp :\n // gl_FragColor = texture2D(uSampler, vTextureCoord + offset);\n\n gl_FragColor.rgb *= 1.0 + (brightness - 1.0) * p * fade;\n}\n";
var ShockwaveFilter=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,vertex$15,fragment$14),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)).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){this.uniforms.time=this.time,e.applyFilter(this,t,n);},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}(PIXI.Filter);PIXI.filters.ShockwaveFilter=ShockwaveFilter;
var ShockwaveFilter=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,vertex$15,fragment$14),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)).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}(PIXI.Filter);PIXI.filters.ShockwaveFilter=ShockwaveFilter;
/*!
* @pixi/filter-simple-lightmap - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:31 UTC
* @pixi/filter-simple-lightmap - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:45 UTC
*

@@ -238,4 +238,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-tilt-shift - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:31 UTC
* @pixi/filter-tilt-shift - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:45 UTC
*

@@ -250,4 +250,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-twist - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:31 UTC
* @pixi/filter-twist - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:45 UTC
*

@@ -262,4 +262,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-zoom-blur - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:33 UTC
* @pixi/filter-zoom-blur - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:47 UTC
*

@@ -269,3 +269,3 @@ * pixi-filters is licensed under the MIT License.

*/
var vertex$19="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";
var vertex$19="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}";
var fragment$18="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\nfloat random(vec3 scale, float seed) {\n // use the fragment position for a different seed per-pixel\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + 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 = random(vec3(12.9898, 78.233, 151.7182), 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 gl_FragColor = color / total;\n\n // switch back from pre-multiplied alpha\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n\n}\n";

@@ -272,0 +272,0 @@ var ZoomBlurFilter=function(n){function t(t,e,r,i){void 0===t&&(t=.1),void 0===e&&(e=[0,0]),void 0===r&&(r=0),void 0===i&&(i=-1),n.call(this,vertex$19,fragment$18),this.center=e,this.strength=t,this.innerRadius=r,this.radius=i;}n&&(t.__proto__=n),(t.prototype=Object.create(n&&n.prototype)).constructor=t;var e={center:{configurable:!0},strength:{configurable:!0},innerRadius:{configurable:!0},radius:{configurable:!0}};return e.center.get=function(){return this.uniforms.uCenter},e.center.set=function(n){this.uniforms.uCenter=n;},e.strength.get=function(){return this.uniforms.uStrength},e.strength.set=function(n){this.uniforms.uStrength=n;},e.innerRadius.get=function(){return this.uniforms.uInnerRadius},e.innerRadius.set=function(n){this.uniforms.uInnerRadius=n;},e.radius.get=function(){return this.uniforms.uRadius},e.radius.set=function(n){(n<0||n===1/0)&&(n=-1),this.uniforms.uRadius=n;},Object.defineProperties(t.prototype,e),t}(PIXI.Filter);PIXI.filters.ZoomBlurFilter=ZoomBlurFilter;

/*!
* pixi-filters - v2.3.0
* Compiled Tue, 31 Oct 2017 18:03:00 UTC
* pixi-filters - v2.3.1
* Compiled Wed, 29 Nov 2017 16:45:13 UTC
*

@@ -18,4 +18,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-ascii - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:25 UTC
* @pixi/filter-ascii - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:39 UTC
*

@@ -30,4 +30,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-advanced-bloom - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:25 UTC
* @pixi/filter-advanced-bloom - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:39 UTC
*

@@ -45,4 +45,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-bloom - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:25 UTC
* @pixi/filter-bloom - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:39 UTC
*

@@ -59,4 +59,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-bulge-pinch - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:25 UTC
* @pixi/filter-bulge-pinch - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:39 UTC
*

@@ -66,9 +66,9 @@ * pixi-filters is licensed under the MIT License.

*/
var vertex$2="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}\n";
var vertex$2="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}";
var fragment$2="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 gl_FragColor = texture2D(uSampler, clampedCoord);\n if (coord != clampedCoord) {\n gl_FragColor *= max(0.0, 1.0 - length(coord - clampedCoord));\n }\n}\n";
var BulgePinchFilter=function(e){function r(r,n,t){e.call(this,vertex$2,fragment$2),this.center=r||[.5,.5],this.radius=n||100,this.strength=t||1;}e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r;var n={radius:{configurable:!0},strength:{configurable:!0},center:{configurable:!0}};return r.prototype.apply=function(e,r,n){this.uniforms.dimensions[0]=r.sourceFrame.width,this.uniforms.dimensions[1]=r.sourceFrame.height,e.applyFilter(this,r,n);},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(r.prototype,n),r}(PIXI.Filter);PIXI.filters.BulgePinchFilter=BulgePinchFilter;
var BulgePinchFilter=function(e){function r(r,n,t){e.call(this,vertex$2,fragment$2),this.center=r||[.5,.5],this.radius=n||100,this.strength=t||1;}e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r;var n={radius:{configurable:!0},strength:{configurable:!0},center:{configurable:!0}};return r.prototype.apply=function(e,r,n,t){this.uniforms.dimensions[0]=r.sourceFrame.width,this.uniforms.dimensions[1]=r.sourceFrame.height,e.applyFilter(this,r,n,t);},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(r.prototype,n),r}(PIXI.Filter);PIXI.filters.BulgePinchFilter=BulgePinchFilter;
/*!
* @pixi/filter-color-replace - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:26 UTC
* @pixi/filter-color-replace - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:41 UTC
*

@@ -78,3 +78,3 @@ * pixi-filters is licensed under the MIT License.

*/
var vertex$3="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}\n";
var vertex$3="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}";
var fragment$3="varying vec2 vTextureCoord;\nuniform sampler2D texture;\nuniform vec3 originalColor;\nuniform vec3 newColor;\nuniform float epsilon;\nvoid main(void) {\n vec4 currentColor = texture2D(texture, 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";

@@ -84,4 +84,4 @@ var ColorReplaceFilter=function(o){function r(r,e,n){void 0===r&&(r=16711680),void 0===e&&(e=0),void 0===n&&(n=.4),o.call(this,vertex$3,fragment$3),this.originalColor=r,this.newColor=e,this.epsilon=n;}o&&(r.__proto__=o),(r.prototype=Object.create(o&&o.prototype)).constructor=r;var e={originalColor:{configurable:!0},newColor:{configurable:!0},epsilon:{configurable:!0}};return e.originalColor.set=function(o){var r=this.uniforms.originalColor;"number"==typeof o?(PIXI.utils.hex2rgb(o,r),this._originalColor=o):(r[0]=o[0],r[1]=o[1],r[2]=o[2],this._originalColor=PIXI.utils.rgb2hex(r));},e.originalColor.get=function(){return this._originalColor},e.newColor.set=function(o){var r=this.uniforms.newColor;"number"==typeof o?(PIXI.utils.hex2rgb(o,r),this._newColor=o):(r[0]=o[0],r[1]=o[1],r[2]=o[2],this._newColor=PIXI.utils.rgb2hex(r));},e.newColor.get=function(){return this._newColor},e.epsilon.set=function(o){this.uniforms.epsilon=o;},e.epsilon.get=function(){return this.uniforms.epsilon},Object.defineProperties(r.prototype,e),r}(PIXI.Filter);PIXI.filters.ColorReplaceFilter=ColorReplaceFilter;

/*!
* @pixi/filter-convolution - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:26 UTC
* @pixi/filter-convolution - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:41 UTC
*

@@ -96,4 +96,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-cross-hatch - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:26 UTC
* @pixi/filter-cross-hatch - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:41 UTC
*

@@ -108,4 +108,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-dot - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:26 UTC
* @pixi/filter-dot - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:41 UTC
*

@@ -120,4 +120,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-drop-shadow - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:28 UTC
* @pixi/filter-drop-shadow - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:42 UTC
*

@@ -129,7 +129,7 @@ * pixi-filters is licensed under the MIT License.

var fragment$7="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float alpha;\nuniform vec3 color;\nvoid main(void){\n vec4 sample = texture2D(uSampler, vTextureCoord);\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}";
var DropShadowFilter=function(t){function r(r,e,i,n,o){void 0===r&&(r=45),void 0===e&&(e=5),void 0===i&&(i=2),void 0===n&&(n=0),void 0===o&&(o=.5),t.call(this),this.tintFilter=new PIXI.Filter(vertex$7,fragment$7),this.blurFilter=new PIXI.filters.BlurFilter,this.blurFilter.blur=i,this.rotation=r,this.padding=e,this.distance=e,this.alpha=o,this.color=n;}t&&(r.__proto__=t),(r.prototype=Object.create(t&&t.prototype)).constructor=r;var e={distance:{configurable:!0},rotation:{configurable:!0},blur:{configurable:!0},alpha:{configurable:!0},color:{configurable:!0}};return r.prototype.apply=function(r,e,i){var n=r.getRenderTarget();n.transform=new PIXI.Matrix,n.transform.translate(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle)),this.tintFilter.apply(r,e,n,!0),this.blurFilter.apply(r,n,i),t.prototype.apply.call(this,r,e,i),n.transform=null,r.returnRenderTarget(n);},r.prototype.updatePadding=function(){this.padding=this.distance+2*this.blur;},e.distance.get=function(){return this._distance},e.distance.set=function(t){this._distance=t,this.updatePadding();},e.rotation.get=function(){return this.angle/PIXI.DEG_TO_RAD},e.rotation.set=function(t){this.angle=t*PIXI.DEG_TO_RAD;},e.blur.get=function(){return this.blurFilter.blur},e.blur.set=function(t){this.blurFilter.blur=t,this.updatePadding();},e.alpha.get=function(){return this.tintFilter.uniforms.alpha},e.alpha.set=function(t){this.tintFilter.uniforms.alpha=t;},e.color.get=function(){return PIXI.utils.rgb2hex(this.tintFilter.uniforms.color)},e.color.set=function(t){PIXI.utils.hex2rgb(t,this.tintFilter.uniforms.color);},Object.defineProperties(r.prototype,e),r}(PIXI.Filter);PIXI.filters.DropShadowFilter=DropShadowFilter;
var DropShadowFilter=function(t){function r(r,e,i,n,a){void 0===r&&(r=45),void 0===e&&(e=5),void 0===i&&(i=2),void 0===n&&(n=0),void 0===a&&(a=.5),t.call(this),this.tintFilter=new PIXI.Filter(vertex$7,fragment$7),this.blurFilter=new PIXI.filters.BlurFilter,this.blurFilter.blur=i,this.targetTransform=new PIXI.Matrix,this.rotation=r,this.padding=e,this.distance=e,this.alpha=a,this.color=n;}t&&(r.__proto__=t),(r.prototype=Object.create(t&&t.prototype)).constructor=r;var e={distance:{configurable:!0},rotation:{configurable:!0},blur:{configurable:!0},alpha:{configurable:!0},color:{configurable:!0}};return r.prototype.apply=function(t,r,e,i){var n=t.getRenderTarget();n.transform=this.targetTransform,this.tintFilter.apply(t,r,n,!0),this.blurFilter.apply(t,n,e),t.applyFilter(this,r,e,i),n.transform=null,t.returnRenderTarget(n);},r.prototype._updatePadding=function(){this.padding=this.distance+2*this.blur;},r.prototype._updateTargetTransform=function(){this.targetTransform.tx=this.distance*Math.cos(this.angle),this.targetTransform.ty=this.distance*Math.sin(this.angle);},e.distance.get=function(){return this._distance},e.distance.set=function(t){this._distance=t,this._updatePadding(),this._updateTargetTransform();},e.rotation.get=function(){return this.angle/PIXI.DEG_TO_RAD},e.rotation.set=function(t){this.angle=t*PIXI.DEG_TO_RAD,this._updateTargetTransform();},e.blur.get=function(){return this.blurFilter.blur},e.blur.set=function(t){this.blurFilter.blur=t,this._updatePadding();},e.alpha.get=function(){return this.tintFilter.uniforms.alpha},e.alpha.set=function(t){this.tintFilter.uniforms.alpha=t;},e.color.get=function(){return PIXI.utils.rgb2hex(this.tintFilter.uniforms.color)},e.color.set=function(t){PIXI.utils.hex2rgb(t,this.tintFilter.uniforms.color);},Object.defineProperties(r.prototype,e),r}(PIXI.Filter);PIXI.filters.DropShadowFilter=DropShadowFilter;
/*!
* @pixi/filter-emboss - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:28 UTC
* @pixi/filter-emboss - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:42 UTC
*

@@ -144,4 +144,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-glow - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:28 UTC
* @pixi/filter-glow - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:42 UTC
*

@@ -151,3 +151,3 @@ * pixi-filters is licensed under the MIT License.

*/
var vertex$9="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}\n";
var vertex$9="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}";
var fragment$9="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;\nvec2 px = vec2(1.0 / filterArea.x, 1.0 / filterArea.y);\n\nvoid main(void) {\n const float PI = 3.14159265358979323846264;\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";

@@ -157,4 +157,4 @@ var GlowFilter=function(o){function n(n,t,r,e,l){void 0===n&&(n=10),void 0===t&&(t=4),void 0===r&&(r=0),void 0===e&&(e=16777215),void 0===l&&(l=.1),o.call(this,vertex$9,fragment$9.replace(/%QUALITY_DIST%/gi,""+(1/l/n).toFixed(7)).replace(/%DIST%/gi,""+n.toFixed(7))),this.uniforms.glowColor=new Float32Array([0,0,0,1]),this.distance=n,this.color=e,this.outerStrength=t,this.innerStrength=r;}o&&(n.__proto__=o),(n.prototype=Object.create(o&&o.prototype)).constructor=n;var t={color:{configurable:!0},distance:{configurable:!0},outerStrength:{configurable:!0},innerStrength:{configurable:!0}};return t.color.get=function(){return PIXI.utils.rgb2hex(this.uniforms.glowColor)},t.color.set=function(o){PIXI.utils.hex2rgb(o,this.uniforms.glowColor);},t.distance.get=function(){return this.uniforms.distance},t.distance.set=function(o){this.uniforms.distance=o;},t.outerStrength.get=function(){return this.uniforms.outerStrength},t.outerStrength.set=function(o){this.uniforms.outerStrength=o;},t.innerStrength.get=function(){return this.uniforms.innerStrength},t.innerStrength.set=function(o){this.uniforms.innerStrength=o;},Object.defineProperties(n.prototype,t),n}(PIXI.Filter);PIXI.filters.GlowFilter=GlowFilter;

/*!
* @pixi/filter-godray - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:28 UTC
* @pixi/filter-godray - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:42 UTC
*

@@ -170,4 +170,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-outline - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:29 UTC
* @pixi/filter-outline - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:44 UTC
*

@@ -177,3 +177,3 @@ * pixi-filters is licensed under the MIT License.

*/
var vertex$11="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}\n";
var vertex$11="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}";
var fragment$10="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float thickness;\nuniform vec4 outlineColor;\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nvec2 px = vec2(1.0 / filterArea.x, 1.0 / filterArea.y);\n\nvoid main(void) {\n const float PI = 3.14159265358979323846264;\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\n vec4 curColor;\n float maxAlpha = 0.;\n vec2 displaced;\n for (float angle = 0.; angle < PI * 2.; angle += %THICKNESS% ) {\n displaced.x = vTextureCoord.x + thickness * px.x * cos(angle);\n displaced.y = vTextureCoord.y + thickness * px.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";

@@ -183,4 +183,4 @@ var OutlineFilter=function(e){function o(o,r){void 0===o&&(o=1),void 0===r&&(r=0),e.call(this,vertex$11,fragment$10.replace(/%THICKNESS%/gi,(1/o).toFixed(7))),this.thickness=o,this.uniforms.outlineColor=new Float32Array([0,0,0,1]),this.color=r;}e&&(o.__proto__=e),(o.prototype=Object.create(e&&e.prototype)).constructor=o;var r={color:{configurable:!0},thickness:{configurable:!0}};return r.color.get=function(){return PIXI.utils.rgb2hex(this.uniforms.outlineColor)},r.color.set=function(e){PIXI.utils.hex2rgb(e,this.uniforms.outlineColor);},r.thickness.get=function(){return this.uniforms.thickness},r.thickness.set=function(e){this.uniforms.thickness=e;},Object.defineProperties(o.prototype,r),o}(PIXI.Filter);PIXI.filters.OutlineFilter=OutlineFilter;

/*!
* @pixi/filter-multi-color-replace - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:29 UTC
* @pixi/filter-multi-color-replace - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:43 UTC
*

@@ -190,3 +190,3 @@ * pixi-filters is licensed under the MIT License.

*/
var vertex$12="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";
var vertex$12="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}";
var fragment$11="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";

@@ -196,4 +196,4 @@ var MultiColorReplaceFilter=function(o){function r(r,e,n){void 0===e&&(e=.05),void 0===n&&(n=null),n=n||r.length,o.call(this,vertex$12,fragment$11.replace(/%maxColors%/g,n)),this.epsilon=e,this._maxColors=n,this._replacements=null,this.uniforms.originalColors=new Float32Array(3*n),this.uniforms.targetColors=new Float32Array(3*n),this.replacements=r;}o&&(r.__proto__=o),(r.prototype=Object.create(o&&o.prototype)).constructor=r;var e={replacements:{configurable:!0},maxColors:{configurable:!0},epsilon:{configurable:!0}};return e.replacements.set=function(o){var r=this.uniforms.originalColors,e=this.uniforms.targetColors,n=o.length;if(n>this._maxColors){ throw"Length of replacements ("+n+") exceeds the maximum colors length ("+this._maxColors+")"; }r[3*n]=-1;for(var t=0;t<n;t++){var i=o[t],l=i[0];"number"==typeof l?l=PIXI.utils.hex2rgb(l):i[0]=PIXI.utils.rgb2hex(l),r[3*t]=l[0],r[3*t+1]=l[1],r[3*t+2]=l[2];var a=i[1];"number"==typeof a?a=PIXI.utils.hex2rgb(a):i[1]=PIXI.utils.rgb2hex(a),e[3*t]=a[0],e[3*t+1]=a[1],e[3*t+2]=a[2];}this._replacements=o;},e.replacements.get=function(){return this._replacements},r.prototype.refresh=function(){this.replacements=this._replacements;},e.maxColors.get=function(){return this._maxColors},e.epsilon.set=function(o){this.uniforms.epsilon=o;},e.epsilon.get=function(){return this.uniforms.epsilon},Object.defineProperties(r.prototype,e),r}(PIXI.Filter);PIXI.filters.MultiColorReplaceFilter=MultiColorReplaceFilter;

/*!
* @pixi/filter-pixelate - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:29 UTC
* @pixi/filter-pixelate - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:44 UTC
*

@@ -208,4 +208,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-rgb-split - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:29 UTC
* @pixi/filter-rgb-split - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:44 UTC
*

@@ -220,4 +220,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-shockwave - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:31 UTC
* @pixi/filter-shockwave - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:45 UTC
*

@@ -229,7 +229,7 @@ * pixi-filters is licensed under the MIT License.

var fragment$14="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 gl_FragColor = texture2D(uSampler, clampedCoord);\n if (coord != clampedCoord) {\n gl_FragColor *= max(0.0, 1.0 - length(coord - clampedCoord));\n }\n\n // No clamp :\n // gl_FragColor = texture2D(uSampler, vTextureCoord + offset);\n\n gl_FragColor.rgb *= 1.0 + (brightness - 1.0) * p * fade;\n}\n";
var ShockwaveFilter=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,vertex$15,fragment$14),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)).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){this.uniforms.time=this.time,e.applyFilter(this,t,n);},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}(PIXI.Filter);PIXI.filters.ShockwaveFilter=ShockwaveFilter;
var ShockwaveFilter=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,vertex$15,fragment$14),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)).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}(PIXI.Filter);PIXI.filters.ShockwaveFilter=ShockwaveFilter;
/*!
* @pixi/filter-simple-lightmap - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:31 UTC
* @pixi/filter-simple-lightmap - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:45 UTC
*

@@ -244,4 +244,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-tilt-shift - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:31 UTC
* @pixi/filter-tilt-shift - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:45 UTC
*

@@ -256,4 +256,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-twist - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:31 UTC
* @pixi/filter-twist - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:45 UTC
*

@@ -268,4 +268,4 @@ * pixi-filters is licensed under the MIT License.

/*!
* @pixi/filter-zoom-blur - v2.2.0
* Compiled Tue, 31 Oct 2017 18:02:33 UTC
* @pixi/filter-zoom-blur - v2.3.0
* Compiled Wed, 29 Nov 2017 16:44:47 UTC
*

@@ -275,3 +275,3 @@ * pixi-filters is licensed under the MIT License.

*/
var vertex$19="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";
var vertex$19="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}";
var fragment$18="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\nfloat random(vec3 scale, float seed) {\n // use the fragment position for a different seed per-pixel\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + 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 = random(vec3(12.9898, 78.233, 151.7182), 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 gl_FragColor = color / total;\n\n // switch back from pre-multiplied alpha\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n\n}\n";

@@ -278,0 +278,0 @@ var ZoomBlurFilter=function(n){function t(t,e,r,i){void 0===t&&(t=.1),void 0===e&&(e=[0,0]),void 0===r&&(r=0),void 0===i&&(i=-1),n.call(this,vertex$19,fragment$18),this.center=e,this.strength=t,this.innerRadius=r,this.radius=i;}n&&(t.__proto__=n),(t.prototype=Object.create(n&&n.prototype)).constructor=t;var e={center:{configurable:!0},strength:{configurable:!0},innerRadius:{configurable:!0},radius:{configurable:!0}};return e.center.get=function(){return this.uniforms.uCenter},e.center.set=function(n){this.uniforms.uCenter=n;},e.strength.get=function(){return this.uniforms.uStrength},e.strength.set=function(n){this.uniforms.uStrength=n;},e.innerRadius.get=function(){return this.uniforms.uInnerRadius},e.innerRadius.set=function(n){this.uniforms.uInnerRadius=n;},e.radius.get=function(){return this.uniforms.uRadius},e.radius.set=function(n){(n<0||n===1/0)&&(n=-1),this.uniforms.uRadius=n;},Object.defineProperties(t.prototype,e),t}(PIXI.Filter);PIXI.filters.ZoomBlurFilter=ZoomBlurFilter;

{
"name": "pixi-filters",
"version": "2.3.0",
"version": "2.3.1",
"main": "lib/pixi-filters.js",

@@ -38,20 +38,20 @@ "description": "Optional display filters to work with PixiJS",

"@pixi/filter-bloom": "^2.3.0",
"@pixi/filter-bulge-pinch": "^2.3.0",
"@pixi/filter-color-replace": "^2.3.0",
"@pixi/filter-bulge-pinch": "^2.3.1",
"@pixi/filter-color-replace": "^2.3.1",
"@pixi/filter-convolution": "^2.3.0",
"@pixi/filter-cross-hatch": "^2.3.0",
"@pixi/filter-dot": "^2.3.0",
"@pixi/filter-drop-shadow": "^2.3.0",
"@pixi/filter-drop-shadow": "^2.3.1",
"@pixi/filter-emboss": "^2.3.0",
"@pixi/filter-glow": "^2.3.0",
"@pixi/filter-glow": "^2.3.1",
"@pixi/filter-godray": "^2.3.0",
"@pixi/filter-multi-color-replace": "^2.3.0",
"@pixi/filter-outline": "^2.3.0",
"@pixi/filter-multi-color-replace": "^2.3.1",
"@pixi/filter-outline": "^2.3.1",
"@pixi/filter-pixelate": "^2.3.0",
"@pixi/filter-rgb-split": "^2.3.0",
"@pixi/filter-shockwave": "^2.3.0",
"@pixi/filter-shockwave": "^2.3.1",
"@pixi/filter-simple-lightmap": "^2.3.0",
"@pixi/filter-tilt-shift": "^2.3.0",
"@pixi/filter-twist": "^2.3.0",
"@pixi/filter-zoom-blur": "^2.3.0",
"@pixi/filter-zoom-blur": "^2.3.1",
"@tools/build": "^2.3.0",

@@ -58,0 +58,0 @@ "rollup": "^0.45.2",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc