New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@pixi/filter-alpha

Package Overview
Dependencies
Maintainers
3
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pixi/filter-alpha - npm Package Compare versions

Comparing version 6.5.3 to 7.0.0-alpha

86

dist/cjs/filter-alpha.js
/*!
* @pixi/filter-alpha - v6.5.3
* Compiled Fri, 09 Sep 2022 13:55:20 UTC
* @pixi/filter-alpha - v7.0.0-alpha
* Compiled Fri, 09 Sep 2022 16:09:18 UTC
*

@@ -14,76 +14,18 @@ * @pixi/filter-alpha is licensed under the MIT License.

/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
var fragment = "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float uAlpha;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;\n}\n";
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) { if (b.hasOwnProperty(p)) { d[p] = b[p]; } } };
return extendStatics(d, b);
};
function __extends(d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
class AlphaFilter extends core.Filter {
constructor(alpha = 1) {
super(core.defaultVertex, fragment, { uAlpha: 1 });
this.alpha = alpha;
}
get alpha() {
return this.uniforms.uAlpha;
}
set alpha(value) {
this.uniforms.uAlpha = value;
}
}
var fragment = "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float uAlpha;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;\n}\n";
/**
* Simplest filter - applies alpha.
*
* Use this instead of Container's alpha property to avoid visual layering of individual elements.
* AlphaFilter applies alpha evenly across the entire display object and any opaque elements it contains.
* If elements are not opaque, they will blend with each other anyway.
*
* Very handy if you want to use common features of all filters:
*
* 1. Assign a blendMode to this filter, blend all elements inside display object with background.
*
* 2. To use clipping in display coordinates, assign a filterArea to the same container that has this filter.
* @memberof PIXI.filters
*/
var AlphaFilter = /** @class */ (function (_super) {
__extends(AlphaFilter, _super);
/**
* @param alpha - Amount of alpha from 0 to 1, where 0 is transparent
*/
function AlphaFilter(alpha) {
if (alpha === void 0) { alpha = 1.0; }
var _this = _super.call(this, core.defaultVertex, fragment, { uAlpha: 1 }) || this;
_this.alpha = alpha;
return _this;
}
Object.defineProperty(AlphaFilter.prototype, "alpha", {
/**
* Coefficient for alpha multiplication
* @default 1
*/
get: function () {
return this.uniforms.uAlpha;
},
set: function (value) {
this.uniforms.uAlpha = value;
},
enumerable: false,
configurable: true
});
return AlphaFilter;
}(core.Filter));
exports.AlphaFilter = AlphaFilter;
//# sourceMappingURL=filter-alpha.js.map

18

dist/cjs/filter-alpha.min.js

@@ -1,9 +0,17 @@

/*!
* @pixi/filter-alpha - v6.5.3
* Compiled Fri, 09 Sep 2022 13:55:20 UTC
"use strict";/*!
* @pixi/filter-alpha - v7.0.0-alpha
* Compiled Fri, 09 Sep 2022 16:09:18 UTC
*
* @pixi/filter-alpha is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("@pixi/core"),t=function(r,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var e in t)t.hasOwnProperty(e)&&(r[e]=t[e])},t(r,e)};var e=function(e){function o(t){void 0===t&&(t=1);var o=e.call(this,r.defaultVertex,"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float uAlpha;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;\n}\n",{uAlpha:1})||this;return o.alpha=t,o}return function(r,e){function o(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}(o,e),Object.defineProperty(o.prototype,"alpha",{get:function(){return this.uniforms.uAlpha},set:function(r){this.uniforms.uAlpha=r},enumerable:!1,configurable:!0}),o}(r.Filter);exports.AlphaFilter=e;
*/Object.defineProperty(exports,"__esModule",{value:!0});var r=require("@pixi/core"),a=`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform float uAlpha;
void main(void)
{
gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;
}
`;class t extends r.Filter{constructor(e=1){super(r.defaultVertex,a,{uAlpha:1}),this.alpha=e}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}}exports.AlphaFilter=t;
//# sourceMappingURL=filter-alpha.min.js.map
{
"name": "@pixi/filter-alpha",
"version": "6.5.3",
"version": "7.0.0-alpha",
"main": "dist/cjs/filter-alpha.js",
"module": "dist/esm/filter-alpha.mjs",
"bundle": "dist/browser/filter-alpha.js",
"types": "index.d.ts",

@@ -20,3 +19,2 @@ "exports": {

},
"namespace": "PIXI.filters",
"description": "Filter that applies alpha evenly across the entire display object and any opaque elements it contains",

@@ -38,10 +36,9 @@ "author": "Mat Groves",

"files": [
"lib",
"dist",
"*.d.ts"
],
"peerDependencies": {
"@pixi/core": "6.5.3"
},
"gitHead": "28e6b2841a65837a5e2873a3d5a9c27cabbe795a"
"pixiRequirements": [
"@pixi/core"
],
"gitHead": "da993226df64b804a9c00ed9ee4d011191467b8a"
}

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

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