@pixi/filter-advanced-bloom
Advanced tools
Comparing version 3.2.0 to 4.0.0
/*! | ||
* @pixi/filter-advanced-bloom - v3.2.0 | ||
* Compiled Wed, 23 Dec 2020 00:29:02 UTC | ||
* @pixi/filter-advanced-bloom - v4.0.0 | ||
* Compiled Wed, 03 Mar 2021 00:14:06 UTC | ||
* | ||
@@ -8,3 +8,3 @@ * @pixi/filter-advanced-bloom is licensed under the MIT License. | ||
*/ | ||
var __filters=function(t,e,r,o){"use strict";var i="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}",l="\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=function(t){function e(e){void 0===e&&(e=.5),t.call(this,i,l),this.threshold=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={threshold:{configurable:!0}};return r.threshold.get=function(){return this.uniforms.threshold},r.threshold.set=function(t){this.uniforms.threshold=t},Object.defineProperties(e.prototype,r),e}(e.Filter),s="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",u=function(t){function e(e){t.call(this,i,s),"number"==typeof e&&(e={threshold:e}),e=Object.assign({threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:o.settings.FILTER_RESOLUTION},e),this.bloomScale=e.bloomScale,this.brightness=e.brightness;var l=e.kernels,u=e.blur,a=e.quality,c=e.pixelSize,h=e.resolution;this._extractFilter=new n(e.threshold),this._extractFilter.resolution=h,this._blurFilter=l?new r.KawaseBlurFilter(l):new r.KawaseBlurFilter(u,a),this.pixelSize=c,this.resolution=h}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var l={resolution:{configurable:!0},threshold:{configurable:!0},kernels:{configurable:!0},blur:{configurable:!0},quality:{configurable:!0},pixelSize:{configurable:!0}};return e.prototype.apply=function(t,e,r,o,i){var l=t.getFilterTexture();this._extractFilter.apply(t,e,l,1,i);var n=t.getFilterTexture();this._blurFilter.apply(t,l,n,1,i),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=n,t.applyFilter(this,e,r,o),t.returnFilterTexture(n),t.returnFilterTexture(l)},l.resolution.get=function(){return this._resolution},l.resolution.set=function(t){this._resolution=t,this._extractFilter&&(this._extractFilter.resolution=t),this._blurFilter&&(this._blurFilter.resolution=t)},l.threshold.get=function(){return this._extractFilter.threshold},l.threshold.set=function(t){this._extractFilter.threshold=t},l.kernels.get=function(){return this._blurFilter.kernels},l.kernels.set=function(t){this._blurFilter.kernels=t},l.blur.get=function(){return this._blurFilter.blur},l.blur.set=function(t){this._blurFilter.blur=t},l.quality.get=function(){return this._blurFilter.quality},l.quality.set=function(t){this._blurFilter.quality=t},l.pixelSize.get=function(){return this._blurFilter.pixelSize},l.pixelSize.set=function(t){this._blurFilter.pixelSize=t},Object.defineProperties(e.prototype,l),e}(e.Filter);return t.AdvancedBloomFilter=u,t}({},PIXI,PIXI.filters,PIXI);Object.assign(PIXI.filters,__filters); | ||
var __filters=function(e,t,r,o){"use strict";var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function i(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}Object.create;Object.create;var l="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=function(e){function t(t){void 0===t&&(t=.5);var r=e.call(this,l,"\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")||this;return r.threshold=t,r}return i(t,e),Object.defineProperty(t.prototype,"threshold",{get:function(){return this.uniforms.threshold},set:function(e){this.uniforms.threshold=e},enumerable:!1,configurable:!0}),t}(t.Filter),s=function(e){function t(n){var i=e.call(this,l,"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")||this;i.bloomScale=1,i.brightness=1,i._resolution=o.settings.FILTER_RESOLUTION,"number"==typeof n&&(n={threshold:n});var s=Object.assign(t.defaults,n);i.bloomScale=s.bloomScale,i.brightness=s.brightness;var a=s.kernels,c=s.blur,b=s.quality,f=s.pixelSize,h=s.resolution;return i._extractFilter=new u(s.threshold),i._extractFilter.resolution=h,i._blurFilter=a?new r.KawaseBlurFilter(a):new r.KawaseBlurFilter(c,b),i.pixelSize=f,i.resolution=h,i}return i(t,e),t.prototype.apply=function(e,t,r,o,n){var i=e.getFilterTexture();this._extractFilter.apply(e,t,i,1,n);var l=e.getFilterTexture();this._blurFilter.apply(e,i,l,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=l,e.applyFilter(this,t,r,o),e.returnFilterTexture(l),e.returnFilterTexture(i)},Object.defineProperty(t.prototype,"resolution",{get:function(){return this._resolution},set:function(e){this._resolution=e,this._extractFilter&&(this._extractFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"threshold",{get:function(){return this._extractFilter.threshold},set:function(e){this._extractFilter.threshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"kernels",{get:function(){return this._blurFilter.kernels},set:function(e){this._blurFilter.kernels=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blur",{get:function(){return this._blurFilter.blur},set:function(e){this._blurFilter.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"quality",{get:function(){return this._blurFilter.quality},set:function(e){this._blurFilter.quality=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pixelSize",{get:function(){return this._blurFilter.pixelSize},set:function(e){this._blurFilter.pixelSize=e},enumerable:!1,configurable:!0}),t.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:o.settings.FILTER_RESOLUTION},t}(t.Filter);return e.AdvancedBloomFilter=s,Object.defineProperty(e,"__esModule",{value:!0}),e}({},PIXI,PIXI.filters,PIXI);Object.assign(PIXI.filters,__filters); | ||
//# sourceMappingURL=filter-advanced-bloom.js.map |
{ | ||
"name": "@pixi/filter-advanced-bloom", | ||
"version": "3.2.0", | ||
"main": "lib/filter-advanced-bloom.cjs.js", | ||
"version": "4.0.0", | ||
"main": "dist/filter-advanced-bloom.cjs.js", | ||
"bundle": "dist/filter-advanced-bloom.js", | ||
@@ -11,4 +11,4 @@ "description": "PixiJS filter to render Bloom Filter (with highlight) effect", | ||
], | ||
"module": "lib/filter-advanced-bloom.esm.js", | ||
"types": "types.d.ts", | ||
"module": "dist/filter-advanced-bloom.esm.js", | ||
"types": "index.d.ts", | ||
"homepage": "http://pixijs.com/", | ||
@@ -25,5 +25,4 @@ "bugs": "https://github.com/pixijs/pixi-filters/issues", | ||
"files": [ | ||
"lib", | ||
"dist", | ||
"types.d.ts" | ||
"index.d.ts" | ||
], | ||
@@ -34,12 +33,16 @@ "globals": { | ||
"dependencies": { | ||
"@pixi/filter-kawase-blur": "3.2.0" | ||
"@pixi/filter-kawase-blur": "4.0.0" | ||
}, | ||
"peerDependencies": { | ||
"@pixi/core": "^5.0.0", | ||
"@pixi/settings": "^5.0.0" | ||
"@pixi/constants": "^6.0.0", | ||
"@pixi/core": "^6.0.0", | ||
"@pixi/settings": "^6.0.0" | ||
}, | ||
"devDependencies": { | ||
"@tools/fragments": "^3.0.3" | ||
"@pixi/constants": "^6.0.0", | ||
"@pixi/core": "^6.0.0", | ||
"@pixi/settings": "^6.0.0", | ||
"@tools/fragments": "4.0.0" | ||
}, | ||
"gitHead": "40907de46bbebb4ea190822f03c33b3aec9547ac" | ||
"gitHead": "87aeb2c547d853ec3ffa0754bbff0d89a1c4d0cf" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
102909
644
4
4
1
+ Added@pixi/constants@6.5.10(transitive)
+ Added@pixi/core@6.5.10(transitive)
+ Added@pixi/extensions@6.5.10(transitive)
+ Added@pixi/filter-kawase-blur@4.0.0(transitive)
+ Added@pixi/math@6.5.10(transitive)
+ Added@pixi/runner@6.5.10(transitive)
+ Added@pixi/settings@6.5.10(transitive)
+ Added@pixi/ticker@6.5.10(transitive)
+ Added@pixi/utils@6.5.10(transitive)
+ Added@types/earcut@2.1.4(transitive)
+ Added@types/offscreencanvas@2019.7.3(transitive)
- Removed@pixi/constants@5.3.12(transitive)
- Removed@pixi/core@5.3.12(transitive)
- Removed@pixi/filter-kawase-blur@3.2.0(transitive)
- Removed@pixi/math@5.3.12(transitive)
- Removed@pixi/runner@5.3.12(transitive)
- Removed@pixi/settings@5.3.12(transitive)
- Removed@pixi/ticker@5.3.12(transitive)
- Removed@pixi/utils@5.3.12(transitive)
- Removedismobilejs@1.1.1(transitive)