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

@pixi/filter-drop-shadow

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pixi/filter-drop-shadow - npm Package Compare versions

Comparing version 4.1.0 to 4.1.2

20

dist/filter-drop-shadow.cjs.js
/*!
* @pixi/filter-drop-shadow - v4.1.0
* Compiled Mon, 03 May 2021 02:14:46 UTC
* @pixi/filter-drop-shadow - v4.1.2
* Compiled Thu, 03 Jun 2021 17:02:55 UTC
*

@@ -47,2 +47,15 @@ * @pixi/filter-drop-shadow is licensed under the MIT License.

var __assign = function() {
__assign = Object.assign || function __assign(t) {
var arguments$1 = arguments;
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments$1[i];
for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) { t[p] = s[p]; } }
}
return t;
};
return __assign.apply(this, arguments);
};
var 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}";

@@ -82,3 +95,4 @@

_this._resolution = settings.settings.FILTER_RESOLUTION;
var opt = Object.assign(DropShadowFilter.defaults, options);
var opt = options
? __assign(__assign({}, DropShadowFilter.defaults), options) : DropShadowFilter.defaults;
var kernels = opt.kernels, blur = opt.blur, quality = opt.quality, pixelSize = opt.pixelSize, resolution = opt.resolution;

@@ -85,0 +99,0 @@ _this._tintFilter = new core.Filter(vertex, fragment);

/*!
* @pixi/filter-drop-shadow - v4.1.0
* Compiled Mon, 03 May 2021 02:14:46 UTC
* @pixi/filter-drop-shadow - v4.1.2
* Compiled Thu, 03 Jun 2021 17:02:55 UTC
*

@@ -43,2 +43,15 @@ * @pixi/filter-drop-shadow is licensed under the MIT License.

var __assign = function() {
__assign = Object.assign || function __assign(t) {
var arguments$1 = arguments;
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments$1[i];
for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) { t[p] = s[p]; } }
}
return t;
};
return __assign.apply(this, arguments);
};
var 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}";

@@ -78,3 +91,4 @@

_this._resolution = settings.FILTER_RESOLUTION;
var opt = Object.assign(DropShadowFilter.defaults, options);
var opt = options
? __assign(__assign({}, DropShadowFilter.defaults), options) : DropShadowFilter.defaults;
var kernels = opt.kernels, blur = opt.blur, quality = opt.quality, pixelSize = opt.pixelSize, resolution = opt.resolution;

@@ -81,0 +95,0 @@ _this._tintFilter = new Filter(vertex, fragment);

6

dist/filter-drop-shadow.js
/*!
* @pixi/filter-drop-shadow - v4.1.0
* Compiled Mon, 03 May 2021 02:14:46 UTC
* @pixi/filter-drop-shadow - v4.1.2
* Compiled Thu, 03 Jun 2021 17:02:55 UTC
*

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

*/
var __filters=function(t,e,r,i,n,o){"use strict";var l=function(t,e){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};Object.create;Object.create;var u=function(t){function u(o){var l=t.call(this)||this;l.angle=45,l._distance=5,l._resolution=i.settings.FILTER_RESOLUTION;var a=Object.assign(u.defaults,o),s=a.kernels,c=a.blur,p=a.quality,f=a.pixelSize,h=a.resolution;l._tintFilter=new r.Filter("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}","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}"),l._tintFilter.uniforms.color=new Float32Array(4),l._tintFilter.uniforms.shift=new n.Point,l._tintFilter.resolution=h,l._blurFilter=s?new e.KawaseBlurFilter(s):new e.KawaseBlurFilter(c,p),l.pixelSize=f,l.resolution=h;var b=a.shadowOnly,_=a.rotation,d=a.distance,y=a.alpha,g=a.color;return l.shadowOnly=b,l.rotation=_,l.distance=d,l.alpha=y,l.color=g,l._updatePadding(),l}return function(t,e){function r(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(u,t),u.prototype.apply=function(t,e,r,i){var n=t.getFilterTexture();this._tintFilter.apply(t,e,n,1),this._blurFilter.apply(t,n,r,i),!0!==this.shadowOnly&&t.applyFilter(this,e,r,0),t.returnFilterTexture(n)},u.prototype._updatePadding=function(){this.padding=this.distance+2*this.blur},u.prototype._updateShift=function(){this._tintFilter.uniforms.shift.set(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle))},Object.defineProperty(u.prototype,"resolution",{get:function(){return this._resolution},set:function(t){this._resolution=t,this._tintFilter&&(this._tintFilter.resolution=t),this._blurFilter&&(this._blurFilter.resolution=t)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"distance",{get:function(){return this._distance},set:function(t){this._distance=t,this._updatePadding(),this._updateShift()},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"rotation",{get:function(){return this.angle/n.DEG_TO_RAD},set:function(t){this.angle=t*n.DEG_TO_RAD,this._updateShift()},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"alpha",{get:function(){return this._tintFilter.uniforms.alpha},set:function(t){this._tintFilter.uniforms.alpha=t},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"color",{get:function(){return o.rgb2hex(this._tintFilter.uniforms.color)},set:function(t){o.hex2rgb(t,this._tintFilter.uniforms.color)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"kernels",{get:function(){return this._blurFilter.kernels},set:function(t){this._blurFilter.kernels=t},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"blur",{get:function(){return this._blurFilter.blur},set:function(t){this._blurFilter.blur=t,this._updatePadding()},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"quality",{get:function(){return this._blurFilter.quality},set:function(t){this._blurFilter.quality=t},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"pixelSize",{get:function(){return this._blurFilter.pixelSize},set:function(t){this._blurFilter.pixelSize=t},enumerable:!1,configurable:!0}),u.defaults={rotation:45,distance:5,color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:i.settings.FILTER_RESOLUTION},u}(r.Filter);return t.DropShadowFilter=u,Object.defineProperty(t,"__esModule",{value:!0}),t}({},PIXI.filters,PIXI,PIXI,PIXI,PIXI.utils);Object.assign(PIXI.filters,__filters);
var __filters=function(t,e,r,i,n,o){"use strict";var l=function(t,e){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};var u=function(){return(u=Object.assign||function(t){for(var e,r=arguments,i=1,n=arguments.length;i<n;i++)for(var o in e=r[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.create;Object.create;var a=function(t){function a(o){var l=t.call(this)||this;l.angle=45,l._distance=5,l._resolution=i.settings.FILTER_RESOLUTION;var s=o?u(u({},a.defaults),o):a.defaults,c=s.kernels,p=s.blur,f=s.quality,h=s.pixelSize,b=s.resolution;l._tintFilter=new r.Filter("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}","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}"),l._tintFilter.uniforms.color=new Float32Array(4),l._tintFilter.uniforms.shift=new n.Point,l._tintFilter.resolution=b,l._blurFilter=c?new e.KawaseBlurFilter(c):new e.KawaseBlurFilter(p,f),l.pixelSize=h,l.resolution=b;var _=s.shadowOnly,d=s.rotation,y=s.distance,g=s.alpha,F=s.color;return l.shadowOnly=_,l.rotation=d,l.distance=y,l.alpha=g,l.color=F,l._updatePadding(),l}return function(t,e){function r(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(a,t),a.prototype.apply=function(t,e,r,i){var n=t.getFilterTexture();this._tintFilter.apply(t,e,n,1),this._blurFilter.apply(t,n,r,i),!0!==this.shadowOnly&&t.applyFilter(this,e,r,0),t.returnFilterTexture(n)},a.prototype._updatePadding=function(){this.padding=this.distance+2*this.blur},a.prototype._updateShift=function(){this._tintFilter.uniforms.shift.set(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle))},Object.defineProperty(a.prototype,"resolution",{get:function(){return this._resolution},set:function(t){this._resolution=t,this._tintFilter&&(this._tintFilter.resolution=t),this._blurFilter&&(this._blurFilter.resolution=t)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"distance",{get:function(){return this._distance},set:function(t){this._distance=t,this._updatePadding(),this._updateShift()},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"rotation",{get:function(){return this.angle/n.DEG_TO_RAD},set:function(t){this.angle=t*n.DEG_TO_RAD,this._updateShift()},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"alpha",{get:function(){return this._tintFilter.uniforms.alpha},set:function(t){this._tintFilter.uniforms.alpha=t},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"color",{get:function(){return o.rgb2hex(this._tintFilter.uniforms.color)},set:function(t){o.hex2rgb(t,this._tintFilter.uniforms.color)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"kernels",{get:function(){return this._blurFilter.kernels},set:function(t){this._blurFilter.kernels=t},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"blur",{get:function(){return this._blurFilter.blur},set:function(t){this._blurFilter.blur=t,this._updatePadding()},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"quality",{get:function(){return this._blurFilter.quality},set:function(t){this._blurFilter.quality=t},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"pixelSize",{get:function(){return this._blurFilter.pixelSize},set:function(t){this._blurFilter.pixelSize=t},enumerable:!1,configurable:!0}),a.defaults={rotation:45,distance:5,color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:i.settings.FILTER_RESOLUTION},a}(r.Filter);return t.DropShadowFilter=a,Object.defineProperty(t,"__esModule",{value:!0}),t}({},PIXI.filters,PIXI,PIXI,PIXI,PIXI.utils);Object.assign(PIXI.filters,__filters);
//# sourceMappingURL=filter-drop-shadow.js.map
{
"name": "@pixi/filter-drop-shadow",
"version": "4.1.0",
"version": "4.1.2",
"main": "dist/filter-drop-shadow.cjs.js",

@@ -48,3 +48,3 @@ "bundle": "dist/filter-drop-shadow.js",

},
"gitHead": "9c6a8161b7e5f669ca6726794d1fa3feb9dc44cf"
"gitHead": "946b9fcb8719e0235bdf4a2505fbee11752d4b0d"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is 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